lock_jar 0.14.7 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/lock_jar/bundler.rb +4 -3
- data/lib/lock_jar/version.rb +1 -1
- data/spec/lock_jar/bundler_spec.rb +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d2413e9ea3e62cd72f1534ddd8fc1de09f1a6f6f
|
4
|
+
data.tar.gz: 87d490c40f460a60a0dbb8610f1d0abce27a0a70
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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!
|
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
|
data/lib/lock_jar/bundler.rb
CHANGED
@@ -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!(
|
17
|
-
|
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
|
data/lib/lock_jar/version.rb
CHANGED
@@ -16,8 +16,8 @@ describe LockJar::Bundler do
|
|
16
16
|
end
|
17
17
|
|
18
18
|
context 'when Bundler.install has run' do
|
19
|
-
|
20
|
-
LockJar::Bundler.lock!(
|
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
|