lock_jar 0.10.0 → 0.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +59 -59
- data/.travis.yml +8 -8
- data/CHANGELOG.md +30 -21
- data/Gemfile +13 -13
- data/Guardfile +9 -9
- data/README.md +375 -375
- data/Rakefile +24 -24
- data/bundler/Gemfile +21 -21
- data/bundler/LICENSE.txt +22 -22
- data/bundler/README.md +29 -29
- data/bundler/Rakefile +2 -2
- data/bundler/lib/lock_jar_bundler/bundler.rb +35 -35
- data/bundler/lib/lock_jar_bundler/piggy_back.rb +97 -97
- data/bundler/lib/lock_jar_bundler/version.rb +5 -5
- data/bundler/lib/lock_jar_bundler.rb +4 -4
- data/bundler/lock_jar_bundler.gemspec +24 -24
- data/bundler/spec/Jarfile +2 -2
- data/bundler/spec/dummy_gem/dummy_gem.gemspec +19 -19
- data/bundler/spec/lock_jar_bundler_spec.rb +48 -48
- data/bundler/spec/spec_helper.rb +88 -88
- data/lib/lock_jar/buildr.rb +144 -144
- data/lib/lock_jar/bundler.rb +154 -154
- data/lib/lock_jar/cli.rb +64 -64
- data/lib/lock_jar/domain/artifact.rb +123 -123
- data/lib/lock_jar/domain/dsl.rb +187 -187
- data/lib/lock_jar/domain/dsl_helper.rb +83 -83
- data/lib/lock_jar/domain/gem_dsl.rb +44 -44
- data/lib/lock_jar/domain/jarfile_dsl.rb +46 -46
- data/lib/lock_jar/domain/lockfile.rb +113 -113
- data/lib/lock_jar/maven.rb +111 -111
- data/lib/lock_jar/registry.rb +92 -92
- data/lib/lock_jar/resolver.rb +95 -95
- data/lib/lock_jar/runtime.rb +359 -355
- data/lib/lock_jar/version.rb +3 -3
- data/lib/lock_jar.rb +172 -177
- data/lock_jar.gemspec +27 -27
- data/spec/fixtures/Jarfile +13 -13
- data/spec/fixtures/Jarfile2 +1 -0
- data/spec/lock_jar/class_loader_spec.rb +57 -57
- data/spec/lock_jar/cli_spec.rb +100 -100
- data/spec/lock_jar/domain/dsl_helper_spec.rb +52 -52
- data/spec/lock_jar/domain/dsl_spec.rb +57 -57
- data/spec/lock_jar/maven_spec.rb +23 -23
- data/spec/lock_jar/resolver_spec.rb +26 -26
- data/spec/lock_jar/runtime_spec.rb +26 -26
- data/spec/lock_jar_spec.rb +372 -295
- data/spec/pom.xml +34 -34
- data/spec/spec_helper.rb +38 -38
- data/spec/support/helper.rb +44 -44
- metadata +3 -1
data/spec/pom.xml
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/
|
3
|
-
2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h
|
4
|
-
ttp://maven.apache.org/maven-v4_0_0.xsd ">
|
5
|
-
<modelVersion>4.0.0</modelVersion>
|
6
|
-
<groupId>lockjar</groupId>
|
7
|
-
<artifactId>test</artifactId>
|
8
|
-
<version>3</version>
|
9
|
-
<packaging>jar</packaging>
|
10
|
-
<repositories>
|
11
|
-
<repository>
|
12
|
-
<url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
|
13
|
-
</repository>
|
14
|
-
</repositories>
|
15
|
-
<dependencies>
|
16
|
-
<dependency>
|
17
|
-
<groupId>com.slackworks</groupId>
|
18
|
-
<artifactId>modelcitizen</artifactId>
|
19
|
-
<version>0.2.2</version>
|
20
|
-
</dependency>
|
21
|
-
<dependency>
|
22
|
-
<groupId>org.jboss.unit</groupId>
|
23
|
-
<artifactId>jboss-unit</artifactId>
|
24
|
-
<version>1.2.4</version>
|
25
|
-
<scope>test</scope>
|
26
|
-
</dependency>
|
27
|
-
<dependency>
|
28
|
-
<groupId>junit</groupId>
|
29
|
-
<artifactId>junit</artifactId>
|
30
|
-
<version>4.8.2</version>
|
31
|
-
<scope>test</scope>
|
32
|
-
</dependency>
|
33
|
-
</dependencies>
|
34
|
-
</project>
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/
|
3
|
+
2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 h
|
4
|
+
ttp://maven.apache.org/maven-v4_0_0.xsd ">
|
5
|
+
<modelVersion>4.0.0</modelVersion>
|
6
|
+
<groupId>lockjar</groupId>
|
7
|
+
<artifactId>test</artifactId>
|
8
|
+
<version>3</version>
|
9
|
+
<packaging>jar</packaging>
|
10
|
+
<repositories>
|
11
|
+
<repository>
|
12
|
+
<url>http://repository.jboss.org/nexus/content/groups/public-jboss</url>
|
13
|
+
</repository>
|
14
|
+
</repositories>
|
15
|
+
<dependencies>
|
16
|
+
<dependency>
|
17
|
+
<groupId>com.slackworks</groupId>
|
18
|
+
<artifactId>modelcitizen</artifactId>
|
19
|
+
<version>0.2.2</version>
|
20
|
+
</dependency>
|
21
|
+
<dependency>
|
22
|
+
<groupId>org.jboss.unit</groupId>
|
23
|
+
<artifactId>jboss-unit</artifactId>
|
24
|
+
<version>1.2.4</version>
|
25
|
+
<scope>test</scope>
|
26
|
+
</dependency>
|
27
|
+
<dependency>
|
28
|
+
<groupId>junit</groupId>
|
29
|
+
<artifactId>junit</artifactId>
|
30
|
+
<version>4.8.2</version>
|
31
|
+
<scope>test</scope>
|
32
|
+
</dependency>
|
33
|
+
</dependencies>
|
34
|
+
</project>
|
data/spec/spec_helper.rb
CHANGED
@@ -1,38 +1,38 @@
|
|
1
|
-
$:.unshift File.expand_path('.')
|
2
|
-
$:.unshift File.expand_path(File.join('..', File.dirname(__FILE__)))
|
3
|
-
$:.unshift File.expand_path(File.join('..', File.dirname(__FILE__), 'lib'))
|
4
|
-
|
5
|
-
require 'rubygems'
|
6
|
-
require 'rspec'
|
7
|
-
require 'lock_jar'
|
8
|
-
require 'lock_jar/cli'
|
9
|
-
require 'stringio'
|
10
|
-
require 'fileutils'
|
11
|
-
require 'support/helper'
|
12
|
-
|
13
|
-
def mock_terminal
|
14
|
-
@input = StringIO.new
|
15
|
-
@output = StringIO.new
|
16
|
-
$terminal = HighLine.new @input, @output
|
17
|
-
end
|
18
|
-
|
19
|
-
TEMP_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", ".spec-tmp"))
|
20
|
-
TEST_REPO = File.expand_path(File.join(TEMP_DIR, "test-repo"))
|
21
|
-
PARAM_CONFIG = File.expand_path(File.join(TEMP_DIR, "param_config"))
|
22
|
-
DSL_CONFIG = File.expand_path(File.join(TEMP_DIR, "dsl_config"))
|
23
|
-
|
24
|
-
RSpec.configure do |config|
|
25
|
-
config.order = 'default'
|
26
|
-
config.treat_symbols_as_metadata_keys_with_true_values = true
|
27
|
-
config.run_all_when_everything_filtered = true
|
28
|
-
config.filter_run :focus
|
29
|
-
|
30
|
-
config.before(:suite) do
|
31
|
-
FileUtils.mkdir_p(DSL_CONFIG)
|
32
|
-
end
|
33
|
-
|
34
|
-
config.after(:suite) do
|
35
|
-
FileUtils.rm_rf(PARAM_CONFIG)
|
36
|
-
FileUtils.rm_rf(DSL_CONFIG)
|
37
|
-
end
|
38
|
-
end
|
1
|
+
$:.unshift File.expand_path('.')
|
2
|
+
$:.unshift File.expand_path(File.join('..', File.dirname(__FILE__)))
|
3
|
+
$:.unshift File.expand_path(File.join('..', File.dirname(__FILE__), 'lib'))
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
require 'rspec'
|
7
|
+
require 'lock_jar'
|
8
|
+
require 'lock_jar/cli'
|
9
|
+
require 'stringio'
|
10
|
+
require 'fileutils'
|
11
|
+
require 'support/helper'
|
12
|
+
|
13
|
+
def mock_terminal
|
14
|
+
@input = StringIO.new
|
15
|
+
@output = StringIO.new
|
16
|
+
$terminal = HighLine.new @input, @output
|
17
|
+
end
|
18
|
+
|
19
|
+
TEMP_DIR = File.expand_path(File.join(File.dirname(__FILE__), "..", ".spec-tmp"))
|
20
|
+
TEST_REPO = File.expand_path(File.join(TEMP_DIR, "test-repo"))
|
21
|
+
PARAM_CONFIG = File.expand_path(File.join(TEMP_DIR, "param_config"))
|
22
|
+
DSL_CONFIG = File.expand_path(File.join(TEMP_DIR, "dsl_config"))
|
23
|
+
|
24
|
+
RSpec.configure do |config|
|
25
|
+
config.order = 'default'
|
26
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
27
|
+
config.run_all_when_everything_filtered = true
|
28
|
+
config.filter_run :focus
|
29
|
+
|
30
|
+
config.before(:suite) do
|
31
|
+
FileUtils.mkdir_p(DSL_CONFIG)
|
32
|
+
end
|
33
|
+
|
34
|
+
config.after(:suite) do
|
35
|
+
FileUtils.rm_rf(PARAM_CONFIG)
|
36
|
+
FileUtils.rm_rf(DSL_CONFIG)
|
37
|
+
end
|
38
|
+
end
|
data/spec/support/helper.rb
CHANGED
@@ -1,44 +1,44 @@
|
|
1
|
-
require 'open3'
|
2
|
-
require 'pathname'
|
3
|
-
|
4
|
-
module Spec
|
5
|
-
module Helpers
|
6
|
-
def lockjar(cmd, options = {})
|
7
|
-
lockjar_bin = File.expand_path('../../../bin/lockjar', __FILE__)
|
8
|
-
cmd = "ruby -I#{lib} #{lockjar_bin} #{cmd}"
|
9
|
-
|
10
|
-
sys_exec(cmd)
|
11
|
-
end
|
12
|
-
|
13
|
-
def lib
|
14
|
-
File.expand_path('../../../lib', __FILE__)
|
15
|
-
end
|
16
|
-
|
17
|
-
def sys_exec(cmd, expect_err = false)
|
18
|
-
Open3.popen3(cmd.to_s) do |stdin, stdout, stderr|
|
19
|
-
@in_p, @out_p, @err_p = stdin, stdout, stderr
|
20
|
-
|
21
|
-
yield @in_p if block_given?
|
22
|
-
@in_p.close
|
23
|
-
|
24
|
-
@out = @out_p.read.strip
|
25
|
-
@err = @err_p.read.strip
|
26
|
-
end
|
27
|
-
|
28
|
-
puts @err unless expect_err || @err.empty? || !$show_err
|
29
|
-
@out
|
30
|
-
end
|
31
|
-
|
32
|
-
def install_jarfile(*args)
|
33
|
-
root_path ||= Pathname.new(File.expand_path("../../..", __FILE__))
|
34
|
-
jarfile_path = root_path.join("Jarfile")
|
35
|
-
File.open(jarfile_path.to_s, 'w') do |f|
|
36
|
-
f.puts args.last
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
def is_jruby?
|
41
|
-
defined?(RUBY_ENGINE) && (RUBY_ENGINE == "jruby")
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|
1
|
+
require 'open3'
|
2
|
+
require 'pathname'
|
3
|
+
|
4
|
+
module Spec
|
5
|
+
module Helpers
|
6
|
+
def lockjar(cmd, options = {})
|
7
|
+
lockjar_bin = File.expand_path('../../../bin/lockjar', __FILE__)
|
8
|
+
cmd = "ruby -I#{lib} #{lockjar_bin} #{cmd}"
|
9
|
+
|
10
|
+
sys_exec(cmd)
|
11
|
+
end
|
12
|
+
|
13
|
+
def lib
|
14
|
+
File.expand_path('../../../lib', __FILE__)
|
15
|
+
end
|
16
|
+
|
17
|
+
def sys_exec(cmd, expect_err = false)
|
18
|
+
Open3.popen3(cmd.to_s) do |stdin, stdout, stderr|
|
19
|
+
@in_p, @out_p, @err_p = stdin, stdout, stderr
|
20
|
+
|
21
|
+
yield @in_p if block_given?
|
22
|
+
@in_p.close
|
23
|
+
|
24
|
+
@out = @out_p.read.strip
|
25
|
+
@err = @err_p.read.strip
|
26
|
+
end
|
27
|
+
|
28
|
+
puts @err unless expect_err || @err.empty? || !$show_err
|
29
|
+
@out
|
30
|
+
end
|
31
|
+
|
32
|
+
def install_jarfile(*args)
|
33
|
+
root_path ||= Pathname.new(File.expand_path("../../..", __FILE__))
|
34
|
+
jarfile_path = root_path.join("Jarfile")
|
35
|
+
File.open(jarfile_path.to_s, 'w') do |f|
|
36
|
+
f.puts args.last
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def is_jruby?
|
41
|
+
defined?(RUBY_ENGINE) && (RUBY_ENGINE == "jruby")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Guymon
|
@@ -88,6 +88,7 @@ files:
|
|
88
88
|
- lib/lock_jar/version.rb
|
89
89
|
- lock_jar.gemspec
|
90
90
|
- spec/fixtures/Jarfile
|
91
|
+
- spec/fixtures/Jarfile2
|
91
92
|
- spec/fixtures/naether-0.13.0.jar
|
92
93
|
- spec/lock_jar/class_loader_spec.rb
|
93
94
|
- spec/lock_jar/cli_spec.rb
|
@@ -127,6 +128,7 @@ specification_version: 4
|
|
127
128
|
summary: Manage Jar files for Ruby
|
128
129
|
test_files:
|
129
130
|
- spec/fixtures/Jarfile
|
131
|
+
- spec/fixtures/Jarfile2
|
130
132
|
- spec/fixtures/naether-0.13.0.jar
|
131
133
|
- spec/lock_jar/class_loader_spec.rb
|
132
134
|
- spec/lock_jar/cli_spec.rb
|