appbundler 0.12.3 → 0.12.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e28f2e4515160806c46bb209b6c77bafc27a3ee85f3a6c150395533f71769bd
4
- data.tar.gz: f1d0721a380ebfa6ff3be21e94d9fa60684e7838a8f10daae7db86e9bf4e905f
3
+ metadata.gz: 26e3280e87178c94ec01585647a28e6f76052491b1847005d46986d4889ef2f4
4
+ data.tar.gz: ad2e9e65ae31eadeec4d634ab359bd2f01b8e01dc3e5bb17f8470a6345a26853
5
5
  SHA512:
6
- metadata.gz: 660b086281a966d5376a6f595afd6a059340815746733a71f85de6fb853bc20ddb22b94a07ff69dc324c094089ef6ed8c30554b75363e49b13a0aadbc35a9469
7
- data.tar.gz: c763835a1fbc8a0c5a72f5c0081acb95f6380141f644c4e365fb93160d4c9cf97e6e7cad8a2b0b9e6da0875ae1a7221c424654edb727240a958e30caaf2a3877
6
+ metadata.gz: 1a3910fb29a86a4741d41817ba0d0f9bed3c957d7cdacfdee44b294033e893c63b8b883aead2c923562783bed56c7d49ea16a8d039e018700a057fae103c8e49
7
+ data.tar.gz: 70b98db9c9c46732fdaa096cb3a94cb5cb507ab64660f798efc2c13cb406f11e0678f276bf134ee82f8a13e2b7d4c320a282c7716b843f038f0ef8e9e0edbbda
@@ -2,26 +2,31 @@
2
2
 
3
3
  This file is used to document the changes between releases of Appbundler
4
4
 
5
- <!-- latest_release 0.12.3 -->
6
- ## [v0.12.3](https://github.com/chef/appbundler/tree/v0.12.3) (2019-04-17)
5
+ <!-- latest_release 0.12.4 -->
6
+ ## [v0.12.4](https://github.com/chef/appbundler/tree/v0.12.4) (2019-04-24)
7
7
 
8
8
  #### Merged Pull Requests
