Permalink
Browse files

Merge pull request #11203 from schneems/schneems/plugin_new-plugin

s/plugin_new/plugin
  • Loading branch information...
2 parents 6c82844 + ec8d865 commit ab6601ccdf15c5b3951b7762387f329c07e39edb @rafaelfranca rafaelfranca committed Jul 1, 2013
Showing with 20 additions and 16 deletions.
  1. +4 −0 railties/CHANGELOG.md
  2. +1 −1 railties/lib/rails/cli.rb
  3. +1 −1 railties/lib/rails/commands.rb
  4. +9 −0 railties/lib/rails/commands/plugin.rb
  5. +0 −9 railties/lib/rails/commands/plugin_new.rb
  6. +1 −1 railties/lib/rails/generators.rb
  7. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/USAGE
  8. +1 −1 ...ties/lib/rails/generators/rails/{plugin_new/plugin_new_generator.rb → plugin/plugin_generator.rb}
  9. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/%name%.gemspec
  10. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/Gemfile
  11. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/MIT-LICENSE
  12. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/README.rdoc
  13. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/Rakefile
  14. 0 ...erators/rails/{plugin_new → plugin}/templates/app/controllers/%name%/application_controller.rb.tt
  15. 0 ...ails/generators/rails/{plugin_new → plugin}/templates/app/helpers/%name%/application_helper.rb.tt
  16. 0 ...enerators/rails/{plugin_new/templates/app/models → plugin/templates/app/mailers}/.empty_directory
  17. 0 ...enerators/rails/{plugin_new/templates/app/mailers → plugin/templates/app/models}/.empty_directory
  18. 0 ...generators/rails/{plugin_new → plugin}/templates/app/views/layouts/%name%/application.html.erb.tt
  19. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/bin/rails.tt
  20. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/config/routes.rb
  21. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/gitignore
  22. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/lib/%name%.rb
  23. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/lib/%name%/engine.rb
  24. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/lib/%name%/version.rb
  25. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/lib/tasks/%name%_tasks.rake
  26. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/rails/application.rb
  27. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/rails/boot.rb
  28. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/rails/javascripts.js
  29. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/rails/routes.rb
  30. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/rails/stylesheets.css
  31. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/test/%name%_test.rb
  32. 0 ...es/lib/rails/generators/rails/{plugin_new → plugin}/templates/test/integration/navigation_test.rb
  33. 0 railties/lib/rails/generators/rails/{plugin_new → plugin}/templates/test/test_helper.rb
  34. +2 −2 railties/test/generators/{plugin_new_generator_test.rb → plugin_generator_test.rb}
  35. +1 −1 railties/test/generators_test.rb
@@ -1,3 +1,7 @@
+* Rename `commands/plugin_new.rb` to `commands/plugin.rb` and fix references
+
+ *Richard Schneeman*
+
* Fix `rails plugin --help` command.
*Richard Schneeman*
@@ -10,7 +10,7 @@
if ARGV.first == 'plugin'
ARGV.shift
- require 'rails/commands/plugin_new'
+ require 'rails/commands/plugin'
else
require 'rails/commands/application'
end
@@ -36,7 +36,7 @@
case command
when 'plugin'
- require "rails/commands/plugin_new"
+ require "rails/commands/plugin"
when 'generate', 'destroy'
require 'rails/generators'
@@ -0,0 +1,9 @@
+if ARGV.first != "new"
+ ARGV[0] = "--help"
+else
+ ARGV.shift
+end
+
+require 'rails/generators'
+require 'rails/generators/rails/plugin/plugin_generator'
+Rails::Generators::PluginGenerator.start
@@ -1,9 +0,0 @@
-if ARGV.first != "new"
- ARGV[0] = "--help"
-else
- ARGV.shift
-end
-
-require 'rails/generators'
-require 'rails/generators/rails/plugin_new/plugin_new_generator'
-Rails::Generators::PluginNewGenerator.start
@@ -225,7 +225,7 @@ def self.help(command = 'generate')
rails = groups.delete("rails")
rails.map! { |n| n.sub(/^rails:/, '') }
rails.delete("app")
- rails.delete("plugin_new")
+ rails.delete("plugin")
print_list("rails", rails)
hidden_namespaces.each { |n| groups.delete(n.to_s) }
@@ -154,7 +154,7 @@ def gemfile_entry
end
module Generators
- class PluginNewGenerator < AppBase # :nodoc:
+ class PluginGenerator < AppBase # :nodoc:
add_shared_options_for "plugin"
alias_method :plugin_path, :app_path
@@ -1,5 +1,5 @@
require 'generators/generators_test_helper'
-require 'rails/generators/rails/plugin_new/plugin_new_generator'
+require 'rails/generators/rails/plugin/plugin_generator'
require 'generators/shared_generator_tests'
DEFAULT_PLUGIN_FILES = %w(
@@ -18,7 +18,7 @@
test/dummy
)
-class PluginNewGeneratorTest < Rails::Generators::TestCase
+class PluginGeneratorTest < Rails::Generators::TestCase
include GeneratorsTestHelper
destination File.join(Rails.root, "tmp/bukkits")
arguments [destination_root]
@@ -106,7 +106,7 @@ def test_rails_generators_help_with_builtin_information
def test_rails_generators_help_does_not_include_app_nor_plugin_new
output = capture(:stdout){ Rails::Generators.help }
assert_no_match(/app/, output)
- assert_no_match(/plugin_new/, output)
+ assert_no_match(/[^:]plugin/, output)
end
def test_rails_generators_with_others_information

0 comments on commit ab6601c

Please sign in to comment.