Update to ActiveSupport 4.0.0
This commit is contained in:
parent
8e7a574a83
commit
177e4baf09
4 changed files with 23 additions and 87 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -27,3 +27,5 @@ activesupport-2.3.8.gem
|
|||
/activesupport-3.2.12.gem
|
||||
/activesupport-3.2.13-tests.tgz
|
||||
/activesupport-3.2.13.gem
|
||||
/activesupport-4.0.0-tests.tgz
|
||||
/activesupport-4.0.0.gem
|
||||
|
|
|
|||
|
|
@ -1,67 +0,0 @@
|
|||
--- test/abstract_unit.rb.orig 2011-02-02 12:38:56.766898240 -0500
|
||||
+++ test/abstract_unit.rb 2011-02-02 12:38:55.397898289 -0500
|
||||
@@ -34,12 +34,16 @@ require 'active_support'
|
||||
require 'active_support/ruby/shim' if RUBY_VERSION < '1.8.7'
|
||||
|
||||
def uses_memcached(test_name)
|
||||
- require 'memcache'
|
||||
begin
|
||||
- MemCache.new('localhost:11211').stats
|
||||
- yield
|
||||
- rescue MemCache::MemCacheError
|
||||
- $stderr.puts "Skipping #{test_name} tests. Start memcached and try again."
|
||||
+ require 'memcache'
|
||||
+ begin
|
||||
+ MemCache.new('localhost:11211').stats
|
||||
+ yield
|
||||
+ rescue MemCache::MemCacheError
|
||||
+ $stderr.puts "Skipping #{test_name} tests. Start memcached and try again."
|
||||
+ end
|
||||
+ rescue LoadError
|
||||
+ $stderr.puts "Skipping #{test_name} tests. Install memcache-client and try again."
|
||||
end
|
||||
end
|
||||
|
||||
--- test/caching_test.rb.orig 2011-02-02 12:39:05.979900964 -0500
|
||||
+++ test/caching_test.rb 2011-02-02 12:41:10.089899015 -0500
|
||||
@@ -59,40 +59,6 @@ class CacheStoreSettingTest < ActiveSupp
|
||||
assert_equal "/path/to/cache/directory", store.cache_path
|
||||
end
|
||||
|
||||
- def test_mem_cache_fragment_cache_store
|
||||
- MemCache.expects(:new).with(%w[localhost], {})
|
||||
- store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost"
|
||||
- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
|
||||
- end
|
||||
-
|
||||
- def test_mem_cache_fragment_cache_store_with_given_mem_cache
|
||||
- mem_cache = MemCache.new
|
||||
- MemCache.expects(:new).never
|
||||
- store = ActiveSupport::Cache.lookup_store :mem_cache_store, mem_cache
|
||||
- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
|
||||
- end
|
||||
-
|
||||
- def test_mem_cache_fragment_cache_store_with_given_mem_cache_like_object
|
||||
- MemCache.expects(:new).never
|
||||
- memcache = Object.new
|
||||
- def memcache.get() true end
|
||||
- store = ActiveSupport::Cache.lookup_store :mem_cache_store, memcache
|
||||
- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
|
||||
- end
|
||||
-
|
||||
- def test_mem_cache_fragment_cache_store_with_multiple_servers
|
||||
- MemCache.expects(:new).with(%w[localhost 192.168.1.1], {})
|
||||
- store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1'
|
||||
- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
|
||||
- end
|
||||
-
|
||||
- def test_mem_cache_fragment_cache_store_with_options
|
||||
- MemCache.expects(:new).with(%w[localhost 192.168.1.1], { :timeout => 10 })
|
||||
- store = ActiveSupport::Cache.lookup_store :mem_cache_store, "localhost", '192.168.1.1', :namespace => 'foo', :timeout => 10
|
||||
- assert_kind_of(ActiveSupport::Cache::MemCacheStore, store)
|
||||
- assert_equal 'foo', store.options[:namespace]
|
||||
- end
|
||||
-
|
||||
def test_object_assigned_fragment_cache_store
|
||||
store = ActiveSupport::Cache.lookup_store ActiveSupport::Cache::FileStore.new("/path/to/cache/directory")
|
||||
assert_kind_of(ActiveSupport::Cache::FileStore, store)
|
||||
|
|
@ -1,12 +1,10 @@
|
|||
%global gem_name activesupport
|
||||
|
||||
|
||||
|
||||
Summary: Support and utility classes used by the Rails framework
|
||||
Name: rubygem-%{gem_name}
|
||||
Epoch: 1
|
||||
Version: 3.2.13
|
||||
Release: 2%{?dist}
|
||||
Version: 4.0.0
|
||||
Release: 1%{?dist}
|
||||
Group: Development/Languages
|
||||
License: MIT
|
||||
URL: http://www.rubyonrails.org
|
||||
|
|
@ -17,18 +15,14 @@ Source0: http://rubygems.org/downloads/activesupport-%{version}.gem
|
|||
# Rails rpms, you may check it out like so
|
||||
# git clone http://github.com/rails/rails.git
|
||||
# cd rails/activesupport/
|
||||
# git checkout v3.2.13
|
||||
# tar czvf activesupport-3.2.13-tests.tgz test/
|
||||
# git checkout v4.0.0
|
||||
# tar czvf activesupport-4.0.0-tests.tgz test/
|
||||
Source2: activesupport-%{version}-tests.tgz
|
||||
|
||||
# Removes code which breaks the test suite due to a
|
||||
# dependency on a file in the greater rails proj
|
||||
Patch1: activesupport-tests-fix.patch
|
||||
|
||||
# Remove memcache build dependency until rubygem-memcache-client
|
||||
# is in Fedora http://bugzilla.redhat.com/show_bug.cgi?id=668822
|
||||
Patch2: activesupport-remove-memcache-build-dep.patch
|
||||
|
||||
# We need to add the bigdecimal dependency to gemspec, otherwise it won't be
|
||||
# loaded. The reason for this is unbundling it from ruby libdir and moving
|
||||
# it under %%{gem_dir} (therefore if not in Gemfile, it won't be found).
|
||||
|
|
@ -38,22 +32,29 @@ Requires: ruby(rubygems)
|
|||
Requires: ruby(release)
|
||||
# Let's keep Requires and BuildRequires sorted alphabeticaly
|
||||
Requires: rubygem(bigdecimal)
|
||||
Requires: rubygem(dalli)
|
||||
Requires: rubygem(i18n) >= 0.6
|
||||
Requires: rubygem(i18n) < 1.0
|
||||
Requires: rubygem(multi_json) >= 1.0
|
||||
Requires: rubygem(multi_json) < 2
|
||||
Requires: rubygem(rack)
|
||||
Requires: rubygem(thread_safe)
|
||||
Requires: rubygem(tzinfo) >= 0.3.37
|
||||
Requires: rubygem(tzinfo) < 0.4.0
|
||||
BuildRequires: rubygems-devel
|
||||
BuildRequires: rubygem(bigdecimal)
|
||||
BuildRequires: rubygem(builder)
|
||||
BuildRequires: rubygem(dalli)
|
||||
BuildRequires: rubygem(i18n) >= 0.6
|
||||
BuildRequires: rubygem(i18n) < 1.0
|
||||
#BuildRequires: rubygem(memcache-client)
|
||||
BuildRequires: rubygem(minitest)
|
||||
BuildRequires: rubygem(mocha)
|
||||
BuildRequires: rubygem(multi_json) >= 1.0
|
||||
BuildRequires: rubygem(multi_json) < 2
|
||||
BuildRequires: rubygem(rack)
|
||||
BuildRequires: rubygem(tzinfo)
|
||||
BuildRequires: rubygem(thread_safe)
|
||||
BuildRequires: rubygem(tzinfo) >= 0.3.37
|
||||
BuildRequires: rubygem(tzinfo) < 0.4.0
|
||||
BuildArch: noarch
|
||||
Provides: rubygem(%{gem_name}) = %{version}
|
||||
|
||||
|
|
@ -71,11 +72,10 @@ tar xzvf %{SOURCE2} -C .%{gem_instdir}
|
|||
|
||||
pushd .%{gem_instdir}
|
||||
%patch1 -p0
|
||||
%patch2 -p0
|
||||
popd
|
||||
|
||||
pushd .%{gem_dir}
|
||||
%patch4 -p1
|
||||
#%%patch4 -p1
|
||||
popd
|
||||
|
||||
%build
|
||||
|
|
@ -86,8 +86,9 @@ mkdir -p %{buildroot}%{gem_dir}
|
|||
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}
|
||||
|
||||
%check
|
||||
pushd %{buildroot}%{gem_instdir}
|
||||
ruby -Itest -e "Dir.glob('./test/**/*_test.rb').each {|t| require t}"
|
||||
pushd %{buildroot}%{gem_instdir}
|
||||
|
||||
ruby -Ilib:test -e "Dir.glob('./test/**/*_test.rb').each {|t| require t}"
|
||||
popd
|
||||
|
||||
%files
|
||||
|
|
@ -103,8 +104,8 @@ popd
|
|||
|
||||
|
||||
%changelog
|
||||
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1:3.2.13-2
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
|
||||
* Tue Jul 30 2013 Josef Stribny <jstribny@redhat.com> - 1:4.0.0-1
|
||||
- Update to ActiveSupport 4.0.0.
|
||||
|
||||
* Tue Mar 19 2013 Vít Ondruch <vondruch@redhat.com> - 1:3.2.13-1
|
||||
- Update to ActiveSupport 3.2.13.
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
e7fc72c75ce5be6c90ae8cbf92fabb99 activesupport-3.2.13-tests.tgz
|
||||
ccd7f45b436d5703f1d0e99dfa6aa5e9 activesupport-3.2.13.gem
|
||||
8d62bf5db98dbed8f854c0605d4f3685 activesupport-4.0.0-tests.tgz
|
||||
ef0727e4446ab141dfe3d350ec663c03 activesupport-4.0.0.gem
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue