From be43ad69afefbe9bbf8e8677f2e35d4a908ca085 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Fri, 11 Jun 2010 16:14:41 -0700 Subject: Support ruby 1.8.7 and 1.9.2 (and development versions) --- railties/lib/rails/ruby_version_check.rb | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/ruby_version_check.rb b/railties/lib/rails/ruby_version_check.rb index 994df17e65..e8d1d1e039 100644 --- a/railties/lib/rails/ruby_version_check.rb +++ b/railties/lib/rails/ruby_version_check.rb @@ -1,10 +1,24 @@ -ruby_release = "#{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" -if ruby_release < '1.8.7' || (ruby_release > '1.8' && ruby_release < '1.9.2') +if RUBY_VERSION < '1.8.7' + desc = defined?(RUBY_DESCRIPTION) ? RUBY_DESCRIPTION : "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE})" abort <<-end_message Rails 3 requires Ruby 1.8.7 or 1.9.2. - You're running #{ruby_release}; please upgrade to continue. + You're running + #{desc} + + Please upgrade to continue. + + end_message +elsif RUBY_VERSION > '1.9' and RUBY_VERSION < '1.9.2' + $stderr.puts <<-end_message + + Rails 3 doesn't officially support Ruby 1.9.1 since recent stable + releases have segfaulted the test suite. Please upgrade to Ruby 1.9.2 + before Rails 3 is released! + + You're running + #{RUBY_DESCRIPTION} end_message end -- cgit v1.2.3 From b5ce2490c1f31b64288854cdaf09380493a1fafd Mon Sep 17 00:00:00 2001 From: Damien Mathieu <42@dmathieu.com> Date: Fri, 11 Jun 2010 12:06:00 +0200 Subject: Test create mailers folder when starting a new app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- railties/test/generators/app_generator_test.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'railties') diff --git a/railties/test/generators/app_generator_test.rb b/railties/test/generators/app_generator_test.rb index ffc5636467..6a3b5de9de 100644 --- a/railties/test/generators/app_generator_test.rb +++ b/railties/test/generators/app_generator_test.rb @@ -9,6 +9,7 @@ DEFAULT_APP_FILES = %w( config.ru app/controllers app/helpers + app/mailers app/models app/views/layouts config/environments -- cgit v1.2.3 From f0963e2ab0d39e951d772465ec4c8d07b8a4a3d7 Mon Sep 17 00:00:00 2001 From: Lawrence Curtis Date: Fri, 11 Jun 2010 10:50:52 +0100 Subject: Create mailers folder when starting a new rails app MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- .../lib/rails/generators/rails/app/templates/app/mailers/.empty_directory | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 railties/lib/rails/generators/rails/app/templates/app/mailers/.empty_directory (limited to 'railties') diff --git a/railties/lib/rails/generators/rails/app/templates/app/mailers/.empty_directory b/railties/lib/rails/generators/rails/app/templates/app/mailers/.empty_directory new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3 From a12079df9f6fab7a491600219173c18e5166a7bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Sun, 13 Jun 2010 13:50:40 +0200 Subject: Tidy up generators based on latest change on AM. --- railties/lib/rails/generators.rb | 2 +- railties/test/generators/mailer_generator_test.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'railties') diff --git a/railties/lib/rails/generators.rb b/railties/lib/rails/generators.rb index f4990bfb4c..41aecea355 100644 --- a/railties/lib/rails/generators.rb +++ b/railties/lib/rails/generators.rb @@ -327,7 +327,7 @@ module Rails paths = [] namespaces.each do |namespace| pieces = namespace.split(":") - paths << pieces.dup.push(pieces.last).join("/") unless pieces.uniq.size == 1 + paths << pieces.dup.push(pieces.last).join("/") paths << pieces.join("/") end paths.uniq! diff --git a/railties/test/generators/mailer_generator_test.rb b/railties/test/generators/mailer_generator_test.rb index 850b45ff74..450dec7716 100644 --- a/railties/test/generators/mailer_generator_test.rb +++ b/railties/test/generators/mailer_generator_test.rb @@ -17,8 +17,8 @@ class MailerGeneratorTest < Rails::Generators::TestCase def test_mailer_with_i18n_helper run_generator assert_file "app/mailers/notifier.rb" do |mailer| - assert_match /en\.actionmailer\.notifier\.foo\.subject/, mailer - assert_match /en\.actionmailer\.notifier\.bar\.subject/, mailer + assert_match /en\.notifier\.foo\.subject/, mailer + assert_match /en\.notifier\.bar\.subject/, mailer end end -- cgit v1.2.3