lock_jar 0.10.2 → 0.10.3

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
  SHA1:
3
- metadata.gz: f21f19e4bd1512fed0232aff03d3040523c8a14e
4
- data.tar.gz: 506c18fe58a3b0e95256d14ba906c0ab522f75f6
3
+ metadata.gz: 5c1b4b263d9458fa6e8e5aff999fc44133d83714
4
+ data.tar.gz: 282764bf7080b2e57eaf25ca92bc8cca749bdd8d
5
5
  SHA512:
6
- metadata.gz: 97ad60a7489b7f332af71a717f45a0fd6d149ac2cffba6bb404a147a3eab8bdd521f3203eb61e648087489d5e84c9bafedb82ed155f3a4e547005228fa27d887
7
- data.tar.gz: 7a7b1f9bcbded109557133017585164370e14471fbd6890658af8f9d6afe48a2f3847452b9956f4277aafb7aa99d74f7858b019b6cda4bc92831a7b84ce88ee8
6
+ metadata.gz: 3e43b9ba3ca5379e06cce94ec69ac76fd3bb8a810b755fa0a30da3b89e64e8a13207b96139021d6c4cf9818050139c6522b5aa676261c1a26b0a2ab7982c50a3
7
+ data.tar.gz: 93aa90c5e194efc69e1d202b723d048a0a7be2310c2d42e1b3dec198ad8a305aaab3f8fab6534645f4377439f8c26edd2cd712ba1ff8a617e8fc22ccb5daec7e
data/lib/lock_jar/cli.rb CHANGED
@@ -1,64 +1,85 @@
1
1
  require 'rubygems'
2
2
  require 'thor'
3
3
  require 'lock_jar'
4
+ require 'lock_jar/logging'
4
5
 
5
6
  module LockJar
6
-
7
+
7
8
  class CLI < Thor
8
-
9
+
9
10
  module ClassMethods
10
11
  def generate_lockfile_option
11
- method_option :lockfile,
12
- :aliases => "-l",
13
- :default => 'Jarfile.lock',
14
- :desc => "Path to Jarfile.lock"
12
+ method_option :lockfile,
13
+ aliases: "-l",
14
+ default: 'Jarfile.lock',
15
+ desc: "Path to Jarfile.lock"
15
16
  end
16
-
17
+
17
18
  def generate_scopes_option
18
- method_option :scopes,
19
- :aliases => "-s",
20
- :default => ['default'],
21
- :desc => "Scopes to install from Jarfile.lock",
19
+ method_option :scopes,
20
+ aliases: "-s",
21
+ default: ['default'],
22
+ desc: "Scopes to install from Jarfile.lock",
22
23
  :type => :array
23
24
  end
24
-
25
+
25
26
  def generate_jarfile_option
26
27
  method_option :jarfile,
27
- :aliases => "-j",
28
- :default => 'Jarfile',
29
- :desc => "Path to Jarfile"
28
+ aliases: "-j",
29
+ default: 'Jarfile',
30
+ desc: "Path to Jarfile"
31
+ end
32
+
33
+ def verbose_option
34
+ method_option :verbose,
35
+ aliases: "-v",
36
+ type: :boolean,
37
+ desc: "Verbose output"
30
38
  end
31
39
  end
32
40
  extend(ClassMethods)
33
-
41
+
34
42
  desc "version", "LockJar version"
35
43
  def version
36
44
  puts LockJar::VERSION
37
45
  end
38
-
46
+
39
47
  desc "install", "Install Jars from a Jarfile.lock"
40
48
  generate_lockfile_option
41
49
  generate_scopes_option
50
+ verbose_option
42
51
  def install
43
- puts "Installing Jars from #{options[:lockfile]} for #{options[:scopes].inspect}"
44
- LockJar.install( options[:lockfile], options[:scopes] )
52
+ handle_verbose(options[:verbose])
53
+ puts "Installing Jars from #{options[:lockfile]} for #{options[:scopes].inspect}"
54
+ LockJar.install( options[:lockfile], options[:scopes] )
45
55
  end
46
-
56
+
47
57
  desc "list", "List Jars from a Jarfile.lock"
48
58
  generate_lockfile_option
49
59
  generate_scopes_option
60
+ verbose_option
50
61
  def list
