diff --git a/.gitignore b/.gitignore index 48449bc..8d646bd 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/bundler-1.3.1.gem +SOURCES/bundler-1.7.8.gem diff --git a/.rubygem-bundler.metadata b/.rubygem-bundler.metadata index f68ee3c..a042fdf 100644 --- a/.rubygem-bundler.metadata +++ b/.rubygem-bundler.metadata @@ -1 +1 @@ -cb07cd56fdc920b8e1bc95b5594c0dcb6c235dc5 SOURCES/bundler-1.3.1.gem +dd798bf25cb9aa0a9948c2095b469ead34095fad SOURCES/bundler-1.7.8.gem diff --git a/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch b/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch index 27efa49..c53ce72 100644 --- a/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch +++ b/SOURCES/bundler-add-support-for-binary-extensions-in-dedicated-folde.patch @@ -11,10 +11,10 @@ diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb index a68fb0a..89796d3 100644 --- a/lib/bundler/rubygems_ext.rb +++ b/lib/bundler/rubygems_ext.rb -@@ -31,13 +31,16 @@ module Gem - end - +@@ -36,13 +36,16 @@ module Gem def load_paths + return full_require_paths if respond_to?(:full_require_paths) + - require_paths.map do |require_path| + paths = require_paths.map do |require_path| if require_path.include?(full_gem_path) @@ -28,7 +28,7 @@ index a68fb0a..89796d3 100644 + paths end - # RubyGems 1.8+ used only. + if method_defined?(:extension_dir) -- 1.7.7.5 diff --git a/SOURCES/rubygem-bundler-1.3.1-Fix-gem_helper_spec.patch b/SOURCES/rubygem-bundler-1.3.1-Fix-gem_helper_spec.patch deleted file mode 100644 index fac5a23..0000000 --- a/SOURCES/rubygem-bundler-1.3.1-Fix-gem_helper_spec.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 31fd2fdae5220d6c2525da503bff97289a09ffef Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?V=C3=ADt=20Ondruch?= -Date: Thu, 7 Mar 2013 09:27:54 +0100 -Subject: [PATCH] Fix gem_helper_spec. - -Fixes "Bundler::GemHelper tasks gem management release releases even -if tag already exists", otherwise the test case fails with: - - RuntimeError: - There are files that need to be committed first. ---- - spec/bundler/gem_helper_spec.rb | 7 +++++-- - 1 file changed, 5 insertions(+), 2 deletions(-) - -diff --git a/spec/bundler/gem_helper_spec.rb b/spec/bundler/gem_helper_spec.rb -index 4fce534..134fc87 100644 ---- a/spec/bundler/gem_helper_spec.rb -+++ b/spec/bundler/gem_helper_spec.rb -@@ -185,8 +185,11 @@ describe "Bundler::GemHelper tasks" do - `git init --bare` - } - Dir.chdir(@app) { -- `git commit -a -m "another commit"` -- `git tag -a -m \"Version 0.0.1\" v0.0.1` -+ `git init` -+ `git config user.email "you@example.com"` -+ `git config user.name "name"` -+ `git commit -a -m "another commit"` -+ `git tag -a -m \"Version 0.0.1\" v0.0.1` - } - @helper.release_gem - end --- -1.8.3.1 - diff --git a/SPECS/rubygem-bundler.spec b/SPECS/rubygem-bundler.spec index bef5e3e..d983232 100644 --- a/SPECS/rubygem-bundler.spec +++ b/SPECS/rubygem-bundler.spec @@ -2,29 +2,42 @@ %{!?enable_test: %global enable_test 0} +# Macro for symlinking system RubyGems as a replacement for removed vendored libs +%global symlink_vendored_libs \ +for dependency in \\\ + net-http-persistent \\\ + thor \ +do \ + for fileordir in \\\ + %{gem_dir}/gems/$dependency-*/lib/* \ + do \ + ln -s -f $fileordir -t %{gem_libdir}/bundler/vendor/ \ + done \ +done + Summary: Library and utilities to manage a Ruby application's gem dependencies Name: rubygem-%{gem_name} -Version: 1.3.1 +Version: 1.7.8 Release: 3%{?dist} Group: Development/Languages License: MIT URL: http://gembundler.com Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem Patch1: bundler-add-support-for-binary-extensions-in-dedicated-folde.patch -Patch100: rubygem-bundler-1.3.1-Fix-gem_helper_spec.patch Requires: ruby(release) Requires: ruby(rubygems) -Requires: rubygem(thor) +Requires: rubygem(thor) >= 0.19.0 Requires: rubygem(net-http-persistent) BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby %if 0%{enable_test} > 0 BuildRequires: ruby-devel +BuildRequires: rubygem(rspec) >= 3.0 BuildRequires: rubygem(thor) BuildRequires: rubygem(net-http-persistent) -BuildRequires: rubygem(rspec) -BuildRequires: rubygem(psych) +#BuildRequires: rubygem(psych) +#BuildRequires: git snv sudo BuildRequires: git sudo %endif BuildArch: noarch @@ -54,6 +67,10 @@ popd %build %install +# Remove bundled libraries +rm -rf .%{gem_libdir}/bundler/vendor +mkdir .%{gem_libdir}/bundler/vendor + mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ @@ -66,59 +83,71 @@ find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod 755 find %{buildroot}%{gem_instdir}/lib/bundler/templates/newgem/bin -type f | xargs chmod 755 chmod 755 %{buildroot}%{gem_instdir}/lib/bundler/templates/Executable* -# Remove bundled libraries -rm -rf %{buildroot}/%{gem_libdir}/bundler/vendor - # Man pages are used by Bundler internally, do not remove them! mkdir -p %{buildroot}%{_mandir}/man5 cp -a %{buildroot}%{gem_libdir}/bundler/man/gemfile.5 %{buildroot}%{_mandir}/man5 mkdir -p %{buildroot}%{_mandir}/man1 -for i in bundle bundle-config bundle-exec bundle-install bundle-package bundle-update +for i in bundle bundle-config bundle-exec bundle-install bundle-package bundle-platform bundle-update do cp -a %{buildroot}%{gem_libdir}/bundler/man/$i %{buildroot}%{_mandir}/man1/`echo $i.1` done # Test suite has to be disabled for official build, since it downloads various # gems, which are not in Fedora or they have different version etc. -# Nevertheless, the test suite passes for local builds. +# Nevertheless, the test suite should run for local builds. +# TODO: investigate failures %if 0%{enable_test} > 0 %check pushd .%{gem_instdir} # This test does not work, since ruby is configured with --with-ruby-version='' -# https://github.com/carlhuda/bundler/issues/2365 -sed -i '/"works after switching Rubies"/,/end$/{s/^/#/}' spec/install/gems/platform_spec.rb - -# Fixes not correctly initialized git repo. -# https://github.com/carlhuda/bundler/pull/2367 -cat %{PATCH100} | patch -p1 +# https://github.com/bundler/bundler/issues/2365 +sed -i '/"fetches gems again after changing the version of Ruby"/,/end$/{s/^/#/}' spec/install/gems/platform_spec.rb # Test suite needs to run in initialized git repository. # https://github.com/carlhuda/bundler/issues/2022 git init -# There is necessary to specify load paths for several gems to pass the test -# suite. Let's evaluate them by this nice Ruby snippet. -RUBYOPT=-I`ruby < - 1.7.8-3 +- Enforce higher Thor version, which is required by Bundler. + Related: rhbz#1194243 + +* Tue Apr 07 2015 - 1.7.8-2 +- Update to Bundler 1.7.8. + Resolves: rhbz#1194243 +- Use symlinks for vendored libraries. + Resolves: rhbz#1163076 + * Fri Dec 27 2013 Daniel Mach - 1.3.1-3 - Mass rebuild 2013-12-27