omnibus 5.4.0 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -3
  3. data/CHANGELOG.md +21 -0
  4. data/Gemfile +8 -5
  5. data/README.md +3 -1
  6. data/Rakefile +20 -13
  7. data/appveyor.yml +4 -3
  8. data/bin/omnibus +3 -3
  9. data/features/commands/manifest.feature +19 -5
  10. data/features/step_definitions/generator_steps.rb +5 -6
  11. data/features/support/env.rb +4 -4
  12. data/lib/omnibus/build_version.rb +14 -14
  13. data/lib/omnibus/build_version_dsl.rb +3 -3
  14. data/lib/omnibus/builder.rb +50 -61
  15. data/lib/omnibus/changelog.rb +2 -2
  16. data/lib/omnibus/changelog_printer.rb +4 -4
  17. data/lib/omnibus/cleaner.rb +4 -4
  18. data/lib/omnibus/cli/base.rb +15 -15
  19. data/lib/omnibus/cli/cache.rb +13 -13
  20. data/lib/omnibus/cli/changelog.rb +8 -9
  21. data/lib/omnibus/cli/publish.rb +12 -13
  22. data/lib/omnibus/cli.rb +26 -27
  23. data/lib/omnibus/compressor.rb +6 -6
  24. data/lib/omnibus/compressors/base.rb +7 -2
  25. data/lib/omnibus/compressors/dmg.rb +12 -12
  26. data/lib/omnibus/compressors/null.rb +1 -1
  27. data/lib/omnibus/compressors/tgz.rb +8 -8
  28. data/lib/omnibus/config.rb +37 -26
  29. data/lib/omnibus/core_extensions/open_uri.rb +3 -3
  30. data/lib/omnibus/core_extensions.rb +1 -1
  31. data/lib/omnibus/digestable.rb +5 -4
  32. data/lib/omnibus/download_helpers.rb +7 -6
  33. data/lib/omnibus/exceptions.rb +29 -13
  34. data/lib/omnibus/fetcher.rb +0 -1
  35. data/lib/omnibus/fetchers/git_fetcher.rb +7 -7
  36. data/lib/omnibus/fetchers/net_fetcher.rb +19 -19
  37. data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
  38. data/lib/omnibus/file_syncer.rb +3 -3
  39. data/lib/omnibus/generator.rb +60 -47
  40. data/lib/omnibus/git_cache.rb +33 -22
  41. data/lib/omnibus/git_repository.rb +5 -5
  42. data/lib/omnibus/health_check.rb +122 -119
  43. data/lib/omnibus/instrumentation.rb +1 -1
  44. data/lib/omnibus/licensing.rb +348 -60
  45. data/lib/omnibus/logger.rb +12 -9
  46. data/lib/omnibus/logging.rb +1 -1
  47. data/lib/omnibus/manifest.rb +4 -4
  48. data/lib/omnibus/manifest_diff.rb +6 -7
  49. data/lib/omnibus/manifest_entry.rb +1 -1
  50. data/lib/omnibus/metadata.rb +36 -36
  51. data/lib/omnibus/ohai.rb +6 -7
  52. data/lib/omnibus/package.rb +1 -1
  53. data/lib/omnibus/packager.rb +37 -28
  54. data/lib/omnibus/packagers/appx.rb +86 -0
  55. data/lib/omnibus/packagers/base.rb +21 -18
  56. data/lib/omnibus/packagers/bff.rb +22 -24
  57. data/lib/omnibus/packagers/deb.rb +20 -20
  58. data/lib/omnibus/packagers/ips.rb +18 -17
  59. data/lib/omnibus/packagers/makeself.rb +7 -7
  60. data/lib/omnibus/packagers/msi.rb +38 -193
  61. data/lib/omnibus/packagers/pkg.rb +16 -16
  62. data/lib/omnibus/packagers/rpm.rb +53 -54
  63. data/lib/omnibus/packagers/solaris.rb +14 -14
  64. data/lib/omnibus/packagers/windows_base.rb +192 -0
  65. data/lib/omnibus/project.rb +45 -43
  66. data/lib/omnibus/publisher.rb +3 -3
  67. data/lib/omnibus/publishers/artifactory_publisher.rb +39 -39
  68. data/lib/omnibus/publishers/s3_publisher.rb +7 -7
  69. data/lib/omnibus/reports.rb +10 -10
  70. data/lib/omnibus/s3_cache.rb +7 -7
  71. data/lib/omnibus/s3_helpers.rb +8 -7
  72. data/lib/omnibus/semantic_version.rb +1 -1
  73. data/lib/omnibus/software.rb +131 -81
  74. data/lib/omnibus/sugarable.rb +10 -10
  75. data/lib/omnibus/templating.rb +5 -5
  76. data/lib/omnibus/thread_pool.rb +1 -1
  77. data/lib/omnibus/util.rb +5 -5
  78. data/lib/omnibus/version.rb +1 -1
  79. data/lib/omnibus.rb +65 -65
  80. data/omnibus.gemspec +34 -32
  81. data/resources/appx/AppxManifest.xml.erb +18 -0
  82. data/resources/appx/assets/clear.png +0 -0
  83. data/spec/fixtures/licensing/license_scout/snoopy/ruby_bundler-bundler-audit-0.5.0-COPYING.txt +674 -0
  84. data/spec/fixtures/licensing/license_scout/snoopy/ruby_bundler-inifile-3.0.0-README.md +215 -0
  85. data/spec/fixtures/licensing/license_scout/snoopy/snoopy-dependency-licenses.json +24 -0
  86. data/spec/fixtures/licensing/license_scout/zlib/ruby_bundler-inifile-3.0.0-README.md +215 -0
  87. data/spec/fixtures/licensing/license_scout/zlib/ruby_bundler-mime-types-3.1-Licence.rdoc +25 -0
  88. data/spec/fixtures/licensing/license_scout/zlib/ruby_bundler-mini_portile2-2.1.0-LICENSE.txt +20 -0
  89. data/spec/fixtures/licensing/license_scout/zlib/zlib-dependency-licenses.json +32 -0
  90. data/spec/functional/builder_spec.rb +149 -150
  91. data/spec/functional/fetchers/git_fetcher_spec.rb +69 -71
  92. data/spec/functional/fetchers/net_fetcher_spec.rb +79 -79
  93. data/spec/functional/fetchers/path_fetcher_spec.rb +19 -20
  94. data/spec/functional/file_syncer_spec.rb +74 -74
  95. data/spec/functional/licensing_spec.rb +344 -35
  96. data/spec/functional/templating_spec.rb +17 -17
  97. data/spec/spec_helper.rb +20 -20
  98. data/spec/support/examples.rb +21 -15
  99. data/spec/support/file_helpers.rb +1 -1
  100. data/spec/support/git_helpers.rb +37 -37
  101. data/spec/support/matchers.rb +3 -3
  102. data/spec/support/ohai_helpers.rb +4 -4
  103. data/spec/support/path_helpers.rb +2 -2
  104. data/spec/support/shell_helpers.rb +2 -2
  105. data/spec/unit/build_version_dsl_spec.rb +5 -5
  106. data/spec/unit/build_version_spec.rb +63 -63
  107. data/spec/unit/builder_spec.rb +86 -70
  108. data/spec/unit/changelog_spec.rb +4 -4
  109. data/spec/unit/changelogprinter_spec.rb +130 -0
  110. data/spec/unit/cleanroom_spec.rb +11 -11
  111. data/spec/unit/compressor_spec.rb +16 -16
  112. data/spec/unit/compressors/base_spec.rb +6 -6
  113. data/spec/unit/compressors/dmg_spec.rb +76 -76
  114. data/spec/unit/compressors/null_spec.rb +4 -4
  115. data/spec/unit/compressors/tgz_spec.rb +20 -20
  116. data/spec/unit/config_spec.rb +44 -43
  117. data/spec/unit/digestable_spec.rb +13 -13
  118. data/spec/unit/fetcher_spec.rb +11 -12
  119. data/spec/unit/fetchers/git_fetcher_spec.rb +31 -31
  120. data/spec/unit/fetchers/net_fetcher_spec.rb +172 -173
  121. data/spec/unit/fetchers/path_fetcher_spec.rb +18 -18
  122. data/spec/unit/generator_spec.rb +38 -38
  123. data/spec/unit/git_cache_spec.rb +56 -54
  124. data/spec/unit/git_repository_spec.rb +2 -2
  125. data/spec/unit/health_check_spec.rb +40 -40
  126. data/spec/unit/library_spec.rb +35 -35
  127. data/spec/unit/manifest_diff_spec.rb +10 -11
  128. data/spec/unit/manifest_spec.rb +17 -17
  129. data/spec/unit/metadata_spec.rb +152 -152
  130. data/spec/unit/ohai_spec.rb +5 -5
  131. data/spec/unit/omnibus_spec.rb +31 -31
  132. data/spec/unit/package_spec.rb +20 -20
  133. data/spec/unit/packager_spec.rb +48 -42
  134. data/spec/unit/packagers/appx_spec.rb +165 -0
  135. data/spec/unit/packagers/base_spec.rb +34 -34
  136. data/spec/unit/packagers/bff_spec.rb +60 -60
  137. data/spec/unit/packagers/deb_spec.rb +71 -71
  138. data/spec/unit/packagers/ips_spec.rb +45 -45
  139. data/spec/unit/packagers/makeself_spec.rb +22 -22
  140. data/spec/unit/packagers/msi_spec.rb +141 -147
  141. data/spec/unit/packagers/pkg_spec.rb +59 -60
  142. data/spec/unit/packagers/rpm_spec.rb +125 -126
  143. data/spec/unit/packagers/solaris_spec.rb +52 -52
  144. data/spec/unit/project_spec.rb +137 -135
  145. data/spec/unit/publisher_spec.rb +70 -70
  146. data/spec/unit/publishers/artifactory_publisher_spec.rb +85 -85
  147. data/spec/unit/publishers/s3_publisher_spec.rb +36 -36
  148. data/spec/unit/s3_cacher_spec.rb +34 -34
  149. data/spec/unit/s3_helpers_spec.rb +6 -6
  150. data/spec/unit/semantic_version_spec.rb +2 -2
  151. data/spec/unit/software_spec.rb +346 -384
  152. data/spec/unit/sugarable_spec.rb +10 -10
  153. data/spec/unit/util_spec.rb +60 -60
  154. metadata +54 -6
  155. data/.rubocop.yml +0 -48
