jar-dependencies 0.5.7 → 0.6.0.pre2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f808b45045d68ee8f676ae6a217eab596d8f5636e61113b453ee0b6b190f75f
4
- data.tar.gz: 5dcec69751d4ebc168be6059e56da74a8c033bff73d895f5cf06051e15fc716d
3
+ metadata.gz: 9ee7540cc0e25cd3f1315a239116155c08fa1ac837684e7b8ee514dfb7dfe901
4
+ data.tar.gz: 6cb7c19d5e902031df4760f7f99fb6a137058a8cbd7377784caf780460a6e5db
5
5
  SHA512:
6
- metadata.gz: 413d8136a728211c7cfe8bffa455f4ac17b4d3eb5cb4eb44e1a08642a56805d3d81698f26be3cb0ee76b972aed0ff748e0f4d1b42fa7030d47e12e676b37fa7b
7
- data.tar.gz: f9558c6a6804622b02546b70320709cb945701524e72d1d1e40829af8cdb5e4fa345fa4888f924794d55b46cf1aa508490f06e70345da2a3c6170ebe516854f8
6
+ metadata.gz: c2cd4fac92fd9078e9c2a059a6b52be5636c62c9144c4cfd36996c0ec2968b4a72163f26617ef1736afbbaae78a729f4adb21bd47a647e283a28834ffa268f3f
7
+ data.tar.gz: 17dd9f17dec9c8e0211c384e52d49de78e55356f5b4e472e3798fd72365714dc2dec596c8abd1800d050bdb99f9e2e516ab9cc1a66ed2cafd4da962daa2b2bf9
data/Mavenfile CHANGED
@@ -6,41 +6,30 @@ plugin_repository id: :mavengems, url: 'mavengem:https://rubygems.org'
6
6
 
7
7
  jruby_plugin(:minitest, minispecDirectory: 'specs/*_spec.rb') do
8
8
  execute_goals(:spec)
9
- gem 'ruby-maven', '${ruby-maven.version}'
10
- end
11
-
12
- # retrieve the ruby-maven version
13
- gemfile_profile = @model.profiles.detect do |p|
14
- p.id.to_sym == :gemfile
15
- end || @model
16
- ruby_maven = gemfile_profile.dependencies.detect do |d|
17
- d.artifact_id == 'ruby-maven'
18
9
  end
19
10
 
20
11
  properties('jruby.versions' => ['${jruby.version}'].join(','),
21
12
  # just lock the version
22
13
  'bundler.version' => '2.5.11',
23
- 'ruby-maven.version' => ruby_maven.version,
24
14
  'jruby.version' => '9.4.8.0',
25
- 'jruby.plugins.version' => '3.0.2',
15
+ 'jruby.plugins.version' => '3.0.6',
26
16
  'push.skip' => true)
27
17
 
28
- plugin :invoker, '1.8' do
29
- execute_goals(:install, :run,
30
- id: 'integration-tests',
31
- projectsDirectory: 'integration',
32
- streamLogs: true,
33
- goals: ['install'],
34
- preBuildHookScript: 'setup.bsh',
35
- postBuildHookScript: 'verify.bsh',
36
- cloneProjectsTo: '${project.build.directory}',
37
- properties: { 'jar-dependencies.version' => '${project.version}',
38
- # use an old jruby with old ruby-maven here
39
- 'jruby.version' => '${jruby.version}',
40
- 'jruby.plugins.version' => '${jruby.plugins.version}',
41
- 'bundler.version' => '${bundler.version}',
42
- 'ruby-maven.version' => '${ruby-maven.version}' })
43
- end
18
+ #plugin :invoker, '1.8' do
19
+ # execute_goals(:install, :run,
20
+ # id: 'integration-tests',
21
+ # projectsDirectory: 'integration',
22
+ # streamLogs: true,
23
+ # goals: ['install'],
24
+ # preBuildHookScript: 'setup.bsh',
25
+ # postBuildHookScript: 'verify.bsh',
26
+ # cloneProjectsTo: '${project.build.directory}',
27
+ # properties: { 'jar-dependencies.version' => '${project.version}',
28
+ # # use an old jruby with old ruby-maven here
29
+ # 'jruby.version' => '${jruby.version}',
30
+ # 'jruby.plugins.version' => '${jruby.plugins.version}',
31
+ # 'bundler.version' => '${bundler.version}', })
32
+ #end
44
33
 
