[rubygem-archivist/f18: 1/2] Update to archivist 1.1.1.

Vít Ondruch vondruch at fedoraproject.org
Thu Aug 16 08:42:54 UTC 2012


commit 16cc6906fa1b5d183c880662343dc9d6007d9793
Author: Vít Ondruch <vondruch at redhat.com>
Date:   Thu Aug 16 10:41:00 2012 +0200

    Update to archivist 1.1.1.

 .gitignore                            |    1 +
 archivist-1.1.1-support-sqlite3.patch |   27 ++++++++
 dead.package                          |    1 -
 rubygem-archivist.spec                |  117 +++++++++++++++++++++++++++++++++
 sources                               |    1 +
 5 files changed, 146 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index c3526c7..4041c2a 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 /archivist-1.0.5.1.gem
+/archivist-1.1.1.gem
diff --git a/archivist-1.1.1-support-sqlite3.patch b/archivist-1.1.1-support-sqlite3.patch
new file mode 100644
index 0000000..de6a46f
--- /dev/null
+++ b/archivist-1.1.1-support-sqlite3.patch
@@ -0,0 +1,27 @@
+diff --git a/lib/archivist/base/db.rb b/lib/archivist/base/db.rb
+index c4c0c1f..2bf4750 100644
+--- a/lib/archivist/base/db.rb
++++ b/lib/archivist/base/db.rb
+@@ -11,6 +11,8 @@ module Archivist
+           base.send(:extend, MySQL)
+         elsif connection_class.include?("postgresql")
+           base.send(:extend, PostgreSQL)
++        elsif connection_class.include?("sqlite3")
++          base.send(:extend, Sqlite3)
+         else
+           raise "DB type not supported by Archivist!"
+         end
+@@ -56,6 +58,13 @@ module Archivist
+           @indexes ||= connection.indexes("archived_#{table_name}").map{|i| i.column_names}
+         end
+       end
++
++      module Sqlite3
++        private
++        def archived_table_indexed_columns
++          @indexes ||= connection.indexes("archived_#{table_name}").map{|i| i.column_names}
++        end
++      end
+     end
+   end
+ end
diff --git a/rubygem-archivist.spec b/rubygem-archivist.spec
new file mode 100644
index 0000000..a67ca51
--- /dev/null
+++ b/rubygem-archivist.spec
@@ -0,0 +1,117 @@
+# Generated from archivist-1.0.5.1.gem by gem2rpm -*- rpm-spec -*-
+%global gem_name archivist
+
+%global rubyabi 1.9.1
+
+Summary: A rails 3 model archiving system based on acts_as_archive
+Name: rubygem-%{gem_name}
+Version: 1.1.1
+Release: 1%{?dist}
+Group: Development/Languages
+License: MIT
+URL: http://github.com/tpickett66/archivist
+Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
+# Partial support for sqlite3.
+# https://github.com/tpickett66/archivist/issues/3
+Patch0: archivist-1.1.1-support-sqlite3.patch
+Requires: ruby(abi) = %{rubyabi}
+Requires: ruby(rubygems)
+Requires: rubygem(activerecord) => 3.0.0
+BuildRequires: ruby(abi) = %{rubyabi}
+BuildRequires: rubygems-devel
+BuildRequires: rubygem(minitest)
+BuildRequires: rubygem(rails)
+BuildRequires: rubygem(sqlite3)
+BuildRequires: rubygem(shoulda)
+BuildRequires: rubygem(factory_girl)
+BuildArch: noarch
+Provides: rubygem(%{gem_name}) = %{version}
+
+%description
+This is a functional replacement for acts_as_archive in
+rails 3 applications, the only functionality that is not
+duplicated is the migration from acts_as_paranoid
+
+
+%package doc
+Summary: Documentation for %{name}
+Group: Documentation
+Requires: %{name} = %{version}-%{release}
+BuildArch: noarch
+
+%description doc
+Documentation for %{name}
+
+
+%prep
+%setup -q -c -T
+mkdir -p .%{gem_dir}
+gem install --local --install-dir .%{gem_dir} \
+            -V --force %{SOURCE0}
+
+pushd .%{gem_instdir}
+%patch0 -p1
+popd
+
+%build
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a .%{gem_dir}/* \
+        %{buildroot}%{gem_dir}/
+
+chmod a+x %{buildroot}%{gem_instdir}/Rakefile
+chmod a+x %{buildroot}%{gem_instdir}/test/dummy/Rakefile
+
+%check
+pushd .%{gem_instdir}
+
+pushd test/dummy
+# Get rid of Bundler.
+sed -i "/Bundler.require/ d" config/application.rb
+# Force sqlite3 as a DB backend.
+sed -i "s/<%=.*%>/sqlite3/" config/database.yml
+popd
+
+# Debugger should not be needed by test suite I guess.
+sed -i "13,+5d" test/test_helper.rb
+
+# I tried to make the test suite work with sqlite3, but failed. Since sqlite3
+# is not supported ATM, I am not sure if that is not dead end.
+# https://github.com/tpickett66/archivist/issues/3
+# testrb test/*_test.rb
+testrb test/archivist_test.rb
+popd
+
+%files
+%dir %{gem_instdir}
+%{gem_libdir}
+%doc %{gem_instdir}/MIT-LICENSE
+%exclude %{gem_cache}
+%{gem_spec}
+
+%files doc
+%doc %{gem_docdir}
+%doc %{gem_instdir}/README.rdoc
+%{gem_instdir}/Rakefile
+%{gem_instdir}/test
+
+
+%changelog
+* Wed Aug 15 2012 Vít Ondruch <vondruch at redhat.com> - 1.1.1-1
+- Update to archivist 1.1.1.
+
+* Sat Jul 21 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.5.1-5
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
+
+* Thu Feb 02 2012 Vít Ondruch <vondruch at redhat.com> - 1.0.5.1-4
+- Rebuilt for Ruby 1.9.3.
+
+* Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.0.5.1-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
+
+* Thu Sep 01 2011 Maros Zatko <mzatko at redhat.com> - 1.0.5.1-2
+- Added %%doc, removed shoulda dep
+
+* Thu Sep 01 2011 Maros Zatko <mzatko at redhat.com> - 1.0.5.1-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..121b5a0
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+3e3ea271c9fb6029871e59937559e417  archivist-1.1.1.gem


More information about the scm-commits mailing list