smarter_bundler 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1fea8b06fe9ce3d8d5e3f234d03b5170acdb7ba6
4
- data.tar.gz: fce5b75f97a00df803e40db87c42a160e27330a2
3
+ metadata.gz: 10f203335d8ae0d93458b567e314c4e5851b4249
4
+ data.tar.gz: 2e015ec0fe6553e0e6d5c343ecf50425dc4421a1
5
5
  SHA512:
6
- metadata.gz: 632f22a9006cbca3cd924bcfb21ab51a11b27be7857b2aff5137757df9936e325d7e0214e3487fa9afc83e8a18d60eec46267ff4c6b57b1df177cb746831e136
7
- data.tar.gz: d805dff7d1dd72600f4d6b0649476f56764663d7241578eaf03793397a4fcbebabec60eb3b877edf5b7d23b415c029b1a4c7d3022ce72ee4cbe1df5e35585b53
6
+ metadata.gz: 53c84d3b071458b4f8a30ee31b3c19eb23d2fbca41e8c90ddef16e39c78fa90c042319e97634161f5a2382437ae517758f1939b1ed387540d0caf3b1a5a64b80
7
+ data.tar.gz: e0994eb574ced2f6152a02e00a9c221c5fd86e310dc17fa4aa5fb467750b2ecb495b48dd0948b1baa14e3220461178e10b03989d15b6fcbb317da212cf93e5f2
data/README.md CHANGED
@@ -16,11 +16,7 @@ Do not install it via Gemfile, as it needs to execute even if bundle can't insta
16
16
 
17
17
  Use smarter_bundle instead of the bundle command when installing or upgrading gems.
18
18
 
19
- If you are using it in an automated deploy, then monitor the time the deploy takes, as
20
- the more fixes this program does, the longer it takes (since it reruns bundler to check the fixed Gemfile).
21
- A reasonable limit would be four to ten times the time it normally takes to install.
22
- Once you hit that limit, then check your install log and incorporate the fixes it has found into your Gemfile
23
- source to remove the need for it to run bundler multiple times whilst it fixes the Gemfile.
19
+ Smarter_bundle assumes that the gem bundler complains about is the one that needs to have its version restricted, as it can not determine if its that gem or the gem/s that require it that should be adjusted.
24
20
 
25
21
  ### Cleaning up afterwards
26
22
 
@@ -29,13 +25,14 @@ After smarter_bundle has updated the Gemfile, you should examine the changes, as
29
25
  2. smarter_bundle does not backtrack and recheck earlier adjustments - this may result in a gem being restricted that is no longer needed because the gem that originally needed ended up being restricted to the point it no longer has so many prerequisites. In the Gemfile.lock you will see that the gem is not required by any other gems, nor was it a gem you directly need.
30
26
  3. smarter_bundle does not know how to handle Gemfiles that are intended to be used with multiple ruby versions, so you will need to make a Gemfile that is intended for the ruby version you are checking it with and then incorporate the changes smarter_bundle makes back into the master Gemfile manually;
31
27
 
32
- ### Using in test scripts
33
-
34
- If for some reason you do not use Gemfile.lock in automated testing (eg when testing gems with travis-ci), and you are testing against older ruby versions, then you may wish to consider using
35
- smarter_bundler - instead of the test script failing, smarter_bundler will update the Gemfile on the fly. Of course you are swapping processing time for convienience,
36
- so you should implement a time limit and manually update your Gemfile once the tests slow down too much.
28
+ ### Using in test or deploy scripts
37
29
 
38
- I usually prefer to fail fast and fix it then and there rather than delay the issue, but sometimes delaying failure till later when it can be worked around is appropriate.
30
+ If you are using it in an automated deploy (ie where you are not using Gemfile.lock),
31
+ then monitor the time the deploy takes, as
32
+ the more fixes this program does, the longer it takes (since it reruns bundler to check the fixed Gemfile).
33
+ A reasonable limit would be four to ten times the time it normally takes to install.
34
+ Once you hit that limit, then check your install log and incorporate the fixes it has found into your Gemfile
35
+ source to remove the need for it to run bundler multiple times whilst it fixes the Gemfile.
39
36
 
40
37
  ## Notes
41
38
 
@@ -87,7 +87,16 @@ module SmarterBundler
87
87
  end
88
88
 
89
89
  def call_bundle(bundle_args)
90
- shell "bundle #{bundle_args.join(' ')} && ruby -e 'puts \"Checking gems can be loaded ...\" ; require \"rubygems\" ; require \"bundler/setup\" ; Bundler.require(:default, :development, :test, :production) ; puts \"PASSED GEM LOAD TEST\" ' "
90
+ require_gems_check = if File.size? 'Rakefile'
91
+ 'bundle exec rake environment'
92
+ else
93
+ "ruby -e 'puts \"Checking gems can be loaded ...\" ; " +
94
+ "require \"rubygems\" ; "+
95
+ "require \"bundler/setup\" ; "+
96
+ "Bundler.require(:default) ; "+
97
+ "puts \"PASSED GEM LOAD TEST\" ' "
98
+ end
99
+ shell "bundle #{bundle_args.join(' ')} && #{require_gems_check}"
91
100
  end
92
101
 
93
102
  def install_failed_gem(gem, version)
@@ -1,3 +1,3 @@
1
1
  module SmarterBundler
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smarter_bundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Heggie