jbundler 0.9.3 → 0.9.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f9e4d16073e343c1631edad87f2295db11e5870d
4
- data.tar.gz: 2c9a5b9d7aa0653386769078eadfb8f9dd662e5c
2
+ SHA256:
3
+ metadata.gz: cf8b687701fd0f4dfb43e8ab79a26f263402805a31bed39aa99864a6a848ff6b
4
+ data.tar.gz: 3cf6ef2c8e75a01d7d3d58e33208732e16588f0a9713a6cf8ee272dc0bb510d2
5
5
  SHA512:
6
- metadata.gz: ff6efba5d768f2c1599e9009a61908cc4af585b125fe72dfde464f53e5bfddf4f7faa6a80af2dfc0cbb413c35c6869b067e92ed274d11e6e6865e8d499dc0a54
7
- data.tar.gz: da06a82cd77f8273381f46e2de8feadd711b35d71ba2e52947e411baea2d8864a455d01aef63d5dcd6bf4df2292fc470e48e8d1be14edb466b8ff80890c8110b
6
+ metadata.gz: 3888caa5f38f37aff68b8284a06c247e586318e3937a6bf59f2cfa22ea4ec5aa760bbc210162da06f07c6aaa287627355e981f346e133e3d12489418a7a11020
7
+ data.tar.gz: fd67097f89bdfc216085c62835e354041cc33aaec1a4c58da96803016c4df96da5d9139f77aaddcf1bb1de256805d7bbd8911a85aa1b1424409f049c09e12227
data/Gemfile.lock CHANGED
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jbundler (0.9.2)
5
- bundler (~> 1.5)
4
+ jbundler (0.9.5)
5
+ bundler (> 1.5, < 3.0.0)
6
6
  jar-dependencies (~> 0.3)
7
- maven-tools (~> 1.0.10)
7
+ maven-tools (= 1.2.3)
8
8
  ruby-maven (~> 3.3, >= 3.3.8)
9
9
 
10
10
  GEM
@@ -19,16 +19,16 @@ GEM
19
19
  descendants_tracker (0.0.4)
20
20
  thread_safe (~> 0.3, >= 0.3.1)
21
21
  equalizer (0.0.11)
22
- ice_nine (0.11.1)
23
- jar-dependencies (0.3.1)
24
- maven-tools (1.0.13)
22
+ ice_nine (0.11.2)
23
+ jar-dependencies (0.5.5)
24
+ maven-tools (1.2.3)
25
25
  virtus (~> 1.0)
26
- minitest (5.8.0)
27
- rake (10.4.2)
28
- ruby-maven (3.3.8)
29
- ruby-maven-libs (~> 3.3.1)
30
- ruby-maven-libs (3.3.3)
31
- thread_safe (0.3.5-java)
26
+ minitest (5.25.5)
27
+ rake (13.3.0)
28
+ ruby-maven (3.9.3)
29
+ ruby-maven-libs (~> 3.9.9)
30
+ ruby-maven-libs (3.9.9)
31
+ thread_safe (0.3.6-java)
32
32
  virtus (1.0.5)
33
33
  axiom-types (~> 0.1)
34
34
  coercible (~> 1.0)
@@ -36,13 +36,13 @@ GEM
36
36
  equalizer (~> 0.0, >= 0.0.9)
37
37
 
38
38
  PLATFORMS
39
- java
39
+ universal-java-21
40
40
 
41
41
  DEPENDENCIES
42
42
  copyright-header (= 1.0.8)
43
43
  jbundler!
44
44
  minitest (~> 5.3)
45
- rake (~> 10.0)
45
+ rake (~> 13.0)
46
46
 
47
47
  BUNDLED WITH
48
- 1.10.6
48
+ 2.6.3
data/Readme.md CHANGED
@@ -1,8 +1,8 @@
1
- # jbundler
1
+ # jbundler
2
2
 
