[DRE-commits] r5424 - in trunk/redmine/debian: . patches

Jérémy Lal kapouer-guest at alioth.debian.org
Tue May 25 23:27:49 UTC 2010


Author: kapouer-guest
Date: 2010-05-25 23:27:46 +0000 (Tue, 25 May 2010)
New Revision: 5424

Removed:
   trunk/redmine/debian/patches/0001-Revert-this-default_scope-rails-2.3-usage.patch
   trunk/redmine/debian/patches/0002-Revert-rails-2.3-changes-in-mailer.patch
   trunk/redmine/debian/patches/0003-Depends-on-rails-2.2.3.patch
   trunk/redmine/debian/patches/0004-Returns-a-hash-in-any-case-since-rails-2.2-could-ret.patch
   trunk/redmine/debian/patches/0005-No-need-to-declare-dependency-on-mocha.-It-s-there-b.patch
   trunk/redmine/debian/patches/0006-Rescue-TamperedWithCookie-because-rails-2.2-does-not.patch
   trunk/redmine/debian/patches/0007-Revert-this-rails-2.3-plugin.patch
   trunk/redmine/debian/patches/0010-Duplicate-name-value-in-request.patch
   trunk/redmine/debian/patches/0011-Sanitize-textarea-id-for-rails2.2.patch
   trunk/redmine/debian/patches/0012-OrderedHash-to-Hash.patch
   trunk/redmine/debian/patches/0013-Monkey-patches-for-group-support-taken-from-rails-2..patch
   trunk/redmine/debian/patches/0015-Request-forgery-protection-allow-XHR.patch
   trunk/redmine/debian/patches/0018-engines-rails2.2.patch
   trunk/redmine/debian/patches/0019-no-batch_size-in-rails2.2.patch
   trunk/redmine/debian/patches/0020-application-rb-for-rails2.2.patch
Modified:
   trunk/redmine/debian/README.Debian
   trunk/redmine/debian/README.source
   trunk/redmine/debian/TODO
   trunk/redmine/debian/changelog
   trunk/redmine/debian/control
   trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch
   trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch
   trunk/redmine/debian/patches/series
   trunk/redmine/debian/postinst
Log:
Upgrade to rails 2.3.5

Modified: trunk/redmine/debian/README.Debian
===================================================================
--- trunk/redmine/debian/README.Debian	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/README.Debian	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,13 +1,5 @@
 redmine for Debian
 ------------------
-* REDMINE 0.9 PATCHED FOR RAILS 2.2 COMPATIBILITY
- rails 2.3 is not currently available in debian. This redmine 0.9 version has been
- patched to be able to run with rails 2.2. There are some drawbacks :
- - prepend_engine_views plugin is removed,
- so any third-party plugin depending on it will fail.
- - login then logout does not clear session (this is rails 2.2 failure)
- - REST web service partially working, e.g.
- get /news.json with a valid HTTP authentication does not login as the user.
 
 * SUPPORTS SETUP AND UPGRADES OF MULTIPLE DATABASE INSTANCES
  This redmine package is designed to automatically configure database

Modified: trunk/redmine/debian/README.source
===================================================================
--- trunk/redmine/debian/README.source	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/README.source	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,11 +1,3 @@
-Notes from a discussion with upstream author:
-Redmine 0.8.7 targets rails 2.1.2
-Redmine 0.9 targets rails 2.3
-UPSTREAM TRUNK MIGRATION TO RAILS 2.3 HAS STARTED SINCE REVISION 2886
-Until rails 2.3 enters debian, redmine debian package will keep using rails 2.2.3.
-All upstream revisions concerning rails 2.3 will be either ignored or patched to
-work with rails 2.2
-
 * RAKE TEST
 1. dpkg-reconfigure redmine, add a "test" sqlite3 instance
 2. edit /etc/redmine/test/database.yml, copy 'production' section and rename it 'test'
@@ -15,46 +7,4 @@
 Notice : there are debian packages available for libshoulda-ruby and libmocha-ruby.
 To run tests with repositories, they must be uncompressed and put in the right place.
 
