Coder Social home page Coder Social logo

laszlo-jflmtco / opensplittime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from splittime/opensplittime

0.0 2.0 0.0 14.67 MB

Timed event data

License: MIT License

Ruby 69.66% JavaScript 14.67% CoffeeScript 0.04% CSS 1.64% HTML 13.97% SQLPL 0.03%

opensplittime's Introduction

OpenSplitTime

OpenSplitTime is a site for endurance athletes, fans and families, race directors, volunteers, support crews, and data geeks. Our purpose is simple: to make it easy to collect endurance event data, play with it, plan with it, safely archive it, and never worry about it again.

The site is built and maintained by OpenSplitTime Company, a Colorado nonprofit corporation. If you find the website useful, motivating, entertaining, or strangely beautiful, please consider making a small donation to help us keep the doors open. OpenSplitTime Company is registered with the U.S. Internal Revenue Service as a 501(c)(3) charitable organization. Your donations are probably tax deductible (but if you have any question you should ask your tax advisor about that stuff).

Our software engine is open source. If you have a suggestion for the site, or you are a software engineer and would like to help with development, or if you are a race director or data geek and would like to be a beta tester, please contact us and let's talk.

OpenSplitTime is developed and maintained by endurance athletes for endurance athletes.

Performance

Performance analysis and monitoring is provided by Skylight. Thanks to the folks at Tilde for supporting open source!

View performance data on Skylight

Ruby on Rails

This application requires:

  • Ruby 2.5.0
  • Rails 5.1.5

Learn more about Installing Rails.

Getting Started

Setup Local Environment

Ruby

  1. Install Homebrew http://brew.sh/
  2. Clone the repository to your local machine by forking the repo
  3. $ brew update
  4. $ brew install rbenv
  5. $ cd into your local OpenSplitTime directory
  6. $ rbenv init For any questions around setting up rbenv see https://github.com/rbenv/rbenv
  7. $ rbenv install 2.5.0
  8. $ rbenv local 2.5.0 (to make sure this is correct, run $ rbenv verision)
  9. $ rbenv rehash then restart the terminal session

Rails and Gems

  1. $ gem install bundler You should not need to sudo this if it says "permission denied" rbenv is not setup correctly
  2. $ gem install rails
  3. $ brew install postgres
  4. $ bundle install

if running into weird errors first try $ rbenv rehash and restart your terminal

Database

  1. Start your local DB $ brew services restart postgres
  2. $ rake db:setup to get local data
  3. $ rails s to start the server
  4. Type localhost:3000 in a browser
  5. You can also locally import a sample race by downloading Hardrock CCW Splits and Hardrock 2015 Efforts

Test Users

| Role  | Email              | Password |
| ----- | ------------------ | -------- |
| user  | [email protected] | password |
| admin | [email protected]   | password |

Postgres Search

OpenSplitTime relies on metaphone searching using a Postgres add-on function. The function is available in the migrations, but because of fundamental changes in database structure, it is no longer possible to run all migrations using the existing codebase, so your dev and test databases will need to be set up using a db:schema:load strategy, like rails db:setup. After setting up your dev and test databases, you will need to run the following SQL query directly against the database:

CREATE OR REPLACE FUNCTION pg_search_dmetaphone(text) RETURNS text LANGUAGE SQL IMMUTABLE STRICT AS $function$
  SELECT array_to_string(ARRAY(SELECT dmetaphone(unnest(regexp_split_to_array($1, E'\\s+')))), ' ')
$function$;

This is a one-time operation for each database.

AWS

OpenSplitTime relies on Amazon Web Services for file import and storage and for SNS (email and text) communications. To take full advantage of these, you will need AWS credentials loaded into your .env file, specifically:

AWS_ACCESS_KEY_ID=your_access_key_id
AWS_SECRET_ACCESS_KEY=your_secret_access_key
AWS_REGION=your_aws_region
S3_BUCKET=your_aws_bucket

Use your own credentials or contact us if you would like to use the dev group's credentials.

Pusher

OpenSplitTime uses Pusher for messaging with workers and to notify Live Entry operators of times that need attention. Specifically, you will need to add the following to your .env file:

PUSHER_APP_ID=xxx
PUSHER_KEY=xxx
PUSHER_SECRET_KEY=xxx

Contact us for the dev team's Pusher credentials.

Sidekiq and Redis

OpenSplitTime relies on Sidekiq for background jobs, and Sidekiq needs Redis. Install Redis using the simple instructions you'll find at redis.io. Run your Sidekiq server from the command line:

$ sidekiq

You'll know you did it right when you see the awesome ASCII art.

ChromeDriver

Some integration tests rely on Google ChromeDriver. You can install it in Mac OS X with brew install chromedriver or your preferred package manager for Linux or Windows.

Support

Still having issues setting up your local environment? Create an issue with label support and we will try and help as best we can!

Contributing

We love Issues but we love Pull Requests more! If you want to change something or add something feel free to do so. If you don't have enough time or skills start an issue. Below are some loose guidlines for contributing.

Pull Requests

Writing code for something is the fastest way to get feedback. It doesn't matter if the code is a work in progress or just a spike of an idea we'd love to see it. Testing is critical to our long-term success, so code submissions must include tests covering all critical logic. ❤️

Issues

Be detailed. They only person who knows the bug you are experiencing or feature that you want is you! So please be as detailed as possible. Include labels like bug or enhancement and you know the saying a picture is worth a thousand words. So if you can grab a screenshot or gif of the behavior even better!

Credits

This application was generated with the rails_apps_composer gem provided by the RailsApps Project.

Rails Composer is supported by developers who purchase our RailsApps tutorials.

Problems? Issues?

Need help? Ask on Stack Overflow with the tag 'railsapps.'

Your application contains diagnostics in the README file. Please provide a copy of the README file when reporting any issues.

If the application doesn't work as expected, please report an issue and include the diagnostics.

License

The MIT License

Copyright

Copyright (c) 2015-2018 OpenSplitTime Company. See license for details.

opensplittime's People

Contributors

moveson avatar legoabram avatar danielosborn avatar mrozanski avatar billwright avatar winterpk avatar nplasterer avatar

Watchers

James Cloos avatar Laszlo Balogh 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.