This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new rails app called `gray_lady_app` outside of your kick_hash folder. | |
__It should not be in a git repo.__ | |
Add `rspec-rails`, `nokogiri`, and `httparty` to your gemfile and create a model called `Scraper` | |
===================================================== | |
$ rails _3.2.14_ new gray_lady_app -d postgresql | |
In Gemfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Creating a rails rspec document | |
$rails _3.2.14_ new zombie_rails -d postgresql | |
create | |
create README.rdoc | |
create Rakefile | |
create config.ru | |
create .gitignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails generate migration AddIqToZombie iq:integer | |
You have to tell the ActiveRecord what they are doing Add | |
You have to tell them to what column to add Iq | |
You have to tell them to what table Zombie | |
You have to tell them the type of material that it will be, in this case iq will be an integer | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Go into the folder you want rspec to run in | |
$ rspec --init | |
Go into folder | |
$cd spec/ | |
Create your files that will end with the '_spec.rb' | |
ex: "school_spec.rb" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Nothing to add |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## This is saying the same thing | |
def current_user | |
if session[:user_id] | |
@current_user ||= User.find(session[:user_id]) | |
end | |
end | |
helper_method :current_user |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails new app | |
rake db:create; rake db:migrate | |
Added new input fied so you can add photos. | |
If you have folder you can just click on the button and we will upload it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create a new Repository aside from the one that already exists for a project. | |
Go into the file you want to push up. | |
ex: CourtPOv1 | |
Get the git name and push up to it in the terminal. I substitute tasha for origin. That can be anything you want it to be. | |
$ git remote add tasha git@github.com:Tasha25/CourtPOv1.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Example of Git Cloning | |
mkdir Projects | |
cd Projects | |
git clone git@github.com:ml242/courtPO.git | |
cd courtPO | |
cd courtPO //just in case it is two files deep | |
bundle install // You need to install any gems | |
rake db:create //create database | |
rake db:migrate // migrate any models |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configure Rspec to print nice | |
RSpec.configure do |config| | |
# Use color in STDOUT | |
config.color_enabled = true | |
# Use color not only in STDOUT but also in pagers and files | |
config.tty = true | |
# Use the specified formatter | |
config.formatter = :documentation # :progress, :html, :textmate | |
# immediately stop running upon first failure | |
config.fail_fast = true |
NewerOlder