diff options
Diffstat (limited to 'railties/lib/rails/generators')
4 files changed, 5 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/app_base.rb b/railties/lib/rails/generators/app_base.rb index 6677850a11..7c449657b5 100644 --- a/railties/lib/rails/generators/app_base.rb +++ b/railties/lib/rails/generators/app_base.rb @@ -181,10 +181,6 @@ module Rails end end - def ruby_debugger_gemfile_entry - "gem 'ruby-debug19', :require => 'ruby-debug'" - end - def assets_gemfile_entry return if options[:skip_sprockets] diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index 98cf85f118..43bfe5bad6 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -22,4 +22,4 @@ source :rubygems # gem 'capistrano', :group => :development # To use debugger -# <%= ruby_debugger_gemfile_entry %> +# gem 'ruby-debug19', :require => 'ruby-debug' diff --git a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb index 0e900a34bb..f4263d1b98 100644 --- a/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb +++ b/railties/lib/rails/generators/rails/plugin_new/plugin_new_generator.rb @@ -285,7 +285,9 @@ task :default => :test end def valid_const? - if camelized =~ /^\d/ + if original_name =~ /[^0-9a-zA-Z_]+/ + raise Error, "Invalid plugin name #{original_name}. Please give a name which use only alphabetic or numeric or \"_\" characters." + elsif camelized =~ /^\d/ raise Error, "Invalid plugin name #{original_name}. Please give a name which does not start with numbers." elsif RESERVED_NAMES.include?(name) raise Error, "Invalid plugin name #{original_name}. Please give a name which does not match one of the reserved rails words." diff --git a/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile b/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile index f4efd3af74..d316b00c43 100644 --- a/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile +++ b/railties/lib/rails/generators/rails/plugin_new/templates/Gemfile @@ -20,4 +20,4 @@ gem "jquery-rails" <% end -%> # To use debugger -# <%= ruby_debugger_gemfile_entry %> +# gem 'ruby-debug19', :require => 'ruby-debug' |