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 select msg, elements | |
elements.each_with_index do |element, index| | |
say(block_given? ? yield(element, index + 1) : ("#{index + 1}. #{element.to_s}")) | |
end | |
result = ask(msg, :limited_to => (1..elements.count).map(&:to_s), :print_limits => false).to_i | |
elements[result - 1] | |
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
require 'thor' | |
require "sub" | |
class MyApp < Thor | |
desc "parentcommand SUBCOMMAND", "Some Parent Command" | |
subcommand "sub", Sub | |
end | |
MyApp.start |
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
Counting objects: 7, done. | |
Delta compression using up to 2 threads. | |
Compressing objects: 100% (4/4), done. | |
Writing objects: 100% (4/4), 540 bytes, done. | |
Total 4 (delta 3), reused 0 (delta 0) | |
remote: /data/github/current/lib/github/config/failbot.rb:5: undefined method `setup' for Failbot:Module (NoMethodError) | |
remote: from /data/github/current/config/basic.rb:168:in `require' | |
remote: from /data/github/current/config/basic.rb:168 | |
remote: from hooks/post-receive:13:in `require' | |
remote: from hooks/post-receive:13 |
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
require 'capybara/rails' | |
require 'capybara/session' | |
Capybara.run_server = true | |
Capybara.default_selector = :css | |
Capybara.default_wait_time = 2 | |
Capybara.ignore_hidden_elements = true |
NewerOlder