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
(GMT-11:00) American Samoa, | |
(GMT-11:00) International Date Line West, | |
(GMT-11:00) Midway Island, | |
(GMT-10:00) Hawaii, | |
(GMT-09:00) Alaska, | |
(GMT-08:00) Pacific Time (US & Canada), | |
(GMT-08:00) Tijuana, | |
(GMT-07:00) Arizona, | |
(GMT-07:00) Chihuahua, | |
(GMT-07:00) Mazatlan, |
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
~/projects> mkdir scratch | |
~/projects> cd scratch/ | |
~/projects/scratch> git init . | |
Initialized empty Git repository in /Users/johnnaegle/projects/scratch/.git/ | |
~/projects/scratch> touch README.md | |
~/projects/scratch> git commit -m "Create Empty Repository" | |
[master (root-commit) bda9f27] Create Empty Repository | |
0 files changed | |
create mode 100644 README.md |
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
~/projects/scratch> rails plugin new . | |
create README.rdoc | |
create Rakefile | |
create scratch.gemspec | |
create MIT-LICENSE | |
create .gitignore | |
create Gemfile | |
create lib/scratch.rb | |
create lib/tasks/scratch_tasks.rake | |
create lib/scratch/version.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
s.add_development_dependency "rspec-rails" |
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
... | |
s.add_development_dependency "rspec-rails" | |
... | |
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
~/projects/scratch> bundle install | |
Using rspec-core (2.12.2) | |
Using rspec-expectations (2.12.1) | |
Using rspec-mocks (2.12.1) | |
Using rspec-rails (2.12.0) | |
Using scratch (0.0.1) from source at . | |
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. |
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
~/projects/scratch> rspec --init | |
create spec/spec_helper.rb | |
create .rspec | |
~/projects/scratch> mv test/dummy spec/ | |
~/projects/scratch> rm -rf test |
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
ENV["RAILS_ENV"] = "test" | |
require File.expand_path("../dummy/config/environment.rb", __FILE__) | |
require "rails/test_help" | |
require 'scratch' # Replace this with the name of your gem | |
Rails.backtrace_cleaner.remove_silencers! |
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
class ActiveSupport::BufferedLogger | |
def formatter=(formatter) | |
@log.formatter = formatter | |
end | |
end | |
class Formatter | |
SEVERITY_TO_COLOR_MAP = {'DEBUG'=>'0;37', 'INFO'=>'32', 'WARN'=>'33', 'ERROR'=>'31', 'FATAL'=>'31', 'UNKNOWN'=>'37'} | |
def call(severity, time, progname, msg) |
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
class Api::UsersController < ApplicationController | |
def show | |
if stale?(:last_modified => current_user.updated_at, :etag => current_user.updated_at) | |
end | |
end | |
end |
OlderNewer