lock_jar 0.10.2 → 0.10.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lock_jar/cli.rb +43 -22
- data/lib/lock_jar/logging.rb +13 -0
- data/lib/lock_jar/version.rb +1 -1
- data/lock_jar.gemspec +1 -3
- data/spec/spec_helper.rb +3 -0
- metadata +13 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c1b4b263d9458fa6e8e5aff999fc44133d83714
|
4
|
+
data.tar.gz: 282764bf7080b2e57eaf25ca92bc8cca749bdd8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
:
|
13
|
-
:
|
14
|
-
:
|
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
|
-
:
|
20
|
-
:
|
21
|
-
:
|
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
|
-
:
|
28
|
-
:
|
29
|
-
:
|
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
|
-
|
44
|
-
|
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
|
data/lib/lock_jar/version.rb
CHANGED
data/lock_jar.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
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.
|
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.
|
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.
|
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
|