@@ -1,19 +1,19 @@
1
- require 'omnibus/util'
1
+ require "omnibus/util"
2
2
 
3
3
  module Omnibus
4
4
  class GitRepository
5
5
  include Util
6
6
 
7
- def initialize(path='./')
7
+ def initialize(path = "./")
8
8
  @repo_path = path
9
9
  end
10
10
 
11
11
  def authors(start_ref, end_ref)
12
- formatted_log_between(start_ref, end_ref, '%aN').lines.map(&:chomp).uniq
12
+ formatted_log_between(start_ref, end_ref, "%aN").lines.map(&:chomp).uniq
13
13
  end
14
14
 
15
15
  def commit_messages(start_ref, end_ref)
16
- formatted_log_between(start_ref, end_ref, '%B').lines.to_a
16
+ formatted_log_between(start_ref, end_ref, "%B").lines.to_a
17
17
  end
18
18
 
19
19
  def revision
@@ -21,7 +21,7 @@ module Omnibus
21
21
  end
22
22
 
23
23
  def latest_tag
24
- git('describe --abbrev=0').chomp
24
+ git("describe --abbrev=0").chomp
25
25
  end
26
26
 
27
27
  def file_at_revision(path, revision)
@@ -14,15 +14,16 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require 'omnibus/sugarable'
17
+ require "omnibus/sugarable"
18
18
  begin
