commit
a89cb90755
BIN
activeresource-5.0.0.gem
Normal file
BIN
activeresource-5.0.0.gem
Normal file
Binary file not shown.
@ -0,0 +1,43 @@
|
||||
From 984181f2b26fe78c94f52d81aed72e25f3d16bf4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
|
||||
Date: Thu, 1 Jun 2017 13:12:51 +0200
|
||||
Subject: [PATCH] Always load 'abstract_unit' on the top of test file.
|
||||
|
||||
This helps to prevent issues such as:
|
||||
|
||||
~~~
|
||||
+ ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||
/builddir/build/BUILD/activeresource-5.0.0/usr/share/gems/gems/activeresource-5.0.0/test/threadsafe_attributes_test.rb:1:in `<top (required)>': uninitialized constant ActiveSupport (NameError)
|
||||
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
|
||||
from /usr/share/rubygems/rubygems/core_ext/kernel_require.rb:55:in `require'
|
||||
from -e:1:in `glob'
|
||||
from -e:1:in `<main>'
|
||||
~~~
|
||||
---
|
||||
test/cases/collection_test.rb | 2 ++
|
||||
test/threadsafe_attributes_test.rb | 2 ++
|
||||
2 files changed, 4 insertions(+)
|
||||
|
||||
diff --git a/test/cases/collection_test.rb b/test/cases/collection_test.rb
|
||||
index 025d3ca..9722375 100644
|
||||
--- a/test/cases/collection_test.rb
|
||||
+++ b/test/cases/collection_test.rb
|
||||
@@ -1,3 +1,5 @@
|
||||
+require 'abstract_unit'
|
||||
+
|
||||
class CollectionTest < ActiveSupport::TestCase
|
||||
def setup
|
||||
@collection = ActiveResource::Collection.new
|
||||
diff --git a/test/threadsafe_attributes_test.rb b/test/threadsafe_attributes_test.rb
|
||||
index 7c3151d..e2459c7 100644
|
||||
--- a/test/threadsafe_attributes_test.rb
|
||||
+++ b/test/threadsafe_attributes_test.rb
|
||||
@@ -1,3 +1,5 @@
|
||||
+require 'abstract_unit'
|
||||
+
|
||||
class ThreadsafeAttributesTest < ActiveSupport::TestCase
|
||||
|
||||
class TestClass
|
||||
--
|
||||
2.12.2
|
||||
|
||||
64
rubygem-activeresource.spec
Normal file
64
rubygem-activeresource.spec
Normal file
@ -0,0 +1,64 @@
|
||||
%global gem_name activeresource
|
||||
Name: rubygem-%{gem_name}
|
||||
Epoch: 1
|
||||
Version: 5.0.0
|
||||
Release: 1
|
||||
Summary: REST modeling framework (part of Rails)
|
||||
License: MIT
|
||||
URL: http://www.rubyonrails.org
|
||||
Source0: https://rubygems.org/gems/activeresource-5.0.0.gem
|
||||
Source1: https://github.com/rails/activeresource/archive/v5.0.0.tar.gz
|
||||
Patch0: rubygem-activeresource-5.0.0-Always-load-abstract_unit-on-the-top-of-test-file.patch
|
||||
BuildRequires: ruby(release) rubygems-devel ruby rubygem(activemodel) >= 5.0
|
||||
BuildRequires: rubygem(activesupport) >= 5.0 rubygem(activemodel-serializers-xml)
|
||||
BuildRequires: rubygem(bundler) rubygem(mocha)
|
||||
BuildArch: noarch
|
||||
%description
|
||||
REST on Rails. Wrap your RESTful web app with Ruby classes and work with them
|
||||
like Active Record models.
|
||||
|
||||
%package doc
|
||||
Summary: Documentation for %{name}
|
||||
Requires: %{name} = %{epoch}:%{version}-%{release}
|
||||
BuildArch: noarch
|
||||
%description doc
|
||||
Documentation for %{name}.
|
||||
|
||||
%prep
|
||||
gem unpack %{SOURCE0}
|
||||
%setup -q -D -T -n %{gem_name}-%{version}
|
||||
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||
|
||||
%build
|
||||
gem build %{gem_name}.gemspec
|
||||
%gem_install
|
||||
|
||||
%install
|
||||
mkdir -p %{buildroot}%{gem_dir}
|
||||
cp -a .%{gem_dir}/* \
|
||||
%{buildroot}%{gem_dir}/
|
||||
|
||||
%check
|
||||
cp %{gem_name}.gemspec .%{gem_instdir}
|
||||
pushd .%{gem_instdir}
|
||||
tar xzvf %{SOURCE1}
|
||||
cd %{gem_name}-%{version}
|
||||
cat %{PATCH0} | patch -p1
|
||||
echo 'gemspec' > Gemfile
|
||||
sed -i '/rake/ s/^/#/' %{gem_name}.gemspec
|
||||
ruby -Itest -e 'Dir.glob "./test/**/*_test.rb", &method(:require)'
|
||||
popd
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%{gem_libdir}
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
%doc %{gem_docdir}
|
||||
%doc %{gem_instdir}/README.rdoc
|
||||
|
||||
%changelog
|
||||
* Wed Aug 12 2020 chengzihan <chengzihan2@huawei.com> - 5.0.0-1
|
||||
- Package init
|
||||
4
rubygem-activeresource.yaml
Normal file
4
rubygem-activeresource.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
version_control: github
|
||||
src_repo: rails/activeresource
|
||||
tag_prefix: "^v"
|
||||
seperator: "."
|
||||
BIN
v5.0.0.tar.gz
Normal file
BIN
v5.0.0.tar.gz
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user