[rubygem-railties/f15] Correct fix for rhbz#720227 and rhbz#715385

Vít Ondruch vondruch at fedoraproject.org
Mon Jul 11 08:24:48 UTC 2011


commit c2e4dc379702bc7477bd89fd33742067e6c33015
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Mon Jul 11 10:23:24 2011 +0200

    Correct fix for rhbz#720227 and rhbz#715385

 ...SL-methods-available-within-Railtie-rake_.patch |   48 ++++++++++++++++++++
 clog                                               |    2 -
 railties-include-rake-dsl.patch                    |   11 -----
 rubygem-railties.spec                              |    9 +++-
 4 files changed, 54 insertions(+), 16 deletions(-)
---
diff --git a/Make-Rake-DSL-methods-available-within-Railtie-rake_.patch b/Make-Rake-DSL-methods-available-within-Railtie-rake_.patch
new file mode 100644
index 0000000..848ccf8
--- /dev/null
+++ b/Make-Rake-DSL-methods-available-within-Railtie-rake_.patch
@@ -0,0 +1,48 @@
+From e2908356672d4459ada0064f773efd820efda822 Mon Sep 17 00:00:00 2001
+From: Patrick Quinn <patrick at patrickquinn.net>
+Date: Fri, 20 May 2011 20:02:20 -0400
+Subject: [PATCH] Make Rake::DSL methods available within Railtie rake_tasks
+ block
+
+Fixes incompatibility introduced by Rake 0.9.0
+---
+ railties/lib/rails/application.rb |   10 ++++++----
+ railties/lib/rails/railtie.rb     |    1 +
+ 2 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
+index 816bff2..a7405aa 100644
+--- a/railties/lib/rails/application.rb
++++ b/railties/lib/rails/application.rb
+@@ -185,10 +185,12 @@ module Rails
+     end
+ 
+     def initialize_tasks
+-      require "rails/tasks"
+-      task :environment do
+-        $rails_rake_task = true
+-        require_environment!
++      self.class.rake_tasks do
++        require "rails/tasks"
++        task :environment do
++          $rails_rake_task = true
++          require_environment!
++        end
+       end
+     end
+ 
+diff --git a/railties/lib/rails/railtie.rb b/railties/lib/rails/railtie.rb
+index b183eb8..0a65840 100644
+--- a/railties/lib/rails/railtie.rb
++++ b/railties/lib/rails/railtie.rb
+@@ -181,6 +181,7 @@ module Rails
+     end
+ 
+     def load_tasks
++      extend Rake::DSL if defined? Rake::DSL
+       self.class.rake_tasks.each(&:call)
+     end
+ 
+-- 
+1.7.6
+
diff --git a/rubygem-railties.spec b/rubygem-railties.spec
index e469c95..4c3bd33 100644
--- a/rubygem-railties.spec
+++ b/rubygem-railties.spec
@@ -8,7 +8,7 @@
 Summary: Tools for creating, working with, and running Rails applications
 Name: rubygem-%{gemname}
 Version: 3.0.5
-Release: 2%{?dist}
+Release: 3%{?dist}
 Group: Development/Languages
 License: MIT
 URL: http://www.rubyonrails.org
@@ -16,7 +16,7 @@ Source0: %{download_path}%{gemname}-%{version}.gem
 # ** Take LICENSE file from upstream. **
 # wget --no-check-certificate https://github.com/rails/rails/raw/master/railties/MIT-LICENSE
 Source1: http://github.com/rails/rails/raw/master/railties/MIT-LICENSE
-Patch0: railties-include-rake-dsl.patch
+Patch0: Make-Rake-DSL-methods-available-within-Railtie-rake_.patch
 Requires: ruby(abi) = %{rubyabi}
 Requires: rubygems
 Requires: rubygem(rake) >= 0.8.7
@@ -61,7 +61,7 @@ gem install --local --install-dir .%{gemdir} \
 find .%{geminstdir} -name *.css -type f -perm /a+x -exec %{__chmod} -v 644 {} \;
 
 pushd .%{geminstdir}
-%patch0
+%patch0 -p2
 
 %build
 
@@ -85,6 +85,9 @@ pushd .%{geminstdir}
 %{gemdir}/doc/%{gemname}-%{version}
 
 %changelog
+* Mon Jul 11 2011 Vít Ondruch <vondruch at redhat.com> - 3.0.5-3
+- Correct fix for rhbz#720227 and rhbz#715385
+
 * Mon Jun 27 2011  <mmorsi at redhat.com> - 3.0.5-2
 - include fix for BZ #715385
 


More information about the scm-commits mailing list