19
- require 'pedump'
19
+ require "pedump"
20
20
  rescue LoadError
21
21
  STDERR.puts "pedump not found - windows health checks disabled"
22
22
  end
23
23
 
24
24
  module Omnibus
25
25
  class HealthCheck
26
+ include Instrumentation
26
27
  include Logging
27
28
  include Util
28
29
  include Sugarable
@@ -157,7 +158,7 @@ module Omnibus
157
158
  /libmd\.so/,
158
159
  ].freeze
159
160
 
160
- IGNORED_ENDINGS = %w(
161
+ IGNORED_ENDINGS = %w{
161
162
  .[ch]
162
163
  .e*rb
163
164
  .gemspec
@@ -191,14 +192,14 @@ module Omnibus
191
192
  README
192
193
  Rakefile
193
194
  VERSION
194
- ).freeze
195
+ }.freeze
195
196
 
196
- IGNORED_PATTERNS = %w(
197
+ IGNORED_PATTERNS = %w{
197
198
  /share/doc/
198
199
  /share/postgresql/
199
200
  /share/terminfo/
200
201
  /terminfo/
201
- ).freeze
202
+ }.freeze
202
203
 
203
204
  class << self
204
205
  # @see (HealthCheck#new)
@@ -235,142 +236,144 @@ module Omnibus
235
236
  # if the healthchecks pass
