Git Product home page Git Product logo

ggtracker's Introduction

Introduction

This 'ggtracker' repository is the web server for ggtracker, plus the HTML/CSS/Javascript that makes the pretty pages pretty.

It does not do replay parsing, and delegates queries about players and matches to the ESDB API.

The other repos involved in ggtracker are:

Requirements

On Mac OSX, you can use homebrew as package manager: http://mxcl.github.com/homebrew/

Basic installation and updating

  • Run Bundler (bundle)
  • Copy and adjust database configuration (cp config/database.yml.example config/database.yml)
  • Copy secrets configuration (cp config/secrets.yml.example config/secrets.yml)
  • Copy s3 configuration (cp config/s3.yml.example config/s3.yml)
  • Create the database ggtracker needs (mysql -u root and then create database ggtracker_development; and then quit)
  • Run migrations (bundle exec rake db:migrate)

If you want to be able to upload replays, you'll need to have an Amazon S3 account. After setting that up, edit your config/s3.yml file accordingly.

Starting

foreman start web

And then go to http://localhost:3000/ in your browser.

Note: the first time you request a page, it will be slow while it compiles CSS, JS etc.

It'll work, but there will be no matches, no players. To make it more interesting, you can simply point your ggtracker at the production ESDB server like so:

ESDB_HOST=api.ggtracker.com ESDB_MATCHBLOBS_BUCKET=gg2-matchblobs-prod foreman start web

And then go to http://localhost:3000/matches in your browser. If you see recent matches, it's working!

If you are working on changes that involve replay processing as well, you can run your own local instance of ESDB; in the default development configuration, the ggtracker server and ESDB server will find each other correctly.

Testing

Ruby (rspec)

The first time you run tests, set up the test database with:

  • mysql -u root ** create database ggtracker_test; ** quit
  • rake db:test:prepare

To run tests: bundle exec rspec

Test Coverage (ruby, simplecov)

After running rspec, open coverage/index.html in a browser.

Javascript (via Testacular, with Jasmine)

NOTE: The following is obsolete as of 20140815. If & when more than one person is actively developing GGTracker Javascript code, I'll revive it.

Install testacular: npm install -g testacular

Note: Depending on your system configuration, the executable might not be in your PATH by default.

Start testacular: /usr/local/share/npm/bin/testacular start

This will launch a chrome window (you need chrome installed, of course) and automatically monitor specs for changes.

Run all tests: /usr/local/share/npm/bin/testacular run

I don't understand XXXX

Just ask, I'll add questions and answers to a FAQ here.

ggtracker's People

Contributors

dsjoerg avatar toff63 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.