lock_jar 0.10.0 → 0.10.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +59 -59
  3. data/.travis.yml +8 -8
  4. data/CHANGELOG.md +30 -21
  5. data/Gemfile +13 -13
  6. data/Guardfile +9 -9
  7. data/README.md +375 -375
  8. data/Rakefile +24 -24
  9. data/bundler/Gemfile +21 -21
  10. data/bundler/LICENSE.txt +22 -22
  11. data/bundler/README.md +29 -29
  12. data/bundler/Rakefile +2 -2
  13. data/bundler/lib/lock_jar_bundler/bundler.rb +35 -35
  14. data/bundler/lib/lock_jar_bundler/piggy_back.rb +97 -97
  15. data/bundler/lib/lock_jar_bundler/version.rb +5 -5
  16. data/bundler/lib/lock_jar_bundler.rb +4 -4
  17. data/bundler/lock_jar_bundler.gemspec +24 -24
  18. data/bundler/spec/Jarfile +2 -2
  19. data/bundler/spec/dummy_gem/dummy_gem.gemspec +19 -19
  20. data/bundler/spec/lock_jar_bundler_spec.rb +48 -48
  21. data/bundler/spec/spec_helper.rb +88 -88
  22. data/lib/lock_jar/buildr.rb +144 -144
  23. data/lib/lock_jar/bundler.rb +154 -154
  24. data/lib/lock_jar/cli.rb +64 -64
  25. data/lib/lock_jar/domain/artifact.rb +123 -123
  26. data/lib/lock_jar/domain/dsl.rb +187 -187
  27. data/lib/lock_jar/domain/dsl_helper.rb +83 -83
  28. data/lib/lock_jar/domain/gem_dsl.rb +44 -44
  29. data/lib/lock_jar/domain/jarfile_dsl.rb +46 -46
  30. data/lib/lock_jar/domain/lockfile.rb +113 -113
  31. data/lib/lock_jar/maven.rb +111 -111
  32. data/lib/lock_jar/registry.rb +92 -92
  33. data/lib/lock_jar/resolver.rb +95 -95
  34. data/lib/lock_jar/runtime.rb +359 -355
  35. data/lib/lock_jar/version.rb +3 -3
  36. data/lib/lock_jar.rb +172 -177
  37. data/lock_jar.gemspec +27 -27
  38. data/spec/fixtures/Jarfile +13 -13
  39. data/spec/fixtures/Jarfile2 +1 -0
  40. data/spec/lock_jar/class_loader_spec.rb +57 -57
  41. data/spec/lock_jar/cli_spec.rb +100 -100
  42. data/spec/lock_jar/domain/dsl_helper_spec.rb +52 -52
  43. data/spec/lock_jar/domain/dsl_spec.rb +57 -57
  44. data/spec/lock_jar/maven_spec.rb +23 -23
  45. data/spec/lock_jar/resolver_spec.rb +26 -26
  46. data/spec/lock_jar/runtime_spec.rb +26 -26
  47. data/spec/lock_jar_spec.rb +372 -295
  48. data/spec/pom.xml +34 -34
  49. data/spec/spec_helper.rb +38 -38
  50. data/spec/support/helper.rb +44 -44
  51. 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
@@ -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.0
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