lock_jar 0.5.1 → 0.5.2
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.
- data/VERSION +1 -1
- data/lib/lock_jar/cli.rb +40 -37
- data/lock_jar.gemspec +1 -1
- data/spec/lock_jar/cli_spec.rb +0 -3
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.2
|
data/lib/lock_jar/cli.rb
CHANGED
@@ -3,45 +3,48 @@ require 'commander/import'
|
|
3
3
|
require 'lock_jar'
|
4
4
|
require 'lock_jar/version'
|
5
5
|
|
6
|
-
module LockJar
|
6
|
+
module LockJar
|
7
|
+
module CLI
|
7
8
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
9
|
+
# :name is optional, otherwise uses the basename of this executable
|
10
|
+
program :name, 'Lock Jar'
|
11
|
+
program :version, LockJar::VERSION
|
12
|
+
program :description, 'LockJar manages Java Jars for Ruby'
|
13
|
+
|
14
|
+
command :install do |c|
|
15
|
+
c.syntax = 'lockjar install'
|
16
|
+
c.description = 'Install Jars from a Jarfile.lock'
|
17
|
+
c.option '--lockfile STRING', String, 'Path to Jarfile.lock, defaults to Jarfile.lock'
|
18
|
+
c.option '--scopes ARRAY', Array, "Scopes to install from Jarfile.lock, defaults to 'compile, runtime'"
|
19
|
+
c.action do |args, options|
|
20
|
+
options.default :lockfile => 'Jarfile.lock', :scopes => ['compile', 'runtime']
|
21
|
+
puts "Installing Jars from #{options.lockfile} for #{options.scopes.inspect}"
|
22
|
+
LockJar.install( options.lockfile, options.scopes )
|
23
|
+
end
|
22
24
|
end
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
|
26
|
+
command :list do |c|
|
27
|
+
c.syntax = 'lockjar list'
|
28
|
+
c.description = 'List Jars from a Jarfile.lock'
|
29
|
+
c.option '--lockfile STRING', String, 'Path to Jarfile.lock, defaults to Jarfile.lock'
|
30
|
+
c.option '--scopes ARRAY', Array, "Scopes to install from Jarfile.lock, defaults to 'compile, runtime'"
|
31
|
+
c.action do |args, options|
|
32
|
+
options.default :lockfile => 'Jarfile.lock', :scopes => ['compile', 'runtime']
|
33
|
+
puts "Listing Jars from #{options.lockfile} for #{options.scopes.inspect}"
|
34
|
+
puts LockJar.list( options.lockfile, options.scopes ).inspect
|
35
|
+
end
|
34
36
|
end
|
37
|
+
|
38
|
+
command :lock do |c|
|
39
|
+
c.syntax = 'lockjar lock'
|
40
|
+
c.description = 'Lock Jars in a Jarfile'
|
41
|
+
c.option '--jarfile STRING', String, 'Path to Jarfile, defaults to Jarfile'
|
42
|
+
c.option '--lockfile STRING', String, 'Path to Jarfile.lock, defaults to Jarfile.lock'
|
43
|
+
c.action do |args, options|
|
44
|
+
options.default :jarfile => 'Jarfile', :lockfile => 'Jarfile.lock'
|
45
|
+
puts "Locking #{options.jarfile} to #{options.lockfile}"
|
46
|
+
LockJar.lock( options.jarfile, { :lockfile => options.lockfile } )
|
47
|
+
end
|
48
|
+
end
|
35
49
|
end
|
36
|
-
|
37
|
-
command :lock do |c|
|
38
|
-
c.syntax = 'lockjar lock'
|
39
|
-
c.description = 'Lock Jars in a Jarfile'
|
40
|
-
c.option '--jarfile STRING', String, 'Path to Jarfile, defaults to Jarfile'
|
41
|
-
c.action do |args, options|
|
42
|
-
options.default :lockfile => 'Jarfile.lock', :scopes => ['compile', 'runtime']
|
43
|
-
puts "Locking #{options.lockfile}"
|
44
|
-
LockJar.lock( options.lockfile, options.scopes )
|
45
|
-
end
|
46
|
-
end
|
47
50
|
end
|
data/lock_jar.gemspec
CHANGED
data/spec/lock_jar/cli_spec.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.5.
|
4
|
+
version: 0.5.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -175,7 +175,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
175
|
version: '0'
|
176
176
|
segments:
|
177
177
|
- 0
|
178
|
-
hash:
|
178
|
+
hash: 3923812674102117980
|
179
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
180
|
none: false
|
181
181
|
requirements:
|