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
Capybara.register_driver :selenium do |app| | |
Capybara::Selenium::Driver # this line ensures that the top level Selenium module is loaded | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile.add_extension File.expand_path "spec/support/vendor/firebug-1.8.4-fx.xpi" | |
profile.add_extension File.expand_path "spec/support/vendor/fireStarter-0.1a6.xpi" | |
profile.add_extension File.expand_path "spec/support/vendor/netExport-0.8b20.xpi" | |
# Configures Firebug - look at http://getfirebug.com/developer/api/firebug1.6/symbols/src/defaults_preferences_firebug.js.html | |
profile['extensions.firebug.currentVersion'] = "1.8.4" # avoid 'first run' tab | |
profile["extensions.firebug.previousPlacement"] = 1 |
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
group :development, :test do | |
gem 'linecache19', :git => 'https://github.com/mark-moseley/linecache.git', :require => false | |
gem 'ruby-debug-base19', :git => 'https://github.com/mark-moseley/ruby-debug.git', :require => false | |
gem 'ruby-debug19', :require => 'ruby-debug' | |
end |
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
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
$VERBOSE = true # -w | |
$KCODE = "U" if RUBY_VERSION < "1.9" # -KU | |
require 'optparse' | |
require 'socket' | |
require 'fileutils' |
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
export ENABLE_REMOTE_DEBUGGER_UNDER_POW=true |
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
context "when you set up your it blocks that they depend on your test data" do | |
it "makes it hard to understand how your program is meant to behave" do | |
fuck_yourself | |
end | |
end |
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
context "when you name your it blocks that they depend on your test data" do | |
it "becomes hard for others to understand how your program is meant to behave" do | |
go_and_sell_vegetables_at_the_market_instead | |
end | |
end |
This file has been truncated, but you can view the full file.
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
➜ ~ (home) rbenv install rbx-2.0.0-rc1 -v | |
/var/folders/j7/06jgjgr52blgmvt7gymjgn900000gn/T/ruby-build.20130322124116.61928 ~ | |
Downloading yaml-0.1.4.tar.gz... | |
HTTP/1.0 200 OK | |
Content-Type: binary/octet-stream | |
Content-Length: 471759 | |
Connection: keep-alive | |
x-amz-id-2: R9kbhU2W7EO380gIyFmu2DmgcBzK6mEmPMvhX1/hCU747YG9D/vWgHDLyJY8r7Vi | |
x-amz-request-id: 4B0323F91DDFD468 | |
Date: Wed, 12 Dec 2012 20:02:34 GMT |
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
# In Rails controllers you often chain scopes together, often the chaining is | |
# subject to certain conditions in the params hash. | |
# So I had some Ruby code like this: | |
@items = MyActiveRecordClass | |
@items = @items.some_scope_method if some_condition? | |
@items = @items.another_scope_method | |
@items = @items.yet_another_scope_method if some_other_condition? | |
@items = @items.one_more_scope_method |
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
[root@freebsd ~]# RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local rbenv install 2.0.0-p195 | |
Downloading ruby-2.0.0-p195.tar.gz... | |
-> http://dqw8nmjcqpjn7.cloudfront.net/0672e5af309ae99d1703d0e96eff8ea5 | |
Installing ruby-2.0.0-p195... | |
BUILD FAILED | |
Inspect or clean up the working tree at /tmp/ruby-build.20131118233113.53696 | |
Results logged to /tmp/ruby-build.20131118233113.53696.log |
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
freebsd% rbenv install 2.0.0-p247 | |
Downloading ruby-2.0.0-p247.tar.gz... | |
-> http://dqw8nmjcqpjn7.cloudfront.net/c351450a0bed670e0f5ca07da3458a5b | |
Installing ruby-2.0.0-p247... | |
BUILD FAILED | |
Inspect or clean up the working tree at /tmp/ruby-build.20131119110747.40295 | |
Results logged to /tmp/ruby-build.20131119110747.40295.log |