45
34
  distribution_management do
46
35
  repository id: :ossrh, url: 'https://oss.sonatype.org/service/local/staging/deploy/maven2/'
data/Rakefile CHANGED
@@ -3,9 +3,14 @@
3
3
  task default: [:specs]
4
4
 
5
5
  require 'bundler/gem_tasks'
6
- require 'rubocop/rake_task'
6
+ require 'rake/clean'
7
7
 
8
- RuboCop::RakeTask.new
8
+ begin
9
+ require 'rubocop/rake_task'
10
+ RuboCop::RakeTask.new
11
+ rescue LoadError
12
+ # RuboCop not available; skip defining the task
13
+ end
9
14
 
10
15
  desc 'run specs'
11
16
  task :specs do
@@ -15,3 +20,47 @@ task :specs do
15
20
  require File.basename(f.sub(/.rb$/, ''))
16
21
  end
17
22
  end
23
+
24
+ require_relative 'lib/jars/mima/version'
25
+
26
+ MIMA_VERSION = Jars::Mima::MIMA_VERSION
27
+ SLF4J_VERSION = Jars::Mima::SLF4J_VERSION
28
+ MIMA_JARS = Jars::Mima::JARS
29
+ MIMA_DIR = Jars::Mima::MIMA_DIR
30
+
31
+ MIMA_JARS.each_key { |jar| CLEAN.include(File.join(MIMA_DIR, jar)) }
32
+
33
+ desc 'download Mima (and dependent SLF4J) jars'
34
+ task :download_jars do
35
+ require 'fileutils'
36
+ require 'open-uri'
37
+ require 'digest/sha1'
38
+
39
+ FileUtils.mkdir_p(MIMA_DIR)
40
+
41
+ MIMA_JARS.each do |filename, info|
42
+ target = File.join(MIMA_DIR, filename)
43
+ if File.exist?(target)
44
+ verify_checksum(target, info[:sha1])
45
+ puts " exists: #{target}"
46
+ next
47
+ end
48
+
49
+ puts " downloading #{filename}..."
50
+ URI.open(info[:url]) do |remote| # rubocop:disable Security/Open
51
+ File.open(target, 'wb') { |f| f.write(remote.read) }
52
+ end
53
+ verify_checksum(target, info[:sha1])
54
+ puts " saved: #{target}"
55
+ end
56
+ end
57
+
58
+ def verify_checksum(path, expected_sha1)
59
+ actual = Digest::SHA1.file(path).hexdigest
60
+ return if actual == expected_sha1
61
+
62
+ File.delete(path)
63
+ raise "SHA-1 mismatch for #{path}:\n" \
64
+ " expected: #{expected_sha1}\n" \
65
+ " actual: #{actual}"
66
+ end
data/Readme.md CHANGED
@@ -166,8 +166,8 @@ xalan/xerces libraries used by those gems are popular ones in the Java world.
166
166
 
167
167
  # Troubleshooting
168
168
 
169
- Since maven is used under the hood it is possible to get more insight
170
- what maven is doing. Show the regular maven output:
169
+ Jar dependency resolution uses the bundled Mima resolver. To get more
170
+ insight into jar-dependencies progress and warnings, enable verbose output:
171
171
 
172
172
  ```shell
173
173
  JARS_VERBOSE=true bundle install
@@ -175,19 +175,14 @@ JARS_VERBOSE=true gem install some_gem
175
175
  ```
176
176
 
177
177
 
178
- Or, with maven debug enabled
178
+ For Ruby-side debug diagnostics, including backtraces for suppressed setup
179
+ errors and jar loading decisions, enable debug output:
179
180
 
180
181
  ```shell
181
182
  JARS_DEBUG=true bundle install
182
183
  JARS_DEBUG=true gem install some_gem
183
184
  ```
184
185
 
