From 2da5ea1c9feb4a7b491bd00bd6ffd931b9203da8 Mon Sep 17 00:00:00 2001 From: Prem Sichanugrist Date: Sun, 24 Feb 2013 13:46:27 -0500 Subject: Remove `--builder` option from `rails` command Ability to use a custom builder by passing `--builder` (or `-b`) has been removed. Consider using application template instead. See this guide for more detail: http://guides.rubyonrails.org/rails_application_templates.html --- railties/lib/rails/generators/app_base.rb | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'railties/lib/rails/generators/app_base.rb') diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 99d80b3245..e886cf77fb 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -19,9 +19,6 @@ module Rails argument :app_path, type: :string def self.add_shared_options_for(name) - class_option :builder, type: :string, aliases: '-b', - desc: "Path to some #{name} builder (can be a filesystem path or URL)" - class_option :template, type: :string, aliases: '-m', desc: "Path to some #{name} template (can be a filesystem path or URL)" @@ -81,17 +78,6 @@ module Rails def builder @builder ||= begin - if path = options[:builder] - if URI(path).is_a?(URI::HTTP) - contents = open(path, "Accept" => "application/x-thor-template") {|io| io.read } - else - contents = open(File.expand_path(path, @original_wd)) {|io| io.read } - end - - prok = eval("proc { #{contents} }", TOPLEVEL_BINDING, path, 1) - instance_eval(&prok) - end - builder_class = get_builder_class builder_class.send(:include, ActionMethods) builder_class.new(self) -- cgit v1.2.3