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
# encoding: utf-8 | |
pretty_name = ARGV[1] | |
pretty_name = 'TODO' if ARGV[1] == '--skip-bundle' | |
author = `dscl localhost -read /Local/Default/Users/$USER RealName`.match(/^RealName:\n\s*(.+?)\n$/m)[1] | |
create_file '.rvmrc', "rvm 1.9.3@#{app_name} --create" | |
gem 'erector' | |
gem 'redcarpet', :require => nil, :group => 'development' |
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
def should_be_a_subset(all_objects, constrained_scope, &condition) | |
flunk "Your superset is empty" if all_objects.empty? | |
flunk "Your constrained set is empty" if constrained_scope.empty? | |
objects_for_which_condition_is_true, objects_for_which_condition_is_false = all_objects.partition(&condition) | |
objects_for_which_condition_is_true.should_not be_empty | |
objects_for_which_condition_is_false.should_not be_empty | |
constrained_scope.map(&:id).sort.should == objects_for_which_condition_is_true.map(&:id).sort |
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
class CucumberExternalResqueWorker | |
DEFAULT_STARTUP_TIMEOUT = 1.minute | |
COUNTER_KEY = "cucumber:counter" | |
class << self | |
attr_accessor :pid, :startup_timeout | |
def start | |
# Call from a Cucumber support file so it is run on startup | |
return unless Rails.env.cucumber? |