Guard watches a directory and runs commands when it sees changes to files.
This is great for automating your rspec tests!
Add guard and guard-rspec to your Gemfile
| language: ruby | |
| rvm: | |
| - 2.1.0 | |
| before_script: | |
| - "sh -e /etc/init.d/xvfb start" | |
| - "export DISPLAY=:99.0" | |
| - "export JASMINE_SPEC_FORMAT=documentation" | |
| env: | |
| - PG_USERNAME='postgres' | |
| script: |
| language: ruby | |
| rvm: | |
| - 2.1.0 | |
| before_script: | |
| - "sh -e /etc/init.d/xvfb start" | |
| - "export DISPLAY=:99.0" | |
| - "export JASMINE_SPEC_FORMAT=documentation" | |
| env: | |
| - PG_USERNAME='postgres' | |
| script: |
| ________________________________________________________________________ | |
| GIT HUB WITH PROJECTS | |
| ________________________________________________________________________ | |
| * git branch -d → Will delete the branch completely if it SUCKS. | |
| * AlWAYS pull first before you start your work. | |
| * git checkout develop → Never work on master branch. | |
| - Your MASTER branch must always work. | |
| ________________________________________________________________________ |
| source 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '4.1.0' | |
| # Use postgresql as the database for Active Record | |
| gem 'pg' | |
| # Use SCSS for stylesheets | |
| gem 'sass-rails', '~> 4.0.0' |
| ---------------------------------------------------------------------- | |
| #### Steps to create Rails App #### | |
| ---------------------------------------------------------------------- | |
| 1.) rails new app_name -d postgresql | |
| 'Jesse's way': rails g model Complaint descriptor:string address:string latitude:decimal longitude:decimal zip:integer | |
| 2.) database.yml → 'Phil's gist' | |
| - put in: echo $USER in the terminal right after to make sure it works. | |
| 3.) rake db:create | |
| 4.) Insert ‘gem’ gist for development: |