jbundler 0.9.1 → 0.9.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Readme.md +7 -7
- data/lib/jbundler/cli.rb +10 -8
- data/lib/jbundler/lock_down.rb +1 -1
- data/lib/jbundler/vendor.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a5611ab6f5ba865994fb7b1c4fb03f6a31678df
|
4
|
+
data.tar.gz: 1e687d388ceaf0d60ef6be699da83ac1b3efcf29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d96365cecc7ebc57356f2d7612c5475a0e0b99fbd8d1e656bda043280398f7de21e04ebee9e72cc2cb6365d8442a9f9e64d25f6c02922eb575b20becd6aff90
|
7
|
+
data.tar.gz: 0ac67d4fe1f3e47c745e3697b9167eb9457758e2e89a9b33b19d0b5cadb7d0f48cc679617b666b5f056f60161c6a6ddf8f55511ee10882b5542c96f1d17d62fd
|
data/Gemfile.lock
CHANGED
data/Readme.md
CHANGED
@@ -2,17 +2,17 @@
|
|
2
2
|
|
3
3
|
* [![Build Status](https://secure.travis-ci.org/mkristian/jbundler.png)](http://travis-ci.org/mkristian/jbundler) #
|
4
4
|
|
5
|
-
manage jar dependencies similar
|
5
|
+
manage jar dependencies similar to how **bundler** manages gem dependencies:
|
6
6
|
|
7
7
|
* the DSL mimics the one from bundler
|
8
|
-
* you can use maven
|
8
|
+
* you can use maven-like version declarations or rubygems/bundler version ranges
|
9
9
|
* it locks down the jar versions inside "Jarfile.lock"
|
10
|
-
* you can declare jar
|
10
|
+
* you can declare jar dependencies within a gem using the requirements directive of the gem specification. jbundler will include those jar dependencies into its classpath
|
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 add ```gem 'jar-dependencies', '~> 0.1.11'``` as runtime dependency.
|
15
|
-
* you need to run ```bundle install``` first if any of the gems
|
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
|
+
* you need to run ```bundle install``` first if any of the gems have jar dependencies.
|
16
16
|
* all one command ```jbundle```, see ```jbundle --help``` on the possible options and how to update a single jar, etc.
|
17
17
|
|
18
18
|
## get started
|
@@ -21,7 +21,7 @@ install JBundler with
|
|
21
21
|
|
22
22
|
jruby -S gem install jbundler
|
23
23
|
|
24
|
-
first create a **Jarfile**, something like
|
24
|
+
first create a **Jarfile**, something like:
|
25
25
|
|
26
26
|
jar 'org.yaml:snakeyaml', '1.14'
|
27
27
|
jar 'org.slf4j:slf4j-simple', '>1.1'
|
data/lib/jbundler/cli.rb
CHANGED
@@ -93,7 +93,7 @@ module JBundler
|
|
93
93
|
def console
|
94
94
|
# dummy - never executed !!!
|
95
95
|
end
|
96
|
-
|
96
|
+
|
97
97
|
desc 'lock_down', "first `bundle install` is called and then the jar dependencies will be installed. for more details see `bundle help install`, jbundler will ignore all options. the install command is also the default when no command is given. that is kept as fall back in cases where the new install does not work as before."
|
98
98
|
method_option :deployment, :type => :boolean, :default => false, :desc => "copy the jars into the vendor/jars directory (or as configured). add the vendor/jars $LOAD_PATH and Jars.require_jars_lock! - no need for any jbundler files at runtime !"
|
99
99
|
method_option :no_deployment, :type => :boolean, :default => false, :desc => 'clears the vendored jars'
|
@@ -123,18 +123,20 @@ module JBundler
|
|
123
123
|
end
|
124
124
|
|
125
125
|
desc 'update', "first `bundle update` is called and if there are no options then the jar dependencies will be updated. for more details see `bundle help update`."
|
126
|
-
method_option :debug,
|
126
|
+
method_option :debug, :type => :boolean, :default => false, :desc => 'enable maven debug output (jbundler only).'
|
127
127
|
method_option :verbose, :type => :boolean, :default => false, :desc => 'enable maven output (jbundler only).'
|
128
|
+
method_option :quiet, :type => :boolean
|
128
129
|
def update
|
129
|
-
|
130
|
-
|
131
|
-
JBundler::LockDown.new( config ).update( options[ :debug ] ,
|
132
|
-
options[ :verbose ] )
|
130
|
+
msg = JBundler::LockDown.new( config ).update( options[ :debug ] ,
|
131
|
+
options[ :verbose ] )
|
133
132
|
|
134
133
|
config.verbose = ! options[ :quiet ]
|
135
134
|
Show.new( config ).show_classpath
|
136
|
-
|
137
|
-
|
135
|
+
unless options[ :quiet ]
|
136
|
+
puts ''
|
137
|
+
puts 'Your jbundle is updated! Use `jbundle show` to see where the bundled jars are installed.'
|
138
|
+
end
|
139
|
+
puts msg if msg
|
138
140
|
end
|
139
141
|
|
140
142
|
desc 'show', "first `bundle show` is called and if there are no options then the jar dependencies will be displayed. for more details see `bundle help show`."
|
data/lib/jbundler/lock_down.rb
CHANGED
data/lib/jbundler/vendor.rb
CHANGED
@@ -58,7 +58,7 @@ module JBundler
|
|
58
58
|
end
|
59
59
|
['jbundler.rb', 'jbundle.rb'].each do |filename|
|
60
60
|
File.write( File.join( @dir, filename ),
|
61
|
-
"ENV['JARS_LOCK'] = File.join( File.dirname( __FILE__ ), 'Jars.lock' )\nrequire 'jars/setup" )
|
61
|
+
"ENV['JARS_LOCK'] = File.join( File.dirname( __FILE__ ), 'Jars.lock' )\nrequire 'jars/setup'" )
|
62
62
|
end
|
63
63
|
end
|
64
64
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jbundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Meier
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|