Upgrade to Rails 3.2.8 (#11758).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10275 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2012-09-02 10:08:51 +00:00
parent 139ddd639f
commit 265baa1b2c
18 changed files with 38 additions and 38 deletions

View File

@ -1,6 +1,6 @@
source 'http://rubygems.org' source 'http://rubygems.org'
gem 'rails', '3.2.6' gem 'rails', '3.2.8'
gem "jquery-rails", "~> 2.0.2" gem "jquery-rails", "~> 2.0.2"
gem "i18n", "~> 0.6.0" gem "i18n", "~> 0.6.0"
gem "coderay", "~> 1.0.6" gem "coderay", "~> 1.0.6"

View File

@ -1206,7 +1206,7 @@ module ApplicationHelper
# Returns the javascript tags that are included in the html layout head # Returns the javascript tags that are included in the html layout head
def javascript_heads def javascript_heads
tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.2', 'application') tags = javascript_include_tag('jquery-1.7.2-ui-1.8.21-ujs-2.0.3', 'application')
unless User.current.pref.warn_on_leaving_unsaved == '0' unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });") tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end end

View File

@ -2,5 +2,5 @@
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>'); $('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'groups/memberships') %>');
$('#member-<%= @membership.id %>').effect("highlight"); $('#member-<%= @membership.id %>').effect("highlight");
<% else %> <% else %>
alert('<%= escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', '))) %>'); alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))) %>');
<% end %> <% end %>

View File

@ -7,5 +7,5 @@ hideOnLoad();
<% end %> <% end %>
<% else %> <% else %>
<% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %> <% errors = @members.collect {|m| m.errors.full_messages}.flatten.uniq.join(', ') %>
alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => errors) %>'); alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => errors))) %>');
<% end %> <% end %>

View File

@ -3,5 +3,5 @@
$('#related-issue-<%= @issue.id %>').effect("highlight"); $('#related-issue-<%= @issue.id %>').effect("highlight");
$('#issue_id').focus(); $('#issue_id').focus();
<% else %> <% else %>
alert("<%= escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid')) %>"); alert("<%= raw(escape_javascript(l(:label_issue) + ' ' + l('activerecord.errors.messages.invalid'))) %>");
<% end %> <% end %>

View File

@ -2,5 +2,5 @@
$('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>'); $('#tab-content-memberships').html('<%= escape_javascript(render :partial => 'users/memberships') %>');
$("#member-<%= @membership.id %>").effect("highlight"); $("#member-<%= @membership.id %>").effect("highlight");
<% else %> <% else %>
alert('<%= escape_javascript l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')) %>'); alert('<%= raw(escape_javascript(l(:notice_failed_to_save_members, :errors => @membership.errors.full_messages.join(', ')))) %>');
<% end %> <% end %>

View File

@ -48,7 +48,7 @@ class ActivitiesControllerTest < ActionController::TestCase
:child => { :tag => "dt", :child => { :tag => "dt",
:attributes => { :class => /issue/ }, :attributes => { :class => /issue/ },
:child => { :tag => "a", :child => { :tag => "a",
:content => /#{Issue.find(1).subject}/, :content => /Can&#x27;t print recipes/,
} }
} }
} }
@ -69,7 +69,7 @@ class ActivitiesControllerTest < ActionController::TestCase
:child => { :tag => "dt", :child => { :tag => "dt",
:attributes => { :class => /issue/ }, :attributes => { :class => /issue/ },
:child => { :tag => "a", :child => { :tag => "a",
:content => /#{Issue.find(5).subject}/, :content => /Subproject issue/,
} }
} }
} }
@ -93,7 +93,7 @@ class ActivitiesControllerTest < ActionController::TestCase
:child => { :tag => "dt", :child => { :tag => "dt",
:attributes => { :class => /issue/ }, :attributes => { :class => /issue/ },
:child => { :tag => "a", :child => { :tag => "a",
:content => /#{Issue.find(1).subject}/, :content => /Can&#x27;t print recipes/,
} }
} }
} }

View File

@ -65,7 +65,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'new' assert_template 'new'
end end
assert_error_tag :content => /host can't be blank/i assert_error_tag :content => /host can&#x27;t be blank/i
end end
def test_edit def test_edit
@ -90,7 +90,7 @@ class AuthSourcesControllerTest < ActionController::TestCase
put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '', :port => '389', :attr_login => 'uid'} put :update, :id => 1, :auth_source => {:name => 'Renamed', :host => '', :port => '389', :attr_login => 'uid'}
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_error_tag :content => /host can't be blank/i assert_error_tag :content => /host can&#x27;t be blank/i
end end
def test_destroy def test_destroy

View File

@ -53,7 +53,7 @@ class IssueStatusesControllerTest < ActionController::TestCase
post :create, :issue_status => {:name => ''} post :create, :issue_status => {:name => ''}
assert_response :success assert_response :success
assert_template 'new' assert_template 'new'
assert_error_tag :content => /name can't be blank/i assert_error_tag :content => /name can&#x27;t be blank/i
end end
def test_edit def test_edit
@ -73,7 +73,7 @@ class IssueStatusesControllerTest < ActionController::TestCase
put :update, :id => '3', :issue_status => {:name => ''} put :update, :id => '3', :issue_status => {:name => ''}
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_error_tag :content => /name can't be blank/i assert_error_tag :content => /name can&#x27;t be blank/i
end end
def test_destroy def test_destroy

View File

@ -61,7 +61,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'index' assert_template 'index'
assert_not_nil assigns(:issues) assert_not_nil assigns(:issues)
assert_nil assigns(:project) assert_nil assigns(:project)
assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Can&#x27;t print recipes/
assert_tag :tag => 'a', :content => /Subproject issue/ assert_tag :tag => 'a', :content => /Subproject issue/
# private projects hidden # private projects hidden
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
@ -78,7 +78,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'index' assert_template 'index'
assert_not_nil assigns(:issues) assert_not_nil assigns(:issues)
assert_nil assigns(:project) assert_nil assigns(:project)
assert_no_tag :tag => 'a', :content => /Can't print recipes/ assert_no_tag :tag => 'a', :content => /Can&#x27;t print recipes/
assert_tag :tag => 'a', :content => /Subproject issue/ assert_tag :tag => 'a', :content => /Subproject issue/
end end
@ -95,7 +95,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'index' assert_template 'index'
assert_not_nil assigns(:issues) assert_not_nil assigns(:issues)
assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Can&#x27;t print recipes/
assert_no_tag :tag => 'a', :content => /Subproject issue/ assert_no_tag :tag => 'a', :content => /Subproject issue/
end end
@ -105,7 +105,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'index' assert_template 'index'
assert_not_nil assigns(:issues) assert_not_nil assigns(:issues)
assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Can&#x27;t print recipes/
assert_tag :tag => 'a', :content => /Subproject issue/ assert_tag :tag => 'a', :content => /Subproject issue/
assert_no_tag :tag => 'a', :content => /Issue of a private subproject/ assert_no_tag :tag => 'a', :content => /Issue of a private subproject/
end end
@ -117,7 +117,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'index' assert_template 'index'
assert_not_nil assigns(:issues) assert_not_nil assigns(:issues)
assert_tag :tag => 'a', :content => /Can't print recipes/ assert_tag :tag => 'a', :content => /Can&#x27;t print recipes/
assert_tag :tag => 'a', :content => /Subproject issue/ assert_tag :tag => 'a', :content => /Subproject issue/
assert_tag :tag => 'a', :content => /Issue of a private subproject/ assert_tag :tag => 'a', :content => /Issue of a private subproject/
end end
@ -823,7 +823,7 @@ class IssuesControllerTest < ActionController::TestCase
:child => { :tag => 'legend', :child => { :tag => 'legend',
:content => /Notes/ } } :content => /Notes/ } }
assert_tag :tag => 'title', assert_tag :tag => 'title',
:content => "Bug #1: Can't print recipes - eCookbook - Redmine" :content => "Bug #1: Can&#x27;t print recipes - eCookbook - Redmine"
end end
def test_show_by_manager def test_show_by_manager
@ -1807,7 +1807,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'new' assert_template 'new'
issue = assigns(:issue) issue = assigns(:issue)
assert_not_nil issue assert_not_nil issue
assert_error_tag :content => /Database can't be blank/ assert_error_tag :content => /Database can&#x27;t be blank/
end end
def test_create_should_validate_required_fields def test_create_should_validate_required_fields
@ -1831,8 +1831,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_template 'new' assert_template 'new'
end end
assert_error_tag :content => /Due date can't be blank/i assert_error_tag :content => /Due date can&#x27;t be blank/i
assert_error_tag :content => /Bar can't be blank/i assert_error_tag :content => /Bar can&#x27;t be blank/i
end end
def test_create_should_ignore_readonly_fields def test_create_should_ignore_readonly_fields
@ -2869,7 +2869,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_error_tag :descendant => {:content => /Activity can't be blank/} assert_error_tag :descendant => {:content => /Activity can&#x27;t be blank/}
assert_tag :textarea, :attributes => { :name => 'notes' }, :content => "\n"+notes assert_tag :textarea, :attributes => { :name => 'notes' }, :content => "\n"+notes
assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => "2z" } assert_tag :input, :attributes => { :name => 'time_entry[hours]', :value => "2z" }
end end
@ -2887,8 +2887,8 @@ class IssuesControllerTest < ActionController::TestCase
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_error_tag :descendant => {:content => /Activity can't be blank/} assert_error_tag :descendant => {:content => /Activity can&#x27;t be blank/}
assert_error_tag :descendant => {:content => /Hours can't be blank/} assert_error_tag :descendant => {:content => /Hours can&#x27;t be blank/}
assert_tag :textarea, :attributes => { :name => 'notes' }, :content => "\n"+notes assert_tag :textarea, :attributes => { :name => 'notes' }, :content => "\n"+notes
assert_tag :input, :attributes => { :name => 'time_entry[comments]', :value => "this is my comment" } assert_tag :input, :attributes => { :name => 'time_entry[comments]', :value => "this is my comment" }
end end

View File

@ -149,7 +149,7 @@ class MyControllerTest < ActionController::TestCase
:new_password_confirmation => 'hello2' :new_password_confirmation => 'hello2'
assert_response :success assert_response :success
assert_template 'password' assert_template 'password'
assert_error_tag :content => /Password doesn't match confirmation/ assert_error_tag :content => /Password doesn&#x27;t match confirmation/
# wrong password # wrong password
post :password, :password => 'wrongpassword', post :password, :password => 'wrongpassword',

View File

@ -123,7 +123,7 @@ class NewsControllerTest < ActionController::TestCase
assert_template 'new' assert_template 'new'
assert_not_nil assigns(:news) assert_not_nil assigns(:news)
assert assigns(:news).new_record? assert assigns(:news).new_record?
assert_error_tag :content => /title can't be blank/i assert_error_tag :content => /title can&#x27;t be blank/i
end end
def test_get_edit def test_get_edit
@ -160,7 +160,7 @@ class NewsControllerTest < ActionController::TestCase
put :update, :id => 1, :news => { :description => '' } put :update, :id => 1, :news => { :description => '' }
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_error_tag :content => /description can't be blank/i assert_error_tag :content => /description can&#x27;t be blank/i
end end
def test_destroy def test_destroy

View File

@ -409,7 +409,7 @@ class ProjectsControllerTest < ActionController::TestCase
post :update, :id => 1, :project => {:name => ''} post :update, :id => 1, :project => {:name => ''}
assert_response :success assert_response :success
assert_template 'settings' assert_template 'settings'
assert_error_tag :content => /name can't be blank/i assert_error_tag :content => /name can&#x27;t be blank/i
end end
def test_update_should_be_denied_for_member_on_closed_project def test_update_should_be_denied_for_member_on_closed_project

View File

@ -95,7 +95,7 @@ class TrackersControllerTest < ActionController::TestCase
end end
assert_response :success assert_response :success
assert_template 'new' assert_template 'new'
assert_error_tag :content => /name can't be blank/i assert_error_tag :content => /name can&#x27;t be blank/i
end end
def test_edit def test_edit
@ -160,7 +160,7 @@ class TrackersControllerTest < ActionController::TestCase
put :update, :id => 1, :tracker => { :name => '' } put :update, :id => 1, :tracker => { :name => '' }
assert_response :success assert_response :success
assert_template 'edit' assert_template 'edit'
assert_error_tag :content => /name can't be blank/i assert_error_tag :content => /name can&#x27;t be blank/i
end end
def test_move_lower def test_move_lower

View File

@ -58,7 +58,7 @@ class WikisControllerTest < ActionController::TestCase
end end
assert_include 'errorExplanation', response.body assert_include 'errorExplanation', response.body
assert_include 'Start page can\\\'t be blank', response.body assert_include 'Start page can&#x27;t be blank', response.body
end end
def test_update def test_update

View File

@ -690,7 +690,7 @@ RAW
expected = <<-EXPECTED expected = <<-EXPECTED
<p><a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a></p> <p><a href="/projects/ecookbook/wiki/CookBook_documentation" class="wiki-page">CookBook documentation</a></p>
<p><a href="/issues/1" class="issue status-1 priority-4" title="Can't print recipes (New)">#1</a></p> <p><a href="/issues/1" class="issue status-1 priority-4" title="Can&#x27;t print recipes (New)">#1</a></p>
<pre> <pre>
[[CookBook documentation]] [[CookBook documentation]]

View File

@ -55,7 +55,7 @@ class MailerTest < ActiveSupport::TestCase
# link to a referenced ticket # link to a referenced ticket
assert_select 'a[href=?][title=?]', assert_select 'a[href=?][title=?]',
'https://mydomain.foo/issues/1', 'https://mydomain.foo/issues/1',
'Can\'t print recipes (New)', 'Can&#x27;t print recipes (New)',
:text => '#1' :text => '#1'
# link to a changeset # link to a changeset
assert_select 'a[href=?][title=?]', assert_select 'a[href=?][title=?]',
@ -94,7 +94,7 @@ class MailerTest < ActiveSupport::TestCase
# link to a referenced ticket # link to a referenced ticket
assert_select 'a[href=?][title=?]', assert_select 'a[href=?][title=?]',
'http://mydomain.foo/rdm/issues/1', 'http://mydomain.foo/rdm/issues/1',
'Can\'t print recipes (New)', 'Can&#x27;t print recipes (New)',
:text => '#1' :text => '#1'
# link to a changeset # link to a changeset
assert_select 'a[href=?][title=?]', assert_select 'a[href=?][title=?]',
@ -134,7 +134,7 @@ class MailerTest < ActiveSupport::TestCase
# link to a referenced ticket # link to a referenced ticket
assert_select 'a[href=?][title=?]', assert_select 'a[href=?][title=?]',
'http://mydomain.foo/rdm/issues/1', 'http://mydomain.foo/rdm/issues/1',
'Can\'t print recipes (New)', 'Can&#x27;t print recipes (New)',
:text => '#1' :text => '#1'
# link to a changeset # link to a changeset
assert_select 'a[href=?][title=?]', assert_select 'a[href=?][title=?]',