62
+ handle_verbose(options[:verbose])
51
63
  puts "Listing Jars from #{options[:lockfile]} for #{options[:scopes].inspect}"
52
64
  puts LockJar.list( options[:lockfile], options[:scopes] ).inspect
53
65
  end
54
-
66
+
55
67
  desc 'lock', 'Lock Jars in a Jarfile.lock'
56
68
  generate_jarfile_option
57
69
  generate_lockfile_option
70
+ verbose_option
58
71
  def lock
72
+ handle_verbose(options[:verbose])
59
73
  puts "Locking #{options[:jarfile]} to #{options[:lockfile]}"
60
74
  LockJar.lock( options[:jarfile], { :lockfile => options[:lockfile] } )
61
75
  end
62
-
76
+
77
+ private
78
+ def handle_verbose(verbose)
79
+ if verbose
80
+ LockJar::Logging.verbose!
81
+ end
82
+ end
83
+
63
84
  end
64
85
  end
@@ -0,0 +1,13 @@
1
+ require 'naether/java'
2
+
3
+ module LockJar
4
+ class Logging
5
+ def self.verbose!
6
+ Naether::Java.exec_static_method(
7
+ "com.tobedevoured.naether.LogUtil",
8
+ "setDefaultLogLevel",
9
+ ["info"]
10
+ )
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module LockJar
2
- VERSION = '0.10.2'
2
+ VERSION = '0.10.3'
3
3
  end
data/lock_jar.gemspec CHANGED
@@ -20,8 +20,6 @@ Gem::Specification.new do |s|
20
20
  s.require_paths = %w(lib)
21
21
  s.summary = 'Manage Jar files for Ruby'
22
22
 
23
- s.add_dependency(%q<naether>, ['~> 0.13.1'])
23
+ s.add_dependency(%q<naether>, ['~> 0.13.8'])
24
24
  s.add_dependency(%q<thor>, ['>= 0.18.1'])
25
-
26
25
  end
27
-
data/spec/spec_helper.rb CHANGED
@@ -9,6 +9,9 @@ require 'lock_jar/cli'
9
9
  require 'stringio'
10
10
  require 'fileutils'
11
11
  require 'support/helper'
12
+ require 'lock_jar/logging'
13
+
14
+ LockJar::Logging.verbose!
12
15
 
13
16
  def mock_terminal
14
17
  @input = StringIO.new
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.10.2
4
+ version: 0.10.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Guymon
@@ -11,33 +11,33 @@ cert_chain: []
11
11
  date: 2014-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: naether
15
- version_requirements: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: 0.13.1
20
14
  requirement: !ruby/object:Gem::Requirement
21
15
  requirements:
22
16
  - - ~>
23
17
  - !ruby/object:Gem::Version
24
- version: 0.13.1
18
+ version: 0.13.8
19
+ name: naether
25
20
  prerelease: false
26
21
  type: :runtime
27
- - !ruby/object:Gem::Dependency
28
- name: thor
29
22
  version_requirements: !ruby/object:Gem::Requirement
30
23
  requirements:
31
- - - '>='
24
+ - - ~>
32
25
  - !ruby/object:Gem::Version
33
- version: 0.18.1
26
+ version: 0.13.8
27
+ - !ruby/object:Gem::Dependency
34
28
  requirement: !ruby/object:Gem::Requirement
35
29
  requirements:
36
30
  - - '>='
37
31
  - !ruby/object:Gem::Version
38
32
  version: 0.18.1
33
+ name: thor
39
34
  prerelease: false
40
35
  type: :runtime
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.18.1
41
41
  description: Manage Jar files for Ruby. In the spirit of Bundler, a Jarfile is used to generate a Jarfile.lock that contains all the resolved jar dependencies for scopes runtime, compile, and test. The Jarfile.lock can be used to populate the classpath
42
42
  email: michael@tobedevoured.com
43
43
  executables:
@@ -81,6 +81,7 @@ files:
81
81
  - lib/lock_jar/domain/gem_dsl.rb
82
82
  - lib/lock_jar/domain/jarfile_dsl.rb
83
83
  - lib/lock_jar/domain/lockfile.rb
84
+ - lib/lock_jar/logging.rb
84
85
  - lib/lock_jar/maven.rb
85
86
  - lib/lock_jar/registry.rb
86
87
  - lib/lock_jar/resolver.rb