appbundler 0.11.0 → 0.11.1

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: 867a7edc3b0cb2bb729b3ec62f2c7afde7c9fcb46a58d7812d5ff261e1fe864e
4
- data.tar.gz: 4c1edc5d6e127e064332406396574b28ae38891eb3c62ff92006dc8f399b18e8
3
+ metadata.gz: f15da5b9078e6f6d17af1820b954af197b850ac2ca507ae6c678c034064535d5
4
+ data.tar.gz: d8241883373c4379b3ccd93ba6ed432a9c41f9049859947e300daf7d58a471ee
5
5
  SHA512:
6
- metadata.gz: c9b76a7be7c70f2cb91e5fe25d80d70133f64abccc55fc40632b44f1d8e6edfceeb9b30111118b566859629b7b4360c6c7f92ef4a0db98e97eea2203c2b736a8
7
- data.tar.gz: 1567880de2199ad880710c06169871be66dbb40af131c133ee18f940fe27658618a6f25474cb41b96d0e85d21f6cd8cbe5861071fd6a10e2cd2d57b67e86bac3
6
+ metadata.gz: 04d7af42ad5838e535c1ed71a3a3b676c075412badd816174a13bd8392e5cc916479da4bf223371195b16210b53264d7d89e5dca495d3a673a55d4cee21003a4
7
+ data.tar.gz: e87ff8982761e09218e2b021349be15d9309c7e7db98fcab98ebcb61ed4f1840d506fc09921eb28e75df6a60784c293bb14fcbd5be5a272aae34696fdcb32211
@@ -53,7 +53,7 @@ module Appbundler
53
53
  ]
54
54
 
55
55
  def external_lockfile?
56
- app_dir != File.dirname(gemfile_lock)
56
+ app_dir != bundle_path
57
57
  end
58
58
 
59
59
  def local_gemfile_lock_specs
@@ -244,7 +244,7 @@ E
244
244
  end
245
245
 
246
246
  def executables
247
- spec = app_gemspec
247
+ spec = installed_spec
248
248
  spec.executables.map { |e| spec.bin_file(e) }
249
249
  end
250
250
 
@@ -260,16 +260,24 @@ E
260
260
  @app_dependency_names ||= app_spec.dependencies.map(&:name)
261
261
  end
262
262
 
263
- def app_gemspec
263
+ def installed_spec
264
264
  Gem::Specification.find_by_name(app_spec.name, app_spec.version)
265
265
  end
266
266
 
267
267
  def app_spec
268
- spec_for(name)
268
+ if name.nil?
269
+ Gem::Specification.load("#{bundle_path}/#{File.basename(@bundle_path)}.gemspec")
270
+ else
271
+ spec_for(name)
272
+ end
269
273
  end
270
274
 
271
275
  def app_dir
272
- app_gemspec.gem_dir
276
+ if name.nil?
277
+ File.dirname(app_spec.loaded_from)
278
+ else
279
+ installed_spec.gem_dir
280
+ end
273
281
  end
274
282
 
275
283
  def gemfile_lock_specs
@@ -73,11 +73,9 @@ BANNER
73
73
  @bundle_path = File.expand_path(cli_arguments[0])
74
74
  @bin_path = File.expand_path(cli_arguments[1])
75
75
  @gems = cli_arguments[2..-1]
76
- @gems = [ File.basename(@bundle_path) ] if @gems.empty?
76
+ @gems = [ nil ] if @gems.empty?
77
77
  verify_bundle_path
78
78
  verify_bin_path
79
- verify_gems_installed
80
- verify_deps_are_accessible
81
79
  end
82
80
  end
83
81
 
@@ -98,31 +96,6 @@ BANNER
98
96
  end
99
97
  end
100
98
 
101
- def verify_gems_installed
102
- gems.each do |g|
103
- begin
104
- app = App.new(bundle_path, bin_path, g)
105
- app.app_gemspec
106
- rescue Gem::LoadError
107
- err("Unable to find #{app.app_spec.name} #{app.app_spec.version} installed as a gem")
108
- err("You must install the top-level app as a gem before calling app-bundler")
109
- usage_and_exit!
110
- end
111
- end
112
- end
113
-
114
- def verify_deps_are_accessible
115
- gems.each do |g|
116
- begin
117
- app = App.new(bundle_path, bin_path, g)
118
- app.verify_deps_are_accessible!
119
- rescue InaccessibleGemsInLockfile => e
120
- err(e.message)
121
- exit 1
122
- end
123
- end
124
- end
125
-
126
99
  def run
127
100
  gems.each do |g|
128
101
  app = App.new(bundle_path, bin_path, g)
@@ -1,3 +1,3 @@
1
1
  module Appbundler
2
- VERSION = "0.11.0"
2
+ VERSION = "0.11.1"
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.0
4
+ version: 0.11.1
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-02-27 00:00:00.000000000 Z
11
+ date: 2018-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
133
133
  version: '0'
134
134
  requirements: []
135
135
  rubyforge_project:
136
- rubygems_version: 2.7.4
136
+ rubygems_version: 2.7.6
137
137
  signing_key:
138
138
  specification_version: 4
139
139
  summary: Extracts a dependency solution from bundler's Gemfile.lock to speed gem activation