This file contains hidden or 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 was ripped from one of our Webrat suites - Capybara would be similar, but slightly different... | |
| Then /^I should( not)? see "([^\"]*)" in (.+)$/ do |negatory, text, area| | |
| within(selector_for(area)) do |content| | |
| if negatory.blank? then | |
| content.should contain(text) | |
| else | |
| content.should_not contain(text) | |
| end | |
| end | |
| end |
This file contains hidden or 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
| # Forked to get it working with Rails 3 and RSpec 2 | |
| # Updated to aggregate Cucumber and rspec correctly | |
| # Updated to not fail in production when Cucumber, rspec aren't available | |
| # | |
| # From http://github.com/jaymcgavren | |
| # | |
| # Save this as rcov.rake in lib/tasks and use rcov:all => | |
| # to get accurate spec/feature coverage data | |
| # | |
| # Use rcov:rspec or rcov:cucumber |
This file contains hidden or 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 | |
| # Quick and dirty FSEvent watcher. | |
| # Example: | |
| # rr spec/lib/foo lib/foo 'spec spec/lib/foo/*_spec.rb' | |
| # | |
| # Will watch the spec/lib directory for any changes, and run the given command for each change, | |
| # dumping the output to STDOUT. | |
| require 'rubygems' | |
| require 'rb-fsevent' |
This file contains hidden or 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
| module AA | |
| module BB | |
| module CC | |
| end | |
| end | |
| end | |
| class Foo | |
| include AA::BB | |
| end |
This file contains hidden or 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
| module ActiveSupport::Rescuable::ClassMethods | |
| alias :old_rescue_from :rescue_from | |
| def rescue_from(*k,&b) | |
| Rails.logger.debug "rescue_from!!!!! #{self.name} (#{k.inspect})" | |
| Rails.logger.debug caller.join("\n") | |
| old_rescue_from(*k, &b) | |
| end | |
| end |
This file contains hidden or 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
| Rubinius Crash Report #rbxcrashreport | |
| Error: signal �SIGSEGV | |
| [[Backtrace]] | |
| 0 rbx 0x00000001090a3b11 _ZN8rubiniusL12segv_handlerEi + 241� | |
| 1 libsystem_c.dylib 0x00007fff8e264cfa _sigtramp + 26� | |
| 2 ??? 0x00007fff68c85330 0x0 + 140734951346992� | |
| 3 libcrypto.0.9.8.dylib 0x00007fff954133e4 CRYPTO_set_ex_data + 36� | |
| 4 openssl.bundle 0x000000010c7ef699 ossl_x509store_set_vfy_cb + 57� |
This file contains hidden or 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
| #!/bin/bash | |
| # Author: Jason Stirk (http://griffin.oobleyboo.com) | |
| # Simple growlnotifu wrapper using return values | |
| # Usage: | |
| # aa <command to execute> | |
| # | |
| # If the command returns with a successful return value, growlnotify will | |
| # be executed and will show the command used. | |
| # If the command returns a failure (non-zero) return value, growlnotify will | |
| # show the same message, but will include the "critical" urgency, which will |
This file contains hidden or 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
| (-10..-5).include?(-7) | |
| #=> true | |
| (-5..-10).include?(-7) | |
| #=> false | |
| (10..5).include?(7) | |
| #=> false | |
| (5..10).include?(7) | |
| #=> true | |
| # OK, so maybe 10..5 wraps the whole set of integers? |
This file contains hidden or 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
| { | |
| "Statement": [ | |
| { | |
| "Sid": "Stmt1344909032464", | |
| "Action": [ | |
| "s3:*" | |
| ], | |
| "Effect": "Allow", | |
| "Resource": [ | |
| "arn:aws:s3:::BUCKETNAME", |
This file contains hidden or 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
| # Add our current git branch out to our path | |
| parse_git_branch() { | |
| git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/' | |
| } | |
| format_git_branch() { | |
| parse_git_branch | sed -e 's/\(.*\)/(\1)/' | |
| } | |
| rvm_prompt() { |