236
237
  #
237
238
  def run!
238
- log.info(log_key) {"Running health on #{project.name}"}
239
- bad_libs = case Ohai['platform']
240
- when 'mac_os_x'
241
- health_check_otool
242
- when 'aix'
243
- health_check_aix
244
- when 'windows'
245
- # TODO: objdump -p will provided a very limited check of
246
- # explicit dependencies on windows. Most dependencies are
247
- # implicit and hence not detected.
248
- log.warn(log_key) { 'Skipping dependency health checks on Windows.' }
249
- {}
250
- else
251
- health_check_ldd
252
- end
253
-
254
- unresolved = []
255
- unreliable = []
256
- detail = []
257
-
258
- if bad_libs.keys.length > 0
259
- bad_libs.each do |name, lib_hash|
260
- lib_hash.each do |lib, linked_libs|
261
- linked_libs.each do |linked, count|
262
- if linked =~ /not found/
263
- unresolved << lib unless unresolved.include? lib
264
- else
265
- unreliable << linked unless unreliable.include? linked
239
+ measure("Health check time") do
240
+ log.info(log_key) { "Running health on #{project.name}" }
241
+ bad_libs = case Ohai["platform"]
242
+ when "mac_os_x"
243
+ health_check_otool
244
+ when "aix"
245
+ health_check_aix
246
+ when "windows"
247
+ # TODO: objdump -p will provided a very limited check of
248
+ # explicit dependencies on windows. Most dependencies are
249
+ # implicit and hence not detected.
250
+ log.warn(log_key) { "Skipping dependency health checks on Windows." }
251
+ {}
252
+ else
253
+ health_check_ldd
254
+ end
255
+
256
+ unresolved = []
257
+ unreliable = []
258
+ detail = []
259
+
260
+ if bad_libs.keys.length > 0
261
+ bad_libs.each do |name, lib_hash|
262
+ lib_hash.each do |lib, linked_libs|
263
+ linked_libs.each do |linked, count|
264
+ if linked =~ /not found/
265
+ unresolved << lib unless unresolved.include? lib
266
+ else
267
+ unreliable << linked unless unreliable.include? linked
268
+ end
269
+ detail << "#{name}|#{lib}|#{linked}|#{count}"
266
270
  end
267
- detail << "#{name}|#{lib}|#{linked}|#{count}"
268
271
  end
269
272
  end
270
- end
271
-
272
- log.error(log_key) { 'Failed!' }
273
- bad_omnibus_libs, bad_omnibus_bins = bad_libs.keys.partition { |k| k.include? 'embedded/lib' }
274
273
 
275
- log.error(log_key) do
276
- out = "The following libraries have unsafe or unmet dependencies:\n"
274
+ log.error(log_key) { "Failed!" }
275
+ bad_omnibus_libs, bad_omnibus_bins = bad_libs.keys.partition { |k| k.include? "embedded/lib" }
277
276
 
278
- bad_omnibus_libs.each do |lib|
279
- out << " --> #{lib}\n"
280
- end
281
-
282
- out
283
- end
277
+ log.error(log_key) do
278
+ out = "The following libraries have unsafe or unmet dependencies:\n"
284
279
 
285
- log.error(log_key) do
286
- out = "The following binaries have unsafe or unmet dependencies:\n"
280
+ bad_omnibus_libs.each do |lib|
281
+ out << " --> #{lib}\n"
282
+ end
287
283
 
288
- bad_omnibus_bins.each do |bin|
289
- out << " --> #{bin}\n"
284
+ out
290
285
  end
291
286
 
292
- out
293
- end
294
-
295
- if unresolved.length > 0
296
287
  log.error(log_key) do
297
- out = "The following requirements could not be resolved:\n"
288
+ out = "The following binaries have unsafe or unmet dependencies:\n"
298
289
 
299
- unresolved.each do |lib|
300
- out << " --> #{lib}\n"
290
+ bad_omnibus_bins.each do |bin|
291
+ out << " --> #{bin}\n"
301
292
  end
302
293
 
303
294
  out
