autobundle 1.0.0.pre1 → 1.0.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/rubygems_plugin.rb +7 -2
  2. metadata +2 -2
@@ -1,11 +1,16 @@
1
1
  module Autobundle
2
2
  def self.setup
3
3
  if gemfile = Utils.find_gemfile
4
- gem 'bundler', Utils.deduce_bundler_version(gemfile)
4
+ version = Utils.deduce_bundler_version(gemfile)
5
+ gem 'bundler', version
5
6
  ENV['BUNDLE_GEMFILE'] = gemfile
6
7
  require 'bundler'
7
8
  Bundler.setup
8
9
  end
10
+ rescue Gem::LoadError => e
11
+ $stderr.puts "You have a Gemfile for bundler #{version} but don't have it installed. Ignoring it."
12
+ rescue Bundler::BundlerError => e
13
+ $stderr.puts "You have a Gemfile but your bundle is half-baked. Leaving it in the oven. #{e}"
9
14
  end
10
15
 
11
16
  module Utils
@@ -31,7 +36,7 @@ module Autobundle
31
36
  contents = File.read(lock)
32
37
  if contents =~ /\A---/
33
38
  if contents =~ /- bundler:\s*\n\s+version:\s*(.+)\n/
34
- "= $1"
39
+ "= #{$1}"
35
40
  else
36
41
  '~> 0.9.0'
37
42
  end
metadata CHANGED
@@ -6,8 +6,8 @@ version: !ruby/object:Gem::Version
6
6
  - 1
7
7
  - 0
8
8
  - 0
9
- - pre1
10
- version: 1.0.0.pre1
9
+ - pre2
10
+ version: 1.0.0.pre2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Kemper