No packages found.
source code to pinballmap.com
Pinball Map
Nothing special found.
The [GPL v3](LICENSE) license applies to the code in this repository.
The data is not included in this repository. Rather, it is accessed via the public API. This data is under a [CC BY-SA](LICENSE-CC-BY-SA) license (and not GPL v3). Amongst other things, this license requires attribution when using the data.
sweet pinballin' brah
This repo is the codebase for pinballmap.com. The code for the Pinball Map mobile app is here. If you have an app issue, please use that repo.
Available here: http://pinballmap.com/api/v1/docs
Below is a summary of the steps that Brian Hanifin undertook to get the site up and running on OS X 10.9. If you would like to contribute, and have any trouble, please ask.
cd /Projects-Path/
git clone https://github.com/pinballmap/pbm.git
(I used the SourceTree app instead.)cd /Projects-Path/pbm
rvm --default use ruby-3.0.5
bundle install
selenium install
brew update
cp config/database.yml.example config/database.yml
to create your database.yml for development
brew install postgresql
initdb /usr/local/var/postgres -E utf8
Download Postgres App. (I have mine run at startup on my "Dev" profile.)
CREATEDB pbm_dev
bundle exec rake db:create ; RAILS_ENV=test bundle exec rake db:create
bundle exec rake db:migrate ; RAILS_ENV=test bundle exec rake db:migrate
rake doc:app
(I think this generates documentation for the app, which sounds helpful for later.)
curl get.pow.cx | sh
cd ~/.pow
ln -s /Projects-Path/pbm
open http://pbm.dev
Start server: bundle exec rails s
Run tests: bundle exec rake
If the site loads properly it will be an empty version of pinballmap.com, then ask Scott for a data dump so you can have a full set of data to work with.
clone https://github.com/{you}/pbm.git
git remote add upstream git://github.com/pinballmap/pbm.git
Install postgresql.
Setup postgres:
or read:
curl -L https://get.rvm.io | bash -s stable --ruby
rvm install ruby-3.0.5
rvm --default use ruby-3.0.5
gem install bundler
bundle install
cp config/database.yml.example config/database.yml
to create your database.yml for developmentbundle exec rake db:create ; RAILS_ENV=test bundle exec rake db:create
bundle exec rake db:migrate ; RAILS_ENV=test bundle exec rake db:migrate
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d pbm_dev dump.file
Start server: bundle exec rails s
Run tests: bundle exec rake
docker-compose up -d
to start containerslocalhost:$PORT
(either specified, or defaults to 3000
)docker-compose down
docker-compose down -v
to destroy the volume. The next time you bring up this docker-compose file, db:create
and db:migrate
will re-populate the database.If you just want to run postgres in a container and use your local filesystem for running Rails, you can use the postgres only compose file.
* Run docker-compose -f docker-compose.postgres.yml up -d
* If first time running, run bundle exec rake db:create db:migrate
to populate the postgres container.
* Bring down containers with docker-compose -f docker-compose.postgres.yml down
* By default, the database will keep its state as a docker volume. If you want to start fresh, run docker-compose -f docker-compose.postgres.yml down -v
to destroy the volume.