3
- * [![Build Status](https://secure.travis-ci.org/mkristian/jbundler.png)](http://travis-ci.org/mkristian/jbundler) #
3
+ * [![Build Status](https://secure.travis-ci.org/mkristian/jbundler.svg)](http://travis-ci.org/mkristian/jbundler)
4
4
 
5
- manage jar dependencies similar to how **bundler** manages gem dependencies:
5
+ Manage jar dependencies similar to how **bundler** manages gem dependencies:
6
6
 
7
7
  * the DSL mimics the one from bundler
8
8
  * you can use maven-like version declarations or rubygems/bundler version ranges
@@ -11,58 +11,91 @@ manage jar dependencies similar to how **bundler** manages gem dependencies:
11
11
 
12
12
  differences compared to **bundler**
13
13
 
14
- * it is just a development gem - no need for it during runtime. just add ```Jars.require_jars_lock!``` to your code and for older JRuby versions add ```gem 'jar-dependencies', '~> 0.1.11'``` as a runtime dependency.
15
14
  * you need to run ```bundle install``` first if any of the gems have jar dependencies.
16
- * all one command ```jbundle```, see ```jbundle --help``` on the possible options and how to update a single jar, etc.
15
+ * all one command ```jbundle```, see ```jbundle help``` on the possible options and how to update a single jar, etc.
17
16
 
18
- ## get started
17
+ ## Get started
19
18
 
20
- install JBundler with
19
+ Install JBundler with:
20
+ ```bash
21
+ jruby -S gem install jbundler
22
+ ```
21
23
 
22
- jruby -S gem install jbundler
23
-
24
- first create a **Jarfile**, something like:
25
-
26
- jar 'org.yaml:snakeyaml', '1.14'
27
- jar 'org.slf4j:slf4j-simple', '>1.1'
24
+ First, create a **Jarfile**, something like:
25
+ ```bash
26
+ jar 'org.yaml:snakeyaml', '1.14'
27
+ jar 'org.slf4j:slf4j-simple', '>1.1'
28
+ ```
29
+
30
+ Install jar dependencies
31
+ ```bash
32
+ jruby -S jbundle install
33
+ ```
34
+
35
+ Loading the jar files
36
+ ```bash
37
+ require 'jbundler'
38
+ ```
39
+
40
+ It will add all the jar dependencies in the java classpath from the `Jarfile.lock`.
28
41
 
29
42
  ### Jarfile
30
43
 
31
- more info about the **[Jarfile](https://github.com/torquebox/maven-tools/wiki/Jarfile)** and about [versions](https://github.com/torquebox/maven-tools/wiki/Versions).
44
+ More info about the **[Jarfile](https://github.com/torquebox/maven-tools/wiki/Jarfile)** and about [versions](https://github.com/torquebox/maven-tools/wiki/Versions).
32
45
 
33
- for adding a maven repository see [Jarfile](https://github.com/torquebox/maven-tools/wiki/Jarfile).
46
+ For adding a maven repository see [Jarfile](https://github.com/torquebox/maven-tools/wiki/Jarfile).
34
47
 
35
- # Building the jbundler gem
48
+ ## Building the jbundler gem
36
49
 
37
- running the integration test
50
+ Running the integration test
38
51
 
39
- ./mvnw verify
52
+ ```bash
53
+ ./mvnw verify
54
+ ./mvnw clean verify
55
+ ```
56
+ or a single integration test
57
+ ```bash
58
+ ./mvnw verify -Dinvoker.test=running_rspec_via_rake
59
+ ./mvnw clean verify -Dinvoker.test=running_rspec_via_rake
60
+ ```
40
61
 
41
- building the gem (see ./pkg)
62
+ Building the gem (see ./pkg)
63
+ ```bash
64
+ ./mvnw package -Dinvoker.skip
65
+ ```
42
66
 
43
- ./mvnw package -Dinvoker.skip
67
+ Or just
68
+ ```bash
69
+ gem build jbundler.gemspec
70
+ ```
44
71
 
45
- or just
72
+ ## Usage
46
73
 
47
- gem build jbundler.gemspec
74
+ Here is an example usage of the AliasEvent class from the snakeyaml package
48
75
 
49
- ## example ##
76
+ ```ruby
77
+ #test_file.rb
78
+ require 'jbundler'
79
+ require 'java'
50
80
 
51
- *src/example/my_project* has a Gemfile which uses a gem which depends on jar dependency. see *src/example/gem_with_jar/gem_with_jar.gemspec* how the jar gets declared.
81
+ java_import 'org.yaml.snakeyaml.events.AliasEvent'
52
82
 
53
- execute *src/example/my_project/info.rb* to see it in action:
83
+ class TestClass
84
+ def my_method
85
+ puts AliasEvent.methods
86
+ end
87
+ end
54
88
 
55
- cd src/example/my_project
56
- jbundle install
57
- bundle exec info.rb
89
+ TestClass.new.my_method
90
+ ```
58
91
 
59
- ## limitations ##
92
+ ## Limitations
60
93
 
61
- since the version resolution happens in two steps - first the gems then the jars/poms - it is possible in case of a failure that there is a valid gems/jars version resolution which satisfies all version contraints. so there is plenty of space for improvements (like maven could resolve the gems as well, etc)
94
+ Since the version resolution happens in two steps - first the gems, and then the jars/poms - it is possible in case of a failure that there is a valid gems/jars version resolution which satisfies all version contraints. So there is plenty of space for improvements (like maven could resolve the gems as well, etc).
62
95
 
63
- # special thanks #
96
+ ## Special thanks
64
97
 
65
- the whole project actually started with a controversial discussion on a [pull request on bundler](https://github.com/carlhuda/bundler/pull/1683). this very same pull request were the starting point of that project here. probably by now there is no much left of the original code but many thanks to [ANithian](https://github.com/ANithian) for given the seed of that project.
98
+ The whole project actually started with a controversial discussion on a [pull request on bundler](https://github.com/carlhuda/bundler/pull/1683). This very same pull request were the starting point of that project here. Probably by now there is not much left of the original code, but many thanks to [ANithian](https://github.com/ANithian) for giving the seed of that project.
66
99
 
67
100
  License
68
101
  -------
@@ -78,7 +111,7 @@ Contributing
78
111
  4. Push to the branch (`git push origin my-new-feature`)
79
112
  5. Create new Pull Request
80
113
 
81
- meta-fu
114
+ Meta-fu
82
115
  -------
83
116
 
84
- enjoy :)
117
+ enjoy :)
@@ -49,7 +49,7 @@ module JBundler
49
49
  end
50
50
 
51
51
  def exists?
52
- File.exists?(@classpathfile)
52
+ File.exist?(@classpathfile)
53
53
  end
54
54
 
55
55
  def missing?( jarfile )
@@ -100,7 +100,7 @@ module JBundler
100
100
  return if path =~ /pom$/
101
101
  if local_repo
102
102
  path = path.sub( /#{local_repo}/, '' )
103
- unless File.exists?( path )
103
+ unless File.exist?( path )
104
104
  file.puts "JBUNDLER_#{prefix}CLASSPATH << (JBUNDLER_LOCAL_REPO + '#{path}')"
105
105
  path = nil
106
106
  end
@@ -33,7 +33,7 @@ module JBundler
33
33
  def initialize
34
34
  if ENV.has_key? 'HOME'
35
35
  homefile = File.join(ENV['HOME'], RC_FILE)
36
- home_config = YAML.load_file(homefile) if File.exists?(homefile)
36
+ home_config = YAML.load_file(homefile) if File.exist?(homefile)
37
37
  else
38
38
  home_config = nil
39
39
  end
@@ -41,7 +41,7 @@ module JBundler
41
41
  @basedir = find_basedir( File.expand_path( '.' ) )
42
42
  @basedir ||= File.expand_path( '.' )
43
43
  file = join_basedir( RC_FILE )
44
- pwd_config = YAML.load_file(file) if File.exists?(file)
44
+ pwd_config = YAML.load_file(file) if File.exist?(file)
45
45
  @config.merge!(pwd_config || {})
46
46
  end
47
47
 
@@ -55,11 +55,11 @@ module JBundler
55
55
 
56
56
  def find_basedir( dir )
57
57
  f = File.join( dir, RC_FILE )
58
- return dir if File.exists?( f )
58
+ return dir if File.exist?( f )
59
59
  f = File.join( dir, _jarfile )
60
- return dir if File.exists?( f )
60
+ return dir if File.exist?( f )
61
61
  f = File.join( dir, _gemfile )
62
- return dir if File.exists?( f )
62
+ return dir if File.exist?( f )
63
63
  parent = File.dirname( dir )
64
64
  if dir != ENV['HOME'] && dir != parent
65
65
  find_basedir( parent )
@@ -28,7 +28,7 @@ module JBundler
28
28
 
29
29
  def initialize(jarfile, lockfile = 'Gemfile.lock')
30
30
  @jarfile = jarfile
31
- @lockfile = lockfile if File.exists?(lockfile)
31
+ @lockfile = lockfile if File.exist?(lockfile)
32
32
  end
33
33
 
34
34
  def exists?
@@ -49,7 +49,7 @@ module JBundler
49
49
 
50
50
  jar = to_jar( group_id, artifact_id, version, classifier )
51
51
  ( [ Jars.home ] + $LOAD_PATH ).each do |path|
52
- if File.exists?( f = File.join( path, jar ) )
52
+ if File.exist?( f = File.join( path, jar ) )
53
53
  return f
54
54
  end
55
55
  end
@@ -25,7 +25,7 @@ module JBundler
25
25
 
26
26
  exec( 'dependency:tree' )
27
27
 
28
- if File.exists?( @tree )
28
+ if File.exist?( @tree )
29
29
  puts File.read( @tree )
30
30
  end
31
31
  end
@@ -1,4 +1,4 @@
1
- require 'jar_installer'
1
+ require 'jars/installer'
2
2
  module JBundler
3
3
  class Vendor
4
4
 
@@ -8,11 +8,11 @@ module JBundler
8
8
  end
9
9
 
10
10
  def vendored?
11
- File.exists?( @dir ) && Dir[ File.join( @dir, '*' ) ].size > 0
11
+ File.exist?( @dir ) && Dir[ File.join( @dir, '*' ) ].size > 0
12
12
  end
13
13
 
14
14
  def require_jars
15
- if File.exists?(@jars_lock)
15
+ if File.exist?(@jars_lock)
16
16
  $LOAD_PATH << @dir unless $LOAD_PATH.include? @dir
17
17
  ENV_JAVA['jars.lock'] = @jars_lock
18
18
  Jars.require_jars_lock!
@@ -24,7 +24,7 @@ module JBundler
24
24
 
25
25
  def require_jars_legacy
26
26
  jars = File.join( @dir, 'jbundler.rb' )
27
- if File.exists?( jars )
27
+ if File.exist?( jars )
28
28
  $LOAD_PATH << @dir unless $LOAD_PATH.include? @dir
29
29
  require jars
30
30
  else
@@ -0,0 +1,3 @@
1
+ module JBundler
2
+ VERSION = '0.9.5'
3
+ end
data/lib/jbundler.rb CHANGED
@@ -19,6 +19,7 @@
19
19
  # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20
20
  #
21
21
 
22
+ require 'jbundler/version'
22
23
  require 'jbundler/context'
23
24
  require 'jbundler/lock_down'
24
25
 
metadata CHANGED
@@ -1,29 +1,28 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jbundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Meier
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2016-04-08 00:00:00.000000000 Z
10
+ date: 2025-06-23 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: maven-tools
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
- - - "~>"
16
+ - - '='
18
17
  - !ruby/object:Gem::Version
19
- version: '1.1'
18
+ version: 1.2.3
20
19
  type: :runtime
21
20
  prerelease: false
22
21
  version_requirements: !ruby/object:Gem::Requirement
23
22
  requirements:
24
- - - "~>"
23
+ - - '='
25
24
  - !ruby/object:Gem::Version
26
- version: '1.1'
25
+ version: 1.2.3
27
26
  - !ruby/object:Gem::Dependency
28
27
  name: ruby-maven
29
28
  requirement: !ruby/object:Gem::Requirement
@@ -48,16 +47,22 @@ dependencies:
48
47
  name: bundler
49
48
  requirement: !ruby/object:Gem::Requirement
50
49
  requirements:
51
- - - "~>"
50
+ - - ">"
52
51
  - !ruby/object:Gem::Version
53
52
  version: '1.5'
53
+ - - "<"
54
+ - !ruby/object:Gem::Version
55
+ version: 3.0.0
54
56
  type: :runtime
55
57
  prerelease: false
56
58
  version_requirements: !ruby/object:Gem::Requirement
57
59
  requirements:
58
- - - "~>"
60
+ - - ">"
59
61
  - !ruby/object:Gem::Version
60
62
  version: '1.5'
63
+ - - "<"
64
+ - !ruby/object:Gem::Version
65
+ version: 3.0.0
61
66
  - !ruby/object:Gem::Dependency
62
67
  name: jar-dependencies
63
68
  requirement: !ruby/object:Gem::Requirement
@@ -78,14 +83,14 @@ dependencies:
78
83
  requirements:
79
84
  - - "~>"
80
85
  - !ruby/object:Gem::Version
81
- version: '10.0'
86
+ version: '13.0'
82
87
  type: :development
83
88
  prerelease: false
84
89
  version_requirements: !ruby/object:Gem::Requirement
85
90
  requirements:
86
91
  - - "~>"
87
92
  - !ruby/object:Gem::Version
88
- version: '10.0'
93
+ version: '13.0'
89
94
  - !ruby/object:Gem::Dependency
90
95
  name: minitest
91
96
  requirement: !ruby/object:Gem::Requirement
@@ -100,8 +105,10 @@ dependencies:
100
105
  - - "~>"
101
106
  - !ruby/object:Gem::Version
102
107
  version: '5.3'
103
- description: |
104
- managing jar dependencies with or without bundler. adding bundler like handling of version ranges for jar dependencies.
108
+ description: 'managing jar dependencies with or without bundler. adding bundler like
109
+ handling of version ranges for jar dependencies.
110
+
111
+ '
105
112
  email:
106
113
  - m.kristian@web.de
107
114
  executables:
@@ -132,17 +139,17 @@ files:
132
139
  - lib/jbundler/show.rb
133
140
  - lib/jbundler/tree.rb
134
141
  - lib/jbundler/vendor.rb
142
+ - lib/jbundler/version.rb
135
143
  - spec/classpath_file_spec.rb
136
144
  - spec/config_spec.rb
137
145
  - spec/pom_spec.rb
138
- - spec/project/Settings.xml
146
+ - spec/project/settings.xml
139
147
  - spec/setup.rb
140
148
  - spec/vendor_spec.rb
141
149
  homepage: https://github.com/mkristian/jbundler
142
150
  licenses:
143
151
  - MIT
144
152
  metadata: {}
145
- post_install_message:
146
153
  rdoc_options: []
147
154
  require_paths:
148
155
  - lib
@@ -157,9 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
164
  - !ruby/object:Gem::Version
158
165
  version: '0'
159
166
  requirements: []
160
- rubyforge_project:
161
- rubygems_version: 2.4.5.1
162
- signing_key:
167
+ rubygems_version: 3.6.3
163
168
  specification_version: 4
164
169
  summary: managing jar dependencies
165
170
  test_files:
File without changes