From b0c87c2bceb0c2ca8d4ac125476d52390c7bf23f Mon Sep 17 00:00:00 2001 From: Vít Ondruch Date: Sep 01 2016 11:27:12 +0000 Subject: Update to mongo 2.3.0. --- diff --git a/.gitignore b/.gitignore index d3255ee..2241a06 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /mongo-1.6.4.gem /mongo-1.9.2.gem /mongo-1.10.2.gem +/mongo-2.3.0.gem diff --git a/rubygem-mongo.spec b/rubygem-mongo.spec index 2bd83e7..0fe350e 100644 --- a/rubygem-mongo.spec +++ b/rubygem-mongo.spec @@ -1,49 +1,46 @@ %global gem_name mongo # mongodb is not stable on rawhide and crashes during test # renable test once mongodb is stable again -%global enable_tests 0 - -Summary: Ruby driver for the MongoDB -Name: rubygem-%{gem_name} -Version: 1.10.2 -Release: 5%{?dist} -License: ASL 2.0 -URL: http://www.mongodb.org -Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem +%global enable_tests 1 + +Name: rubygem-%{gem_name} +Version: 2.3.0 +Release: 1%{?dist} +Summary: Ruby driver for MongoDB +Group: Development/Languages +License: ASL 2.0 +URL: http://www.mongodb.org +Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel +BuildRequires: ruby # For running the tests BuildRequires: %{_bindir}/mongod BuildRequires: rubygem(bson) -BuildRequires: rubygem(shoulda) -BuildRequires: rubygem(mocha) -BuildRequires: rubygem(test-unit) -BuildArch: noarch - +BuildRequires: rubygem(rspec) +BuildArch: noarch %description -A Ruby driver for MongoDB. For more information about Mongo, see -http://www.mongodb.org. +A Ruby driver for MongoDB. + %package doc Summary: Documentation for %{name} -Requires:%{name} = %{version}-%{release} +Group: Documentation +Requires: %{name} = %{version}-%{release} +BuildArch: noarch %description doc -Documentation for %{name} - +Documentation for %{name}. %prep gem unpack %{SOURCE0} + %setup -q -D -T -n %{gem_name}-%{version} 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 @@ -51,18 +48,23 @@ gem build %{gem_name}.gemspec %install mkdir -p %{buildroot}%{gem_dir} -cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/ +cp -a .%{gem_dir}/* \ + %{buildroot}%{gem_dir}/ + mkdir -p %{buildroot}%{_bindir} -cp -a .%{_bindir}/* %{buildroot}%{_bindir} +cp -pa .%{_bindir}/* \ + %{buildroot}%{_bindir}/ + +find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x + +# Drop the shebang, file is not executable anyway. +sed -i '/#!\// d' %{buildroot}%{gem_instdir}/Rakefile %if 0%{?enable_tests} %check pushd .%{gem_instdir} -# 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 \ @@ -71,38 +73,35 @@ mongod \ --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 JENKINS_CI=1 xargs ruby -Ilib:test +CI="travis" rspec spec -# Shutdown mongo and celanupt the data. +# Shutdown mongo and cleanup the data. mongod --shutdown --dbpath data rm -rf data popd %endif %files -%doc %{gem_instdir}/LICENSE %dir %{gem_instdir} %{_bindir}/mongo_console +%license %{gem_instdir}/LICENSE %{gem_instdir}/bin %{gem_libdir} -%{gem_spec} %exclude %{gem_cache} +%{gem_spec} %files doc -%doc %{gem_instdir}/README.md -%doc %{gem_instdir}/VERSION %doc %{gem_docdir} -%{gem_instdir}/test -%{gem_instdir}/mongo.gemspec +%doc %{gem_instdir}/CONTRIBUTING.md +%doc %{gem_instdir}/README.md %{gem_instdir}/Rakefile +%exclude %{gem_instdir}/mongo.gemspec +%{gem_instdir}/spec %changelog +* Wed Aug 31 2016 Vít Ondruch - 2.3.0-1 +- Update to mongo 2.3.0. + * Tue Feb 16 2016 Troy Dawson - 1.10.2-5 - Disable tests until mongodb becomes stable in rawhide again. diff --git a/sources b/sources index 78ce847..efadfd2 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -41e5b7a64f39b6b58369978d1751df3e mongo-1.10.2.gem +cc25a9fa40919ef19e539f68e69ea65d mongo-2.3.0.gem