-4. These are rails 2.2 failures. It is not clear (to me) wether the fix should be backported from rails 2.3,
-or the failure simply ignored since they could be considered minor failures.
-  1) This one is a rails 2.2 bug
-Failure:
-test_login_and_logout_should_clear_session(AccountTest)
-    [./test/integration/account_test.rb:191:in `test_login_and_logout_should_clear_session'
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run'
-     /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/integration.rb:597:in `run']:
-login should reset session.
-<nil> expected to be != to
-<nil>.
-
-  2) This one is a false positive, since the redirection makes sense.
-Failure:
-test_Add_a_user_as_an_anonymous_user_should_fail(AdminTest)
-    [./test/integration/admin_test.rb:47:in `test_Add_a_user_as_an_anonymous_user_should_fail'
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run'
-     /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/integration.rb:597:in `run']:
-Expected response to be a redirect to <http://www.example.com/login?back_url=http%3A%2F%2Fwww.example.com%2Fusers%2Fnew> but was a redirect to <http://www.example.com/login?back_url=http%3A%2F%2Fwww.example.com%2Fusers%2Fadd>.
-
-  3) Failure:
-test: get /news in :json format with a valid HTTP authentication should login as the user. (HttpBasicLoginWithApiTokenTest)
-    [./test/integration/http_basic_login_with_api_token_test.rb:63:in `__bind_1261645152_696173'
-     /var/lib/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:351:in `call'
-     /var/lib/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:351:in `test: get /news in :json format with a valid HTTP authentication should login as the user. '
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run'
-     /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/integration.rb:597:in `run']:
-<#<User id: 12, login: "usez7", hashed_password: "", firstname: "Bps", lastname: "Dpv", mail: "usev4 at example.com", mail_notification: false, admin: false, status: 1, last_login_on: nil, language: "", auth_source_id: nil, created_on: "2009-12-24 09:59:12", updated_on: "2009-12-24 09:59:12", type: "User", identity_url: nil>> expected but was
-<#<AnonymousUser id: 6, login: "", hashed_password: "1", firstname: "", lastname: "Anonymous", mail: "", mail_notification: false, admin: false, status: 0, last_login_on: nil, language: "", auth_source_id: nil, created_on: "2006-07-19 19:33:19", updated_on: "2006-07-19 19:33:19", type: "AnonymousUser", identity_url: nil>>.
-
-  4) Failure:
-test: get /news in :json format with a valid HTTP authentication should respond with success. (HttpBasicLoginWithApiTokenTest)
-    [/var/lib/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/assertions.rb:55:in `assert_accepts'
-     /var/lib/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/action_controller/macros.rb:124:in `__bind_1261645153_57906'
-     /var/lib/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:351:in `call'
-     /var/lib/gems/1.8/gems/thoughtbot-shoulda-2.10.2/lib/shoulda/context.rb:351:in `test: get /news in :json format with a valid HTTP authentication should respond with success. '
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `__send__'
-     /usr/share/redmine/vendor/rails/activesupport/lib/active_support/testing/setup_and_teardown.rb:94:in `run'
-     /usr/share/redmine/vendor/rails/actionpack/lib/action_controller/integration.rb:597:in `run']:
-Expected response to be a 200, but was 401
+4. Unfortunately, a bug in rails 2.3.5 prevents from running integration tests.

Modified: trunk/redmine/debian/TODO
===================================================================
--- trunk/redmine/debian/TODO	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/TODO	2010-05-25 23:27:46 UTC (rev 5424)
@@ -5,3 +5,10 @@
 - REST web service partially working, e.g.
 get /news.json with a valid HTTP authentication does not login as the user.
 - plugin_assets should really be put in RAILS_CACHE/plugin_assets, i.e. depend on instance name.
+- in general, check that failures that happened with rails 2.2 don't with rails 2.3 :
+	delivery_method: :async_smtp
+	It has been reported [0] that this method does not work when used by a rake task (e.g.
+	in a crontab). Simply use :smtp method in that case.
+	[0]
+	http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=570402
+- and also the four usual failures with redmine 0.9 and rails 2.2, see previous README.source

Modified: trunk/redmine/debian/changelog
===================================================================
--- trunk/redmine/debian/changelog	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/changelog	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,3 +1,12 @@
+redmine (0.9.4-3) unstable; urgency=low
+
+  * Depends on rails 2.3.5. (Closes: #583107)
+  * Clean up dependencies and recommandations.
+  * Overall improvement over previous rails 2.2.3 version, since
+    upstream supports redmine-0.9.4 / rails 2.3.5 combination.
+
+ -- Jérémy Lal <kapouer at melix.org>  Tue, 25 May 2010 19:58:45 +0200
+
 redmine (0.9.4-2) unstable; urgency=low
 
   * ENV['RAILS_RELATIVE_URL_ROOT'] should never be empty.
@@ -3,5 +12,5 @@
     (Closes: #581383)
 
- -- Jérémy Lal <kapouer at melix.org>  Wed, 12 May 2010 22:53:28 +0200
+ -- Jérémy Lal <kapouer at melix.org>  Wed, 12 May 2010 17:25:00 +0200
 
 redmine (0.9.4-1) unstable; urgency=low

Modified: trunk/redmine/debian/control
===================================================================
--- trunk/redmine/debian/control	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/control	2010-05-25 23:27:46 UTC (rev 5424)
@@ -14,9 +14,8 @@
 Package: redmine
 Architecture: all
 Pre-Depends: debconf
-Depends: ruby, ruby1.8 (>= 1.8.7), rake (>=0.8.3), rails (>= 2.2.3), rails (<< 2.3), libjs-prototype (>= 1.6.1), libjs-scriptaculous (>= 1.8.2), dbconfig-common, redmine-sqlite | redmine-mysql | redmine-pgsql, ${misc:Depends}
-Recommends: libfcgi-ruby, libapache2-mod-passenger | libapache2-mod-fcgid
-Suggests: libsvn-ruby (>= 1.3), librmagick-ruby, libopenid-ruby, thin | mongrel | httpd-cgi
+Depends: ruby, ruby1.8 (>= 1.8.7), rails (>= 2.3.5), libactivesupport-ruby (>= 2.3.5), libactiveresource-ruby (>= 2.3.5), libactionpack-ruby (>= 2.3.5), libactionmailer-ruby (>= 2.3.5), libjs-scriptaculous (>= 1.8.2), dbconfig-common, redmine-sqlite | redmine-mysql | redmine-pgsql, ${misc:Depends}
+Suggests: libsvn-ruby (>= 1.3), librmagick-ruby, libopenid-ruby
 Description: flexible project management web application
  Redmine is a flexible project management web application. Written using Ruby
  on Rails framework, it is cross-platform and cross-database.

Deleted: trunk/redmine/debian/patches/0001-Revert-this-default_scope-rails-2.3-usage.patch
===================================================================
--- trunk/redmine/debian/patches/0001-Revert-this-default_scope-rails-2.3-usage.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0001-Revert-this-default_scope-rails-2.3-usage.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,33 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 22 Nov 2009 23:29:40 +0100
-Subject: [PATCH] Revert this default_scope rails 2.3 usage.
-
----
- app/models/enumeration.rb |    6 ++----
- 1 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/app/models/enumeration.rb b/app/models/enumeration.rb
-index 3b7a434..947e7b7 100644
---- a/app/models/enumeration.rb
-+++ b/app/models/enumeration.rb
-@@ -16,8 +16,6 @@
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- 
- class Enumeration < ActiveRecord::Base
--  default_scope :order => "#{Enumeration.table_name}.position ASC"
--  
-   belongs_to :project
-   
-   acts_as_list :scope => 'type = \'#{type}\''
-@@ -30,8 +28,8 @@ class Enumeration < ActiveRecord::Base
-   validates_uniqueness_of :name, :scope => [:type, :project_id]
-   validates_length_of :name, :maximum => 30
- 
--  named_scope :shared, :conditions => { :project_id => nil }
--  named_scope :active, :conditions => { :active => true }
-+  named_scope :shared, :conditions => { :project_id => nil }, :order => "#{Enumeration.table_name}.position ASC"
-+  named_scope :active, :conditions => { :active => true }, :order => "#{Enumeration.table_name}.position ASC"
- 
-   def self.default
-     # Creates a fake default scope so Enumeration.default will check
--- 

Deleted: trunk/redmine/debian/patches/0002-Revert-rails-2.3-changes-in-mailer.patch
===================================================================
--- trunk/redmine/debian/patches/0002-Revert-rails-2.3-changes-in-mailer.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0002-Revert-rails-2.3-changes-in-mailer.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,180 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Mon, 23 Nov 2009 00:32:38 +0100
-Subject: [PATCH] Revert rails 2.3 changes in mailer.
-
----
- app/models/mailer.rb |   49 ++++++++++++++++++-------------------------------
- 1 files changed, 18 insertions(+), 31 deletions(-)
-
---- a/app/models/mailer.rb
-+++ b/app/models/mailer.rb
-@@ -16,7 +16,6 @@
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
- 
- class Mailer < ActionMailer::Base
--  layout 'mailer'
-   helper :application
-   helper :issues
-   helper :custom_fields
-@@ -46,7 +45,6 @@
-     subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}"
-     body :issue => issue,
-          :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
--    render_multipart('issue_add', body)
-   end
- 
-   # Builds a tmail object used to email recipients of the edited issue.
-@@ -73,8 +71,6 @@
-     body :issue => issue,
-          :journal => journal,
-          :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)
--
--    render_multipart('issue_edit', body)
-   end
- 
-   def reminder(user, issues, days)
-@@ -84,7 +80,6 @@
-     body :issues => issues,
-          :days => days,
-          :issues_url => url_for(:controller => 'issues', :action => 'index', :set_filter => 1, :assigned_to_id => user.id, :sort_key => 'due_date', :sort_order => 'asc')
--    render_multipart('reminder', body)
-   end
- 
-   # Builds a tmail object used to email users belonging to the added document's project.
-@@ -98,7 +93,6 @@
-     subject "[#{document.project.name}] #{l(:label_document_new)}: #{document.title}"
-     body :document => document,
-          :document_url => url_for(:controller => 'documents', :action => 'show', :id => document)
--    render_multipart('document_added', body)
-   end
- 
-   # Builds a tmail object used to email recipients of a project when an attachements are added.
-@@ -129,7 +123,6 @@
-     body :attachments => attachments,
-          :added_to => added_to,
-          :added_to_url => added_to_url
--    render_multipart('attachments_added', body)
-   end
-   
-   # Builds a tmail object used to email recipients of a news' project when a news item is added.
-@@ -144,7 +137,6 @@
-     subject "[#{news.project.name}] #{l(:label_news)}: #{news.title}"
-     body :news => news,
-          :news_url => url_for(:controller => 'news', :action => 'show', :id => news)
--    render_multipart('news_added', body)
-   end
- 
-   # Builds a tmail object used to email the recipients of the specified message that was posted. 
-@@ -162,7 +154,6 @@
-     subject "[#{message.board.project.name} - #{message.board.name} - msg#{message.root.id}] #{message.subject}"
-     body :message => message,
-          :message_url => url_for(:controller => 'messages', :action => 'show', :board_id => message.board_id, :id => message.root)
--    render_multipart('message_posted', body)
-   end
-   
-   # Builds a tmail object used to email the recipients of a project of the specified wiki content was added. 
-@@ -179,7 +170,6 @@
-     subject "[#{wiki_content.project.name}] #{l(:mail_subject_wiki_content_added, :page => wiki_content.page.pretty_title)}"
-     body :wiki_content => wiki_content,
-          :wiki_content_url => url_for(:controller => 'wiki', :action => 'index', :id => wiki_content.project, :page => wiki_content.page.title)
--    render_multipart('wiki_content_added', body)
-   end
-   
-   # Builds a tmail object used to email the recipients of a project of the specified wiki content was updated. 
-@@ -197,7 +187,6 @@
-     body :wiki_content => wiki_content,
-          :wiki_content_url => url_for(:controller => 'wiki', :action => 'index', :id => wiki_content.project, :page => wiki_content.page.title),
-          :wiki_diff_url => url_for(:controller => 'wiki', :action => 'diff', :id => wiki_content.project, :page => wiki_content.page.title, :version => wiki_content.version)
--    render_multipart('wiki_content_updated', body)
-   end
- 
-   # Builds a tmail object used to email the specified user their account information.
-@@ -212,7 +201,6 @@
-     body :user => user,
-          :password => password,
-          :login_url => url_for(:controller => 'account', :action => 'login')
--    render_multipart('account_information', body)
-   end
- 
-   # Builds a tmail object used to email all active administrators of an account activation request.
-@@ -226,7 +214,6 @@
-     subject l(:mail_subject_account_activation_request, Setting.app_title)
-     body :user => user,
-          :url => url_for(:controller => 'users', :action => 'index', :status => User::STATUS_REGISTERED, :sort_key => 'created_on', :sort_order => 'desc')
--    render_multipart('account_activation_request', body)
-   end
- 
-   # Builds a tmail object used to email the specified user that their account was activated by an administrator.
-@@ -240,7 +227,6 @@
-     subject l(:mail_subject_register, Setting.app_title)
-     body :user => user,
-          :login_url => url_for(:controller => 'account', :action => 'login')
--    render_multipart('account_activated', body)
-   end
- 
-   def lost_password(token)
-@@ -249,7 +235,6 @@
-     subject l(:mail_subject_lost_password, Setting.app_title)
-     body :token => token,
-          :url => url_for(:controller => 'account', :action => 'lost_password', :token => token.value)
--    render_multipart('lost_password', body)
-   end
- 
-   def register(token)
-@@ -258,7 +243,6 @@
-     subject l(:mail_subject_register, Setting.app_title)
-     body :token => token,
-          :url => url_for(:controller => 'account', :action => 'activate', :token => token.value)
--    render_multipart('register', body)
-   end
- 
-   def test(user)
-@@ -266,7 +250,6 @@
-     recipients user.mail
-     subject 'Redmine test'
-     body :url => url_for(:controller => 'welcome')
--    render_multipart('test', body)
-   end
- 
-   # Overrides default deliver! method to prevent from sending an email
-@@ -358,22 +341,26 @@
-     super
-   end
- 
--  # Rails 2.3 has problems rendering implicit multipart messages with
--  # layouts so this method will wrap an multipart messages with
--  # explicit parts.
--  #
--  # https://rails.lighthouseapp.com/projects/8994/tickets/2338-actionmailer-mailer-views-and-content-type
--  # https://rails.lighthouseapp.com/projects/8994/tickets/1799-actionmailer-doesnt-set-template_format-when-rendering-layouts
--  
--  def render_multipart(method_name, body)
-+  # Renders a message with the corresponding layout
-+  def render_message(method_name, body)
-+    layout = method_name.to_s.match(%r{text\.html\.(rhtml|rxml)}) ? 'layout.text.html.rhtml' : 'layout.text.plain.rhtml'
-+    body[:content_for_layout] = render(:file => method_name, :body => body)
-+    ActionView::Base.new(template_root, body, self).render(:file => "mailer/#{layout}", :use_full_path => true)
-+  end
-+
-+  # for the case of plain text only
-+  def body(*params)
-+    value = super(*params)
-     if Setting.plain_text_mail?
--      content_type "text/plain"
--      body render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb')
--    else
--      content_type "multipart/alternative"
--      part :content_type => "text/plain", :body => render(:file => "#{method_name}.text.plain.rhtml", :body => body, :layout => 'mailer.text.plain.erb')
--      part :content_type => "text/html", :body => render_message("#{method_name}.text.html.rhtml", body)
-+      templates = Dir.glob("#{template_path}/#{@template}.text.plain.{rhtml,erb}")
-+      unless String === @body or templates.empty?
-+        template = File.basename(templates.first)
-+        @body[:content_for_layout] = render(:file => template, :body => @body)
-+        @body = ActionView::Base.new(template_root, @body, self).render(:file => "mailer/layout.text.plain.rhtml", :use_full_path => true)
-+        return @body
-+      end
-     end
-+    return value
-   end
- 
-   # Makes partial rendering work with Rails 1.2 (retro-compatibility)

Deleted: trunk/redmine/debian/patches/0003-Depends-on-rails-2.2.3.patch
===================================================================
--- trunk/redmine/debian/patches/0003-Depends-on-rails-2.2.3.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0003-Depends-on-rails-2.2.3.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,42 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Mon, 23 Nov 2009 00:44:09 +0100
-Subject: [PATCH] Depends on rails 2.2.3
-
----
- config/environment.rb          |    2 +-
- vendor/plugins/engines/boot.rb |    4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/config/environment.rb b/config/environment.rb
-index 97fc54a..1f7d23e 100644
---- a/config/environment.rb
-+++ b/config/environment.rb
-@@ -5,7 +5,7 @@
- # ENV['RAILS_ENV'] ||= 'production'
- 
- # Specifies gem version of Rails to use when vendor/rails is not present
--RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
-+RAILS_GEM_VERSION = '2.2.3' unless defined? RAILS_GEM_VERSION
- 
- # Bootstrap the Rails environment, frameworks, and default configuration
- require File.join(File.dirname(__FILE__), 'boot')
-diff --git a/vendor/plugins/engines/boot.rb b/vendor/plugins/engines/boot.rb
-index 7dd90d1..c153353 100644
---- a/vendor/plugins/engines/boot.rb
-+++ b/vendor/plugins/engines/boot.rb
-@@ -1,6 +1,6 @@
- begin
-   require 'rails/version'
--  unless Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 3 && Rails::VERSION::TINY >= 2
-+  unless Rails::VERSION::MAJOR >= 2 && Rails::VERSION::MINOR >= 2 && Rails::VERSION::TINY >= 3
-     raise "This version of the engines plugin requires Rails 2.3.2 or later!"
-   end
- end
-@@ -14,4 +14,4 @@ require File.join(File.dirname(__FILE__), 'lib/engines')
-   :default_plugin_loader => Engines::Plugin::Loader,
-   :default_plugins => [:engines, :all] }.each do |name, default|    
-   Rails::Configuration.send(:define_method, name) { default }
--end
-\ No newline at end of file
-+end
--- 

Deleted: trunk/redmine/debian/patches/0004-Returns-a-hash-in-any-case-since-rails-2.2-could-ret.patch
===================================================================
--- trunk/redmine/debian/patches/0004-Returns-a-hash-in-any-case-since-rails-2.2-could-ret.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0004-Returns-a-hash-in-any-case-since-rails-2.2-could-ret.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,20 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sat, 12 Dec 2009 18:19:39 +0100
-Subject: [PATCH] Returns a hash in any case, since rails 2.2 could return an OrderedHash, which is an array.
-
----
- app/models/query.rb |    3 +++
- 1 files changed, 3 insertions(+), 0 deletions(-)
-
---- a/app/models/query.rb
-+++ b/app/models/query.rb
-@@ -434,6 +434,9 @@
-         r = r.keys.inject({}) {|h, k| h[c.custom_field.cast_value(k)] = r[k]; h}
-       end
-     end
-+    if !r.nil? && r.is_a?(ActiveSupport::OrderedHash)
-+      r = r.to_hash
-+    end
-     r
-   rescue ::ActiveRecord::StatementInvalid => e
-     raise StatementInvalid.new(e.message)

Deleted: trunk/redmine/debian/patches/0005-No-need-to-declare-dependency-on-mocha.-It-s-there-b.patch
===================================================================
--- trunk/redmine/debian/patches/0005-No-need-to-declare-dependency-on-mocha.-It-s-there-b.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0005-No-need-to-declare-dependency-on-mocha.-It-s-there-b.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,16 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 13 Dec 2009 12:56:46 +0100
-Subject: [PATCH] No need to declare dependency on mocha. It's there but rails2.2 thinks it's not.
-
----
- config/environments/test.rb |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
---- a/config/environments/test.rb
-+++ b/config/environments/test.rb
-@@ -26,4 +26,4 @@
- 
- config.gem "thoughtbot-shoulda", :lib => "shoulda", :source => "http://gems.github.com"
- config.gem "edavis10-object_daddy", :lib => "object_daddy"
--config.gem "mocha"
-+#config.gem "mocha"

Deleted: trunk/redmine/debian/patches/0006-Rescue-TamperedWithCookie-because-rails-2.2-does-not.patch
===================================================================
--- trunk/redmine/debian/patches/0006-Rescue-TamperedWithCookie-because-rails-2.2-does-not.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0006-Rescue-TamperedWithCookie-because-rails-2.2-does-not.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,25 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 13 Dec 2009 14:25:43 +0100
-Subject: [PATCH] Rescue TamperedWithCookie because rails 2.2 does not.
-
----
- app/controllers/application_controller.rb |    5 +++++
- 1 files changed, 5 insertions(+), 0 deletions(-)
-
-diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
-index 20a8e57..b388812 100644
---- a/app/controllers/application_controller.rb
-+++ b/app/controllers/application_controller.rb
-@@ -22,6 +22,11 @@ class ApplicationController < ActionController::Base
-   include Redmine::I18n
- 
-   layout 'base'
-+
-+  # In case the cookie store secret changes
-+  rescue_from CGI::Session::CookieStore::TamperedWithCookie do |exception|	
-+    render :text => 'Your session was invalid and has been reset. Please, reload this page.', :status => 500
-+  end
-   
-   # Remove broken cookie after upgrade from 0.8.x (#4292)
-   # See https://rails.lighthouseapp.com/projects/8994/tickets/3360
--- 

Deleted: trunk/redmine/debian/patches/0007-Revert-this-rails-2.3-plugin.patch
===================================================================
--- trunk/redmine/debian/patches/0007-Revert-this-rails-2.3-plugin.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0007-Revert-this-rails-2.3-plugin.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,37 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 22 Nov 2009 23:17:28 +0100
-Subject: [PATCH] Revert this rails 2.3 plugin.
-
----
- vendor/plugins/prepend_engine_views/init.rb |   21 ---------------------
- 1 files changed, 0 insertions(+), 21 deletions(-)
- delete mode 100644 vendor/plugins/prepend_engine_views/init.rb
-
-diff --git a/vendor/plugins/prepend_engine_views/init.rb b/vendor/plugins/prepend_engine_views/init.rb
-deleted file mode 100644
-index cbf0e89..0000000
---- a/vendor/plugins/prepend_engine_views/init.rb
-+++ /dev/null
-@@ -1,21 +0,0 @@
--module PrependEngineViews
--  def self.included(base)
--    base.send(:include, InstanceMethods)
--    base.class_eval do
--      alias_method_chain :add_engine_view_paths, :prepend
--    end
--  end
--
--  module InstanceMethods
--    # Patch Rails so engine's views are prepended to the view_path,
--    # thereby letting plugins override application views
--    def add_engine_view_paths_with_prepend
--      paths = ActionView::PathSet.new(engines.collect(&:view_path))
--      ActionController::Base.view_paths.unshift(*paths)
--      ActionMailer::Base.view_paths.unshift(*paths) if configuration.frameworks.include?(:action_mailer)
--    end
--  end
--end
--
--Rails::Plugin::Loader.send :include, PrependEngineViews
--
--- 

Modified: trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch
===================================================================
--- trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0009-Allows-environment-variables-to-setup-debian-paths.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -10,11 +10,9 @@
  public/dispatch.fcgi.example      |    7 +++++--
  5 files changed, 28 insertions(+), 5 deletions(-)
 
-diff --git a/app/models/attachment.rb b/app/models/attachment.rb
-index e44b162..296d8b9 100644
 --- a/app/models/attachment.rb
 +++ b/app/models/attachment.rb
-@@ -43,7 +43,7 @@ class Attachment < ActiveRecord::Base
+@@ -43,7 +43,7 @@
                                                          "LEFT JOIN #{Project.table_name} ON #{Document.table_name}.project_id = #{Project.table_name}.id"}
  
    cattr_accessor :storage_path
@@ -23,8 +21,6 @@
    
    def validate
      if self.filesize > Setting.attachment_max_size.to_i.kilobytes
-diff --git a/config/environment.rb b/config/environment.rb
-index 1f7d23e..a248e7e 100644
 --- a/config/environment.rb
 +++ b/config/environment.rb
 @@ -2,7 +2,15 @@
@@ -43,8 +39,8 @@
 +ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
  
  # Specifies gem version of Rails to use when vendor/rails is not present
- RAILS_GEM_VERSION = '2.2.3' unless defined? RAILS_GEM_VERSION
-@@ -30,9 +38,18 @@ Rails::Initializer.run do |config|
+ RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
+@@ -30,9 +38,18 @@
    # (by default production uses :info, the others :debug)
    # config.log_level = :debug
  
@@ -63,19 +59,15 @@
    
    # Activate observers that should always be running
    # config.active_record.observers = :cacher, :garbage_collector
-diff --git a/config/initializers/10-patches.rb b/config/initializers/10-patches.rb
-index cdc3bfd..2edbe7b 100644
 --- a/config/initializers/10-patches.rb
 +++ b/config/initializers/10-patches.rb
-@@ -78,3 +78,6 @@ module AsynchronousMailer
+@@ -78,3 +78,6 @@
  end
  
  ActionMailer::Base.send :include, AsynchronousMailer
 +
 +# the session store
 +ActionController::Base.session_options[:tmpdir] = File.join(ENV['RAILS_VAR'], 'sessions') unless !ENV['RAILS_VAR']
-diff --git a/config/initializers/40-email.rb b/config/initializers/40-email.rb
-index 5b388ec..d7aba5c 100644
 --- a/config/initializers/40-email.rb
 +++ b/config/initializers/40-email.rb
 @@ -1,7 +1,7 @@
@@ -87,8 +79,6 @@
  if File.file?(filename)
    mailconfig = YAML::load_file(filename)
  
-diff --git a/public/dispatch.fcgi.example b/public/dispatch.fcgi.example
-index 664dbbb..d24a04b 100755
 --- a/public/dispatch.fcgi.example
 +++ b/public/dispatch.fcgi.example
 @@ -20,5 +20,8 @@
@@ -102,4 +92,3 @@
 +else
 +  RailsFCGIHandler.process!
 +end
--- 

Deleted: trunk/redmine/debian/patches/0010-Duplicate-name-value-in-request.patch
===================================================================
--- trunk/redmine/debian/patches/0010-Duplicate-name-value-in-request.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0010-Duplicate-name-value-in-request.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,42 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sat, 16 Jan 2010 17:16:40 +0100
-Subject: [PATCH] Duplicate name value in request
-
-In rails 2.2, when two inputs have the same name, only the first one's value will be considered. It's best if the hidden input is rejected after the main input, and ignored by rails 2.2.
----
- app/helpers/settings_helper.rb |    8 ++++----
- 1 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/app/helpers/settings_helper.rb b/app/helpers/settings_helper.rb
-index e57b75f..a5d8355 100644
---- a/app/helpers/settings_helper.rb
-+++ b/app/helpers/settings_helper.rb
-@@ -41,14 +41,14 @@ module SettingsHelper
-     setting_values = [] unless setting_values.is_a?(Array)
-       
-     setting_label(setting, options) +
--      hidden_field_tag("settings[#{setting}][]", '') +
-       choices.collect do |choice|
-         text, value = (choice.is_a?(Array) ? choice : [choice, choice]) 
-         content_tag('label',
-           check_box_tag("settings[#{setting}][]", value, Setting.send(setting).include?(value)) + text.to_s,
-           :class => 'block'
-         )
--      end.join
-+      end.join +
-+      hidden_field_tag("settings[#{setting}][]", '')
-   end
-   
-   def setting_text_field(setting, options={})
-@@ -63,8 +63,8 @@ module SettingsHelper
-   
-   def setting_check_box(setting, options={})
-     setting_label(setting, options) +
--      hidden_field_tag("settings[#{setting}]", 0) +
--      check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options)
-+      check_box_tag("settings[#{setting}]", 1, Setting.send("#{setting}?"), options) +
-+      hidden_field_tag("settings[#{setting}]", 0)
-   end
-   
-   def setting_label(setting, options={})
--- 

Deleted: trunk/redmine/debian/patches/0011-Sanitize-textarea-id-for-rails2.2.patch
===================================================================
--- trunk/redmine/debian/patches/0011-Sanitize-textarea-id-for-rails2.2.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0011-Sanitize-textarea-id-for-rails2.2.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,66 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 17 Jan 2010 15:18:41 +0100
-Subject: [PATCH] Sanitize textarea id for rails2.2
-
-In rails 2.2, the id attribute of a textarea is not sanitized as it is for other form tags. Fix this using a minimal monkey patch from rails 2.3.
----
- .../initializers/text_field_helper_santitize_id.rb |   49 ++++++++++++++++++++
- 1 files changed, 49 insertions(+), 0 deletions(-)
- create mode 100644 config/initializers/text_field_helper_santitize_id.rb
-
-diff --git a/config/initializers/text_field_helper_santitize_id.rb b/config/initializers/text_field_helper_santitize_id.rb
-new file mode 100644
-index 0000000..429c806
---- /dev/null
-+++ b/config/initializers/text_field_helper_santitize_id.rb
-@@ -0,0 +1,49 @@
-+require 'action_view/helpers/tag_helper'
-+
-+module ActionView
-+  module Helpers
-+    module FormTagHelper
-+      # Creates a text input area; use a textarea for longer text inputs such as blog posts or descriptions.
-+      #
-+      # ==== Options
-+      # * <tt>:size</tt> - A string specifying the dimensions (columns by rows) of the textarea (e.g., "25x10").
-+      # * <tt>:rows</tt> - Specify the number of rows in the textarea
-+      # * <tt>:cols</tt> - Specify the number of columns in the textarea
-+      # * <tt>:disabled</tt> - If set to true, the user will not be able to use this input.
-+      # * <tt>:escape</tt> - By default, the contents of the text input are HTML escaped.
-+      #   If you need unescaped contents, set this to false.
-+      # * Any other key creates standard HTML attributes for the tag.
-+      #
-+      # ==== Examples
-+      #   text_area_tag 'post'
-+      #   # => <textarea id="post" name="post"></textarea>
-+      #
-+      #   text_area_tag 'bio', @user.bio
-+      #   # => <textarea id="bio" name="bio">This is my biography.</textarea>
-+      #
-+      #   text_area_tag 'body', nil, :rows => 10, :cols => 25
-+      #   # => <textarea cols="25" id="body" name="body" rows="10"></textarea>
-+      #
-+      #   text_area_tag 'body', nil, :size => "25x10"
-+      #   # => <textarea name="body" id="body" cols="25" rows="10"></textarea>
-+      #
-+      #   text_area_tag 'description', "Description goes here.", :disabled => true
-+      #   # => <textarea disabled="disabled" id="description" name="description">Description goes here.</textarea>
-+      #
-+      #   text_area_tag 'comment', nil, :class => 'comment_input'
-+      #   # => <textarea class="comment_input" id="comment" name="comment"></textarea>
-+      def text_area_tag(name, content = nil, options = {})
-+        options.stringify_keys!
-+
-+        if size = options.delete("size")
-+          options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
-+        end
-+
-+        escape = options.key?("escape") ? options.delete("escape") : true
-+        content = html_escape(content) if escape
-+
-+        content_tag :textarea, content, { "name" => name, "id" => sanitize_to_id(name) }.update(options.stringify_keys)
-+      end
-+    end
-+  end
-+end
--- 

Deleted: trunk/redmine/debian/patches/0012-OrderedHash-to-Hash.patch
===================================================================
--- trunk/redmine/debian/patches/0012-OrderedHash-to-Hash.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0012-OrderedHash-to-Hash.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,20 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Thu, 21 Jan 2010 09:38:43 +0100
-Subject: [PATCH] OrderedHash to Hash
-
-Since in rails 2.2 OrderedHash < Array, not < Hash.
----
- app/models/issue.rb |    2 +-
- 1 files changed, 1 insertions(+), 1 deletions(-)
-
---- a/app/models/issue.rb
-+++ b/app/models/issue.rb
-@@ -157,7 +157,7 @@
-     if new_tracker_id
-       self.tracker_id = new_tracker_id
-     end
--    send :attributes_without_tracker_first=, new_attributes, *args
-+    send :attributes_without_tracker_first=, new_attributes.to_hash, *args
-   end
-   # Do not redefine alias chain on reload (see #4838)
-   alias_method_chain(:attributes=, :tracker_first) unless method_defined?(:attributes_without_tracker_first=)

Deleted: trunk/redmine/debian/patches/0013-Monkey-patches-for-group-support-taken-from-rails-2..patch
===================================================================
--- trunk/redmine/debian/patches/0013-Monkey-patches-for-group-support-taken-from-rails-2..patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0013-Monkey-patches-for-group-support-taken-from-rails-2..patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,85 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sat, 9 Jan 2010 23:30:15 +0100
-Subject: [PATCH] Monkey patches for group support, taken from rails 2.3.
-
----
- config/initializers/action_group.rb |   69 +++++++++++++++++++++++++++++++++++
- 1 files changed, 69 insertions(+), 0 deletions(-)
- create mode 100644 config/initializers/action_group.rb
-
-diff --git a/config/initializers/action_group.rb b/config/initializers/action_group.rb
-new file mode 100644
-index 0000000..0adfd78
---- /dev/null
-+++ b/config/initializers/action_group.rb
-@@ -0,0 +1,69 @@
-+module ActionView
-+  module Helpers
-+    module FormOptionsHelper
-+      def options_for_select(container, selected = nil)
-+        return container if String === container
-+
-+        container = container.to_a if Hash === container
-+        selected, disabled = extract_selected_and_disabled(selected)
-+
-+        options_for_select = container.inject([]) do |options, element|
-+          text, value = option_text_and_value(element)
-+          selected_attribute = ' selected="selected"' if option_value_selected?(value, selected)
-+          disabled_attribute = ' disabled="disabled"' if disabled && option_value_selected?(value, disabled)
-+          options << %(<option value="#{html_escape(value.to_s)}"#{selected_attribute}#{disabled_attribute}>#{html_escape(text.to_s)}</option>)
-+        end
-+
-+        options_for_select.join("\n")
-+      end
-+      def extract_selected_and_disabled(selected)
-+          if selected.is_a?(Hash)
-+            [selected[:selected], selected[:disabled]]
-+          else
-+            [selected, nil]
-+          end
-+        end
-+      def grouped_options_for_select(grouped_options, selected_key = nil, prompt = nil)
-+        body = ''
-+        body << content_tag(:option, prompt, :value => "") if prompt
-+        grouped_options = grouped_options.sort if grouped_options.is_a?(Hash)
-+        grouped_options.each do |group|
-+          body << content_tag(:optgroup, options_for_select(group[1], selected_key), :label => group[0])
-+        end
-+        body
-+      end
-+    end
-+  end
-+
-+  require 'action_view/test_case'
-+  require 'action_controller/test_process'
-+  class FormOptionsHelperTest < ActionView::TestCase
-+    def test_grouped_options_for_select_with_array
-+      assert_dom_equal(
-+            "<optgroup label=\"North America\"><option value=\"US\">United States</option>\n<option value=\"Canada\">Canada</option></optgroup><optgroup label=\"Europe\"><option value=\"GB\">Great Britain</option>\n<option value=\"Germany\">Germany</option></optgroup>",
-+            grouped_options_for_select([
-+               ["North America",
-+                       [['United States','US'],"Canada"]],
-+               ["Europe",
-+                       [["Great Britain","GB"], "Germany"]]
-+             ])
-+      )
-+    end
-+
-+    def test_grouped_options_for_select_with_selected_and_prompt
-+      assert_dom_equal(
-+              "<option value=\"\">Choose a product...</option><optgroup label=\"Hats\"><option value=\"Baseball Cap\">Baseball Cap</option>\n<option selected=\"selected\" value=\"Cowboy Hat\">Cowboy Hat</option></optgroup>",
-+              grouped_options_for_select([["Hats", ["Baseball Cap","Cowboy Hat"]]], "Cowboy Hat", "Choose a product...")
-+      )
-+    end
-+
-+    def test_optgroups_with_with_options_with_hash
-+      assert_dom_equal(
-+             "<optgroup label=\"Europe\"><option value=\"Denmark\">Denmark</option>\n<option value=\"Germany\">Germany</option></optgroup><optgroup label=\"North America\"><option value=\"United States\">United States</option>\n<option value=\"Canada\">Canada</option></optgroup>",
-+             grouped_options_for_select({'North America' => ['United States','Canada'], 'Europe' => ['Denmark','Germany']})
-+      )
-+    end
-+  end
-+end
-+
-+
--- 

Deleted: trunk/redmine/debian/patches/0015-Request-forgery-protection-allow-XHR.patch
===================================================================
--- trunk/redmine/debian/patches/0015-Request-forgery-protection-allow-XHR.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0015-Request-forgery-protection-allow-XHR.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,31 +0,0 @@
-From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lal?= <kapouer at melix.org>
-Date: Sun, 14 Feb 2010 15:54:48 +0100
-Subject: [PATCH] Request forgery protection allow XHR
-
-This patch is from rails 2.3.5. If not applied, XHR requests return error 500.
-Submitted to rails 2.2.3-2 :
-http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=569811
----
- .../initializers/request_forgery_protection_xhr.rb |   12 ++++++++++++
- 1 files changed, 12 insertions(+), 0 deletions(-)
- create mode 100644 config/initializers/request_forgery_protection_xhr.rb
-
-diff --git a/config/initializers/request_forgery_protection_xhr.rb b/config/initializers/request_forgery_protection_xhr.rb
-new file mode 100644
-index 0000000..1886080
---- /dev/null
-+++ b/config/initializers/request_forgery_protection_xhr.rb
-@@ -0,0 +1,12 @@
-+module ActionController
-+  module RequestForgeryProtection
-+    protected
-+	  def verified_request?
-+        !protect_against_forgery?     ||
-+          request.method == :get      ||
-+          request.xhr?                ||
-+          !verifiable_request_format? ||
-+          form_authenticity_token == params[request_forgery_protection_token]
-+      end
-+  end
-+end
--- 

Modified: trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch
===================================================================
--- trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0017-dump_schema_to_cache_dir.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -7,13 +7,13 @@
 /var/cache/redmine/${X_DEBIAN_SITEID}/schema.db
 so that each instance has its own migration dump.
 
---- redmine-0.9.2.orig/config/environment.rb
-+++ redmine-0.9.2/config/environment.rb
-@@ -11,6 +11,7 @@ ENV['RAILS_ETC'] ||= "/etc/redmine/#{ENV
+--- a/config/environment.rb
++++ b/config/environment.rb
+@@ -11,6 +11,7 @@
  ENV['RAILS_LOG'] ||= "/var/log/redmine/#{ENV['X_DEBIAN_SITEID']}"
  ENV['RAILS_VAR'] ||= "/var/lib/redmine/#{ENV['X_DEBIAN_SITEID']}"
  ENV['RAILS_CACHE'] ||= "/var/cache/redmine/#{ENV['X_DEBIAN_SITEID']}"
 +ENV['SCHEMA'] ||= "#{ENV['RAILS_CACHE']}/schema.db"
  
  # Specifies gem version of Rails to use when vendor/rails is not present
- RAILS_GEM_VERSION = '2.2.3' unless defined? RAILS_GEM_VERSION
+ RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

Deleted: trunk/redmine/debian/patches/0018-engines-rails2.2.patch
===================================================================
--- trunk/redmine/debian/patches/0018-engines-rails2.2.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0018-engines-rails2.2.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,265 +0,0 @@
-Description: Backport of Engines plugin for rails 2.2, and redmine compatibility fix.
- The engines plugin provided upstream is rails 2.3 compatible.
- Several fixes taken from an earlier engines version and earlier redmine version
- have been used to make it work with rails 2.2.3
-Author: Jérémy Lal <kapouer at melix.org>
-
----
-
---- a/vendor/plugins/engines/tasks/engines.rake
-+++ b/vendor/plugins/engines/tasks/engines.rake
-@@ -153,8 +153,8 @@
- 
- # 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 load paths (see
--# Plugin#load_paths).
-+# <plugin>/component. These tasks now include every file under a plugin's code paths (see
-+# Plugin#code_paths).
- namespace :doc do
- 
-   plugins = FileList['vendor/plugins/**'].collect { |plugin| File.basename(plugin) }
-@@ -173,9 +173,9 @@
-         options << '--line-numbers' << '--inline-source'
-         options << '-T html'
- 
--        # Include every file in the plugin's load_paths (see Plugin#load_paths)
-+        # Include every file in the plugin's code_paths (see Plugin#code_paths)
-         if Engines.plugins[plugin]
--          files.include("#{plugin_base}/{#{Engines.plugins[plugin].load_paths.join(",")}}/**/*.rb")
-+          files.include("#{plugin_base}/{#{Engines.plugins[plugin].code_paths.join(",")}}/**/*.rb")
-         end
-         if File.exists?("#{plugin_base}/README")
-           files.include("#{plugin_base}/README")    
---- a/vendor/plugins/engines/lib/engines.rb
-+++ b/vendor/plugins/engines/lib/engines.rb
-@@ -43,7 +43,7 @@
-   
-   # List of extensions to load, can be changed in init.rb before calling Engines.init
-   mattr_accessor :rails_extensions
--  self.rails_extensions = %w(asset_helpers form_tag_helpers migrations dependencies)
-+  self.rails_extensions = %w(asset_helpers routing form_tag_helpers migrations dependencies)
-   
-   # The name of the public directory to mirror public engine assets into.
-   # Defaults to <tt>RAILS_ROOT/public/plugin_assets</tt>.
---- a/vendor/plugins/engines/lib/engines/plugin.rb
-+++ b/vendor/plugins/engines/lib/engines/plugin.rb
-@@ -4,9 +4,23 @@
- #
- #   Engines.plugins[:plugin_name]
- #
-+# If this plugin contains paths in directories other than <tt>app/controllers</tt>,
-+# <tt>app/helpers</tt>, <tt>app/models</tt> and <tt>components</tt>, authors can
-+# declare this by adding extra paths to #code_paths:
-+#
-+#    Rails.plugin[:my_plugin].code_paths << "app/sweepers" << "vendor/my_lib"
-+#
- # Other properties of the Plugin instance can also be set.
- module Engines
-   class Plugin < Rails::Plugin    
-+    # Plugins can add code paths to this attribute in init.rb if they 
-+    # need plugin directories to be added to the load path, i.e.
-+    #
-+    #   plugin.code_paths << 'app/other_classes'
-+    #
-+    # Defaults to ["app/controllers", "app/helpers", "app/models", "components"]
-+    attr_accessor :code_paths
-+
-     # Plugins can add paths to this attribute in init.rb if they need
-     # controllers loaded from additional locations. 
-     attr_accessor :controller_paths
-@@ -18,6 +32,16 @@
-     attr_accessor :public_directory   
-     
-     protected
-+  
-+      # The default set of code paths which will be added to $LOAD_PATH
-+      # and Dependencies.load_paths
-+      def default_code_paths
-+        # lib will actually be removed from the load paths when we call
-+        # uniq! in #inject_into_load_paths, but it's important to keep it
-+        # around (for the documentation tasks, for instance).
-+        %w(app/controllers app/helpers app/models components lib)
-+      end
-+    
-       # The default set of code paths which will be added to the routing system
-       def default_controller_paths
-         %w(app/controllers components)
-@@ -34,15 +58,25 @@
-   
-     def initialize(directory)
-       super directory
-+      @code_paths = default_code_paths
-       @controller_paths = default_controller_paths
-       @public_directory = default_public_directory
-     end
-   
-+    # Returns a list of paths this plugin wishes to make available in $LOAD_PATH
-+    #
-+    # Overwrites the correspondend method in the superclass  
-+    def load_paths
-+      report_nonexistant_or_empty_plugin! unless valid?
-+      select_existing_paths :code_paths
-+    end
-+  
-     # Extends the superclass' load method to additionally mirror public assets
-     def load(initializer)
-       return if loaded?
-       super initializer
-       add_plugin_locale_paths
-+      add_plugin_view_paths
-       Assets.mirror_files_for(self)
-     end    
-   
-@@ -65,11 +99,25 @@
-       I18n.load_path.insert(app_index, *locale_files)
-     end
- 
-+    def add_plugin_view_paths
-+      view_path = File.join(directory, 'app', 'views')
-+      if File.exist?(view_path)
-+        ActionController::Base.prepend_view_path(view_path) # push it just underneath the app
-+        # ActionView::TemplateFinder.process_view_paths(view_path)
-+	ActionView::Base.process_view_paths(view_path)
-+      end
-+    end
-+
-     # The path to this plugin's public files
-     def public_asset_directory
-       "#{File.basename(Engines.public_directory)}/#{name}"
-     end
-     
-+    # The path to this plugin's routes file
-+    def routes_path
-+      File.join(directory, "config/routes.rb")
-+    end
-+    
-     # The directory containing this plugin's migrations (<tt>plugin/db/migrate</tt>)
-     def migration_directory
-       File.join(self.directory, 'db', 'migrate')
---- /dev/null
-+++ b/vendor/plugins/engines/lib/engines/rails_extensions/routing.rb
-@@ -0,0 +1,87 @@
-+# Effective use of Rails' routes can help create a tidy and elegant set of URLs,
-+# and is a significant part of creating an external API for your web application.
-+# 
-+# When developing plugins which contain controllers, it seems obvious that including
-+# the corresponding routes would be extremely useful. This is particularly true
-+# when exposing RESTful resources using the new REST-ian features of Rails.
-+#
-+# == Including routes in your plugin
-+#
-+# The engines plugin makes it possible to include a set of routes within your plugin
-+# very simply, as it turns out. In your plugin, you simply include a <tt>routes.rb</tt> 
-+# file like the one below at the root of your plugin:
-+# 
-+#   connect "/login", :controller => "my_plugin/account", :action => "login"
-+#
-+#   # add a named route
-+#   logout "/logout", :controller => "my_plugin/account", :action => "logout"
-+#
-+#   # some restful stuff
-+#   resources :things do |t|
-+#     t.resources :other_things
-+#   end
-+# 
-+# Everywhere in a normal <tt>RAILS_ROOT/config/routes.rb</tt> file 
-+# where you might have <tt>map.connect</tt>, you just use <tt>connect</tt> in your 
-+# plugin's <tt>routes.rb</tt>.
-+# 
-+# === Hooking it up in your application
-+#
-+# While it would be possible to have each plugin's routes automagically included into
-+# the application's route set, to do so would actually be a stunningly bad idea. Route
-+# priority is the key issue here. You, the application developer, needs to be in complete
-+# control when it comes to specifying the priority of routes in your application, since 
-+# the ordering of your routes directly affects how Rails will interpret incoming requests.
-+# 
-+# To add plugin routes into your application's <tt>routes.rb</tt> file, you need to explicitly 
-+# map them in using the Engines::RailsExtensions::Routing#from_plugin method:
-+# 
-+#   ApplicationController::Routing::Routes.draw do |map|
-+#
-+#     map.connect "/app_stuff", :controller => "application_thing" # etc...
-+#
-+#     # This line includes the routes from the given plugin at this point, giving you
-+#     # control over the priority of your application routes 
-+#     map.from_plugin :your_plugin
-+#
-+#     map.connect ":controller/:action/:id"
-+#   end
-+# 
-+# By including routes in plugins which have controllers, you can now share in a simple way 
-+# a compact and elegant URL scheme which corresponds to those controllers.
-+#
-+# ---
-+#
-+# The Engines::RailsExtensions::Routing module defines extensions to Rails' 
-+# routing (ActionController::Routing) mechanism such that routes can be loaded 
-+# from a given plugin.
-+#
-+# The key method is Engines::RailsExtensions::Routing#from_plugin, which can be called 
-+# within your application's <tt>config/routes.rb</tt> file to load plugin routes at that point.
-+#
-+module Engines::RailsExtensions::Routing
-+  # Loads the set of routes from within a plugin and evaluates them at this
-+  # point within an application's main <tt>routes.rb</tt> file.
-+  #
-+  # Plugin routes are loaded from <tt><plugin_root>/routes.rb</tt>.
-+  def from_plugin(name)
-+    map = self # to make 'map' available within the plugin route file
-+    begin
-+      routes_path = Engines.plugins[name].routes_path
-+      Engines.logger.debug "loading routes from #{routes_path}"
-+      eval(IO.read(routes_path), binding, routes_path) if File.file?(routes_path)
-+    rescue
-+    end
-+  end
-+end
-+
-+  
-+module ::ActionController #:nodoc:
-+  module Routing #:nodoc:
-+    class RouteSet #:nodoc:
-+      class Mapper #:nodoc:
-+        include Engines::RailsExtensions::Routing
-+      end
-+    end
-+  end
-+end
---- a/config/routes.rb
-+++ b/config/routes.rb
-@@ -6,6 +6,11 @@
-   # map.connect 'products/:id', :controller => 'catalog', :action => 'view'
-   # Keep in mind you can assign values other than :controller and :action
- 
-+  # Allow Redmine plugins to map routes and potentially override them
-+  Rails.plugins.each do |plugin|
-+    map.from_plugin plugin.name.to_sym
-+  end
-+
-   map.home '', :controller => 'welcome'
-   
-   map.signin 'login', :controller => 'account', :action => 'login'
---- a/vendor/plugins/engines/lib/engines/plugin/loader.rb
-+++ b/vendor/plugins/engines/lib/engines/plugin/loader.rb
-@@ -5,7 +5,16 @@
-         def register_plugin_as_loaded(plugin)
-           super plugin
-           Engines.plugins << plugin
--        end    
-+          register_to_routing(plugin)
-+        end
-+
-+        # Registers the plugin's controller_paths for the routing system. 
-+        def register_to_routing(plugin)
-+          if plugin.respond_to?('select_existing_paths')
-+            initializer.configuration.controller_paths += plugin.select_existing_paths(:controller_paths)
-+            initializer.configuration.controller_paths.uniq!
-+          end
-+        end
-     end
-   end
--end
-\ No newline at end of file
-+end

Deleted: trunk/redmine/debian/patches/0019-no-batch_size-in-rails2.2.patch
===================================================================
--- trunk/redmine/debian/patches/0019-no-batch_size-in-rails2.2.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0019-no-batch_size-in-rails2.2.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,24 +0,0 @@
-Because rails 2.2 does not support this batch_size query.
-
---- a/lib/tasks/migrate_from_mantis.rake
-+++ b/lib/tasks/migrate_from_mantis.rake
-@@ -314,7 +314,7 @@
-       Issue.destroy_all
-       issues_map = {}
-       keep_bug_ids = (Issue.count == 0)
--      MantisBug.find_each(:batch_size => 200) do |bug|
-+      MantisBug.find(:all, :order => 'id ASC').each do |bug|
-         next unless projects_map[bug.project_id] && users_map[bug.reporter_id]
-     	i = Issue.new :project_id => projects_map[bug.project_id], 
-                       :subject => encode(bug.summary),
---- a/lib/tasks/migrate_from_trac.rake
-+++ b/lib/tasks/migrate_from_trac.rake
-@@ -458,7 +458,7 @@
- 
-         # Tickets
-         print "Migrating tickets"
--          TracTicket.find_each(:batch_size => 200) do |ticket|
-+          TracTicket.find(:all, :order => 'id ASC').each do |ticket|
-           print '.'
-           STDOUT.flush
-           i = Issue.new :project => @target_project,

Deleted: trunk/redmine/debian/patches/0020-application-rb-for-rails2.2.patch
===================================================================
--- trunk/redmine/debian/patches/0020-application-rb-for-rails2.2.patch	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/0020-application-rb-for-rails2.2.patch	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,9 +0,0 @@
-Instead of linking application.rb to application_controller.rb,
-which could lead to multiple loading of ApplicationController class,
-just require application_controller in application.rb
-
---- /dev/null
-+++ b/app/controllers/application.rb
-@@ -0,0 +1,2 @@
-+require_dependency 'application_controller'
-+

Modified: trunk/redmine/debian/patches/series
===================================================================
--- trunk/redmine/debian/patches/series	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/patches/series	2010-05-25 23:27:46 UTC (rev 5424)
@@ -1,20 +1,5 @@
-0001-Revert-this-default_scope-rails-2.3-usage.patch
-0002-Revert-rails-2.3-changes-in-mailer.patch
-0003-Depends-on-rails-2.2.3.patch
-0004-Returns-a-hash-in-any-case-since-rails-2.2-could-ret.patch
-0005-No-need-to-declare-dependency-on-mocha.-It-s-there-b.patch
-0006-Rescue-TamperedWithCookie-because-rails-2.2-does-not.patch
-0007-Revert-this-rails-2.3-plugin.patch
 0008-Wrong-path-for-interpreter.patch
 0009-Allows-environment-variables-to-setup-debian-paths.patch
-0010-Duplicate-name-value-in-request.patch
-0011-Sanitize-textarea-id-for-rails2.2.patch
-0012-OrderedHash-to-Hash.patch
-0013-Monkey-patches-for-group-support-taken-from-rails-2..patch
 0014-Move-session-configuration-to-YML-file-next-to-datab.patch
-0015-Request-forgery-protection-allow-XHR.patch
 0016-plugin_assets_in_var_dir.patch
 0017-dump_schema_to_cache_dir.patch
-0018-engines-rails2.2.patch
-0019-no-batch_size-in-rails2.2.patch
-0020-application-rb-for-rails2.2.patch

Modified: trunk/redmine/debian/postinst
===================================================================
--- trunk/redmine/debian/postinst	2010-05-25 23:16:40 UTC (rev 5423)
+++ trunk/redmine/debian/postinst	2010-05-25 23:27:46 UTC (rev 5424)
@@ -56,7 +56,16 @@
 		savedir="`pwd`"
 		cd /usr/share/redmine
 		if [ ! -e vendor/rails ]; then
-			rails-app-debianize
+			# rails 2.2 to 2.3 migration
+			rm -f vendor/actionmailer
+			rm -f vendor/actionpack
+			rm -f vendor/activemodel
+			rm -f vendor/activerecord
+			rm -f vendor/activeresource
+			rm -f vendor/activesupport
+			rm -f vendor/railties
+			rm -f vendor/rails
+			ln -s /usr/share/rails-ruby1.8 vendor/rails
 		fi
 		if [ ! -e app/views/members ]; then
 			mkdir app/views/members




More information about the Pkg-ruby-extras-commits mailing list