From 971f0c5b04695b6d9f14fcebf7cabb0cdde24d16 Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Nov 20 2013 17:32:54 +0000 Subject: update to mongo 1.9.2 --- diff --git a/.gitignore b/.gitignore index 3a839a6..10d9054 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /mongo-1.6.4.gem +/mongo-1.9.2.gem diff --git a/rubygem-mongo.spec b/rubygem-mongo.spec index 0f0091e..fcee5a7 100644 --- a/rubygem-mongo.spec +++ b/rubygem-mongo.spec @@ -1,31 +1,23 @@ %global gem_name mongo -%global rubyabi 1.9.1 Summary: Ruby driver for the MongoDB Name: rubygem-%{gem_name} -Version: 1.6.4 -Release: 5%{?dist} -Group: Development/Languages +Version: 1.9.2 +Release: 1%{?dist} License: ASL 2.0 URL: http://www.mongodb.org Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem -Requires: rubygems -Requires: rubygem(bson) = %{version} -%if 0%{?fedora} >= 19 Requires: ruby(release) +Requires: ruby(rubygems) +Requires: rubygem(bson) = %{version} BuildRequires: ruby(release) -%else -Requires: ruby(abi) >= %{rubyabi} -BuildRequires: ruby(abi) >= %{rubyabi} -%endif -BuildRequires: rubygems BuildRequires: rubygems-devel # For running the tests +BuildRequires: %{_bindir}/mongod BuildRequires: rubygem(bson) BuildRequires: rubygem(shoulda) BuildRequires: rubygem(mocha) -#BuildRequires: rubygem(minitest) -BuildRequires: rubygem(test-unit) +BuildRequires: rubygem(minitest) BuildArch: noarch Provides: rubygem(%{gem_name}) = %{version} @@ -36,7 +28,6 @@ http://www.mongodb.org. %package doc Summary: Documentation for %{name} -Group: Documentation Requires:%{name} = %{version}-%{release} %description doc @@ -49,23 +40,15 @@ gem unpack %{SOURCE0} gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec +chmod a-x test/test_helper.rb + %build mkdir -p .%{gem_dir} # Create the gem as gem install only works on a gem file gem build %{gem_name}.gemspec -export CONFIGURE_ARGS="--with-cflags='%{optflags}'" -# gem install compiles any C extensions and installs into a directory -# We set that to be a local directory so that we can move it into the -# buildroot in %%install -gem install -V \ - --local \ - --install-dir .%{gem_dir} \ - --bindir .%{_bindir} \ - --force \ - --rdoc \ - %{gem_name}-%{version}.gem +%gem_install %install mkdir -p %{buildroot}%{gem_dir} @@ -74,20 +57,40 @@ cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ mkdir -p %{buildroot}%{_bindir} cp -a .%{_bindir}/* %{buildroot}%{_bindir} -chmod 755 %{buildroot}%{gem_instdir}/test/tools/repl_set_manager.rb - %check pushd .%{gem_instdir} -# Most tests require a mongo server to be running -# We are only running tests that do not require the server -RUBYOPT="-rdate" testrb test/conversions_test.rb \ - test/support_test.rb \ - test/uri_test.rb \ - test/unit/*_test.rb + +# Lets go with minitest. +sed -i "/gem 'test-unit'/ d" test/test_helper.rb +sed -i "s|assert_true|assert|" test/functional/uri_test.rb +sed -i "s|assert_false|refute|" test/sharded_cluster/basic_test.rb + +# Spawn For Ruby 1.8 should not be needed for Ruby 1.9+. +sed -i "/require 'sfl'/ d" test/tools/mongo_config.rb + +# Create data directory and start testing mongo instance. +mkdir data +mongod \ + --dbpath data \ + --logpath data/log \ + --fork \ + --auth + +# This should mimic the "rake test:default". +# https://github.com/mongodb/mongo-ruby-driver/blob/1.9.2/tasks/testing.rake +find test/{unit,functional,threading} -name '*_test.rb' \ + ! -wholename 'test/functional/grid_io_test.rb' \ + ! -wholename 'test/functional/grid_test.rb' \ + ! -wholename 'test/functional/ssl_test.rb' \ + | DBPATH=data xargs testrb -Ilib:test + +# Shutdown mongo and celanupt the data. +mongod --shutdown --dbpath data +rm -rf data popd %files -%doc %{gem_instdir}/LICENSE.txt +%doc %{gem_instdir}/LICENSE %dir %{gem_instdir} %{_bindir}/mongo_console %{gem_instdir}/bin @@ -97,13 +100,17 @@ popd %files doc %doc %{gem_instdir}/README.md +%doc %{gem_instdir}/VERSION %doc %{gem_docdir} -%doc %{gem_instdir}/docs %{gem_instdir}/test %{gem_instdir}/mongo.gemspec %{gem_instdir}/Rakefile %changelog +* Tue Nov 19 2013 Vít Ondruch - 1.9.2-1 +- Update to mongo 1.9.2. +- Enabled test suite. + * Sun Aug 04 2013 Fedora Release Engineering - 1.6.4-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/sources b/sources index cef960b..b3d1fb1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -c483d7ae303c5ea4d41ea7556b4a1917 mongo-1.6.4.gem +f24bc9ec20cdfd7db0fdf575a6699084 mongo-1.9.2.gem