lock_jar 0.5.4 → 0.5.5
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/Gemfile +1 -2
- data/VERSION +1 -1
- data/bin/lockjar +60 -2
- data/lock_jar.gemspec +4 -9
- metadata +5 -23
- data/lib/lock_jar/cli.rb +0 -50
- data/spec/lock_jar/cli_spec.rb +0 -14
data/Gemfile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.5
|
data/bin/lockjar
CHANGED
@@ -1,6 +1,64 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
require 'rubygems'
|
3
|
+
require 'gli'
|
3
4
|
require 'lock_jar'
|
4
|
-
require 'lock_jar/
|
5
|
+
require 'lock_jar/version'
|
5
6
|
|
6
|
-
include
|
7
|
+
include GLI::App
|
8
|
+
|
9
|
+
program_desc 'LockJar manages Java Jars for Ruby'
|
10
|
+
|
11
|
+
version LockJar::VERSION
|
12
|
+
|
13
|
+
desc 'Install Jars from a Jarfile.lock'
|
14
|
+
command :install do |c|
|
15
|
+
c.desc 'Path to Jarfile.lock'
|
16
|
+
c.default_value 'Jarfile.lock'
|
17
|
+
c.flag :lockfile
|
18
|
+
|
19
|
+
c.desc "Scopes to install from Jarfile.lock"
|
20
|
+
c.default_value 'compile, runtime'
|
21
|
+
c.flag :scopes
|
22
|
+
|
23
|
+
c.action do |global_options,options,args|
|
24
|
+
scopes = options[:scopes].split(',').map{ |scope| scope.strip }
|
25
|
+
puts "Installing Jars from #{options[:lockfile]} for #{scopes.inspect}"
|
26
|
+
LockJar.install( options[:lockfile], scopes )
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
desc 'List Jars from a Jarfile.lock'
|
31
|
+
command :list do |c|
|
32
|
+
c.desc 'Path to Jarfile.lock'
|
33
|
+
c.default_value 'Jarfile.lock'
|
34
|
+
c.flag :lockfile
|
35
|
+
|
36
|
+
c.desc "Scopes to install from Jarfile.lock"
|
37
|
+
c.default_value 'compile, runtime'
|
38
|
+
c.flag :scopes
|
39
|
+
|
40
|
+
c.action do |global_options,options,args|
|
41
|
+
scopes = options[:scopes].split(',').map{ |scope| scope.strip }
|
42
|
+
puts "Listing Jars from #{options[:lockfile]} for #{scopes.inspect}"
|
43
|
+
puts LockJar.list( options[:lockfile], scopes ).inspect
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
desc 'Lock Jars in a Jarfile.lock'
|
48
|
+
command :lock do |c|
|
49
|
+
c.desc 'Path to Jarfile'
|
50
|
+
c.default_value 'Jarfile'
|
51
|
+
c.flag :jarfile
|
52
|
+
|
53
|
+
c.desc "Path to Jarfile.lock"
|
54
|
+
c.default_value 'Jarfile.lock'
|
55
|
+
c.flag :lockfile
|
56
|
+
|
57
|
+
c.action do |global_options,options,args|
|
58
|
+
puts "Locking #{options[:jarfile]} to #{options[:lockfile]}"
|
59
|
+
LockJar.lock( options[:jarfile], { :lockfile => options[:lockfile] } )
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
|
64
|
+
exit run(ARGV)
|
data/lock_jar.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "lock_jar"
|
8
|
-
s.version = "0.5.
|
8
|
+
s.version = "0.5.5"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Michael Guymon"]
|
@@ -27,7 +27,6 @@ Gem::Specification.new do |s|
|
|
27
27
|
"bin/lockjar",
|
28
28
|
"lib/lock_jar.rb",
|
29
29
|
"lib/lock_jar/buildr.rb",
|
30
|
-
"lib/lock_jar/cli.rb",
|
31
30
|
"lib/lock_jar/dsl.rb",
|
32
31
|
"lib/lock_jar/maven.rb",
|
33
32
|
"lib/lock_jar/resolver.rb",
|
@@ -35,7 +34,6 @@ Gem::Specification.new do |s|
|
|
35
34
|
"lib/lock_jar/version.rb",
|
36
35
|
"lock_jar.gemspec",
|
37
36
|
"spec/Jarfile",
|
38
|
-
"spec/lock_jar/cli_spec.rb",
|
39
37
|
"spec/lock_jar/dsl_spec.rb",
|
40
38
|
"spec/lock_jar/maven_spec.rb",
|
41
39
|
"spec/lock_jar/resolver_spec.rb",
|
@@ -55,16 +53,14 @@ Gem::Specification.new do |s|
|
|
55
53
|
|
56
54
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
55
|
s.add_runtime_dependency(%q<naether>, ["~> 0.8.6"])
|
58
|
-
s.add_runtime_dependency(%q<
|
59
|
-
s.add_runtime_dependency(%q<commander>, ["~> 4.0.7"])
|
56
|
+
s.add_runtime_dependency(%q<gli>, ["~> 2.0.0"])
|
60
57
|
s.add_development_dependency(%q<rspec>, ["~> 2.9.0"])
|
61
58
|
s.add_development_dependency(%q<bundler>, ["~> 1.1.0"])
|
62
59
|
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
63
60
|
s.add_development_dependency(%q<yard>, ["~> 0.8.0"])
|
64
61
|
else
|
65
62
|
s.add_dependency(%q<naether>, ["~> 0.8.6"])
|
66
|
-
s.add_dependency(%q<
|
67
|
-
s.add_dependency(%q<commander>, ["~> 4.0.7"])
|
63
|
+
s.add_dependency(%q<gli>, ["~> 2.0.0"])
|
68
64
|
s.add_dependency(%q<rspec>, ["~> 2.9.0"])
|
69
65
|
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
70
66
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
@@ -72,8 +68,7 @@ Gem::Specification.new do |s|
|
|
72
68
|
end
|
73
69
|
else
|
74
70
|
s.add_dependency(%q<naether>, ["~> 0.8.6"])
|
75
|
-
s.add_dependency(%q<
|
76
|
-
s.add_dependency(%q<commander>, ["~> 4.0.7"])
|
71
|
+
s.add_dependency(%q<gli>, ["~> 2.0.0"])
|
77
72
|
s.add_dependency(%q<rspec>, ["~> 2.9.0"])
|
78
73
|
s.add_dependency(%q<bundler>, ["~> 1.1.0"])
|
79
74
|
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -28,29 +28,13 @@ dependencies:
|
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 0.8.6
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
|
-
name:
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>'
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: 1.5.0
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>'
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: 1.5.0
|
46
|
-
- !ruby/object:Gem::Dependency
|
47
|
-
name: commander
|
31
|
+
name: gli
|
48
32
|
requirement: !ruby/object:Gem::Requirement
|
49
33
|
none: false
|
50
34
|
requirements:
|
51
35
|
- - ~>
|
52
36
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
37
|
+
version: 2.0.0
|
54
38
|
type: :runtime
|
55
39
|
prerelease: false
|
56
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -58,7 +42,7 @@ dependencies:
|
|
58
42
|
requirements:
|
59
43
|
- - ~>
|
60
44
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
45
|
+
version: 2.0.0
|
62
46
|
- !ruby/object:Gem::Dependency
|
63
47
|
name: rspec
|
64
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -144,7 +128,6 @@ files:
|
|
144
128
|
- bin/lockjar
|
145
129
|
- lib/lock_jar.rb
|
146
130
|
- lib/lock_jar/buildr.rb
|
147
|
-
- lib/lock_jar/cli.rb
|
148
131
|
- lib/lock_jar/dsl.rb
|
149
132
|
- lib/lock_jar/maven.rb
|
150
133
|
- lib/lock_jar/resolver.rb
|
@@ -152,7 +135,6 @@ files:
|
|
152
135
|
- lib/lock_jar/version.rb
|
153
136
|
- lock_jar.gemspec
|
154
137
|
- spec/Jarfile
|
155
|
-
- spec/lock_jar/cli_spec.rb
|
156
138
|
- spec/lock_jar/dsl_spec.rb
|
157
139
|
- spec/lock_jar/maven_spec.rb
|
158
140
|
- spec/lock_jar/resolver_spec.rb
|
@@ -175,7 +157,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
175
157
|
version: '0'
|
176
158
|
segments:
|
177
159
|
- 0
|
178
|
-
hash:
|
160
|
+
hash: -2534310865284659612
|
179
161
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
162
|
none: false
|
181
163
|
requirements:
|
data/lib/lock_jar/cli.rb
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'commander/import'
|
3
|
-
require 'lock_jar'
|
4
|
-
require 'lock_jar/version'
|
5
|
-
|
6
|
-
module LockJar
|
7
|
-
module CLI
|
8
|
-
|
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
|
24
|
-
end
|
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
|
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
|
49
|
-
end
|
50
|
-
end
|
data/spec/lock_jar/cli_spec.rb
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
require File.expand_path(File.join(File.dirname(__FILE__),'../spec_helper'))
|
2
|
-
require 'lib/lock_jar/cli'
|
3
|
-
|
4
|
-
describe LockJar::CLI do
|
5
|
-
before :each do
|
6
|
-
$stderr = StringIO.new
|
7
|
-
mock_terminal
|
8
|
-
end
|
9
|
-
|
10
|
-
it "should have commands" do
|
11
|
-
LockJar::CLI.commands.keys.should eql( ["help", "install", "list", "lock"] )
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|