9
- - syntax fix [#52](https://github.com/chef/appbundler/pull/52) ([lamont-granquist](https://github.com/lamont-granquist))
9
+ - add --binstub-source option [#53](https://github.com/chef/appbundler/pull/53) ([lamont-granquist](https://github.com/lamont-granquist))
10
10
  <!-- latest_release -->
11
11
 
12
- <!-- release_rollup since=0.12.2 -->
12
+ <!-- release_rollup since=0.12.3 -->
13
13
  ### Changes not yet released to rubygems.org
14
14
 
15
15
  #### Merged Pull Requests
16
- - syntax fix [#52](https://github.com/chef/appbundler/pull/52) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 0.12.3 -->
16
+ - add --binstub-source option [#53](https://github.com/chef/appbundler/pull/53) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 0.12.4 -->
17
17
  <!-- release_rollup -->
18
18
 
19
19
  <!-- latest_stable_release -->
20
+ ## [v0.12.3](https://github.com/chef/appbundler/tree/v0.12.3) (2019-04-17)
21
+
22
+ #### Merged Pull Requests
23
+ - syntax fix [#52](https://github.com/chef/appbundler/pull/52) ([lamont-granquist](https://github.com/lamont-granquist))
24
+ <!-- latest_stable_release -->
25
+
20
26
  ## [v0.12.2](https://github.com/chef/appbundler/tree/v0.12.2) (2019-04-16)
21
27
 
22
28
  #### Merged Pull Requests
23
29
  - fix syntax for cli options [#51](https://github.com/chef/appbundler/pull/51) ([lamont-granquist](https://github.com/lamont-granquist))
24
- <!-- latest_stable_release -->
25
30
 
26
31
  ## [v0.12.1](https://github.com/chef/appbundler/tree/v0.12.1) (2019-04-16)
27
32
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.12.3
1
+ 0.12.4
@@ -86,7 +86,7 @@ module Appbundler
86
86
  # of our appbundle calls. But to ship ChefDK 2.0 we just do this.
87
87
  SHITLIST = [
88
88
  "github_changelog_generator",
89
- ]
89
+ ].freeze
90
90
 
91
91
  # This is a check which is equivalent to asking if we are running 2-arg or 3-arg. If
92
92
  # we have an "external_lockfile" that means the chef-dk omnibus Gemfile.lock, e.g.:
@@ -111,11 +111,11 @@ module Appbundler
111
111
  #
112
112
  def local_gemfile_lock_specs
113
113
  gemfile_lock_specs.map do |s|
114
- #if SHITLIST.include?(s.name)
114
+ # if SHITLIST.include?(s.name)
115
115
  # nil
116
- #else
117
- safe_resolve_local_gem(s)
118
- #end
116
+ # else
117
+ safe_resolve_local_gem(s)
118
+ # end
119
119
  end.compact
120
120
  end
121
121
 
@@ -129,13 +129,23 @@ module Appbundler
129
129
  gem_path = installed_spec.gem_dir
130
130
  # If we're already using that directory, don't copy (it won't work anyway)
131
131
  return if gem_path == File.dirname(gemfile_lock)
132
- FileUtils.install(gemfile_lock, gem_path, :mode => 0644)
132
+ FileUtils.install(gemfile_lock, gem_path, mode: 0644)
133
133
  if File.exist?(dot_bundle_dir) && File.directory?(dot_bundle_dir)
134
134
  FileUtils.cp_r(dot_bundle_dir, gem_path)
135
135
  FileUtils.chmod_R("ugo+rX", File.join(gem_path, ".bundle"))
136
136
  end
137
137
  end
138
138
 
139
+ # This is used to copy the binstubs from the binstub source directory to the actual
140
+ # binstub location.
141
+ #
142
+ def copy_binstubs(binstubs_source)
143
+ gem_path = installed_spec.gem_dir
144
+ dst = "#{gem_path}/bin"
145
+ src = "#{gem_path}/#{binstubs_source}/*"
146
+ FileUtils.cp_r(Dir.glob(src), dst)
147
+ end
148
+
139
149
  # This is the implementation of the 3-arg version of writing the merged lockfiles,
140
150
  # when called with the 2-arg version it short-circuits, however, to the copy_bundler_env
141
151
  # version above.
@@ -155,7 +165,7 @@ module Appbundler
155
165
  locked_gems = {}
156
166
 
157
167
  gemfile_lock_specs.each do |s|
158
- #next if SHITLIST.include?(s.name)
168
+ # next if SHITLIST.include?(s.name)
159
169
  spec = safe_resolve_local_gem(s)
160
170
  next if spec.nil?
161
171
 
@@ -197,7 +207,7 @@ module Appbundler
197
207
  end
198
208
 
199
209
  t.close
200
- puts IO.read(t.path) # debugging
210
+ puts IO.read(t.path) # debugging
201
211
  Dir.chdir(app_dir) do
202
212
  FileUtils.rm_f "#{app_dir}/Gemfile.lock"
203
213
  Bundler.with_clean_env do
@@ -208,7 +218,7 @@ module Appbundler
208
218
  FileUtils.mv t.path, "#{app_dir}/Gemfile"
209
219
  end
210
220
  end
211
- return "#{app_dir}/Gemfile"
221
+ "#{app_dir}/Gemfile"
212
222
  end
213
223
 
214
224
  def write_executable_stubs
@@ -247,10 +257,10 @@ module Appbundler
247
257
 
248
258
  def batchfile_stub
249
259
  ruby_relpath_windows = ruby_relative_path.tr("/", '\\')
250
- <<-E
251
- @ECHO OFF
252
- "%~dp0\\#{ruby_relpath_windows}" "%~dpn0" %*
253
- E
260
+ <<~E
261
+ @ECHO OFF
262
+ "%~dp0\\#{ruby_relpath_windows}" "%~dpn0" %*
263
+ E
254
264
  end
255
265
 
256
266
  # Relative path from #target_bin_dir to #ruby. This is used to
@@ -288,24 +298,24 @@ E
288
298
  # APPBUNDLER_ALLOW_RVM environment variable to "true". This feature
289
299
  # exists to make tests run correctly on travis.ci (which uses rvm).
290
300
  def env_sanitizer
291
- <<-EOS
292
- require "rubygems"
293
-
294
- begin
295
- # this works around rubygems/rubygems#2196 and can be removed in rubygems > 2.7.6
296
- require "rubygems/bundler_version_finder"
297
- rescue LoadError
298
- # probably means rubygems is too old or too new to have this class, and we don't care
299
- end
301
+ <<~EOS
302
+ require "rubygems"
303
+
304
+ begin
305
+ # this works around rubygems/rubygems#2196 and can be removed in rubygems > 2.7.6
306
+ require "rubygems/bundler_version_finder"
307
+ rescue LoadError
308
+ # probably means rubygems is too old or too new to have this class, and we don't care
309
+ end
300
310
 
301
- # avoid appbundling if we are definitely running within a Bundler bundle.
302
- # most likely the check for defined?(Bundler) is enough since we don't require
303
- # bundler above, but just for paranoia's sake also we test to see if Bundler is
304
- # really doing its thing or not.
305
- unless defined?(Bundler) && Bundler.instance_variable_defined?("@load")
306
- ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
307
- ::Gem.clear_paths
308
- EOS
311
+ # avoid appbundling if we are definitely running within a Bundler bundle.
312
+ # most likely the check for defined?(Bundler) is enough since we don't require
313
+ # bundler above, but just for paranoia's sake also we test to see if Bundler is
314
+ # really doing its thing or not.
315
+ unless defined?(Bundler) && Bundler.instance_variable_defined?("@load")
316
+ ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
317
+ ::Gem.clear_paths
318
+ EOS
309
319
  end
310
320
 
311
321
  def runtime_activate
@@ -325,17 +335,17 @@ EOS
325
335
  def load_statement_for(bin_file)
326
336
  name, version = app_spec.name, app_spec.version
327
337
  bin_basename = File.basename(bin_file)
328
- <<-E
329
- gem "#{name}", "= #{version}"
330
- spec = Gem::Specification.find_by_name("#{name}", "= #{version}")
331
- else
332
- spec = Gem::Specification.find_by_name("#{name}")
333
- end
338
+ <<~E
339
+ gem "#{name}", "= #{version}"
340
+ spec = Gem::Specification.find_by_name("#{name}", "= #{version}")
341
+ else
342
+ spec = Gem::Specification.find_by_name("#{name}")
343
+ end
334
344
 
335
- bin_file = spec.bin_file("#{bin_basename}")
345
+ bin_file = spec.bin_file("#{bin_basename}")
336
346
 
337
- Kernel.load(bin_file)
338
- E
347
+ Kernel.load(bin_file)
348
+ E
339
349
  end
340
350
 
341
351
  def executables
@@ -413,12 +423,12 @@ E
413
423
  inaccessable_gems = inaccessable_git_sourced_gems
414
424
  return true if inaccessable_gems.empty?
415
425
 
416
- message = <<-MESSAGE
417
- Application '#{name}' contains gems in the lockfile which are
418
- not accessible by rubygems. This usually occurs when you fetch gems from git in
419
- your Gemfile and do not install the same version of the gems beforehand.
426
+ message = <<~MESSAGE
427
+ Application '#{name}' contains gems in the lockfile which are
428
+ not accessible by rubygems. This usually occurs when you fetch gems from git in
429
+ your Gemfile and do not install the same version of the gems beforehand.
420
430
 
421
- MESSAGE
431
+ MESSAGE
422
432
 
423
433
  message << "The Gemfile.lock is located here:\n- #{gemfile_lock}\n\n"
424
434
 
@@ -6,49 +6,54 @@ module Appbundler
6
6
  class CLI
7
7
  include Mixlib::CLI
8
8
 
9
- banner(<<-BANNER)
10
- * appbundler #{VERSION} *
9
+ banner(<<~BANNER)
10
+ * appbundler #{VERSION} *
11
11
 
12
- Usage: appbundler BUNDLE_DIR BINSTUB_DIR [GEM_NAME] [GEM_NAME] ...
12
+ Usage: appbundler BUNDLE_DIR BINSTUB_DIR [GEM_NAME] [GEM_NAME] ...
13
13
 
14
- BUNDLE_DIR is the root directory to the bundle containing your app
15
- BINSTUB_DIR is the directory where you want generated executables to be written
16
- GEM_NAME is the name of a gem you want to appbundle. Default is the directory name
17
- of BUNDLE_DIR (e.g. /src/chef -> chef)
14
+ BUNDLE_DIR is the root directory to the bundle containing your app
15
+ BINSTUB_DIR is the directory where you want generated executables to be written
16
+ GEM_NAME is the name of a gem you want to appbundle. Default is the directory name
17
+ of BUNDLE_DIR (e.g. /src/chef -> chef)
18
18
 
19
- Your bundled application must already be gem installed. Generated binstubs
20
- will point to the gem, not your working copy.
21
- BANNER
19
+ Your bundled application must already be gem installed. Generated binstubs
20
+ will point to the gem, not your working copy.
21
+ BANNER
22
22
 
23
23
  # this is used by chef-dk, its probably not an external API, here be dragons
24
24
  option :without,
25
- :long => "--without GROUPS",
26
- :description => "Comma separated list of groups to exclude when building transitive Gemfile.locks (internal API)",
27
- :proc => lambda { |o| o.split(/[\s,]+/) },
28
- :default => []
25
+ long: "--without GROUPS",
26
+ description: "Comma separated list of groups to exclude when building transitive Gemfile.locks (internal API)",
27
+ proc: lambda { |o| o.split(/[\s,]+/) },
28
+ default: []
29
+
30
+ option :binstubs_source,
31
+ long: "--binstubs-source path/to/binstubs",
32
+ description: "Path to binstubs within the gem to be moved into the bindir",
33
+ default: nil
29
34
 
30
35
  option :extra_bin_files,
31
- :long => "--extra-bin-files bin1,bin2",
32
- :description => "Comma separated list of extra binstubs to wire up which are not listed in the gemspec",
33
- :proc => lambda { |o| o.split(/[\s,]+/) },
34
- :default => []
36
+ long: "--extra-bin-files bin1,bin2",
37
+ description: "Comma separated list of extra binstubs to wire up which are not listed in the gemspec",
38
+ proc: lambda { |o| o.split(/[\s,]+/) },
39
+ default: []
35
40
 
36
41
  option :version,
37
- :short => "-v",
38
- :long => "--version",
39
- :description => "Show appbundler version",
40
- :boolean => true,
41
- :proc => lambda { |v| $stdout.puts("Appbundler Version: #{::Appbundler::VERSION}") },
42
- :exit => 0
42
+ short: "-v",
43
+ long: "--version",
44
+ description: "Show appbundler version",
45
+ boolean: true,
46
+ proc: lambda { |v| $stdout.puts("Appbundler Version: #{::Appbundler::VERSION}") },
47
+ exit: 0
43
48
 
44
49
  option :help,
45
- :short => "-h",
46
- :long => "--help",
47
- :description => "Show this message",
48
- :on => :tail,
49
- :boolean => true,
50
- :show_options => true,
51
- :exit => 0
50
+ short: "-h",
51
+ long: "--help",
52
+ description: "Show this message",
53
+ on: :tail,
54
+ boolean: true,
55
+ show_options: true,
56
+ exit: 0
52
57
 
53
58
  def self.run(argv)
54
59
  cli = new(argv)
@@ -111,6 +116,10 @@ BANNER
111
116
  end
112
117
  created_lockfile = app.write_merged_lockfiles(without: config[:without])
113
118
  $stdout.puts "Generated merged lockfile at #{created_lockfile}" if created_lockfile
119
+ if config[:binstubs_source]
120
+ app.copy_binstubs(config[:binstubs_source])
121
+ $stdout.puts "Copied binstubs"
122
+ end
114
123
  end
115
124
  end
116
125
 
@@ -1,3 +1,3 @@
1
1
  module Appbundler
2
- VERSION = "0.12.3"
2
+ VERSION = "0.12.4".freeze
3
3
  end
@@ -11,15 +11,15 @@ describe Appbundler do
11
11
  end
12
12
 
13
13
  def double_spec(name, version, dep_names)
14
- deps = dep_names.map { |n| double("Bundler::Dependency #{n}", :name => n.to_s) }
14
+ deps = dep_names.map { |n| double("Bundler::Dependency #{n}", name: n.to_s) }
15
15
  source = double("Bundler::Source::Rubygems")
16
- spec = double("Bundler::LazySpecification '#{name}'", :name => name.to_s, :version => version, :dependencies => deps, :source => source)
16
+ spec = double("Bundler::LazySpecification '#{name}'", name: name.to_s, version: version, dependencies: deps, source: source)
17
17
  all_specs << spec
18
18
  spec
19
19
  end
20
20
 
21
21
  def shellout!(cmd)
22
- s = Mixlib::ShellOut.new(cmd, :env => { "RUBYOPT" => nil, "BUNDLE_GEMFILE" => nil, "APPBUNDLER_ALLOW_RVM" => "true" })
22
+ s = Mixlib::ShellOut.new(cmd, env: { "RUBYOPT" => nil, "BUNDLE_GEMFILE" => nil, "APPBUNDLER_ALLOW_RVM" => "true" })
23
23
  s.run_command
24
24
  s.error!
25
25
  s
@@ -99,23 +99,23 @@ describe Appbundler do
99
99
  end
100
100
 
101
101
  it "locks the main app's gem via rubygems, and loads the proper binary" do
102
- expected_loading_code = <<-CODE
103
- gem "app", "= 1.0.0"
102
+ expected_loading_code = <<~CODE
103
+ gem "app", "= 1.0.0"
104
104
 
105
- spec = Gem::Specification.find_by_name("app", "= 1.0.0")
106
- bin_file = spec.bin_file("foo")
105
+ spec = Gem::Specification.find_by_name("app", "= 1.0.0")
106
+ bin_file = spec.bin_file("foo")
107
107
 
108
- Kernel.load(bin_file)
109
- CODE
108
+ Kernel.load(bin_file)
109
+ CODE
110
110
  expect(app.load_statement_for(bin_path)).to eq(expected_loading_code)
111
111
  end
112
112
 
113
113
  it "generates code to override GEM_HOME and GEM_PATH (e.g., rvm)" do
114
- expected = <<-EOS
115
- ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
116
- require "rubygems"
117
- ::Gem.clear_paths
118
- EOS
114
+ expected = <<~EOS
115
+ ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
116
+ require "rubygems"
117
+ ::Gem.clear_paths
118
+ EOS
119
119
 
120
120
  expect(app.env_sanitizer).to eq(expected)
121
121
  expect(app.runtime_activate).to include(expected)
@@ -134,10 +134,10 @@ EOS
134
134
  end
135
135
 
136
136
  it "generates batchfile stub code" do
137
- expected_batch_code = <<-E
138
- @ECHO OFF
139
- "%~dp0\\..\\embedded\\bin\\ruby.exe" "%~dpn0" %*
140
- E
137
+ expected_batch_code = <<~E
138
+ @ECHO OFF
139
+ "%~dp0\\..\\embedded\\bin\\ruby.exe" "%~dpn0" %*
140
+ E
141
141
  expect(app.batchfile_stub).to eq(expected_batch_code)
142
142
  end
143
143
 
@@ -155,8 +155,8 @@ E
155
155
 
156
156
  # Ensure that the behavior we emulate in our stubs is correct:
157
157
  it "sanity checks rubygems behavior" do
158
- expect { Gem::Specification.find_by_name("there-is-no-such-gem-named-this", "= 999.999.999") }.
159
- to raise_error(Gem::LoadError)
158
+ expect { Gem::Specification.find_by_name("there-is-no-such-gem-named-this", "= 999.999.999") }
159
+ .to raise_error(Gem::LoadError)
160
160
  end
161
161
 
162
162
  context "and the gems are not accessible by rubygems" do
@@ -238,123 +238,123 @@ E
238
238
 
239
239
  it "generates runtime activation code for the app" do
240
240
  expected_gem_activates = if windows?
241
- <<-E
242
- ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
243
- require "rubygems"
244
- ::Gem.clear_paths
245
-
246
- gem "chef", "= 12.4.1"
247
- gem "chef-config", "= 12.4.1"
248
- gem "mixlib-config", "= 2.2.1"
249
- gem "mixlib-shellout", "= 2.2.0"
250
- gem "win32-process", "= 0.7.5"
251
- gem "ffi", "= 1.9.10"
252
- gem "chef-zero", "= 4.3.0"
253
- gem "ffi-yajl", "= 2.2.2"
254
- gem "libyajl2", "= 1.2.0"
255
- gem "hashie", "= 2.1.2"
256
- gem "mixlib-log", "= 1.6.0"
257
- gem "rack", "= 1.6.4"
258
- gem "uuidtools", "= 2.1.5"
259
- gem "diff-lcs", "= 1.2.5"
260
- gem "erubis", "= 2.7.0"
261
- gem "highline", "= 1.7.3"
262
- gem "mixlib-authentication", "= 1.3.0"
263
- gem "mixlib-cli", "= 1.5.0"
264
- gem "net-ssh", "= 2.9.2"
265
- gem "net-ssh-multi", "= 1.2.1"
266
- gem "net-ssh-gateway", "= 1.2.0"
267
- gem "ohai", "= 8.5.1"
268
- gem "ipaddress", "= 0.8.0"
269
- gem "mime-types", "= 2.6.1"
270
- gem "rake", "= 10.1.1"
271
- gem "systemu", "= 2.6.5"
272
- gem "wmi-lite", "= 1.0.0"
273
- gem "plist", "= 3.1.0"
274
- gem "pry", "= 0.9.12.6"
275
- gem "coderay", "= 1.1.0"
276
- gem "method_source", "= 0.8.2"
277
- gem "slop", "= 3.4.7"
278
- gem "win32console", "= 1.3.2"
279
- gem "rspec-core", "= 3.3.2"
280
- gem "rspec-support", "= 3.3.0"
281
- gem "rspec-expectations", "= 3.3.1"
282
- gem "rspec-mocks", "= 3.3.2"
283
- gem "rspec_junit_formatter", "= 0.2.3"
284
- gem "builder", "= 3.2.2"
285
- gem "serverspec", "= 2.23.1"
286
- gem "multi_json", "= 1.11.2"
287
- gem "rspec", "= 3.3.0"
288
- gem "rspec-its", "= 1.2.0"
289
- gem "specinfra", "= 2.43.3"
290
- gem "net-scp", "= 1.2.1"
291
- gem "net-telnet", "= 0.1.1"
292
- gem "sfl", "= 2.2"
293
- gem "syslog-logger", "= 1.6.8"
294
- gem "win32-api", "= 1.5.3"
295
- gem "win32-dir", "= 0.5.0"
296
- gem "win32-event", "= 0.6.1"
297
- gem "win32-ipc", "= 0.6.6"
298
- gem "win32-eventlog", "= 0.6.3"
299
- gem "win32-mmap", "= 0.4.1"
300
- gem "win32-mutex", "= 0.4.2"
301
- gem "win32-service", "= 0.8.6"
302
- gem "windows-api", "= 0.4.4"
303
- gem "windows-pr", "= 1.2.4"
304
- E
241
+ <<~E
242
+ ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
243
+ require "rubygems"
244
+ ::Gem.clear_paths
245
+
246
+ gem "chef", "= 12.4.1"
247
+ gem "chef-config", "= 12.4.1"
248
+ gem "mixlib-config", "= 2.2.1"
249
+ gem "mixlib-shellout", "= 2.2.0"
250
+ gem "win32-process", "= 0.7.5"
251
+ gem "ffi", "= 1.9.10"
252
+ gem "chef-zero", "= 4.3.0"
253
+ gem "ffi-yajl", "= 2.2.2"
254
+ gem "libyajl2", "= 1.2.0"
255
+ gem "hashie", "= 2.1.2"
256
+ gem "mixlib-log", "= 1.6.0"
257
+ gem "rack", "= 1.6.4"
258
+ gem "uuidtools", "= 2.1.5"
259
+ gem "diff-lcs", "= 1.2.5"
260
+ gem "erubis", "= 2.7.0"
261
+ gem "highline", "= 1.7.3"
262
+ gem "mixlib-authentication", "= 1.3.0"
263
+ gem "mixlib-cli", "= 1.5.0"
264
+ gem "net-ssh", "= 2.9.2"
265
+ gem "net-ssh-multi", "= 1.2.1"
266
+ gem "net-ssh-gateway", "= 1.2.0"
267
+ gem "ohai", "= 8.5.1"
268
+ gem "ipaddress", "= 0.8.0"
269
+ gem "mime-types", "= 2.6.1"
270
+ gem "rake", "= 10.1.1"
271
+ gem "systemu", "= 2.6.5"
272
+ gem "wmi-lite", "= 1.0.0"
273
+ gem "plist", "= 3.1.0"
274
+ gem "pry", "= 0.9.12.6"
275
+ gem "coderay", "= 1.1.0"
276
+ gem "method_source", "= 0.8.2"
277
+ gem "slop", "= 3.4.7"
278
+ gem "win32console", "= 1.3.2"
279
+ gem "rspec-core", "= 3.3.2"
280
+ gem "rspec-support", "= 3.3.0"
281
+ gem "rspec-expectations", "= 3.3.1"
282
+ gem "rspec-mocks", "= 3.3.2"
283
+ gem "rspec_junit_formatter", "= 0.2.3"
284
+ gem "builder", "= 3.2.2"
285
+ gem "serverspec", "= 2.23.1"
286
+ gem "multi_json", "= 1.11.2"
287
+ gem "rspec", "= 3.3.0"
288
+ gem "rspec-its", "= 1.2.0"
289
+ gem "specinfra", "= 2.43.3"
290
+ gem "net-scp", "= 1.2.1"
291
+ gem "net-telnet", "= 0.1.1"
292
+ gem "sfl", "= 2.2"
293
+ gem "syslog-logger", "= 1.6.8"
294
+ gem "win32-api", "= 1.5.3"
295
+ gem "win32-dir", "= 0.5.0"
296
+ gem "win32-event", "= 0.6.1"
297
+ gem "win32-ipc", "= 0.6.6"
298
+ gem "win32-eventlog", "= 0.6.3"
299
+ gem "win32-mmap", "= 0.4.1"
300
+ gem "win32-mutex", "= 0.4.2"
301
+ gem "win32-service", "= 0.8.6"
302
+ gem "windows-api", "= 0.4.4"
303
+ gem "windows-pr", "= 1.2.4"
304
+ E
305
305
  else
306
- <<-E
307
- ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
308
- require "rubygems"
309
- ::Gem.clear_paths
310
-
311
- gem "chef", "= 12.4.1"
312
- gem "chef-config", "= 12.4.1"
313
- gem "mixlib-config", "= 2.2.1"
314
- gem "mixlib-shellout", "= 2.2.0"
315
- gem "chef-zero", "= 4.3.0"
316
- gem "ffi-yajl", "= 2.2.2"
317
- gem "libyajl2", "= 1.2.0"
318
- gem "hashie", "= 2.1.2"
319
- gem "mixlib-log", "= 1.6.0"
320
- gem "rack", "= 1.6.4"
321
- gem "uuidtools", "= 2.1.5"
322
- gem "diff-lcs", "= 1.2.5"
323
- gem "erubis", "= 2.7.0"
324
- gem "highline", "= 1.7.3"
325
- gem "mixlib-authentication", "= 1.3.0"
326
- gem "mixlib-cli", "= 1.5.0"
327
- gem "net-ssh", "= 2.9.2"
328
- gem "net-ssh-multi", "= 1.2.1"
329
- gem "net-ssh-gateway", "= 1.2.0"
330
- gem "ohai", "= 8.5.1"
331
- gem "ffi", "= 1.9.10"
332
- gem "ipaddress", "= 0.8.0"
333
- gem "mime-types", "= 2.6.1"
334
- gem "rake", "= 10.1.1"
335
- gem "systemu", "= 2.6.5"
336
- gem "wmi-lite", "= 1.0.0"
337
- gem "plist", "= 3.1.0"
338
- gem "pry", "= 0.9.12.6"
339
- gem "coderay", "= 1.1.0"
340
- gem "method_source", "= 0.8.2"
341
- gem "slop", "= 3.4.7"
342
- gem "rspec-core", "= 3.3.2"
343
- gem "rspec-support", "= 3.3.0"
344
- gem "rspec-expectations", "= 3.3.1"
345
- gem "rspec-mocks", "= 3.3.2"
346
- gem "rspec_junit_formatter", "= 0.2.3"
347
- gem "builder", "= 3.2.2"
348
- gem "serverspec", "= 2.23.1"
349
- gem "multi_json", "= 1.11.2"
350
- gem "rspec", "= 3.3.0"
351
- gem "rspec-its", "= 1.2.0"
352
- gem "specinfra", "= 2.43.3"
353
- gem "net-scp", "= 1.2.1"
354
- gem "net-telnet", "= 0.1.1"
355
- gem "sfl", "= 2.2"
356
- gem "syslog-logger", "= 1.6.8"
357
- E
306
+ <<~E
307
+ ENV["GEM_HOME"] = ENV["GEM_PATH"] = nil unless ENV["APPBUNDLER_ALLOW_RVM"] == "true"
308
+ require "rubygems"
309
+ ::Gem.clear_paths
310
+
311
+ gem "chef", "= 12.4.1"
312
+ gem "chef-config", "= 12.4.1"
313
+ gem "mixlib-config", "= 2.2.1"
314
+ gem "mixlib-shellout", "= 2.2.0"
315
+ gem "chef-zero", "= 4.3.0"
316
+ gem "ffi-yajl", "= 2.2.2"
317
+ gem "libyajl2", "= 1.2.0"
318
+ gem "hashie", "= 2.1.2"
319
+ gem "mixlib-log", "= 1.6.0"
320
+ gem "rack", "= 1.6.4"
321
+ gem "uuidtools", "= 2.1.5"
322
+ gem "diff-lcs", "= 1.2.5"
323
+ gem "erubis", "= 2.7.0"
324
+ gem "highline", "= 1.7.3"
325
+ gem "mixlib-authentication", "= 1.3.0"
326
+ gem "mixlib-cli", "= 1.5.0"
327
+ gem "net-ssh", "= 2.9.2"
328
+ gem "net-ssh-multi", "= 1.2.1"
329
+ gem "net-ssh-gateway", "= 1.2.0"
330
+ gem "ohai", "= 8.5.1"
331
+ gem "ffi", "= 1.9.10"
332
+ gem "ipaddress", "= 0.8.0"
333
+ gem "mime-types", "= 2.6.1"
334
+ gem "rake", "= 10.1.1"
335
+ gem "systemu", "= 2.6.5"
336
+ gem "wmi-lite", "= 1.0.0"
337
+ gem "plist", "= 3.1.0"
338
+ gem "pry", "= 0.9.12.6"
339
+ gem "coderay", "= 1.1.0"
340
+ gem "method_source", "= 0.8.2"
341
+ gem "slop", "= 3.4.7"
342
+ gem "rspec-core", "= 3.3.2"
343
+ gem "rspec-support", "= 3.3.0"
344
+ gem "rspec-expectations", "= 3.3.1"
345
+ gem "rspec-mocks", "= 3.3.2"
346
+ gem "rspec_junit_formatter", "= 0.2.3"
347
+ gem "builder", "= 3.2.2"
348
+ gem "serverspec", "= 2.23.1"
349
+ gem "multi_json", "= 1.11.2"
350
+ gem "rspec", "= 3.3.0"
351
+ gem "rspec-its", "= 1.2.0"
352
+ gem "specinfra", "= 2.43.3"
353
+ gem "net-scp", "= 1.2.1"
354
+ gem "net-telnet", "= 0.1.1"
355
+ gem "sfl", "= 2.2"
356
+ gem "syslog-logger", "= 1.6.8"
357
+ E
358
358
  end
359
359
  expect(app.runtime_activate).to include(expected_gem_activates)
360
360
  end
@@ -391,8 +391,8 @@ E
391
391
  binary_2 = File.join(target_bindir, "app-binary-2")
392
392
  expect(File.exist?(binary_1)).to be(true)
393
393
  expect(File.exist?(binary_2)).to be(true)
394
- expect(File.executable?(binary_1) || File.exists?(binary_1 + ".bat")).to be(true)
395
- expect(File.executable?(binary_1) || File.exists?(binary_1 + ".bat")).to be(true)
394
+ expect(File.executable?(binary_1) || File.exist?(binary_1 + ".bat")).to be(true)
395
+ expect(File.executable?(binary_1) || File.exist?(binary_1 + ".bat")).to be(true)
396
396
  expect(shellout!(binary_1).stdout.strip).to eq("binary 1 ran")
397
397
  expect(shellout!(binary_2).stdout.strip).to eq("binary 2 ran")
398
398
  end
@@ -401,7 +401,7 @@ E
401
401
  spec = Gem::Specification.find_by_name("appbundler-example-app", "= 1.0.0")
402
402
  gem_path = spec.gem_dir
403
403
  app.copy_bundler_env
404
- expect(File.exists?(File.join(gem_path, "Gemfile.lock"))).to be(true)
404
+ expect(File.exist?(File.join(gem_path, "Gemfile.lock"))).to be(true)
405
405
  end
406
406
 
407
407
  it "copies over .bundler to the gem directory" do
@@ -409,7 +409,7 @@ E
409
409
  gem_path = spec.gem_dir
410
410
  app.copy_bundler_env
411
411
  expect(File.directory?(File.join(gem_path, ".bundle"))).to be(true)
412
- expect(File.exists?(File.join(gem_path, ".bundle/config"))).to be(true)
412
+ expect(File.exist?(File.join(gem_path, ".bundle/config"))).to be(true)
413
413
  end
414
414
  context "and the executable is symlinked to a different directory", :not_supported_on_windows do
415
415
 
@@ -449,10 +449,10 @@ E
449
449
  end
450
450
 
451
451
  let(:expected_batch_code) do
452
- <<-E
453
- @ECHO OFF
454
- "%~dp0\\#{expected_ruby_relpath}" "%~dpn0" %*
455
- E
452
+ <<~E
453
+ @ECHO OFF
454
+ "%~dp0\\#{expected_ruby_relpath}" "%~dpn0" %*
455
+ E
456
456
  end
457
457
 
458
458
  before do
@@ -1,3 +1,3 @@
1
1
  module ExampleApp
2
- IT_WORKS = "yes"
2
+ IT_WORKS = "yes".freeze
3
3
  end
@@ -3,7 +3,7 @@ def windows?
3
3
  end
4
4
 
5
5
  RSpec.configure do |c|
6
- c.filter_run :focus => true
6
+ c.filter_run focus: true
7
7
  c.run_all_when_everything_filtered = true
8
8
  c.filter_run_excluding(not_supported_on_windows: true) if windows?
9
9
  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.12.3
4
+ version: 0.12.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chef Software, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-17 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake