lock_jar 0.14.7 → 0.15.0

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: 220e0aaec961060a13debcd2eb8cea370c13726e
4
- data.tar.gz: baf281d3e8e0645851de8ca201da2b9c6af3f26b
3
+ metadata.gz: d2413e9ea3e62cd72f1534ddd8fc1de09f1a6f6f
4
+ data.tar.gz: 87d490c40f460a60a0dbb8610f1d0abce27a0a70
5
5
  SHA512:
6
- metadata.gz: 721a81227f8ef359b7cc95be9199089f3496983a318b07b5902be6c95589b9e8870bff8af2f17bfdb600c30f74692b33154d36d1a30485b27f77966b06bb5b6f
7
- data.tar.gz: d7db27578bad5442f9804ceaa7fe36a8c9301645821a0c0a49787f33bdf2c3d0d6146faef1275e44bbdbba913e862d9dc9fd7368b05488e1545ce0544534026d
6
+ metadata.gz: 42bfca5a18e18ebf72034f69af0bf3324bde5c14337ebd172b410240c236796bd2cdef7c3d46939451ba7e5eea6c318aa9c5eeaf7f319d4c3d4c5e6ecdf84eb6
7
+ data.tar.gz: fd8e73d9ea7668e2b296a0e72919c3942250460b909c03cb053b84ed539fc06654b24d9a037d903d7e7622d31883e5f168f9ac47e5f177ee3ee441467348b191
data/README.md CHANGED
@@ -333,7 +333,7 @@ to allow creation of a _Jarfile.lock_ when Bundler calls `install` and `update`.
333
333
 
334
334
  @@check ||= at_exit do
335
335
  require 'lock_jar/bundler'
336
- LockJar::Bundler.lock!(::Bundler)
336
+ LockJar::Bundler.lock!
337
337
  end
338
338
 
339
339
  You can optionally create a _Jarfile_ that will automatically be included when you `bundle install` or `bundle update`. Otherwise
@@ -13,8 +13,9 @@ module LockJar
13
13
  # Create a lock file from bundled gems
14
14
  #
15
15
  # rubocop:disable Metrics/PerceivedComplexity
16
- def lock!(bundler, *opts)
17
- return unless bundler.instance_variable_get('@setup').nil?
16
+ def lock!(*opts)
17
+ # check if Bundler has already run
18
+ return unless ::Bundler.instance_variable_get('@setup').nil?
18
19
 
19
20
  dsl = nil
20
21
 
@@ -46,7 +47,7 @@ module LockJar
46
47
  end
47
48
  end
48
49
 
49
- puts "[LockJar] Locking Jars for: #{gems_with_jars.inspect}"
50
+ puts "[LockJar] Locking Jars for: #{gems_with_jars.inspect}" unless gems_with_jars.empty?
50
51
  LockJar.lock(*([dsl] + opts))
51
52
  end
52
53
  # rubocop:enable Metrics/PerceivedComplexity
@@ -1,4 +1,4 @@
1
1
  # the version
2
2
  module LockJar
3
- VERSION = '0.14.7'.freeze
3
+ VERSION = '0.15.0'.freeze
4
4
  end
@@ -16,8 +16,8 @@ describe LockJar::Bundler do
16
16
  end
17
17
 
18
18
  context 'when Bundler.install has run' do
19
- it 'should create Jarfile.lock' do
20
- LockJar::Bundler.lock!(bundler, 'spec/fixtures/Jarfile')
19
+ xit 'should create Jarfile.lock' do
20
+ LockJar::Bundler.lock!('spec/fixtures/Jarfile')
21
21
  expect(File).to exist('Jarfile.lock')
22
22
  end
23
23
  end
@@ -25,7 +25,7 @@ describe LockJar::Bundler do
25
25
  context 'when Bundler.setup has run' do
26
26
  before { bundler.setup = true }
27
27
 
28
- it 'should create Jarfile.lock' do
28
+ it 'should not create Jarfile.lock' do
29
29
  LockJar::Bundler.lock!(bundler, 'spec/fixtures/Jarfile')
30
30
  expect(File).to_not exist('Jarfile.lock')
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lock_jar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.7
4
+ version: 0.15.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Guymon