Skip to content

Commit

Permalink
Fixes issue #6251
Browse files Browse the repository at this point in the history
Plugin generator crashes when using the --dummy-path option

Code was assuming the application name in `config/application.rb`
was module Dummy.
  • Loading branch information
David Padilla authored and drogus committed May 11, 2012
1 parent b14d1cd commit 0d48b12
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -302,7 +302,7 @@ def application_definition
dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root) dummy_application_path = File.expand_path("#{dummy_path}/config/application.rb", destination_root)
unless options[:pretend] || !File.exists?(dummy_application_path) unless options[:pretend] || !File.exists?(dummy_application_path)
contents = File.read(dummy_application_path) contents = File.read(dummy_application_path)
contents[(contents.index("module Dummy"))..-1] contents[(contents.index(/module ([\w]+)\n(.*)class Application/m))..-1]
end end
end end
end end
Expand Down

0 comments on commit 0d48b12

Please sign in to comment.