diff options
author | 2010-06-22 21:35:43 +0000 | |
---|---|---|
committer | 2010-06-22 21:35:43 +0000 | |
commit | c9e2fd8c22e5c061a68809479eee4bcaf8df4cd7 (patch) | |
tree | 20892f107539ee56a1753264594648a24ecc143c | |
parent | Automated update of use.local.desc (diff) | |
download | gentoo-2-c9e2fd8c22e5c061a68809479eee4bcaf8df4cd7.tar.gz gentoo-2-c9e2fd8c22e5c061a68809479eee4bcaf8df4cd7.tar.bz2 gentoo-2-c9e2fd8c22e5c061a68809479eee4bcaf8df4cd7.zip |
Finally bump to bundler 0.9, add a patch with a number of fixes for both test and code itself, already merged upstream.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
-rw-r--r-- | dev-ruby/bundler/ChangeLog | 9 | ||||
-rw-r--r-- | dev-ruby/bundler/bundler-0.9.26.ebuild | 41 | ||||
-rw-r--r-- | dev-ruby/bundler/files/bundler-0.9.26-gentoo.patch | 62 |
3 files changed, 111 insertions, 1 deletions
diff --git a/dev-ruby/bundler/ChangeLog b/dev-ruby/bundler/ChangeLog index 563b5b995f7a..b2ecca1fac89 100644 --- a/dev-ruby/bundler/ChangeLog +++ b/dev-ruby/bundler/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for dev-ruby/bundler # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bundler/ChangeLog,v 1.3 2010/05/01 00:40:38 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bundler/ChangeLog,v 1.4 2010/06/22 21:35:43 flameeyes Exp $ + +*bundler-0.9.26 (22 Jun 2010) + + 22 Jun 2010; Diego E. Pettenò <flameeyes@gentoo.org> + +bundler-0.9.26.ebuild, +files/bundler-0.9.26-gentoo.patch: + Finally bump to bundler 0.9, add a patch with a number of fixes for both + test and code itself, already merged upstream. 01 May 2010; Diego E. Pettenò <flameeyes@gentoo.org> bundler-0.8.1.ebuild: diff --git a/dev-ruby/bundler/bundler-0.9.26.ebuild b/dev-ruby/bundler/bundler-0.9.26.ebuild new file mode 100644 index 000000000000..5d2e7fe10763 --- /dev/null +++ b/dev-ruby/bundler/bundler-0.9.26.ebuild @@ -0,0 +1,41 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-ruby/bundler/bundler-0.9.26.ebuild,v 1.1 2010/06/22 21:35:43 flameeyes Exp $ + +EAPI=2 + +# ruby19 → uncountable number of test failures +# jruby → needs to be tested because jruby-1.5.1 fails in multiple +# ways unrelated to this package +USE_RUBY="ruby18 ree18" + +RUBY_FAKEGEM_TASK_TEST="spec" + +# No documentation task +RUBY_FAKEGEM_TASK_DOC="" +RUBY_FAKEGEM_EXTRADOC="README.md CHANGELOG.md ROADMAP.md" + +inherit ruby-fakegem + +DESCRIPTION="An easy way to vendor gem dependencies" +HOMEPAGE="http://github.com/carlhuda/bundler" + +GITHUB_USER="carlhuda" +SRC_URI="http://github.com/${GITHUB_USER}/${PN}/tarball/${PV} -> ${PN}-git-${PV}.tgz" +S="${WORKDIR}/${GITHUB_USER}-${PN}-*" + +LICENSE="MIT" +SLOT="0" +KEYWORDS="~amd64" +IUSE="" + +ruby_add_rdepend dev-ruby/rubygems + +ruby_add_bdepend "test? ( dev-ruby/rspec )" + +RDEPEND="${RDEPEND} + dev-vcs/git" +DEPEND="${DEPEND} + test? ( dev-vcs/git )" + +RUBY_PATCHES=( "${FILESDIR}"/${P}-gentoo.patch ) diff --git a/dev-ruby/bundler/files/bundler-0.9.26-gentoo.patch b/dev-ruby/bundler/files/bundler-0.9.26-gentoo.patch new file mode 100644 index 000000000000..19d9568e9f04 --- /dev/null +++ b/dev-ruby/bundler/files/bundler-0.9.26-gentoo.patch @@ -0,0 +1,62 @@ +diff --git a/bin/bundle b/bin/bundle +index d2e5081..17db3f0 100755 +--- a/bin/bundle ++++ b/bin/bundle +@@ -1,9 +1,14 @@ + #!/usr/bin/env ruby + + # Check if an older version of bundler is installed ++mybasedir = __FILE__.gsub(/\/bin\/bundle/, '') ++ + require 'bundler' + $:.each do |path| +- if path =~ %r'/bundler-0.(\d+)' && $1.to_i < 9 ++ # ignore the directory we're running from, in the tests ++ path = path.gsub(%r"^#{mybasedir}", '') ++ ++ if path =~ %r'/bundler-0\.(\d+)' && $1.to_i < 9 + abort "Please remove older versions of bundler. This can be done by running `gem cleanup bundler`." + end + end +diff --git a/lib/bundler/rubygems_ext.rb b/lib/bundler/rubygems_ext.rb +index bf74a60..c800827 100644 +--- a/lib/bundler/rubygems_ext.rb ++++ b/lib/bundler/rubygems_ext.rb +@@ -26,7 +26,7 @@ module Gem + def git_version + if @loaded_from && File.exist?(File.join(full_gem_path, ".git")) + sha = Dir.chdir(full_gem_path){ `git rev-parse HEAD`.strip } +- branch = full_gem_path.split("-")[3] ++ branch = full_gem_path.match(/gems\/.*/).to_s.split("-")[3] + (branch && branch != sha) ? " #{branch}-#{sha[0...6]}" : " #{sha[0...6]}" + end + end +diff --git a/spec/install/git_spec.rb b/spec/install/git_spec.rb +index a732caa..4c1fc1a 100644 +--- a/spec/install/git_spec.rb ++++ b/spec/install/git_spec.rb +@@ -301,7 +301,7 @@ describe "bundle install with git sources" do + should_be_installed "forced 1.1" + + Dir.chdir(lib_path('forced-1.0')) do +- `git reset --hard head^` ++ `git reset --hard HEAD^` + end + bundle :install + should_be_installed "forced 1.0" +diff --git a/spec/runtime/environment_rb_spec.rb b/spec/runtime/environment_rb_spec.rb +index 73a388c..34417dc 100644 +--- a/spec/runtime/environment_rb_spec.rb ++++ b/spec/runtime/environment_rb_spec.rb +@@ -204,6 +204,11 @@ describe "environment.rb file" do + end + + it "warns you if it's from an old bundler but read-only" do ++ if Process.euid == 0 ++ pending "this test cannot succeed as root" ++ return ++ end ++ + env_file(env_file.read.gsub("by Bundler #{Bundler::VERSION}", "by Bundler 0.9.0")) + FileUtils.chmod 0444, env_file + ruby <<-R, :expect_err => true |