Skip to content

Commit

Permalink
Not creating script/rails in full mode. from master.
Browse files Browse the repository at this point in the history
  • Loading branch information
arunagw committed Jul 17, 2011
1 parent 777fcc5 commit 09f5780
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def javascripts
end

def script(force = false)
return unless full?

directory "script", :force => force do |content|
"#{shebang}\n" + content
end
Expand Down
2 changes: 0 additions & 2 deletions railties/test/generators/plugin_new_generator_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
lib
lib/bukkits.rb
lib/tasks/bukkits_tasks.rake
script/rails
test/bukkits_test.rb
test/test_helper.rb
test/dummy
Expand Down Expand Up @@ -253,7 +252,6 @@ def test_overriding_test_framework
assert_file 'spec/dummy'
assert_file 'Rakefile', /task :default => :spec/
assert_file 'Rakefile', /# spec tasks in rakefile/
assert_file 'script/rails', %r{spec/dummy}
end

protected
Expand Down
4 changes: 2 additions & 2 deletions railties/test/generators/shared_generator_tests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -67,12 +67,12 @@ def test_name_raises_an_error_if_name_already_used_constant
end

def test_shebang_is_added_to_rails_file
run_generator [destination_root, "--ruby", "foo/bar/baz"]
run_generator [destination_root, "--ruby", "foo/bar/baz", "--full"]
assert_file "script/rails", /#!foo\/bar\/baz/
end

def test_shebang_when_is_the_same_as_default_use_env
run_generator [destination_root, "--ruby", Thor::Util.ruby_command]
run_generator [destination_root, "--ruby", Thor::Util.ruby_command, "--full"]
assert_file "script/rails", /#!\/usr\/bin\/env/
end

Expand Down

0 comments on commit 09f5780

Please sign in to comment.