304
295
  end
305
- end
306
296
 
307
- if unreliable.length > 0
308
- log.error(log_key) do
309
- out = "The following libraries cannot be guaranteed to be on "
310
- out << "target systems:\n"
297
+ if unresolved.length > 0
298
+ log.error(log_key) do
299
+ out = "The following requirements could not be resolved:\n"
311
300
 
312
- unreliable.each do |lib|
313
- out << " --> #{lib}\n"
301
+ unresolved.each do |lib|
302
+ out << " --> #{lib}\n"
303
+ end
304
+
305
+ out
314
306
  end
307
+ end
315
308
 
316
- out
309
+ if unreliable.length > 0
310
+ log.error(log_key) do
311
+ out = "The following libraries cannot be guaranteed to be on "
312
+ out << "target systems:\n"
313
+
314
+ unreliable.each do |lib|
315
+ out << " --> #{lib}\n"
316
+ end
317
+
318
+ out
319
+ end
317
320
  end
318
- end
319
321
 
320
- log.error(log_key) do
321
- out = "The precise failures were:\n"
322
+ log.error(log_key) do
323
+ out = "The precise failures were:\n"
324
+
325
+ detail.each do |line|
326
+ item, dependency, location, count = line.split("|")
327
+ reason = location =~ /not found/ ? "Unresolved dependency" : "Unsafe dependency"
322
328
 
323
- detail.each do |line|
324
- item, dependency, location, count = line.split('|')
325
- reason = location =~ /not found/ ? 'Unresolved dependency' : 'Unsafe dependency'
329
+ out << " --> #{item}\n"
330
+ out << " DEPENDS ON: #{dependency}\n"
331
+ out << " COUNT: #{count}\n"
332
+ out << " PROVIDED BY: #{location}\n"
333
+ out << " FAILED BECAUSE: #{reason}\n"
334
+ end
326
335
 
327
- out << " --> #{item}\n"
328
- out << " DEPENDS ON: #{dependency}\n"
329
- out << " COUNT: #{count}\n"
330
- out << " PROVIDED BY: #{location}\n"
331
- out << " FAILED BECAUSE: #{reason}\n"
336
+ out
332
337
  end
333
338
 
334
- out
339
+ raise HealthCheckFailed
335
340
  end
336
341
 
337
- raise HealthCheckFailed
338
- end
342
+ conflict_map = {}
339
343
 
340
- conflict_map = {}
344
+ conflict_map = relocation_check if relocation_checkable?
341
345
 
342
- conflict_map = relocation_check if relocation_checkable?
346
+ if conflict_map.keys.length > 0
347
+ log.warn(log_key) { "Multiple dlls with overlapping images detected" }
343
348
 
344
- if conflict_map.keys.length > 0
345
- log.warn(log_key) { 'Multiple dlls with overlapping images detected' }
349
+ conflict_map.each do |lib_name, data|
350
+ base = data[:base]
351
+ size = data[:size]
352
+ next_valid_base = data[:base] + data[:size]
346
353
 
347
- conflict_map.each do |lib_name, data|
348
- base = data[:base]
349
- size = data[:size]
350
- next_valid_base = data[:base] + data[:size]
354
+ log.warn(log_key) do
355
+ out = "Overlapping dll detected:\n"
356
+ out << " #{lib_name} :\n"
357
+ out << " IMAGE BASE: #{hex}\n" % base
358
+ out << " IMAGE SIZE: #{hex} (#{size} bytes)\n" % size
359
+ out << " NEXT VALID BASE: #{hex}\n" % next_valid_base
360
+ out << " CONFLICTS:\n"
351
361
 
352
- log.warn(log_key) do
353
- out = "Overlapping dll detected:\n"
354
- out << " #{lib_name} :\n"
355
- out << " IMAGE BASE: #{hex}\n" % base
356
- out << " IMAGE SIZE: #{hex} (#{size} bytes)\n" % size
357
- out << " NEXT VALID BASE: #{hex}\n" % next_valid_base
358
- out << " CONFLICTS:\n"
359
-
360
- data[:conflicts].each do |conflict_name|
361
- cbase = conflict_map[conflict_name][:base]
362
- csize = conflict_map[conflict_name][:size]
363
- out << " - #{conflict_name} #{hex} + #{hex}\n" % [cbase, csize]
364
- end
362
+ data[:conflicts].each do |conflict_name|
363
+ cbase = conflict_map[conflict_name][:base]
364
+ csize = conflict_map[conflict_name][:size]
365
+ out << " - #{conflict_name} #{hex} + #{hex}\n" % [cbase, csize]
366
+ end
365
367
 
