puck 1.0.0-java → 1.1.0-java
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 +4 -4
- data/lib/puck/jar.rb +39 -29
- data/lib/puck/version.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: 1d2fa619bd5d33c67783df7f02b076b8d8fb7d61
|
4
|
+
data.tar.gz: a2d9a4ceaf07a7c12c8d0f156633ff65627ee8b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1d492499c49e043bbc2f2b9585e79437b76d7ad32539024378ba1fc2b0d49006083e8f376ddc3d83aa46697aeae1ad4adb8a1d72b00c16352bba9c92186b688
|
7
|
+
data.tar.gz: 0882d65123098436d26afdbd499afb254f1aa883623e1daae7edf8fa7c114edf67267209d2de814f0bdfacf0f3554f255b2a1b75788846b71f5e85654d8e282a
|
data/lib/puck/jar.rb
CHANGED
@@ -48,8 +48,11 @@ module Puck
|
|
48
48
|
# is the same as the name of the directory containing the "lib" directory.
|
49
49
|
#
|
50
50
|
# @param [Hash] configuration
|
51
|
-
# @option configuration [String] :extra_files a
|
52
|
-
# the Jar. The
|
51
|
+
# @option configuration [Array<String>, Hash<String,String>] :extra_files a
|
52
|
+
# list of files to include in the Jar. The option can be either an Array,
|
53
|
+
# in which case paths must be below the `:app_dir`, or a Hash, in which
|
54
|
+
# case the file specified by the key is included at the path specified by
|
55
|
+
# the corresponding value.
|
53
56
|
# @option configuration [String] :gem_groups ([:default]) a list of gem
|
54
57
|
# groups to include in the Jar. Remember to include the default group if
|
55
58
|
# you override this option.
|
@@ -97,42 +100,49 @@ module Puck
|
|
97
100
|
create_jar_bootstrap!(tmp_dir, gem_dependencies)
|
98
101
|
|
99
102
|
ant = Ant.new(output_level: 1)
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
103
|
+
begin
|
104
|
+
ant.jar(destfile: output_path) do
|
105
|
+
manifest do
|
106
|
+
attribute name: 'Main-Class', value: 'org.jruby.JarBootstrapMain'
|
107
|
+
attribute name: 'Created-By', value: "Puck v#{Puck::VERSION}"
|
108
|
+
end
|
105
109
|
|
106
|
-
|
110
|
+
zipfileset dir: tmp_dir, includes: 'jar-bootstrap.rb'
|
107
111
|
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
112
|
+
if jruby_complete_path
|
113
|
+
zipfileset src: jruby_complete_path
|
114
|
+
else
|
115
|
+
zipfileset src: JRubyJars.core_jar_path
|
116
|
+
zipfileset src: JRubyJars.stdlib_jar_path
|
117
|
+
end
|
114
118
|
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
+
%w[bin lib].each do |sub_dir|
|
120
|
+
path = project_dir + sub_dir
|
121
|
+
if File.exists?(path)
|
122
|
+
zipfileset dir: path, prefix: File.join(JAR_APP_HOME, sub_dir)
|
123
|
+
end
|
119
124
|
end
|
120
|
-
end
|
121
125
|
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
126
|
+
extra_files.each do |file, target_path|
|
127
|
+
path = Pathname.new(file).expand_path.cleanpath
|
128
|
+
if target_path
|
129
|
+
zipfileset file: path, fullpath: target_path
|
130
|
+
else
|
131
|
+
prefix = File.join(JAR_APP_HOME, path.relative_path_from(project_dir).dirname.to_s)
|
132
|
+
zipfileset dir: path.dirname, prefix: prefix, includes: path.basename
|
133
|
+
end
|
134
|
+
end
|
127
135
|
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
136
|
+
gem_dependencies.each do |spec|
|
137
|
+
base_path = Pathname.new(spec[:base_path]).expand_path.cleanpath
|
138
|
+
unless project_dir == base_path
|
139
|
+
zipfileset dir: spec[:base_path], prefix: File.join(JAR_GEM_HOME, spec[:versioned_name])
|
140
|
+
end
|
132
141
|
end
|
133
142
|
end
|
143
|
+
rescue Java::OrgApacheToolsAnt::BuildException => e
|
144
|
+
raise PuckError, sprintf('Error when building JAR: %s (%s)', e.message, e.class), e.backtrace
|
134
145
|
end
|
135
|
-
|
136
146
|
output_path
|
137
147
|
end
|
138
148
|
end
|
data/lib/puck/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Theo Hultberg
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Puck takes your app and packs it along with all your gems and a complete JRuby runtime in a standalone Jar file that can be run with just `java -jar …`
|
14
14
|
email:
|