185
- The maven command line which gets printed needs maven-3.9.x and the
186
- ruby DSL extension for maven:
187
- [polyglot-maven
188
- configuration](https://github.com/takari/polyglot-maven#configuration) where `${maven.multiModuleProjectDirectory}` is
189
- your current directory.
190
-
191
186
  # Configuration
192
187
 
193
188
  <table border='1'>
@@ -195,10 +190,10 @@ your current directory.
195
190
  <td>ENV</td><td>java system property</td><td>default</td><td>description</td>
196
191
  </tr>
197
192
  <tr>
198
- <td><tt>JARS_DEBUG</tt></td><td>jars.debug</td><td>false</td><td>if set to true it will produce lots of debug out (maven -X switch)</td>
193
+ <td><tt>JARS_DEBUG</tt></td><td>jars.debug</td><td>false</td><td>if set to true it will produce Ruby-side debug diagnostics and implies verbose output</td>
199
194
  </tr>
200
195
  <tr>
201
- <td><tt>JARS_VERBOSE</tt></td><td>jars.verbose</td><td>false</td><td>if set to true it will produce some extra output</td>
196
+ <td><tt>JARS_VERBOSE</tt></td><td>jars.verbose</td><td>false</td><td>if set to true it will produce some extra resolver output</td>
202
197
  </tr>
203
198
  <tr>
204
199
  <td><tt>JARS_HOME</tt></td><td>jars.home</td><td>$HOME/.m2/repository</td><td>filesystem location where to store the jar files and some metadata</td>
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require_relative 'lib/jars/version'
4
+ require_relative 'lib/jars/mima/version'
4
5
 
5
6
  Gem::Specification.new do |s|
6
7
  s.name = 'jar-dependencies'
@@ -13,11 +14,13 @@ Gem::Specification.new do |s|
13
14
  s.homepage = 'https://github.com/jruby/jar-dependencies'
14
15
 
15
16
  s.bindir = 'exe'
16
- s.executables = [lock_jars = 'lock_jars']
17
+ s.executables = ['lock_jars']
17
18
 
18
19
  s.license = 'MIT'
19
20
 
20
21
  s.files = Dir['{lib}/**/*'] + %w[Mavenfile Rakefile Readme.md jar-dependencies.gemspec MIT-LICENSE]
22
+ # explicitly require the jars
23
+ s.files += Jars::Mima::JARS.each_key.map {File.join(Jars::Mima::MIMA_DIR, _1)}
21
24
 
22
25
  s.description = <<~TEXT
23
26
  manage jar dependencies for gems and keep track which jar was already
@@ -30,18 +33,6 @@ Gem::Specification.new do |s|
30
33
  s.required_ruby_version = '>= 2.6'
31
34
 
32
35
  s.add_development_dependency 'minitest', '~> 5.10'
33
- s.add_development_dependency 'ruby-maven', ruby_maven_version = '~> 3.9'
34
36
 
35
- s.post_install_message = <<~TEXT
36
-
37
- if you want to use the executable #{lock_jars} then install ruby-maven gem before using #{lock_jars}
38
-
39
- $ gem install ruby-maven -v '#{ruby_maven_version}'
40
-
41
- or add it as a development dependency to your Gemfile
42
-
43
- gem 'ruby-maven', '#{ruby_maven_version}'
44
-
45
- TEXT
46
37
  s.metadata['rubygems_mfa_required'] = 'true'
47
38
  end
@@ -22,48 +22,58 @@
22
22
  #
23
23
 
24
24
  module Jars
25
- unless defined? Jars::SKIP_LOCK
26
- MAVEN_SETTINGS = 'JARS_MAVEN_SETTINGS'
27
- LOCAL_MAVEN_REPO = 'JARS_LOCAL_MAVEN_REPO'
28
- # lock file to use
29
- LOCK = 'JARS_LOCK'
30
- # where the locally stored jars are search for or stored
31
- HOME = 'JARS_HOME'
32
- # skip the gem post install hook
33
- SKIP = 'JARS_SKIP'
34
- # skip Jars.lock mainly to run lock_jars
35
- SKIP_LOCK = 'JARS_SKIP_LOCK'
36
- # do not require any jars if set to false
37
- REQUIRE = 'JARS_REQUIRE'
38
- # @private
39
- NO_REQUIRE = 'JARS_NO_REQUIRE'
40
- # no more warnings on conflict. this still requires jars but will
41
- # not warn. it is needed to load jars from (default) gems which
42
- # do contribute to any dependency manager (maven, gradle, jbundler)
43
- QUIET = 'JARS_QUIET'
44
- # show maven output
45
- VERBOSE = 'JARS_VERBOSE'
46
- # maven debug
47
- DEBUG = 'JARS_DEBUG'
48
- # vendor jars inside gem when installing gem
49
- VENDOR = 'JARS_VENDOR'
50
- # string used when the version is unknown
51
- UNKNOWN = 'unknown'
52
- end
25
+ # rubocop:disable Style/RedundantFreeze
26
+ MAVEN_SETTINGS = 'JARS_MAVEN_SETTINGS'.freeze
27
+ LOCAL_MAVEN_REPO = 'JARS_LOCAL_MAVEN_REPO'.freeze
28
+ # lock file to use
29
+ LOCK = 'JARS_LOCK'.freeze
30
+ # where the locally stored jars are search for or stored
31
+ HOME = 'JARS_HOME'.freeze
32
+ # skip the gem post install hook
33
+ SKIP = 'JARS_SKIP'.freeze
34
+ # skip Jars.lock mainly to run lock_jars
35
+ SKIP_LOCK = 'JARS_SKIP_LOCK'.freeze
36
+ # do not require any jars if set to false
37
+ REQUIRE = 'JARS_REQUIRE'.freeze
38
+ # @private
39
+ NO_REQUIRE = 'JARS_NO_REQUIRE'.freeze
40
+ # no more warnings on conflict. this still requires jars but will
41
+ # not warn. it is needed to load jars from (default) gems which
42
+ # do contribute to any dependency manager (maven, gradle, jbundler)
43
+ QUIET = 'JARS_QUIET'.freeze
44
+ # show resolver output
45
+ VERBOSE = 'JARS_VERBOSE'.freeze
46
+ # show jar-dependencies debug output
47
+ DEBUG = 'JARS_DEBUG'.freeze
48
+ # vendor jars inside gem when installing gem
49
+ VENDOR = 'JARS_VENDOR'.freeze
50
+ # string used when the version is unknown
51
+ UNKNOWN = 'unknown'.freeze
52
+ # rubocop:enable Style/RedundantFreeze
53
53
 
54
- autoload :MavenSettings, 'jars/maven_settings'
55
54
  autoload :Classpath, 'jars/classpath'
55
+ autoload :MavenSettings, 'jars/maven_settings'
56
+ autoload :Mima, 'jars/mima'
56
57
 
57
58
  @jars_lock = false
58
59
  @jars = {}
59
60
 
61
+ class JarLoadError < LoadError; end
62
+
60
63
  class << self
61
- def lock_down(debug: false, verbose: false, **kwargs)
64
+ def lock_down(debug: nil, verbose: nil, **kwargs)
65
+ previous_debug = ENV[DEBUG]
66
+ previous_verbose = ENV[VERBOSE]
67
+ previous_skip_lock = ENV[SKIP_LOCK]
68
+ ENV[DEBUG] = debug.to_s unless debug.nil?
69
+ ENV[VERBOSE] = verbose.to_s unless verbose.nil?
62
70
  ENV[SKIP_LOCK] = 'true'
63
71
  require 'jars/lock_down' # do this lazy to keep things clean
64
- Jars::LockDown.new(debug, verbose).lock_down(kwargs.delete(:vendor_dir), **kwargs)
72
+ Jars::LockDown.new.lock_down(kwargs.delete(:vendor_dir), **kwargs)
65
73
  ensure
66
- ENV[SKIP_LOCK] = nil
74
+ ENV[DEBUG] = previous_debug unless debug.nil?
75
+ ENV[VERBOSE] = previous_verbose unless verbose.nil?
76
+ ENV[SKIP_LOCK] = previous_skip_lock
67
77
  end
68
78
 
69
79
  if defined? JRUBY_VERSION
@@ -95,7 +105,7 @@ module Jars
95
105
  if @require.nil?
96
106
  if (require = to_boolean(REQUIRE)).nil?
97
107
  no_require = to_boolean(NO_REQUIRE)
98
- @require = no_require.nil? ? true : !no_require
108
+ @require = no_require.nil? || !no_require
99
109
  else
100
110
  @require = require
101
111
  end
@@ -118,7 +128,8 @@ module Jars
118
128
  end
119
129
 
120
130
  def verbose?
121
- to_boolean(VERBOSE)
131
+ verbose = to_boolean(VERBOSE)
132
+ verbose.nil? ? debug? : (verbose || !!debug?)
122
133
  end
123
134
 
124
135
  def debug?
@@ -144,12 +155,7 @@ module Jars
144
155
  def jars_lock_from_class_loader
145
156
  return unless defined?(JRUBY_VERSION)
146
157
 
147
- if JRuby::Util.respond_to?(:class_loader_resources)
148
- JRuby::Util.class_loader_resources('Jars.lock')
149
- else
150
- require 'jruby'
151
- JRuby.runtime.jruby_class_loader.get_resources('Jars.lock').collect(&:to_s)
152
- end
158
+ JRuby::Util.class_loader_resources('Jars.lock')
153
159
  end
154
160
 
155
161
  def lock_path(basedir = nil)
@@ -270,7 +276,7 @@ module Jars
270
276
  end
271
277
 
272
278
  def warn(msg = nil)
273
- return if (verbose? == nil && quiet?) || (verbose? == false && !debug?)
279
+ return if quiet? && !debug?
274
280
 
275
281
  Kernel.warn(msg || yield)
276
282
  end
@@ -328,8 +334,8 @@ module Jars
328
334
  local_repo = nil if local_repo.empty? || !File.exist?(local_repo)
329
335
  local_repo
330
336
  rescue => e
331
- Jars.debug(e)
332
337
  Jars.warn "error reading or parsing local settings from: #{settings}"
338
+ Jars.debug(e)
333
339
  nil
334
340
  end
335
341
 
@@ -356,25 +362,26 @@ module Jars
356
362
  require jar
357
363
  end
358
364
  rescue LoadError => e
359
- raise "\n\n\tyou might need to reinstall the gem which depends on the " \
360
- 'missing jar or in case there is Jars.lock then resolve the jars with ' \
361
- "`lock_jars` command\n\n#{e.message} (LoadError)"
365
+ Jars.warn "failed to load jar: #{jar} (#{e.message})"
366
+ Jars.debug(e)
367
+ raise JarLoadError, "failed to load jar: #{jar}; run `lock_jars` or reinstall the gem"
362
368
  end
363
369
  end
364
370
  end
365
371
 
366
372
  def require_jar(*args, &block)
367
- return nil unless Jars.require?
373
+ return unless Jars.require?
368
374
 
369
375
  result = Jars.require_jar(*args, &block)
370
376
  if result.is_a? String
371
377
  args << (yield || Jars::UNKNOWN) if args.size == 2 && block
372
378
  Jars.warn do
373
- "--- jar coordinate #{args[0..-2].join(':')} already loaded with version #{result} - omit version #{args[-1]}"
379
+ "jar conflict: #{args[0..-2].join(':')} already loaded with version #{result}; " \
380
+ "skipping requested version #{args[-1]}"
374
381
  end
375
- Jars.debug { " try to load from #{caller.join("\n\t")}" }
382
+ Jars.debug("\n\t#{caller.join("\n\t")}") if Jars.debug?
376
383
  return false
377
384
  end
378
- Jars.debug { " register #{args.inspect} - #{result == true}" }
385
+ Jars.debug { "jar registration: #{args.inspect}; loaded=#{result == true}" }
379
386
  result
380
387
  end
@@ -12,7 +12,7 @@ module Jars
12
12
  if low == high
13
13
  low
14
14
  else
15
- super "#{low || '[0'},#{high || ')'}"
15
+ super("#{low || '[0'},#{high || ')'}")
16
16
  end
17
17
  end
18
18
  end
@@ -26,17 +26,17 @@ module Jars
26
26
  ["[#{snapshot_version(val)}", "#{snapshot_version(last)}]"]
27
27
  elsif arg.include?('>=')
28
28
  val = arg.sub(/>=\s*/, '')
29
- ["[#{snapshot_version(val)}", (nil || high)]
29
+ ["[#{snapshot_version(val)}", high]
30
30
  elsif arg.include?('<=')
31
31
  val = arg.sub(/<=\s*/, '')
32
- [(nil || low), "#{snapshot_version(val)}]"]
33
- # treat '!' the same way as '>' since maven can not describe such range
32
+ [low, "#{snapshot_version(val)}]"]
33
+ # treat '!' the same way as '>' since maven cannot describe such range
34
34
  elsif /[!>]/.match?(arg)
35
35
  val = arg.sub(/[!>]\s*/, '')
36
- ["(#{snapshot_version(val)}", (nil || high)]
36
+ ["(#{snapshot_version(val)}", high]
37
37
  elsif arg.include?('<')
38
38
  val = arg.sub(/<\s*/, '')
39
- [(nil || low), "#{snapshot_version(val)})"]
39
+ [low, "#{snapshot_version(val)})"]
40
40
  elsif arg.include?('=')
41
41
  val = arg.sub(/=\s*/, '')
42
42
  # for prereleased version pick the maven version (no version range)
@@ -133,12 +133,12 @@ module Jars
133
133
 
134
134
  if /[\[()\]]/.match?(line)
135
135
  index = line.index(/[\[(].+$/)
136
- version = line[index..].sub(/:/, ', ')
137
- line = line[0..index - 1].strip.sub(/:$/, '')
136
+ version = line[index..].sub(':', ', ')
137
+ line = line[0..(index - 1)].strip.sub(/:$/, '')
138
138
  else
139
139
  index = line.index(/:[^:]+$/)
140
- version = line[index + 1..]
141
- line = line[0..index - 1].strip
140
+ version = line[(index + 1)..]
141
+ line = line[0..(index - 1)].strip
142
142
  end
143
143
 
144
144
  case line.count(':')
@@ -171,17 +171,18 @@ module Jars
171
171
  end
172
172
 
173
173
  def ruby_maven_install_options=(options)
174
- @mvn.ruby_maven_install_options = options
174
+ # no-op: kept for backward compatibility with post_install_hook
175
175
  end
176
176
 
177
177
  def jars?
178
178
  # first look if there are any requirements in the spec
179
179
  # and then if gem depends on jar-dependencies for runtime.
180
180
  # only then install the jars declared in the requirements
181
- result = (spec = self.spec) && !spec.requirements.empty? &&
181
+ spec = self.spec
182
+ result = spec && !spec.requirements.empty? &&
182
183
  spec.dependencies.detect { |d| d.name == 'jar-dependencies' && d.type == :runtime }
183
184
  if result && spec.platform.to_s != 'java'
184
- Jars.warn "\njar dependencies found on non-java platform gem - do not install jars\n"
185
+ Jars.warn "jar-dependencies found on non-java platform gem; skipping jar installation"
185
186
  false
186
187
  else
187
188
  result
@@ -191,21 +192,18 @@ module Jars
191
192
  private
192
193
 
193
194
  def do_install(vendor_dir, write_require_file)
194
- if !spec.require_paths.include?(vendor_dir) && vendor_dir
195
- raise "vendor dir #{vendor_dir} not in require_paths of gemspec #{spec.require_paths}"
195
+ require_paths = spec.require_paths
196
+ if vendor_dir && !require_paths.include?(vendor_dir)
197
+ raise "vendor dir #{vendor_dir} not in require_paths of gemspec #{require_paths}"
196
198
  end
197
199
 
198
200
  target_dir = File.join(@mvn.basedir, vendor_dir || spec.require_path)
199
201
  jars_file = File.join(target_dir, "#{spec.name}_jars.rb")
200
202
 
201
- # write out new jars_file it write_require_file is true or
202
- # check timestamps:
203
- # do not generate file if specfile is older then the generated file
204
- if !write_require_file &&
205
- File.exist?(jars_file) &&
206
- File.mtime(@mvn.specfile) < File.mtime(jars_file)
207
- # leave jars_file as is
208
- jars_file = nil
203
+ # write out new jars_file if write_require_file is true or check timestamps:
204
+ # do not generate file if specfile is older than the generated file
205
+ if !write_require_file && File.exist?(jars_file) && File.mtime(@mvn.specfile) < File.mtime(jars_file)
206
+ jars_file = nil # leave jars_file as is
209
207
  end
210
208
  deps = install_dependencies
211
209
  self.class.write_require_jars(deps, jars_file)
data/lib/jars/lock.rb CHANGED
@@ -57,7 +57,7 @@ module Jars
57
57
  File.read(@file).each_line do |line|
58
58
  next unless /:.+:/.match?(line)
59
59
 
60
- jar = JarDetails.new(line.strip.sub(/:jar:/, ':').sub(/:$/, ': ').split(':'))
60
+ jar = JarDetails.new(line.strip.sub(':jar:', ':').sub(/:$/, ': ').split(':'))
61
61
  case scope
62
62
  when :all, :test
63
63
  yield jar