diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-08 09:40:33 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-04-08 09:40:33 -0700 |
commit | bd79172e430ffd8c60154d5d98a2d5ea0c93743b (patch) | |
tree | 6861b21f5ed4f4e6139254145f1af178165b8fe7 | |
parent | 2cdc1f0cd5b89722e8c22bb4b26b83bd4619b28a (diff) | |
download | rails-bd79172e430ffd8c60154d5d98a2d5ea0c93743b.tar.gz rails-bd79172e430ffd8c60154d5d98a2d5ea0c93743b.tar.bz2 rails-bd79172e430ffd8c60154d5d98a2d5ea0c93743b.zip |
make turn a soft dependency. generate a Gemfile that contains turn and require turn if it is available
-rw-r--r-- | railties/lib/rails/generators/rails/app/templates/Gemfile | 10 | ||||
-rw-r--r-- | railties/lib/rails/test_help.rb | 10 | ||||
-rw-r--r-- | railties/railties.gemspec | 1 |
3 files changed, 14 insertions, 7 deletions
diff --git a/railties/lib/rails/generators/rails/app/templates/Gemfile b/railties/lib/rails/generators/rails/app/templates/Gemfile index c383d4842f..61daefef90 100644 --- a/railties/lib/rails/generators/rails/app/templates/Gemfile +++ b/railties/lib/rails/generators/rails/app/templates/Gemfile @@ -23,9 +23,13 @@ source 'http://rubygems.org' # Bundle gems for the local environment. Make sure to # put test-only gems in this group so their generators # and rake tasks are available in development mode: -# group :development, :test do -# gem 'webrat' -# end + +group :development, :test do + # Depend "turn" for pretty printing test output, but disable autorequire. + gem 'turn', :require => false + + # gem 'webrat' +end # Needed for guides generation # gem "RedCloth", "~> 4.2" diff --git a/railties/lib/rails/test_help.rb b/railties/lib/rails/test_help.rb index b9f7bdc2eb..41485c8bac 100644 --- a/railties/lib/rails/test_help.rb +++ b/railties/lib/rails/test_help.rb @@ -14,10 +14,14 @@ if defined?(Test::Unit::Util::BacktraceFilter) && ENV['BACKTRACE'].nil? end if defined?(MiniTest) - require 'turn' + # Enable turn if it is available + begin + require 'turn' - if MiniTest::Unit.respond_to?(:use_natural_language_case_names=) - MiniTest::Unit.use_natural_language_case_names = true + if MiniTest::Unit.respond_to?(:use_natural_language_case_names=) + MiniTest::Unit.use_natural_language_case_names = true + end + rescue LoadError end end diff --git a/railties/railties.gemspec b/railties/railties.gemspec index b1eda71c7f..cd0646b8ed 100644 --- a/railties/railties.gemspec +++ b/railties/railties.gemspec @@ -21,7 +21,6 @@ Gem::Specification.new do |s| s.add_dependency('rake', '>= 0.8.7') s.add_dependency('thor', '~> 0.14.4') s.add_dependency('rack-ssl', '~> 1.3.2') - s.add_dependency('turn', '~> 0.8.2') s.add_dependency('activesupport', version) s.add_dependency('actionpack', version) end |