jarbler 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/jarbler/builder.rb +17 -30
- data/lib/jarbler/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7c6489ae577a03079ca5976e6f8ea2c311593aa2754590b83e37a446f68bc9
|
4
|
+
data.tar.gz: 840b7720151675d538e08473857d7fae6a4342f478cf84473ffc231f2414fc46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 444d52de14b8316967b5184c9e814e40d52bcb780d84ef74dc148befea457232182bf83b01ec8c64540959af7d2522d2e20417ed9589771e8cd63779ffd60266
|
7
|
+
data.tar.gz: 991f7a004c5383846504ff98c7b0c0cb508e50530d64887e4418dd7b9ec2e788764303fa7358eb43d8d66ec3143118da038ee8cf8b03e5743dbc7b83175ff87b
|
data/CHANGELOG.md
CHANGED
data/lib/jarbler/builder.rb
CHANGED
@@ -86,28 +86,28 @@ module Jarbler
|
|
86
86
|
# @param [String] app_root Application root directory
|
87
87
|
# @return [Array] Array of Gem locations
|
88
88
|
def collect_gem_search_locations(app_root)
|
89
|
-
#
|
90
|
-
|
91
|
-
|
92
|
-
possible_gem_search_locations << bundle_config_bundle_path(app_root) if bundle_config_bundle_path(app_root)
|
93
|
-
ENV['GEM_PATH'].split(':').each do |gem_path|
|
94
|
-
possible_gem_search_locations << gem_path
|
95
|
-
end
|
89
|
+
# All active search locations for Gems
|
90
|
+
Bundler.setup
|
91
|
+
possible_gem_search_locations = Gem.paths.path
|
96
92
|
debug "Possible Gem locations: #{possible_gem_search_locations}"
|
97
93
|
gem_search_locations = []
|
98
94
|
# Check where inside this location the gems may be installed
|
99
95
|
possible_gem_search_locations.each do |gem_search_location|
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
96
|
+
if File.exist?(gem_search_location) && File.directory?(gem_search_location)
|
97
|
+
valid_gem_search_location = nil # No valid path found yet
|
98
|
+
Find.find(gem_search_location) do |path|
|
99
|
+
if File.directory?(path) && File.exist?("#{path}/specifications") && File.exist?("#{path}/gems")
|
100
|
+
valid_gem_search_location = path # Found a valid path
|
101
|
+
Find.prune # Do not search deeper
|
102
|
+
end
|
103
|
+
end
|
104
|
+
if valid_gem_search_location
|
105
|
+
gem_search_locations << valid_gem_search_location
|
106
|
+
else
|
107
|
+
debug "No valid gem location found in #{gem_search_location}"
|
105
108
|
end
|
106
|
-
end
|
107
|
-
if valid_gem_search_location
|
108
|
-
gem_search_locations << valid_gem_search_location
|
109
109
|
else
|
110
|
-
debug
|
110
|
+
debug("Gem location #{gem_search_location} does not exist or is not a directory")
|
111
111
|
end
|
112
112
|
end
|
113
113
|
debug "Valid Gem locations: #{gem_search_locations}"
|
@@ -193,19 +193,6 @@ module Jarbler
|
|
193
193
|
@config
|
194
194
|
end
|
195
195
|
|
196
|
-
# Check if there is an additional local bundle path in .bundle/config
|
197
|
-
def bundle_config_bundle_path(rails_root)
|
198
|
-
bundle_path = nil # default
|
199
|
-
if File.exist?("#{rails_root}/.bundle/config")
|
200
|
-
bundle_config = YAML.load_file("#{rails_root}/.bundle/config")
|
201
|
-
if bundle_config && bundle_config['BUNDLE_PATH']
|
202
|
-
bundle_path = "#{rails_root}/#{bundle_config['BUNDLE_PATH']}"
|
203
|
-
debug "Local Gem path configured in #{rails_root}/.bundle/config: #{bundle_path}"
|
204
|
-
end
|
205
|
-
end
|
206
|
-
bundle_path
|
207
|
-
end
|
208
|
-
|
209
196
|
# Copy the jruby-jars to the staging directory
|
210
197
|
# @param [String] staging_dir Path to the staging directory
|
211
198
|
# @param [Array] gem_search_locations Array of Gem locations to look for jRuby jars
|
@@ -219,7 +206,7 @@ module Jarbler
|
|
219
206
|
break
|
220
207
|
end
|
221
208
|
end
|
222
|
-
raise "Could not determine location of jRuby jars for release '#{config.jruby_version}' in the following
|
209
|
+
raise "Could not determine location of jRuby jars for release '#{config.jruby_version}' in the following locations:\n#{gem_search_locations}" unless jruby_jars_location
|
223
210
|
file_utils_copy("#{jruby_jars_location}/lib/jruby-core-#{config.jruby_version}-complete.jar", staging_dir)
|
224
211
|
file_utils_copy("#{jruby_jars_location}/lib/jruby-stdlib-#{config.jruby_version}.jar", staging_dir)
|
225
212
|
|
data/lib/jarbler/version.rb
CHANGED