diff options
author | José Valim <jose.valim@gmail.com> | 2010-01-23 22:53:26 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-01-23 22:53:26 +0100 |
commit | f915f9e33903ee474920e24ad12a1625f2ef1c52 (patch) | |
tree | 5b6d41e8a809aeaadbc2c0be59603f5f58b16231 /railties/lib/generators | |
parent | b17e358e3df34c03019e357f693611618092e1d6 (diff) | |
parent | 8ff2fb6f3aa6140f5a8bd018d5919a8a1e707cda (diff) | |
download | rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.tar.gz rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.tar.bz2 rails-f915f9e33903ee474920e24ad12a1625f2ef1c52.zip |
Merge branch 'master' into app
Conflicts:
railties/lib/rails/application.rb
Diffstat (limited to 'railties/lib/generators')
13 files changed, 12 insertions, 25 deletions
diff --git a/railties/lib/generators/rails/app/templates/config.ru b/railties/lib/generators/rails/app/templates/config.ru index 2ab821e38d..fcfbc6b07a 100644 --- a/railties/lib/generators/rails/app/templates/config.ru +++ b/railties/lib/generators/rails/app/templates/config.ru @@ -1,4 +1,4 @@ # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) -run <%= app_const %>.instance +run <%= app_const %> diff --git a/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml b/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml index a9716ddb44..2cecb5c879 100644 --- a/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml +++ b/railties/lib/generators/rails/app/templates/config/databases/ibm_db.yml @@ -59,4 +59,4 @@ production: #account: my_account #app_user: my_app_user #application: my_application - #workstation: my_workstation
\ No newline at end of file + #workstation: my_workstation diff --git a/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt b/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt index b10103b436..177ce44d41 100644 --- a/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt +++ b/railties/lib/generators/rails/app/templates/config/environments/development.rb.tt @@ -16,4 +16,4 @@ # Don't care if the mailer can't send config.action_mailer.raise_delivery_errors = false -end
\ No newline at end of file +end diff --git a/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt b/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt index 543a40108c..ee071df63b 100644 --- a/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt +++ b/railties/lib/generators/rails/app/templates/config/environments/production.rb.tt @@ -30,4 +30,4 @@ # Enable threaded mode # config.threadsafe! -end
\ No newline at end of file +end diff --git a/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt b/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt index 428fa35633..f6c38f3c0d 100644 --- a/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt +++ b/railties/lib/generators/rails/app/templates/config/environments/test.rb.tt @@ -26,4 +26,4 @@ # This is necessary if your schema can't be completely dumped by the schema dumper, # like if you have constraints or database-specific column types # config.active_record.schema_format = :sql -end
\ No newline at end of file +end diff --git a/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb b/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb index 839d4cde19..59385cdf37 100644 --- a/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb +++ b/railties/lib/generators/rails/app/templates/config/initializers/backtrace_silencers.rb @@ -4,4 +4,4 @@ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. -# Rails.backtrace_cleaner.remove_silencers!
\ No newline at end of file +# Rails.backtrace_cleaner.remove_silencers! diff --git a/railties/lib/generators/rails/app/templates/config/locales/en.yml b/railties/lib/generators/rails/app/templates/config/locales/en.yml index f265c068d8..a747bfa698 100644 --- a/railties/lib/generators/rails/app/templates/config/locales/en.yml +++ b/railties/lib/generators/rails/app/templates/config/locales/en.yml @@ -2,4 +2,4 @@ # See http://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points. en: - hello: "Hello world"
\ No newline at end of file + hello: "Hello world" diff --git a/railties/lib/generators/rails/app/templates/db/seeds.rb b/railties/lib/generators/rails/app/templates/db/seeds.rb index bc8695e6f0..664d8c74c8 100644 --- a/railties/lib/generators/rails/app/templates/db/seeds.rb +++ b/railties/lib/generators/rails/app/templates/db/seeds.rb @@ -2,6 +2,6 @@ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). # # Examples: -# +# # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) # Mayor.create(:name => 'Daley', :city => cities.first) diff --git a/railties/lib/generators/rails/app/templates/script/console.tt b/railties/lib/generators/rails/app/templates/script/console.tt index daba8ba2f1..915c5b8294 100755 --- a/railties/lib/generators/rails/app/templates/script/console.tt +++ b/railties/lib/generators/rails/app/templates/script/console.tt @@ -2,4 +2,4 @@ require File.expand_path('../../config/boot', __FILE__) require 'rails/commands/console' require File.expand_path('../../config/application', __FILE__) -Rails::Console.start(<%= app_const %>.instance) +Rails::Console.start(<%= app_const %>) diff --git a/railties/lib/generators/rails/app/templates/script/dbconsole.tt b/railties/lib/generators/rails/app/templates/script/dbconsole.tt index a7f114a97f..a92f6f2844 100755 --- a/railties/lib/generators/rails/app/templates/script/dbconsole.tt +++ b/railties/lib/generators/rails/app/templates/script/dbconsole.tt @@ -2,4 +2,4 @@ require File.expand_path('../../config/boot', __FILE__) require 'rails/commands/dbconsole' require File.expand_path('../../config/application', __FILE__) -Rails::DBConsole.start(<%= app_const %>.instance) +Rails::DBConsole.start(<%= app_const %>) diff --git a/railties/lib/generators/rails/metal/templates/metal.rb b/railties/lib/generators/rails/metal/templates/metal.rb index e94982b69a..2f5d4e7593 100644 --- a/railties/lib/generators/rails/metal/templates/metal.rb +++ b/railties/lib/generators/rails/metal/templates/metal.rb @@ -1,12 +1,12 @@ # Allow the metal piece to run in isolation -require(File.dirname(__FILE__) + "/../../config/environment") unless defined?(Rails) +require File.expand_path('../../../config/environment', __FILE__) class <%= class_name %> def self.call(env) if env["PATH_INFO"] =~ /^\/<%= file_name %>/ [200, {"Content-Type" => "text/html"}, ["Hello, World!"]] else - [404, {"Content-Type" => "text/html"}, ["Not Found"]] + [404, {"Content-Type" => "text/html", "X-Cascade" => "pass"}, ["Not Found"]] end end end diff --git a/railties/lib/generators/rails/plugin/templates/Rakefile.tt b/railties/lib/generators/rails/plugin/templates/Rakefile.tt index 23c2245a41..e94c0bfc77 100644 --- a/railties/lib/generators/rails/plugin/templates/Rakefile.tt +++ b/railties/lib/generators/rails/plugin/templates/Rakefile.tt @@ -1,22 +1,10 @@ -require 'rake' require 'rake/testtask' -require 'rake/rdoctask' desc 'Default: run unit tests.' task :default => :test desc 'Test the <%= file_name %> plugin.' Rake::TestTask.new(:test) do |t| - t.libs << 'lib' t.libs << 'test' t.pattern = 'test/**/*_test.rb' end - -desc 'Generate documentation for the <%= file_name %> plugin.' -Rake::RDocTask.new(:rdoc) do |rdoc| - rdoc.rdoc_dir = 'rdoc' - rdoc.title = '<%= class_name %>' - rdoc.options << '--line-numbers' << '--inline-source' - rdoc.rdoc_files.include('README') - rdoc.rdoc_files.include('lib/**/*.rb') -end diff --git a/railties/lib/generators/rails/stylesheets/templates/scaffold.css b/railties/lib/generators/rails/stylesheets/templates/scaffold.css index d9fa2cf2dc..de6669ad9e 100644 --- a/railties/lib/generators/rails/stylesheets/templates/scaffold.css +++ b/railties/lib/generators/rails/stylesheets/templates/scaffold.css @@ -59,4 +59,3 @@ div.field, div.actions { font-size: 12px; list-style: square; } - |