module Rails::Generators::Actions
def add_source(source, options = {}, &block)
gem "rspec-rails"
add_source "http://gems.github.com/" do
add_source "http://gems.github.com/"
If block is given, gem entries in block are wrapped into the source group.
Add the given source to +Gemfile+
def add_source(source, options = {}, &block) log :source, source in_root do if block append_file_with_newline "Gemfile", "\nsource #{quote(source)} do", force: true with_indentation(&block) append_file_with_newline "Gemfile", "end", force: true else prepend_file "Gemfile", "source #{quote(source)}\n", verbose: false end end end