Giter Club home page Giter Club logo

southwest-checkin's Introduction

Southwest Checkin 2.0

Build Status Coverage Status

Deploy

Automatically checks in passengers for their Southwest Flight.

Version 2.0 of this project is a complete rewrite of the service. The brittle HTML parsing and form submissions are a thing of the past. A much better approach is being taken to automate checkins. And, importantly, the new version has a robust test suite. It is even written in a new language (Ruby) and framework (Rails).

If you are interested in the old version, see the 1.0 branch.

Features

  • Accounts
    • an easy and convient way to manage your reservations
    • view or remove your reservations at any time
    • increased security
  • Email Notifications
    • Notified when a reservation is added
    • Notified on successful checkin
  • Checks in all passengers for a given confirmation number
  • Secured via HTTPS
  • Modern UI
  • Modern background processing and job scheduling
  • Full test suite

Local Installation

  1. While not strictly required, it is recommended to install rbenv and ruby-build to manage ruby versions in development. Ruby 2.2 or greater is required.

  2. Required dependencies

    • Ruby 2.2 or greater
    • Postgres
    • Redis
  3. After installing the aforementioned dependencies, install the ruby dependencies:

    bundle install
  4. Create and seed the database:

    rake db:create db:migrate db:seed
  5. Adding some basic test data for development:

    rake dev:prime
  6. Copy .env.example to .env. The defaults should work in development.

    cp .env.example .env
  7. Run the tests:

    rspec
  8. Run the development server:

    rails s
    
  9. Run sidekiq to process jobs:

    bundle exec sidekiq
    

Heroku Installation

  1. While not strictly required, it is recommended to install rbenv and ruby-build to manage ruby versions in development. Ruby 2.2 or greater is required.

    • Note: Replace anything inside of <> with your projects information.
    • Note: These instructions do not include steps to add email support.
    • Note: This tutorial assumes you're using a Mac with OSX, if you're running something else you may need to make a few adjustments for your OS but should work mostly the same.
    • Note: I recommend using Homebrew to install dependencies.
  2. Required dependencies

  3. Setup heroku and download latest version of the code:

    • Create an account on Heroku
    • From the Heroku web interface create a new app
    • From the Heroku web interface add the following resources to your project:
      • Redis To Go
      • Heroku Postgres
    • Create a folder and cd into it using Terminal
    cd Your/Project/Folder
    git clone https://github.com/aortbals/southwest-checkin.git
    heroku git:remote -a <YOUR_HEROKU_APP_NAME>
  4. Get sidekiq to load the redis add-on's URL

    heroku config:set REDIS_PROVIDER=REDISTOGO_URL
  5. Add ruby version to Gemfile:

    • Open the Gemfile located in the project folder and add the following lines near the top, right below source 'https://rubygems.org'"
    ruby '2.2.0'
    gem 'rails_12factor', group: :production
    
  6. Configure Heroku:

    heroku config:set SITE_NAME='Southwest Checkin' SITE_URL=<HEROKU_URL> ASSET_HOST=<HEROKU_URL> MAILER_DEFAULT_FROM_EMAIL=<YOUR_EMAIL> MAILER_DEFAULT_REPLY_TO=<YOUR_EMAIL> DEPLOY_BRANCH=master DEPLOY_USER=deploy DEPLOY_PORT=22
  7. After installing the aforementioned dependencies (see step 2), install the ruby dependencies:

    gem install bundler
    bundle install
  8. Now commit and push your app to heroku:

    git add .
    git commit -am ""
    git push heroku master
  9. Create and seed the database:

    heroku run rake db:create db:migrate db:seed
  10. (Optional) Setup email with Mailgun

    • From the Heroku web interface add the following resource to your project:
      • Mailgun
    • Once Mailgun is installed login to Mailgun (click on the Mailgun resource to automatically be logged in) and add your domain. This might not be necessary but it's the only way I could get it to work for me.
    • Once the domain has been verified, click on the domain to find the values for the following command and run it:
    heroku config:set MAILER_DEFAULT_FROM_EMAIL=<YOUR_EMAIL> MAILER_DEFAULT_REPLY_TO=<YOUR_EMAIL> MAILER_ADDRESS=<SMTP_HOSTNAME> MAILER_DOMAIN=<HEROKU_URL> MAILER_USERNAME=<DEFAULT_SMTP_LOGIN> MAILER_PASSWORD=<DEFAULT_PASSWORD>
  11. Now browse to your Heroku's app url and start adding reservations.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Write rspec tests
  5. Push to the branch (git push origin my-new-feature)
  6. Create new Pull Request

southwest-checkin's People

Contributors

aortbals avatar jbeda avatar dcjones21 avatar ggruen avatar nickaknudson avatar sguha00 avatar pw10n avatar wootwoot1234 avatar missouribp avatar dionlarson avatar mickgiles avatar sarahpythonista avatar

Watchers

James Cloos 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.