Advanced Software Engineering project: Fight everybody to earn money with the help of the CyberCoach app!
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app
bin
config
db
doc
features
lib
log
public
script
spec
vendor/assets
.gitignore
.overcommit.yml
.rspec
.rubocop.yml
.travis.yml
Gemfile
Gemfile.lock
Procfile
README.md
Rakefile
config.ru

README.md

E-FightClub logo

E.FightClub v1.0 Build Status

This readme covers the basic setup of the FightClub application. More documentation is available in our wiki.

As of the time of writing, a live demo is hosted on Heroku.

Requirements

Installation

  1. Clone the project and go into the clone

    $ git clone https://github.com/ase-15/fightclub.git
    $ cd fightclub
    
  2. Install gem dependencies

    $ bundle install
    
  3. Configure your database for access via UNIX socket or enter your credentials in the config/database.yml file

  4. Configure your API keys for external services

    1. Create the config/application.yml file and enter the following into it:

      # Git-ignored file containing API keys that are meant to be SECRET!
      # Only used in local development configuration; Heroku and Travis are configured through environment variables.
      # All values in this file populate the ENV hash.
      
      # Cloudinary
      CLOUDINARY_URL: "cloudinary://"
      
      # PayPal
      PAYPAL_CLIENT_ID: ""
      PAYPAL_CLIENT_SECRET: ""
      PAYPAL_MODE: "sandbox"
      
      # Facebook
      FACEBOOK_APP_ID: ""
      FACEBOOK_SECRET: ""
      
      # Pushbullet
      PUSHBULLET_TOKEN: ""
      PUSHBULLET_BASE_URL: "http://localhost:3000"
    2. Complete each field with your personal API key

  5. Create the database. This will delete and recreate the fightclub_development database according to the latest schema.

    $ rake db:drop db:create db:schema:load
    
  6. (Optional) Populate the database with test data.

    $ rake db:seed
    
  7. You can now start the web server

    $ rails s
    

Develop

We use the git flow branching strategy. Installing the git flow plugin is optional but guarantees correct usage.

We use a number of git hooks to ensure proper code quality. You need to install them before coding!

$ overcommit --install

Tests

Our test framework is RSpec. Additionnaly, we are using capybara and cucumber. We use factory_girl and faker to populate the database with fake data.

Overcommit will automatically run the RSpec tests before each push. You still need to manually run the Cucumber tests however.

All tests can be run by running the following command:

$ bundle exec rspec spec
$ bundle exec cucumber

We have a Travis-CI instance running our tests after each commit. It is publically accessible.