LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File fix-rails-freeze-version_requirements.patch of Package hawk (Project openSUSE:Factory)

Index: hawk/lib/tasks/freeze.rake
===================================================================
--- hawk/lib/tasks/freeze.rake.orig
+++ hawk/lib/tasks/freeze.rake
@@ -36,6 +36,19 @@ def do_or_die(task)
   end
 end
 
+if Gem::VERSION >= "1.5.0"
+  # This little bit of insanity re-instates version_requirements
+  # (deprecated), because rails:freeze:gems in rails 2.3.10 still
+  # relies on it, but it's gone in rubygems 1.5
+  module Gem
+    class Dependency
+      def version_requirements
+        requirement
+      end
+    end
+  end
+end
+
 namespace :freeze do
   desc "Freeze Rails (but actually fail if there's an error)"
   task :rails do