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
>> a = OpenStruct.new | |
=> #<OpenStruct> | |
>> h = OpenStruct.new | |
=> #<OpenStruct> | |
>> h.a = a | |
=> #<OpenStruct> | |
>> a.h = h | |
=> #<OpenStruct a=#<OpenStruct h=#<OpenStruct ...>>> | |
>> h.a.h.a.h.a.h.a.h.a.h.a.h.a.h.a.h | |
=> #<OpenStruct a=#<OpenStruct h=#<OpenStruct ...>>> |
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
>> nineeleven = Date.parse('9/11/2001') | |
=> Tue, 11 Sep 2001 | |
>> earthquake = Date.parse('3/10/2011') | |
=> Thu, 10 Mar 2011 | |
>> Date.parse("#{nineeleven.month + earthquake.month}/#{nineeleven.day + earthquake.day}/#{nineeleven.year + earthquake.year - 2000}") | |
=> Fri, 21 Dec 2012 | |
# aw fuck |
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
>> c = CarSearch.last | |
=> #<CarSearch id: 906, start_date_time: "2011-03-30 12:00:00", ...> | |
>> cs = c.clone | |
=> #<CarSearch id: nil, start_date_time: "2011-03-30 12:00:00", ...> | |
>> cs.attributes | |
=> {"start_date_time"=>Wed Mar 30 12:00:00 -0500 2011, ...} | |
>> cs.read_attribute :start_date_time |
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
activerecord: | |
errors: | |
messages: | |
some_blank_message: "Shit be blank" |
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
mculp:rails matthew$ gem build rails.gemspec | |
Successfully built RubyGem | |
Name: rails | |
Version: 3.1.0.beta | |
File: rails-3.1.0.beta.gem | |
mculp:rails matthew$ rake install | |
(in /Users/matthew/work/rails) | |
(in /Users/matthew/work/rails/activesupport) | |
(in /Users/matthew/work/rails/activemodel) |
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
Using rspec-rails (2.5.0) | |
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed. | |
mculp:greenpath matthew$ rails g rspec:install | |
identical .rspec | |
exist spec | |
conflict spec/spec_helper.rb | |
Overwrite /Users/matthew/work/greenpath/spec/spec_helper.rb? (enter "h" for help) [Ynaqdh] y | |
force spec/spec_helper.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
Failure/Error: click_button 'submit' | |
Encoding::CompatibilityError: | |
incompatible encoding regexp match (UTF-8 regexp with ASCII-8BIT string) | |
# ./spec/integration/searches_spec.rb:16:in `block (2 levels) in <top (required)>' |
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
matthew$ bundle exec rspec spec/models/search_spec.rb | |
/Library/Ruby/Gems/1.8/gems/bundler-1.0.12/lib/bundler/shared_helpers.rb:107:in `gem': rspec-core is not part of the bundle. Add it to Gemfile. (Gem::LoadError) | |
from /usr/bin/rspec:18 | |
matthew$ bundle exec rspec spec/models/search_spec.rb | |
Could not find gem 'rspec-core (= 1.3.4, runtime)' in any of the gem sources listed in your Gemfile. | |
matthew$ bundle exec rspec spec/models/search_spec.rb | |
/Library/Ruby/Gems/1.8/gems/rspec-core-2.0.1/lib/rspec/core.rb:78:in `require': no such file to load -- rspec/expectations (LoadError) | |
from /Library/Ruby/Gems/1.8/gems/rspec-core-2.0.1/lib/rspec/core.rb:78 |
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
Installing nokogiri (1.4.4) with native extensions /usr/local/rvm/rubies/ruby-1.9.2-p0/lib/ruby/1.9.1/rubygems/installer.rb:483:in `rescue in block in build_extensions': ERROR: Failed to build gem native extension. (Gem::Installer::ExtensionBuildError) | |
/usr/local/rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb | |
checking for libxml/parser.h... no | |
----- | |
libxml2 is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies. | |
----- | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more |
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
require 'benchmark' | |
require 'forgery' | |
def new_ostruct_member(arg); end | |
def generate_data | |
(0..1000).map do |i| | |
{ "k#{i}" => "v#{i}" } | |
end.inject &:merge | |
end |
OlderNewer