omnibus 6.1.7 → 6.1.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (62) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/lib/omnibus/build_version_dsl.rb +1 -0
  4. data/lib/omnibus/builder.rb +6 -5
  5. data/lib/omnibus/changelog_printer.rb +7 -4
  6. data/lib/omnibus/cleaner.rb +3 -0
  7. data/lib/omnibus/cli/changelog.rb +24 -24
  8. data/lib/omnibus/compressors/dmg.rb +3 -4
  9. data/lib/omnibus/fetchers/git_fetcher.rb +1 -0
  10. data/lib/omnibus/fetchers/net_fetcher.rb +2 -3
  11. data/lib/omnibus/health_check.rb +1 -1
  12. data/lib/omnibus/licensing.rb +2 -3
  13. data/lib/omnibus/logger.rb +2 -1
  14. data/lib/omnibus/manifest.rb +1 -1
  15. data/lib/omnibus/packagers/appx.rb +1 -2
  16. data/lib/omnibus/packagers/base.rb +1 -0
  17. data/lib/omnibus/packagers/bff.rb +6 -8
  18. data/lib/omnibus/packagers/deb.rb +7 -10
  19. data/lib/omnibus/packagers/ips.rb +3 -6
  20. data/lib/omnibus/packagers/makeself.rb +1 -2
  21. data/lib/omnibus/packagers/msi.rb +12 -11
  22. data/lib/omnibus/packagers/pkg.rb +3 -6
  23. data/lib/omnibus/packagers/rpm.rb +11 -12
  24. data/lib/omnibus/packagers/solaris.rb +4 -4
  25. data/lib/omnibus/packagers/windows_base.rb +7 -6
  26. data/lib/omnibus/project.rb +1 -0
  27. data/lib/omnibus/publisher.rb +2 -2
  28. data/lib/omnibus/software.rb +18 -11
  29. data/lib/omnibus/templating.rb +1 -1
  30. data/lib/omnibus/util.rb +3 -2
  31. data/lib/omnibus/version.rb +1 -1
  32. data/omnibus.gemspec +2 -2
  33. data/spec/functional/builder_spec.rb +2 -1
  34. data/spec/functional/fetchers/file_fetcher_spec.rb +4 -4
  35. data/spec/functional/fetchers/git_fetcher_spec.rb +4 -4
  36. data/spec/functional/fetchers/net_fetcher_spec.rb +5 -6
  37. data/spec/functional/fetchers/path_fetcher_spec.rb +4 -4
  38. data/spec/functional/licensing_spec.rb +5 -5
  39. data/spec/support/examples.rb +3 -4
  40. data/spec/unit/builder_spec.rb +9 -9
  41. data/spec/unit/changelogprinter_spec.rb +8 -6
  42. data/spec/unit/compressor_spec.rb +3 -3
  43. data/spec/unit/fetchers/net_fetcher_spec.rb +16 -17
  44. data/spec/unit/health_check_spec.rb +2 -6
  45. data/spec/unit/library_spec.rb +2 -1
  46. data/spec/unit/manifest_diff_spec.rb +2 -2
  47. data/spec/unit/manifest_spec.rb +1 -1
  48. data/spec/unit/metadata_spec.rb +8 -11
  49. data/spec/unit/omnibus_spec.rb +1 -1
  50. data/spec/unit/packagers/bff_spec.rb +2 -2
  51. data/spec/unit/packagers/msi_spec.rb +2 -2
  52. data/spec/unit/packagers/pkgsrc_spec.rb +1 -1
  53. data/spec/unit/packagers/solaris_spec.rb +7 -7
  54. data/spec/unit/project_spec.rb +2 -2
  55. data/spec/unit/publisher_spec.rb +1 -2
  56. data/spec/unit/publishers/artifactory_publisher_spec.rb +2 -4
  57. data/spec/unit/publishers/s3_publisher_spec.rb +2 -4
  58. data/spec/unit/s3_cacher_spec.rb +2 -6
  59. data/spec/unit/s3_helpers_spec.rb +2 -2
  60. data/spec/unit/software_spec.rb +9 -9
  61. data/spec/unit/util_spec.rb +1 -2
  62. metadata +4 -4
@@ -419,7 +419,7 @@ module Omnibus
419
419
  end
420
420
 
421
421
  it "outputs a source.wxs file to the staging directory" do
422
- expect(subject.candle_command).to include("#{subject.windows_safe_path(staging_dir, 'source.wxs')}")
422
+ expect(subject.candle_command).to include("#{subject.windows_safe_path(staging_dir, "source.wxs")}")
423
423
  end
424
424
  end
425
425
 
@@ -433,7 +433,7 @@ module Omnibus
433
433
  end
434
434
 
435
435
  it "outputs a bundle.wxs file to the staging directory" do
436
- expect(subject.candle_command(is_bundle: true)).to include("#{subject.windows_safe_path(staging_dir, 'bundle.wxs')}")
436
+ expect(subject.candle_command(is_bundle: true)).to include("#{subject.windows_safe_path(staging_dir, "bundle.wxs")}")
437
437
  end
438
438
  end
439
439
  end
@@ -70,7 +70,7 @@ module Omnibus
70
70
  expect(subject).to receive(:shellout!)
71
71
  .with "cd #{project.install_dir} && find . -type l -or -type f | sort >> #{staging_dir}/packlist"
72
72
  subject.write_packlist
73
- expect(File.read("#{staging_dir}/packlist")).to match(/@pkgdir \/opt\/project/)
73
+ expect(File.read("#{staging_dir}/packlist")).to match(%r{@pkgdir /opt/project})
74
74
  end
75
75
  end
76
76
  end
@@ -139,11 +139,11 @@ module Omnibus
139
139
 
140
140
  it "uses the correct commands" do
141
141
  expect(subject).to receive(:shellout!)
142
- .with("cd /opt && find project -print > #{File.join(staging_dir, 'files')}")
142
+ .with("cd /opt && find project -print > #{File.join(staging_dir, "files")}")
143
143
  expect(subject).to receive(:shellout!)
144
- .with("cd /opt && pkgproto < #{File.join(staging_dir, 'files.clean')} > #{File.join(staging_dir, 'Prototype.files')}")
144
+ .with("cd /opt && pkgproto < #{File.join(staging_dir, "files.clean")} > #{File.join(staging_dir, "Prototype.files")}")
145
145
  expect(subject).to receive(:shellout!)
146
- .with("awk '{ $5 = \"root\"; $6 = \"root\"; print }' < #{File.join(staging_dir, 'Prototype.files')} >> #{File.join(staging_dir, 'Prototype')}")
146
+ .with("awk '{ $5 = \"root\"; $6 = \"root\"; print }' < #{File.join(staging_dir, "Prototype.files")} >> #{File.join(staging_dir, "Prototype")}")
147
147
  subject.write_prototype_file
148
148
  end
149
149
 
@@ -158,11 +158,11 @@ module Omnibus
158
158
  describe "#create_solaris_file" do
159
159
  it "uses the correct commands" do
160
160
  expect(subject).to receive(:shellout!)
161
- .with("pkgmk -o -r /opt -d #{staging_dir} -f #{File.join(staging_dir, 'Prototype')}")
161
+ .with("pkgmk -o -r /opt -d #{staging_dir} -f #{File.join(staging_dir, "Prototype")}")
162
162
  expect(subject).to receive(:shellout!)
163
163
  .with("pkgchk -vd #{staging_dir} project")
164
164
  expect(subject).to receive(:shellout!)
165
- .with("pkgtrans #{staging_dir} #{File.join(package_dir, 'project-1.2.3-1.i386.solaris')} project")
165
+ .with("pkgtrans #{staging_dir} #{File.join(package_dir, "project-1.2.3-1.i386.solaris")} project")
166
166
 
167
167
  subject.create_solaris_file
168
168
  end
@@ -207,11 +207,11 @@ module Omnibus
207
207
 
208
208
  it "uses the correct commands" do
209
209
  expect(subject).to receive(:shellout!)
210
- .with("pkgmk -o -r /opt -d #{staging_dir} -f #{File.join(staging_dir, 'Prototype')}")
210
+ .with("pkgmk -o -r /opt -d #{staging_dir} -f #{File.join(staging_dir, "Prototype")}")
211
211
  expect(subject).to receive(:shellout!)
212
212
  .with("pkgchk -vd #{staging_dir} project")
213
213
  expect(subject).to receive(:shellout!)
214
- .with("pkgtrans #{staging_dir} #{File.join(package_dir, 'project-1.2.3-1.i386.solaris')} project")
214
+ .with("pkgtrans #{staging_dir} #{File.join(package_dir, "project-1.2.3-1.i386.solaris")} project")
215
215
 
216
216
  subject.create_solaris_file
217
217
  end
@@ -202,7 +202,7 @@ module Omnibus
202
202
  end
203
203
 
204
204
  describe "#build_iteration" do
205
- let(:fauxhai_options) { Hash.new }
205
+ let(:fauxhai_options) { {} }
206
206
 
207
207
  before { stub_ohai(fauxhai_options) }
208
208
 
@@ -340,7 +340,7 @@ module Omnibus
340
340
  subject.compress(:tgz)
341
341
 
342
342
  expect(Compressor).to receive(:for_current_system)
343
- .with([:dmg, :tgz])
343
+ .with(%i{dmg tgz})
344
344
  .and_call_original
345
345
 
346
346
  subject.compressor
@@ -133,8 +133,7 @@ module Omnibus
133
133
  license: "Apache-2.0",
134
134
  },
135
135
  },
136
- }
137
- )
136
+ })
138
137
  end
139
138
 
140
139
  before do
@@ -10,8 +10,7 @@ module Omnibus
10
10
  path: "/path/to/files/chef.deb",
11
11
  name: "chef.deb",
12
12
  content: "BINARY",
13
- validate!: true
14
- )
13
+ validate!: true)
15
14
  end
16
15
 
17
16
  let(:metadata) do
@@ -90,8 +89,7 @@ module Omnibus
90
89
  license: "Apache-2.0",
91
90
  },
92
91
  },
93
- }
94
- )
92
+ })
95
93
  end
96
94
 
97
95
  let(:packages) { [package] }
@@ -9,8 +9,7 @@ module Omnibus
9
9
  path: "/path/to/files/chef.deb",
10
10
  name: "chef.deb",
11
11
  content: "BINARY",
12
- validate!: true
13
- )
12
+ validate!: true)
14
13
  end
15
14
 
16
15
  let(:metadata) do
@@ -24,8 +23,7 @@ module Omnibus
24
23
  platform_version: "14.04",
25
24
  arch: "x86_64",
26
25
  sha1: "SHA1",
27
- md5: "ABCDEF123456"
28
- )
26
+ md5: "ABCDEF123456")
29
27
  end
30
28
 
31
29
  let(:packages) { [package] }
@@ -7,9 +7,7 @@ module Omnibus
7
7
  name: "ruby",
8
8
  version: "1.9.3",
9
9
  fetcher: double(Fetcher,
10
- checksum: "abcd1234"
11
- )
12
- )
10
+ checksum: "abcd1234"))
13
11
  end
14
12
 
15
13
  let(:python_27) do
@@ -17,9 +15,7 @@ module Omnibus
17
15
  name: "python",
18
16
  version: "2.7",
19
17
  fetcher: double(Fetcher,
20
- checksum: "defg5678"
21
- )
22
- )
18
+ checksum: "defg5678"))
23
19
  end
24
20
 
25
21
  describe ".list" do
@@ -9,12 +9,12 @@ module Omnibus
9
9
  describe "#client" do
10
10
  it "raises an error if it is not overridden" do
11
11
  expect { s3_configuration }.to raise_error(RuntimeError,
12
- "You must override s3_configuration")
12
+ "You must override s3_configuration")
13
13
  end
14
14
 
15
15
  it "raises an error stating that s3_configuration must be overriden" do
16
16
  expect { client }.to raise_error(RuntimeError,
17
- "You must override s3_configuration")
17
+ "You must override s3_configuration")
18
18
  end
19
19
  end
20
20
  end
@@ -286,13 +286,13 @@ module Omnibus
286
286
  end
287
287
  it "sets the defaults" do
288
288
  expect(subject.with_standard_compiler_flags).to eq(
289
- "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
290
- "CFLAGS" => "-I/opt/project/embedded/include -O2",
291
- "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
292
- "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
293
- "LD_RUN_PATH" => "/opt/project/embedded/lib",
294
- "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
295
- "OMNIBUS_INSTALL_DIR" => "/opt/project"
289
+ "LDFLAGS" => "-Wl,-rpath,/opt/project/embedded/lib -L/opt/project/embedded/lib",
290
+ "CFLAGS" => "-I/opt/project/embedded/include -O2",
291
+ "CXXFLAGS" => "-I/opt/project/embedded/include -O2",
292
+ "CPPFLAGS" => "-I/opt/project/embedded/include -O2",
293
+ "LD_RUN_PATH" => "/opt/project/embedded/lib",
294
+ "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
295
+ "OMNIBUS_INSTALL_DIR" => "/opt/project"
296
296
  )
297
297
  end
298
298
 
@@ -313,7 +313,7 @@ module Omnibus
313
313
  "LD_RUN_PATH" => "/opt/project/embedded/lib",
314
314
  "PKG_CONFIG_PATH" => "/opt/project/embedded/lib/pkgconfig",
315
315
  "OMNIBUS_INSTALL_DIR" => "/opt/project"
316
- )
316
+ )
317
317
  end
318
318
  end
319
319
  end
@@ -547,7 +547,7 @@ module Omnibus
547
547
  describe "#whitelist_file" do
548
548
  it "appends to the whitelist_files array" do
549
549
  expect(subject.whitelist_files.size).to eq(0)
550
- subject.whitelist_file(/foo\/bar/)
550
+ subject.whitelist_file(%r{foo/bar})
551
551
  expect(subject.whitelist_files.size).to eq(1)
552
552
  end
553
553
 
@@ -46,8 +46,7 @@ module Omnibus
46
46
  environment: {
47
47
  "TICKLE_ME" => "elmo",
48
48
  "I_LOVE_YOU" => "barney",
49
- }
50
- )
49
+ })
51
50
  end
52
51
 
53
52
  context "when the command fails" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnibus
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.1.7
4
+ version: 6.1.9
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-10-29 00:00:00.000000000 Z
11
+ date: 2019-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3
@@ -210,14 +210,14 @@ dependencies:
210
210
  requirements:
211
211
  - - '='
212
212
  - !ruby/object:Gem::Version
213
- version: '0.12'
213
+ version: 0.13.3
214
214
  type: :development
215
215
  prerelease: false
216
216
  version_requirements: !ruby/object:Gem::Requirement
217
217
  requirements:
218
218
  - - '='
219
219
  - !ruby/object:Gem::Version
220
- version: '0.12'
220
+ version: 0.13.3
221
221
  - !ruby/object:Gem::Dependency
222
222
  name: fauxhai
223
223
  requirement: !ruby/object:Gem::Requirement