diff --git a/rubygem-activesupport-3.2.13-search-private-and-protected-methods-for-convert_key.patch b/rubygem-activesupport-3.2.13-search-private-and-protected-methods-for-convert_key.patch new file mode 100644 index 0000000..7409f9a --- /dev/null +++ b/rubygem-activesupport-3.2.13-search-private-and-protected-methods-for-convert_key.patch @@ -0,0 +1,61 @@ +From 7cc26fd15e27c4a13705a844538bebfdd0461729 Mon Sep 17 00:00:00 2001 +From: Aaron Patterson +Date: Tue, 20 Mar 2012 09:58:42 -0700 +Subject: [PATCH] search private and protected methods for convert_key + +--- + activesupport/lib/active_support/core_ext/hash/indifferent_access.rb | 1 - + activesupport/lib/active_support/core_ext/hash/slice.rb | 4 ++-- + activesupport/lib/active_support/hash_with_indifferent_access.rb | 2 +- + 3 files changed, 3 insertions(+), 4 deletions(-) + +diff --git a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +index 7d54c9f..e5042c6 100644 +--- a/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb ++++ b/activesupport/lib/active_support/core_ext/hash/indifferent_access.rb +@@ -1,7 +1,6 @@ + require 'active_support/hash_with_indifferent_access' + + class Hash +- + # Returns an ActiveSupport::HashWithIndifferentAccess out of its receiver: + # + # {:a => 1}.with_indifferent_access["a"] # => 1 +diff --git a/activesupport/lib/active_support/core_ext/hash/slice.rb b/activesupport/lib/active_support/core_ext/hash/slice.rb +index 0484d8e..a983cae 100644 +--- a/activesupport/lib/active_support/core_ext/hash/slice.rb ++++ b/activesupport/lib/active_support/core_ext/hash/slice.rb +@@ -13,7 +13,7 @@ class Hash + # valid_keys = [:mass, :velocity, :time] + # search(options.slice(*valid_keys)) + def slice(*keys) +- keys = keys.map! { |key| convert_key(key) } if respond_to?(:convert_key) ++ keys = keys.map! { |key| convert_key(key) } if respond_to?(:convert_key, true) + hash = self.class.new + keys.each { |k| hash[k] = self[k] if has_key?(k) } + hash +@@ -23,7 +23,7 @@ class Hash + # Returns a hash contained the removed key/value pairs + # {:a => 1, :b => 2, :c => 3, :d => 4}.slice!(:a, :b) # => {:c => 3, :d => 4} + def slice!(*keys) +- keys = keys.map! { |key| convert_key(key) } if respond_to?(:convert_key) ++ keys = keys.map! { |key| convert_key(key) } if respond_to?(:convert_key, true) + omit = slice(*self.keys - keys) + hash = slice(*keys) + replace(hash) +diff --git a/activesupport/lib/active_support/hash_with_indifferent_access.rb b/activesupport/lib/active_support/hash_with_indifferent_access.rb +index 9e7cb76..9dc93de 100644 +--- a/activesupport/lib/active_support/hash_with_indifferent_access.rb ++++ b/activesupport/lib/active_support/hash_with_indifferent_access.rb +@@ -6,7 +6,7 @@ require 'active_support/core_ext/hash/keys' + + module ActiveSupport + class HashWithIndifferentAccess < Hash +- ++ + # Always returns true, so that Array#extract_options! finds members of this class. + def extractable_options? + true +-- +1.8.1.2 + diff --git a/rubygem-activesupport.spec b/rubygem-activesupport.spec index 7d1ac2a..817c17a 100644 --- a/rubygem-activesupport.spec +++ b/rubygem-activesupport.spec @@ -1,13 +1,12 @@ %global gem_name activesupport -%global rubyabi 1.9.1 Summary: Support and utility classes used by the Rails framework Name: rubygem-%{gem_name} Epoch: 1 Version: 3.2.12 -Release: 1%{?dist} +Release: 2%{?dist} Group: Development/Languages License: MIT URL: http://www.rubyonrails.org @@ -39,8 +38,12 @@ Patch3: activesupport-4.0.0-Make-the-tests-pass-with-minitest-4.2.patch # it under %%{gem_dir} (therefore if not in Gemfile, it won't be found). Patch4: activesupport-add-bigdecimal-dependency.patch +# Fixes Ruby 2.0.0 issues. Should be in next release it seems. +# https://github.com/rails/rails/commit/7cc26fd15e27c4a13705a844538bebfdd0461729 +Patch5: rubygem-activesupport-3.2.13-search-private-and-protected-methods-for-convert_key.patch + Requires: ruby(rubygems) -Requires: ruby(abi) = %{rubyabi} +Requires: ruby(release) # Let's keep Requires and BuildRequires sorted alphabeticaly Requires: rubygem(bigdecimal) Requires: rubygem(i18n) >= 0.6 @@ -68,9 +71,7 @@ goodies from the Rails framework %prep %setup -q -c -T -mkdir -p .%{gem_dir} -gem install --local --install-dir .%{gem_dir} \ - --force -V --rdoc %{SOURCE0} +%gem_install -n %{SOURCE0} # move the tests into place tar xzvf %{SOURCE2} -C .%{gem_instdir} @@ -80,6 +81,7 @@ pushd .%{gem_instdir} %patch1 -p0 %patch2 -p0 %patch3 -p2 +%patch5 -p2 popd pushd .%{gem_dir} @@ -111,6 +113,9 @@ popd %changelog +* Fri Mar 01 2013 Vít Ondruch - 1:3.2.12-2 +- Rebuild for https://fedoraproject.org/wiki/Features/Ruby_2.0.0 + * Tue Feb 12 2013 Vít Ondruch - 1:3.2.12-1 - Update to ActiveSupport 3.2.12.