- Ruby 90%
- CoffeeScript 5%
- Sass 4%
- JavaScript <1%
- HTML <1%
splits i/o #
splits i/o is a website similar to Pastebin or GitHub Gist, but for splits generated from speedruns rather than text or code. It's written in Ruby on Rails.
splits i/o currently supports splits from Urn, LiveSplit, SplitterZ, Time Split Tracker, and WSplit.
Running locally #
Requirements #
- Ruby 2.3.4
- PostgreSQL
First run #
cp config/application.example.yml config/application.yml
$EDITOR config/application.yml # give it a once-over (required if you want local sign in)
bundle install
rake db:create db:migrate
rails server
Splits I/O runs using some AWS resources, which means to run it locally you'll have to use local versions of these
resources (or have AWS account credentials specified in config/application.yml).
S3 #
Splits I/O uses AWS S3 for long-term run file storage. S3 is the source of truth for run files, allowing us to reparse runs whenever as if the run was just uploaded for the first time. To shim S3 on your local machine, run a fakes3 server in another terminal window.
fakes3 -r /tmp -p 4567
DynamoDB #
Splits I/O uses AWS DynamoDB for storing parsed runs, so that we don't have to reparse huge 10MB runs to get the splits out of it every time we want to display them. Everything in DynamoDB can theoretically be recreated from what's stored in S3.
To shim DynamoDB on your local machine, run Amazon's official DynamoDB local. If you're on macOS, you can install this with just
brew tap glacials/splits-io
brew install dynamodb-local
then have it auto-run now and at boot with
brew services start dynamodb-local
In your browser #
You're good to go! Access localhost:3000 in your browser.
Troubleshooting (macOS) #
If you get Bundler errors about eventmachine, try
brew install openssl
brew link openssl --force
If that doesn't work, you may need to also run
gem install eventmachine -- --with-cppflags=-I/usr/local/opt/openssl/include
If you get Bundler errors about nokogiri, run
xcode-select --install
API #
See the full API documentation in the API readme file.
Parsing #
If you're interested in how we parse run files from different programs, check out the parsing readme.
Tests #
To start running tests, you'll need to set up a test database:
RAILS_ENV=test rake db:create db:migrate