omnibus 5.5.0 → 5.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (102) hide show
  1. checksums.yaml +4 -4
  2. data/.github/PULL_REQUEST_TEMPLATE.md +11 -0
  3. data/.travis.yml +2 -1
  4. data/CHANGELOG.md +37 -0
  5. data/Gemfile +5 -4
  6. data/MAINTAINERS.md +12 -17
  7. data/README.md +98 -107
  8. data/appveyor.yml +1 -1
  9. data/lib/omnibus.rb +4 -4
  10. data/lib/omnibus/builder.rb +42 -9
  11. data/lib/omnibus/cli.rb +5 -0
  12. data/lib/omnibus/cli/base.rb +1 -1
  13. data/lib/omnibus/cli/publish.rb +5 -3
  14. data/lib/omnibus/compressors/dmg.rb +2 -2
  15. data/lib/omnibus/config.rb +42 -5
  16. data/lib/omnibus/core_extensions/open_uri.rb +1 -0
  17. data/lib/omnibus/download_helpers.rb +4 -4
  18. data/lib/omnibus/fetchers/git_fetcher.rb +15 -5
  19. data/lib/omnibus/fetchers/net_fetcher.rb +1 -1
  20. data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
  21. data/lib/omnibus/file_syncer.rb +2 -2
  22. data/lib/omnibus/generator_files/omnibus.rb.erb +1 -0
  23. data/lib/omnibus/git_cache.rb +31 -13
  24. data/lib/omnibus/health_check.rb +1 -173
  25. data/lib/omnibus/licensing.rb +48 -7
  26. data/lib/omnibus/manifest.rb +3 -5
  27. data/lib/omnibus/manifest_entry.rb +1 -1
  28. data/lib/omnibus/metadata.rb +2 -1
  29. data/lib/omnibus/packager.rb +3 -1
  30. data/lib/omnibus/packagers/appx.rb +3 -3
  31. data/lib/omnibus/packagers/base.rb +9 -0
  32. data/lib/omnibus/packagers/bff.rb +4 -6
  33. data/lib/omnibus/packagers/deb.rb +95 -1
  34. data/lib/omnibus/packagers/ips.rb +50 -4
  35. data/lib/omnibus/packagers/pkgsrc.rb +112 -0
  36. data/lib/omnibus/packagers/rpm.rb +72 -3
  37. data/lib/omnibus/packagers/solaris.rb +0 -4
  38. data/lib/omnibus/packagers/windows_base.rb +1 -1
  39. data/lib/omnibus/project.rb +13 -3
  40. data/lib/omnibus/publishers/artifactory_publisher.rb +4 -6
  41. data/lib/omnibus/publishers/s3_publisher.rb +8 -3
  42. data/lib/omnibus/reports.rb +1 -1
  43. data/lib/omnibus/s3_cache.rb +18 -5
  44. data/lib/omnibus/s3_helpers.rb +45 -8
  45. data/lib/omnibus/software.rb +55 -37
  46. data/lib/omnibus/sugarable.rb +4 -0
  47. data/lib/omnibus/templating.rb +29 -13
  48. data/lib/omnibus/util.rb +81 -2
  49. data/lib/omnibus/version.rb +1 -1
  50. data/lib/omnibus/whitelist.rb +228 -0
  51. data/omnibus.gemspec +9 -8
  52. data/resources/dmg/create_dmg.osascript.erb +33 -13
  53. data/resources/ips/doc-transform.erb +2 -0
  54. data/resources/rpm/spec.erb +1 -2
  55. data/spec/functional/builder_spec.rb +21 -21
  56. data/spec/functional/fetchers/git_fetcher_spec.rb +6 -6
  57. data/spec/functional/fetchers/net_fetcher_spec.rb +7 -7
  58. data/spec/functional/fetchers/path_fetcher_spec.rb +5 -5
  59. data/spec/functional/file_syncer_spec.rb +6 -6
  60. data/spec/functional/licensing_spec.rb +29 -16
  61. data/spec/functional/templating_spec.rb +23 -22
  62. data/spec/support/git_helpers.rb +30 -24
  63. data/spec/unit/build_version_spec.rb +1 -1
  64. data/spec/unit/builder_spec.rb +36 -24
  65. data/spec/unit/changelogprinter_spec.rb +10 -8
  66. data/spec/unit/cleanroom_spec.rb +6 -6
  67. data/spec/unit/compressors/dmg_spec.rb +23 -37
  68. data/spec/unit/compressors/null_spec.rb +2 -2
  69. data/spec/unit/compressors/tgz_spec.rb +2 -2
  70. data/spec/unit/config_spec.rb +2 -1
  71. data/spec/unit/digestable_spec.rb +2 -2
  72. data/spec/unit/fetchers/git_fetcher_spec.rb +5 -5
  73. data/spec/unit/fetchers/net_fetcher_spec.rb +46 -6
  74. data/spec/unit/fetchers/path_fetcher_spec.rb +5 -5
  75. data/spec/unit/file_syncer_spec.rb +19 -0
  76. data/spec/unit/git_cache_spec.rb +76 -22
  77. data/spec/unit/health_check_spec.rb +1 -1
  78. data/spec/unit/library_spec.rb +2 -2
  79. data/spec/unit/manifest_spec.rb +6 -6
  80. data/spec/unit/metadata_spec.rb +4 -4
  81. data/spec/unit/omnibus_spec.rb +4 -4
  82. data/spec/unit/package_spec.rb +6 -6
  83. data/spec/unit/packagers/appx_spec.rb +16 -12
  84. data/spec/unit/packagers/base_spec.rb +5 -5
  85. data/spec/unit/packagers/bff_spec.rb +45 -15
  86. data/spec/unit/packagers/deb_spec.rb +95 -17
  87. data/spec/unit/packagers/ips_spec.rb +61 -17
  88. data/spec/unit/packagers/makeself_spec.rb +5 -5
  89. data/spec/unit/packagers/msi_spec.rb +43 -43
  90. data/spec/unit/packagers/pkg_spec.rb +15 -15
  91. data/spec/unit/packagers/pkgsrc_spec.rb +77 -0
  92. data/spec/unit/packagers/rpm_spec.rb +94 -17
  93. data/spec/unit/packagers/solaris_spec.rb +11 -11
  94. data/spec/unit/project_spec.rb +53 -22
  95. data/spec/unit/publisher_spec.rb +2 -2
  96. data/spec/unit/publishers/artifactory_publisher_spec.rb +7 -3
  97. data/spec/unit/publishers/s3_publisher_spec.rb +1 -1
  98. data/spec/unit/s3_helpers_spec.rb +41 -3
  99. data/spec/unit/software_spec.rb +115 -37
  100. data/spec/unit/sugarable_spec.rb +23 -3
  101. data/spec/unit/util_spec.rb +42 -11
  102. metadata +49 -29
@@ -55,7 +55,7 @@ module Omnibus
55
55
  let(:yajl) { generate_software("yajl", "1.1.0", %w{rubygems}) }
56
56
  let(:zlib) { generate_software("zlib", "1.2.6", %w{libgcc}) }
57
57
 
58
- describe '#component_added' do
58
+ describe "#component_added" do
59
59
  it "adds the software to the component list" do
60
60
  library.component_added(erchef)
61
61
  expect(library.components).to eql([erchef])
@@ -68,7 +68,7 @@ module Omnibus
68
68
  end
69
69
  end
70
70
 
71
- describe '#build_order' do
71
+ describe "#build_order" do
72
72
  let(:library) do
73
73
  library = Library.new(project)
74
74
  library.component_added(preparation)
@@ -78,7 +78,7 @@ module Omnibus
78
78
  end
79
79
 
80
80
  describe "#from_hash" do
81
- let(:manifest) {
81
+ let(:manifest) do
82
82
  { manifest_format: 1,
83
83
  build_version: "12.4.0+20150629082811",
84
84
  build_git_revision: "2e763ac957b308ba95cef256c2491a5a55a163cc",
@@ -93,7 +93,7 @@ module Omnibus
93
93
  },
94
94
  },
95
95
  }
96
- }
96
+ end
97
97
 
98
98
  it "has a build_version" do
99
99
  expect(Manifest.from_hash(manifest).build_version).to eq("12.4.0+20150629082811")
@@ -112,7 +112,7 @@ module Omnibus
112
112
  end
113
113
 
114
114
  context "v2 manifest" do
115
- let(:manifest) {
115
+ let(:manifest) do
116
116
  { manifest_format: 2,
117
117
  build_version: "12.4.0+20150629082811",
118
118
  build_git_revision: "2e763ac957b308ba95cef256c2491a5a55a163cc",
@@ -129,7 +129,7 @@ module Omnibus
129
129
  },
130
130
  },
131
131
  }
132
- }
132
+ end
133
133
 
134
134
  it "has a license" do
135
135
  expect(Manifest.from_hash(manifest).license).to eq("Unspecified")
@@ -137,11 +137,11 @@ module Omnibus
137
137
  end
138
138
 
139
139
  context "unsupported manifest" do
140
- let(:manifest) {
140
+ let(:manifest) do
141
141
  {
142
142
  manifest_format: 99,
143
143
  }
144
- }
144
+ end
145
145
 
146
146
  it "raises an error if it doesn't recognize the manifest version" do
147
147
  expect { Manifest.from_hash(manifest) }.to raise_error Manifest::InvalidManifestFormat
@@ -329,20 +329,20 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
329
329
  end
330
330
  end
331
331
 
332
- describe '#name' do
332
+ describe "#name" do
333
333
  it "returns the basename of the package" do
334
334
  expect(subject.name).to eq("package.deb.metadata.json")
335
335
  end
336
336
  end
337
337
 
338
- describe '#path' do
338
+ describe "#path" do
339
339
  it "delegates to .path_for" do
340
340
  expect(described_class).to receive(:path_for).once
341
341
  subject.path
342
342
  end
343
343
  end
344
344
 
345
- describe '#save' do
345
+ describe "#save" do
346
346
  let(:file) { double(File) }
347
347
 
348
348
  before { allow(File).to receive(:open).and_yield(file) }
@@ -353,7 +353,7 @@ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
353
353
  end
354
354
  end
355
355
 
356
- describe '#to_json' do
356
+ describe "#to_json" do
357
357
  it "generates pretty JSON" do
358
358
  expect(subject.to_json.strip).to eq <<-EOH.gsub(/^ {10}/, "").strip
359
359
  {
@@ -18,7 +18,7 @@ describe Omnibus do
18
18
  Omnibus::Config.software_gems(["omnibus-software", "custom-omnibus-software"])
19
19
  end
20
20
 
21
- describe '#which' do
21
+ describe "#which" do
22
22
  it "returns nil when the file does not exist" do
23
23
  stub_env("PATH", nil)
24
24
  expect(subject.which("not_a_real_executable")).to be nil
@@ -33,7 +33,7 @@ describe Omnibus do
33
33
  end
34
34
  end
35
35
 
36
- describe '#project_path' do
36
+ describe "#project_path" do
37
37
  before do
38
38
  allow(Omnibus).to receive(:project_map)
39
39
  .and_return("chef" => "/projects/chef")
@@ -52,7 +52,7 @@ describe Omnibus do
52
52
  end
53
53
  end
54
54
 
55
- describe '#software_path' do
55
+ describe "#software_path" do
56
56
  before do
57
57
  allow(Omnibus).to receive(:software_map)
58
58
  .and_return("chef" => "/software/chef")
@@ -71,7 +71,7 @@ describe Omnibus do
71
71
  end
72
72
  end
73
73
 
74
- describe '#possible_paths_for' do
74
+ describe "#possible_paths_for" do
75
75
  it "searches all paths" do
76
76
  expect(subject.possible_paths_for("file")).to eq(%w{
77
77
  /foo/bar/file
@@ -12,13 +12,13 @@ module Omnibus
12
12
  end
13
13
  end
14
14
 
15
- describe '#name' do
15
+ describe "#name" do
16
16
  it "returns the basename of the file" do
17
17
  expect(subject.name).to eq("thing.deb")
18
18
  end
19
19
  end
20
20
 
21
- describe '#md5' do
21
+ describe "#md5" do
22
22
  let(:md5) { "abcdef123456" }
23
23
 
24
24
  before { allow(subject).to receive(:digest).with(path, :md5).and_return(md5) }
@@ -28,7 +28,7 @@ module Omnibus
28
28
  end
29
29
  end
30
30
 
31
- describe '#sha256' do
31
+ describe "#sha256" do
32
32
  let(:sha256) { "abcdef123456" }
33
33
 
34
34
  before { allow(subject).to receive(:digest).with(path, :sha256).and_return(sha256) }
@@ -38,7 +38,7 @@ module Omnibus
38
38
  end
39
39
  end
40
40
 
41
- describe '#sha512' do
41
+ describe "#sha512" do
42
42
  let(:sha512) { "abcdef123456" }
43
43
 
44
44
  before { allow(subject).to receive(:digest).with(path, :sha512).and_return(sha512) }
@@ -48,7 +48,7 @@ module Omnibus
48
48
  end
49
49
  end
50
50
 
51
- describe '#content' do
51
+ describe "#content" do
52
52
  context "when the file exists" do
53
53
  let(:content) { "BINARY" }
54
54
 
@@ -68,7 +68,7 @@ module Omnibus
68
68
  end
69
69
  end
70
70
 
71
- describe '#metadata' do
71
+ describe "#metadata" do
72
72
  let(:content) { '{ "platform": "ubuntu" }' }
73
73
 
74
74
  before { allow(IO).to receive(:read).and_return(content) }
@@ -34,21 +34,25 @@ module Omnibus
34
34
  end
35
35
  end
36
36
 
37
- describe '#id' do
37
+ describe "#id" do
38
38
  it "is :pkg" do
39
39
  expect(subject.id).to eq(:appx)
40
40
  end
41
41
  end
42
42
 
43
- describe '#package_name' do
43
+ describe "#package_name" do
44
+ before do
45
+ allow(Config).to receive(:windows_arch).and_return(:foo_arch)
46
+ end
47
+
44
48
  it "includes the name, version, and build iteration" do
45
- expect(subject.package_name).to eq("project-1.2.3-2.appx")
49
+ expect(subject.package_name).to eq("project-1.2.3-2-foo_arch.appx")
46
50
  end
47
51
  end
48
52
 
49
- describe '#write_manifest_file' do
53
+ describe "#write_manifest_file" do
50
54
  before do
51
- allow(subject).to receive(:shellout!).and_return(double("output", stdout: "CN=Chef "))
55
+ allow(subject).to receive(:shellout!).and_return(double("output", stdout: 'CN="Chef", O="Chef"'))
52
56
  allow(subject).to receive(:signing_identity).and_return({})
53
57
  end
54
58
 
@@ -63,7 +67,7 @@ module Omnibus
63
67
 
64
68
  expect(contents).to include('Name="project"')
65
69
  expect(contents).to include('Version="1.2.3.2"')
66
- expect(contents).to include('Publisher="CN=Chef"')
70
+ expect(contents).to include('Publisher="CN=&quot;Chef&quot;, O=&quot;Chef&quot;"')
67
71
  expect(contents).to include("<DisplayName>Project</DisplayName>")
68
72
  expect(contents).to include(
69
73
  '<PublisherDisplayName>"Chef Software &lt;maintainers@chef.io&gt;"</PublisherDisplayName>'
@@ -71,7 +75,7 @@ module Omnibus
71
75
  end
72
76
  end
73
77
 
74
- describe '#windows_package_version' do
78
+ describe "#windows_package_version" do
75
79
  context "when the project build_version semver" do
76
80
  it "returns the right value" do
77
81
  expect(subject.windows_package_version).to eq("1.2.3.2")
@@ -87,7 +91,7 @@ module Omnibus
87
91
  end
88
92
  end
89
93
 
90
- describe '#pack_command' do
94
+ describe "#pack_command" do
91
95
  it "returns a String" do
92
96
  expect(subject.pack_command("foo")).to be_a(String)
93
97
  end
@@ -125,7 +129,7 @@ module Omnibus
125
129
  allow(subject).to receive(:shellout!)
126
130
  end
127
131
 
128
- describe '#timestamp_servers' do
132
+ describe "#timestamp_servers" do
129
133
  it "defaults to using ['http://timestamp.digicert.com','http://timestamp.verisign.com/scripts/timestamp.dll']" do
130
134
  subject.signing_identity("foo")
131
135
  expect(subject).to receive(:try_sign).with(appx, "http://timestamp.digicert.com").and_return(false)
@@ -133,20 +137,20 @@ module Omnibus
133
137
  subject.sign_package(appx)
134
138
  end
135
139
 
136
- it 'uses the timestamp server if provided through the #timestamp_server dsl' do
140
+ it "uses the timestamp server if provided through the #timestamp_server dsl" do
137
141
  subject.signing_identity("foo", timestamp_servers: "http://fooserver")
138
142
  expect(subject).to receive(:try_sign).with(appx, "http://fooserver").and_return(true)
139
143
  subject.sign_package(appx)
140
144
  end
141
145
 
142
- it 'tries all timestamp server if provided through the #timestamp_server dsl' do
146
+ it "tries all timestamp server if provided through the #timestamp_server dsl" do
143
147
  subject.signing_identity("foo", timestamp_servers: ["http://fooserver", "http://barserver"])
144
148
  expect(subject).to receive(:try_sign).with(appx, "http://fooserver").and_return(false)
145
149
  expect(subject).to receive(:try_sign).with(appx, "http://barserver").and_return(true)
146
150
  subject.sign_package(appx)
147
151
  end
148
152
 
149
- it 'tries all timestamp server if provided through the #timestamp_servers dsl and stops at the first available' do
153
+ it "tries all timestamp server if provided through the #timestamp_servers dsl and stops at the first available" do
150
154
  subject.signing_identity("foo", timestamp_servers: ["http://fooserver", "http://barserver"])
151
155
  expect(subject).to receive(:try_sign).with(appx, "http://fooserver").and_return(true)
152
156
  expect(subject).not_to receive(:try_sign).with(appx, "http://barserver")
@@ -71,7 +71,7 @@ module Omnibus
71
71
  end
72
72
  end
73
73
 
74
- describe '#install_dir' do
74
+ describe "#install_dir" do
75
75
  it "is a DSL method" do
76
76
  expect(subject).to have_exposed_method(:install_dir)
77
77
  end
@@ -81,13 +81,13 @@ module Omnibus
81
81
  end
82
82
  end
83
83
 
84
- describe '#windows_safe_path' do
84
+ describe "#windows_safe_path" do
85
85
  it "is a DSL method" do
86
86
  expect(subject).to have_exposed_method(:windows_safe_path)
87
87
  end
88
88
  end
89
89
 
90
- describe '#run!' do
90
+ describe "#run!" do
91
91
  before do
92
92
  allow(subject).to receive(:remove_directory)
93
93
  allow(Metadata).to receive(:generate)
@@ -105,14 +105,14 @@ module Omnibus
105
105
  end
106
106
  end
107
107
 
108
- describe '#staging_dir' do
108
+ describe "#staging_dir" do
109
109
  it "creates a temporary directory" do
110
110
  expect(Dir).to receive(:mktmpdir)
111
111
  subject.send(:staging_dir)
112
112
  end
113
113
  end
114
114
 
115
- describe '#resource_path' do
115
+ describe "#resource_path" do
116
116
  let(:id) { :base }
117
117
  before { allow(subject).to receive(:id).and_return(id) }
118
118
 
@@ -32,13 +32,13 @@ module Omnibus
32
32
  create_directory(subject.scripts_staging_dir)
33
33
  end
34
34
 
35
- describe '#id' do
35
+ describe "#id" do
36
36
  it "is :bff" do
37
37
  expect(subject.id).to eq(:bff)
38
38
  end
39
39
  end
40
40
 
41
- describe '#package_name' do
41
+ describe "#package_name" do
42
42
  before do
43
43
  allow(subject).to receive(:safe_architecture).and_return("x86_64")
44
44
  end
@@ -48,19 +48,19 @@ module Omnibus
48
48
  end
49
49
  end
50
50
 
51
- describe '#scripts_install_dir' do
51
+ describe "#scripts_install_dir" do
52
52
  it "is nested inside the project install_dir" do
53
53
  expect(subject.scripts_install_dir).to start_with(project.install_dir)
54
54
  end
55
55
  end
56
56
 
57
- describe '#scripts_staging_dir' do
57
+ describe "#scripts_staging_dir" do
58
58
  it "is nested inside the staging_dir" do
59
59
  expect(subject.scripts_staging_dir).to start_with(staging_dir)
60
60
  end
61
61
  end
62
62
 
63
- describe '#write_scripts' do
63
+ describe "#write_scripts" do
64
64
  context "when scripts are given" do
65
65
  let(:scripts) { %w{ preinst postinst prerm postrm } }
66
66
  before do
@@ -83,7 +83,7 @@ module Omnibus
83
83
  end
84
84
  end
85
85
 
86
- describe '#write_gen_template' do
86
+ describe "#write_gen_template" do
87
87
  before do
88
88
  allow(subject).to receive(:safe_architecture).and_return("x86_64")
89
89
  end
@@ -191,6 +191,36 @@ module Omnibus
191
191
  end
192
192
  end
193
193
 
194
+ context "when paths with invalid characters are present", if: !windows? do
195
+ let(:contents) do
196
+ subject.write_gen_template
197
+ File.read(gen_file)
198
+ end
199
+
200
+ before do
201
+ create_file("#{staging_dir}/file with_a_space")
202
+ create_file("#{staging_dir}/file_with_{left_brace")
203
+ create_file("#{staging_dir}/file_with_}right_brace")
204
+ create_file("#{staging_dir}/file_that_meets_expectations")
205
+ end
206
+
207
+ it "includes a file that does not include invalid characters" do
208
+ expect(contents).to include("/file_that_meets_expectations")
209
+ end
210
+
211
+ it "does not include a file with spaces in the path" do
212
+ expect(contents).to_not include("/file with_a_space")
213
+ end
214
+
215
+ it "does not include a file with left braces in the path" do
216
+ expect(contents).to_not include("/file_with_{left_brace")
217
+ end
218
+
219
+ it "does not include a file with right braces in the path" do
220
+ expect(contents).to_not include("/file_with_}right_brace")
221
+ end
222
+ end
223
+
194
224
  context "when script files are present" do
195
225
  before do
196
226
  create_file("#{subject.scripts_staging_dir}/preinst")
@@ -224,13 +254,13 @@ module Omnibus
224
254
  end
225
255
  end
226
256
 
227
- describe '#create_bff_file' do
257
+ describe "#create_bff_file" do
228
258
  # Need to mock out the id calls
229
- let(:id_shellout) {
259
+ let(:id_shellout) do
230
260
  shellout_mock = double("shellout_mock")
231
261
  allow(shellout_mock).to receive(:stdout).and_return("300")
232
262
  shellout_mock
233
- }
263
+ end
234
264
 
235
265
  before do
236
266
  allow(subject).to receive(:shellout!)
@@ -240,7 +270,7 @@ module Omnibus
240
270
  allow(subject).to receive(:shellout!)
241
271
  .with("id -g").and_return(id_shellout)
242
272
 
243
- create_file(File.join(staging_dir, ".info", "#{project.name}.inventory")) {
273
+ create_file(File.join(staging_dir, ".info", "#{project.name}.inventory")) do
244
274
  <<-INVENTORY.gsub(/^\s{12}/, "")
245
275
  /opt/project/version-manifest.txt:
246
276
  owner = root
@@ -251,7 +281,7 @@ module Omnibus
251
281
  size = 1906
252
282
  checksum = "02776 2 "
253
283
  INVENTORY
254
- }
284
+ end
255
285
  create_file("#{staging_dir}/file") { "http://goo.gl/TbkO01" }
256
286
  end
257
287
 
@@ -307,7 +337,7 @@ module Omnibus
307
337
  end
308
338
  end
309
339
 
310
- describe '#safe_base_package_name' do
340
+ describe "#safe_base_package_name" do
311
341
  context 'when the project name is "safe"' do
312
342
  it "returns the value without logging a message" do
313
343
  expect(subject.safe_base_package_name).to eq("project")
@@ -328,20 +358,20 @@ module Omnibus
328
358
  end
329
359
  end
330
360
 
331
- describe '#create_bff_file_name' do
361
+ describe "#create_bff_file_name" do
332
362
  it "constructs the proper package name" do
333
363
  expect(subject.create_bff_file_name).to eq("project-1.2.3-2.x86_64.bff")
334
364
  end
335
365
 
336
366
  end
337
367
 
338
- describe '#bff_version' do
368
+ describe "#bff_version" do
339
369
  it "returns the build version up with the build iteration" do
340
370
  expect(subject.bff_version).to eq("1.2.3.2")
341
371
  end
342
372
  end
343
373
 
344
- describe '#safe_architecture' do
374
+ describe "#safe_architecture" do
345
375
  before do
346
376
  stub_ohai(platform: "ubuntu", version: "12.04") do |data|
347
377
  data["kernel"]["machine"] = "i386"