1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix shebang on created files.

This commit is contained in:
José Valim 2009-06-17 19:48:25 +02:00
parent 6f044c9b6c
commit e0a4d8be93
2 changed files with 2 additions and 6 deletions

View file

@ -185,12 +185,8 @@ module Rails::Generators
ActiveSupport::SecureRandom.hex(64)
end
def freeze
options[:freeze]
end
def shebang
options[:ruby] || "#!/usr/bin/env ruby"
"#!#{options[:ruby] || "/usr/bin/env ruby"}"
end
def mysql_socket

View file

@ -1,7 +1,7 @@
# Be sure to restart your server when you modify this file
# Specifies gem version of Rails to use when vendor/rails is not present
<%= '# ' if freeze %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION
<%= '# ' if options[:freeze] %>RAILS_GEM_VERSION = '<%= Rails::VERSION::STRING %>' unless defined? RAILS_GEM_VERSION
# Bootstrap the Rails environment, frameworks, and default configuration
require File.join(File.dirname(__FILE__), 'boot')