366
- out
368
+ out
369
+ end
367
370
  end
371
+
372
+ # Don't raise an error yet. This is only bad for FIPS mode.
368
373
  end
369
374
 
370
- # Don't raise an error yet. This is only bad for FIPS mode.
375
+ true
371
376
  end
372
-
373
- true
374
377
  end
375
378
 
376
379
  # Ensure the method relocation_check is able to run
@@ -381,7 +384,7 @@ module Omnibus
381
384
  return false unless windows?
382
385
 
383
386
  begin
384
- require 'pedump'
387
+ require "pedump"
385
388
  true
386
389
  rescue LoadError
387
390
  false
@@ -403,7 +406,7 @@ module Omnibus
403
406
  Dir.glob("#{embedded_bin}/*.dll") do |lib_path|
404
407
  log.debug(log_key) { "Analyzing dependencies for #{lib_path}" }
405
408
 
406
- File.open(lib_path, 'rb') do |f|
409
+ File.open(lib_path, "rb") do |f|
407
410
  dump = PEdump.new(lib_path)
408
411
  pe = dump.pe f
409
412
 
@@ -418,7 +421,7 @@ module Omnibus
418
421
  # This can be done more smartly but O(n^2) is just fine for n = small
419
422
  conflict_map.each do |candidate_name, details|
420
423
  unless details[:base] >= base + size ||
421
- details[:base] + details[:size] <= base
424
+ details[:base] + details[:size] <= base
422
425
  details[:conflicts] << lib_name
423
426
  conflicts << candidate_name
424
427
  end
@@ -494,14 +497,14 @@ module Omnibus
494
497
 
495
498
  #
496
499
  # Run healthchecks against ldd.
497
- #
500
+ #
498
501
  # @return [Hash<String, Hash<String, Hash<String, Int>>>]
499
502
  # the bad libraries (library_name -> dependency_name -> satisfied_lib_path -> count)
500
503
  #
501
504
  def health_check_ldd
502
- regexp_ends = '.*(' + IGNORED_ENDINGS.map { |e| e.gsub(/\./, '\.') }.join('|') + ')$'
503
- regexp_patterns = IGNORED_PATTERNS.map { |e| '.*' + e.gsub(/\//, '\/') + '.*' }.join('|')
504
- regexp = regexp_ends + '|' + regexp_patterns
505
+ regexp_ends = ".*(" + IGNORED_ENDINGS.map { |e| e.gsub(/\./, '\.') }.join("|") + ")$"
506
+ regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(/\//, '\/') + ".*" }.join("|")
507
+ regexp = regexp_ends + "|" + regexp_patterns
505
508
 
506
509
  current_library = nil
507
510
  bad_libs = {}
@@ -592,18 +595,18 @@ module Omnibus
592
595
  def check_for_bad_library(bad_libs, current_library, name, linked)
593
596
  safe = nil
594
597
 
595
- whitelist_libs = case Ohai['platform']
596
- when 'arch'
598
+ whitelist_libs = case Ohai["platform"]
599
+ when "arch"
597
600
  ARCH_WHITELIST_LIBS
598
- when 'mac_os_x'
601
+ when "mac_os_x"
599
602
  MAC_WHITELIST_LIBS
600
- when 'solaris2'
603
+ when "solaris2"
601
604
  SOLARIS_WHITELIST_LIBS
602
- when 'smartos'
605
+ when "smartos"
603
606
  SMARTOS_WHITELIST_LIBS
604
- when 'freebsd'
607
+ when "freebsd"
605
608
  FREEBSD_WHITELIST_LIBS
606
- when 'aix'
609
+ when "aix"
607
610
  AIX_WHITELIST_LIBS
608
611
  else
609
612
  WHITELIST_LIBS
@@ -20,7 +20,7 @@ module Omnibus
20
20
 
21
21
  def measure(label, &block)
22
22
  start = Time.now
23
- block.call
23
+ yield
24
24
  ensure
25
25
  elapsed = Time.now - start
26
26
  log.info(log_key) { "#{label}: #{elapsed.to_f.round(4)}s" }