appbundler 0.11.5 → 0.11.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb63d63d943dde32830345ad2f83ea1870a7a6c0f108c59f51caef60f47ede88
4
- data.tar.gz: e14be84a66065ed787f1914086a0f6e9e349163f81f46d314c97663c607040ee
3
+ metadata.gz: 703fb5ac8b8bcf4d7cd65d46f4bfaa625d4977957d9d5b6791ed4780336062e4
4
+ data.tar.gz: 8125c71999832e0cb96e60287a56d839fd77ff633520c2c05e2dfd8ea0cc9224
5
5
  SHA512:
6
- metadata.gz: 90af3d7038ac9b7ddcfc811b5f1bed8dd75f4d0a2717ed714931527dbdae1034b40064070c98c17e5034692c0ad5837d81589ccc73b324a42715454b3ced76fc
7
- data.tar.gz: 21be3d9fd2d0973c4897fd0fb3e856857d18ba27df2db39453b8697f5bf44467aa274cd5e6d37f158b8ab53c1eb87db938941a381c8fdcb2b507005f4059bd2e
6
+ metadata.gz: fef53c32469cd9c1bc30b0bfe281eb4c5af74b76cd4da0d91e153e4a443a26f3e741c0dc5ec1ddcf3c32ad64da696a39b39b5db09db696f344f03e0d48f63442
7
+ data.tar.gz: ac1190460a4d7ff1a0d7760b0ebcaa1923549516477f5e3972f504c36a40124ee5d392dc621d2faa3ffed1ac3bf783d3fd0ff91c70b309ac33c4f9c827f75e59
@@ -226,7 +226,6 @@ E
226
226
  # exists to make tests run correctly on travis.ci (which uses rvm).
227
227
  def env_sanitizer
228
228
  <<-EOS
229
- ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
230
229
  require "rubygems"
231
230
 
232
231
  begin
@@ -236,13 +235,19 @@ rescue LoadError
236
235
  # probably means rubygems is too old or too new to have this class, and we don't care
237
236
  end
238
237
 
239
- ::Gem.clear_paths
238
+ # avoid appbundling if we are definitely running within a Bundler bundle.
239
+ # most likely the check for defined?(Bundler) is enough since we don't require
240
+ # bundler above, but just for paranoia's sake also we test to see if Bundler is
241
+ # really doing its thing or not.
242
+ unless defined?(Bundler) && Bundler.instance_variable_defined?("@load")
243
+ ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
244
+ ::Gem.clear_paths
240
245
  EOS
241
246
  end
242
247
 
243
248
  def runtime_activate
244
249
  @runtime_activate ||= begin
245
- statements = runtime_dep_specs.map { |s| %Q{gem "#{s.name}", "= #{s.version}"} }
250
+ statements = runtime_dep_specs.map { |s| %Q{ gem "#{s.name}", "= #{s.version}"} }
246
251
  activate_code = ""
247
252
  activate_code << env_sanitizer << "\n"
248
253
  activate_code << statements.join("\n") << "\n"
@@ -258,9 +263,12 @@ EOS
258
263
  name, version = app_spec.name, app_spec.version
259
264
  bin_basename = File.basename(bin_file)
260
265
  <<-E
261
- gem "#{name}", "= #{version}"
266
+ gem "#{name}", "= #{version}"
267
+ spec = Gem::Specification.find_by_name("#{name}", "= #{version}")
268
+ else
269
+ spec = Gem::Specification.find_by_name("#{name}")
270
+ end
262
271
 
263
- spec = Gem::Specification.find_by_name("#{name}", "= #{version}")
264
272
  bin_file = spec.bin_file("#{bin_basename}")
265
273
 
266
274
  Kernel.load(bin_file)
@@ -1,3 +1,3 @@
1
1
  module Appbundler
2
- VERSION = "0.11.5"
2
+ VERSION = "0.11.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appbundler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.5
4
+ version: 0.11.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan DeLeo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-11 00:00:00.000000000 Z
11
+ date: 2018-05-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake