Upgraded to Rails 2.3.4 (#3597)
* Ran the Rails upgrade
* Upgraded to Rails Engines 2.3.2
* Added a plugin to let Engines override application views.
* Converted tests to use the new classes:
** ActionController::TestCase for functional
** ActiveSupport::TestCase for units
* Converted ActiveRecord::Error message to a string.
* ActiveRecord grouping returns an ordered hash which doesn't have #sort!
* Updated the I18n storage_units format.
* Added some default initializers from a fresh rails app
* Changed the order of check_box_tags and hidden_field_tags. The hidden tag
needs to appear first in Rails 2.3, otherwise it will override any value in
the check_box_tag.
* Removed the custom handler for when the cookie store is tampered with.
Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not
load the data from it when it's been tampered with (e.g. no user login).
* Fixed mail layouts, 2.3 has problems with implicit multipart emails that
use layouts. Also removed some custom Redmine mailer code.
* Fixed a bug that occurred in tests where the "required" span tag would be
added to the :field_status translation. This resulted in an email string of:
<li>Status<span class="required"> *</span><span class="required"> *</span>
Instead of:
<li>Status: New</li>
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
+35
-7
@@ -118,10 +118,10 @@ namespace :db do
|
||||
end
|
||||
|
||||
desc 'Migrate a specified plugin.'
|
||||
task({:plugin => :environment}, :name, :version) do |task, args|
|
||||
name = args[:name] || ENV['NAME']
|
||||
task(:plugin => :environment) do
|
||||
name = ENV['NAME']
|
||||
if plugin = Engines.plugins[name]
|
||||
version = args[:version] || ENV['VERSION']
|
||||
version = ENV['VERSION']
|
||||
puts "Migrating #{plugin.name} to " + (version ? "version #{version}" : 'latest version') + " ..."
|
||||
plugin.migrate(version ? version.to_i : nil)
|
||||
else
|
||||
@@ -152,8 +152,8 @@ end
|
||||
|
||||
# this is just a modification of the original task in railties/lib/tasks/documentation.rake,
|
||||
# because the default task doesn't support subdirectories like <plugin>/app or
|
||||
# <plugin>/component. These tasks now include every file under a plugin's code paths (see
|
||||
# Plugin#code_paths).
|
||||
# <plugin>/component. These tasks now include every file under a plugin's load paths (see
|
||||
# Plugin#load_paths).
|
||||
namespace :doc do
|
||||
|
||||
plugins = FileList['vendor/plugins/**'].collect { |plugin| File.basename(plugin) }
|
||||
@@ -172,9 +172,9 @@ namespace :doc do
|
||||
options << '--line-numbers' << '--inline-source'
|
||||
options << '-T html'
|
||||
|
||||
# Include every file in the plugin's code_paths (see Plugin#code_paths)
|
||||
# Include every file in the plugin's load_paths (see Plugin#load_paths)
|
||||
if Engines.plugins[plugin]
|
||||
files.include("#{plugin_base}/{#{Engines.plugins[plugin].code_paths.join(",")}}/**/*.rb")
|
||||
files.include("#{plugin_base}/{#{Engines.plugins[plugin].load_paths.join(",")}}/**/*.rb")
|
||||
end
|
||||
if File.exists?("#{plugin_base}/README")
|
||||
files.include("#{plugin_base}/README")
|
||||
@@ -217,6 +217,34 @@ Report any issues on http://dev.rails-engines.org. Thanks!
|
||||
-~===============( ... as you were ... )============================~-}
|
||||
end
|
||||
|
||||
namespace :engines do
|
||||
|
||||
def engine_plugins
|
||||
Dir["vendor/plugins/*"].select { |f| File.directory?(File.join(f, "app")) }.map { |f| File.basename(f) }.join(",")
|
||||
end
|
||||
|
||||
desc "Run tests from within engines plugins (plugins with an 'app' directory)"
|
||||
task :all => [:units, :functionals, :integration]
|
||||
|
||||
desc "Run unit tests from within engines plugins (plugins with an 'app' directory)"
|
||||
Rake::TestTask.new(:units => "test:plugins:setup_plugin_fixtures") do |t|
|
||||
t.pattern = "vendor/plugins/{#{ENV['PLUGIN'] || engine_plugins}}/test/unit/**/*_test.rb"
|
||||
t.verbose = true
|
||||
end
|
||||
|
||||
desc "Run functional tests from within engines plugins (plugins with an 'app' directory)"
|
||||
Rake::TestTask.new(:functionals => "test:plugins:setup_plugin_fixtures") do |t|
|
||||
t.pattern = "vendor/plugins/{#{ENV['PLUGIN'] || engine_plugins}}/test/functional/**/*_test.rb"
|
||||
t.verbose = true
|
||||
end
|
||||
|
||||
desc "Run integration tests from within engines plugins (plugins with an 'app' directory)"
|
||||
Rake::TestTask.new(:integration => "test:plugins:setup_plugin_fixtures") do |t|
|
||||
t.pattern = "vendor/plugins/{#{ENV['PLUGIN'] || engine_plugins}}/test/integration/**/*_test.rb"
|
||||
t.verbose = true
|
||||
end
|
||||
end
|
||||
|
||||
namespace :plugins do
|
||||
|
||||
desc "Run the plugin tests in vendor/plugins/**/test (or specify with PLUGIN=name)"
|
||||
|
||||
Reference in New Issue
Block a user