omnibus 6.1.7 → 8.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +0 -4
  3. data/README.md +54 -12
  4. data/Rakefile +1 -1
  5. data/bin/omnibus +1 -1
  6. data/lib/omnibus.rb +2 -2
  7. data/lib/omnibus/build_version.rb +1 -1
  8. data/lib/omnibus/build_version_dsl.rb +6 -7
  9. data/lib/omnibus/builder.rb +10 -9
  10. data/lib/omnibus/changelog_printer.rb +7 -4
  11. data/lib/omnibus/cleaner.rb +4 -1
  12. data/lib/omnibus/cli.rb +2 -2
  13. data/lib/omnibus/cli/changelog.rb +25 -25
  14. data/lib/omnibus/compressor.rb +2 -2
  15. data/lib/omnibus/compressors/base.rb +2 -2
  16. data/lib/omnibus/compressors/dmg.rb +8 -6
  17. data/lib/omnibus/compressors/tgz.rb +2 -2
  18. data/lib/omnibus/config.rb +13 -3
  19. data/lib/omnibus/core_extensions/open_uri.rb +1 -1
  20. data/lib/omnibus/digestable.rb +2 -2
  21. data/lib/omnibus/download_helpers.rb +6 -2
  22. data/lib/omnibus/fetchers/file_fetcher.rb +1 -1
  23. data/lib/omnibus/fetchers/git_fetcher.rb +1 -0
  24. data/lib/omnibus/fetchers/net_fetcher.rb +3 -4
  25. data/lib/omnibus/fetchers/path_fetcher.rb +1 -1
  26. data/lib/omnibus/file_syncer.rb +1 -1
  27. data/lib/omnibus/generator.rb +2 -2
  28. data/lib/omnibus/generator_files/README.md.erb +20 -16
  29. data/lib/omnibus/generator_files/config/software/preparation.rb.erb +1 -1
  30. data/lib/omnibus/generator_files/omnibus.rb.erb +5 -4
  31. data/lib/omnibus/git_cache.rb +2 -2
  32. data/lib/omnibus/health_check.rb +3 -1
  33. data/lib/omnibus/licensing.rb +5 -6
  34. data/lib/omnibus/logger.rb +3 -2
  35. data/lib/omnibus/manifest.rb +2 -2
  36. data/lib/omnibus/metadata.rb +2 -2
  37. data/lib/omnibus/ohai.rb +1 -1
  38. data/lib/omnibus/package.rb +1 -1
  39. data/lib/omnibus/packager.rb +6 -14
  40. data/lib/omnibus/packagers/appx.rb +1 -2
  41. data/lib/omnibus/packagers/base.rb +2 -1
  42. data/lib/omnibus/packagers/bff.rb +6 -8
  43. data/lib/omnibus/packagers/deb.rb +7 -10
  44. data/lib/omnibus/packagers/ips.rb +3 -6
  45. data/lib/omnibus/packagers/makeself.rb +1 -2
  46. data/lib/omnibus/packagers/msi.rb +13 -12
  47. data/lib/omnibus/packagers/pkg.rb +125 -9
  48. data/lib/omnibus/packagers/rpm.rb +11 -12
  49. data/lib/omnibus/packagers/solaris.rb +5 -5
  50. data/lib/omnibus/packagers/windows_base.rb +7 -6
  51. data/lib/omnibus/project.rb +3 -2
  52. data/lib/omnibus/publisher.rb +2 -2
  53. data/lib/omnibus/publishers/artifactory_publisher.rb +2 -2
  54. data/lib/omnibus/publishers/s3_publisher.rb +6 -4
  55. data/lib/omnibus/s3_cache.rb +4 -2
  56. data/lib/omnibus/s3_helpers.rb +7 -7
  57. data/lib/omnibus/software.rb +68 -43
  58. data/lib/omnibus/sugarable.rb +5 -14
  59. data/lib/omnibus/templating.rb +2 -2
  60. data/lib/omnibus/thread_pool.rb +0 -2
  61. data/lib/omnibus/util.rb +4 -3
  62. data/lib/omnibus/version.rb +1 -1
  63. data/lib/omnibus/whitelist.rb +24 -1
  64. data/omnibus.gemspec +8 -9
  65. data/resources/ips/doc-transform.erb +1 -0
  66. data/resources/msi/CustomActionFastMsi.CA.dll +0 -0
  67. data/resources/msi/source.wxs.erb +2 -10
  68. data/resources/rpm/signing.erb +7 -10
  69. data/spec/functional/builder_spec.rb +2 -1
  70. data/spec/functional/fetchers/file_fetcher_spec.rb +4 -4
  71. data/spec/functional/fetchers/git_fetcher_spec.rb +4 -4
  72. data/spec/functional/fetchers/net_fetcher_spec.rb +5 -6
  73. data/spec/functional/fetchers/path_fetcher_spec.rb +4 -4
  74. data/spec/functional/licensing_spec.rb +5 -5
  75. data/spec/support/examples.rb +3 -4
  76. data/spec/support/path_helpers.rb +2 -2
  77. data/spec/unit/builder_spec.rb +9 -9
  78. data/spec/unit/changelogprinter_spec.rb +8 -6
  79. data/spec/unit/compressor_spec.rb +4 -4
  80. data/spec/unit/compressors/dmg_spec.rb +5 -2
  81. data/spec/unit/fetchers/net_fetcher_spec.rb +16 -17
  82. data/spec/unit/health_check_spec.rb +2 -6
  83. data/spec/unit/library_spec.rb +2 -1
  84. data/spec/unit/manifest_diff_spec.rb +2 -2
  85. data/spec/unit/manifest_spec.rb +1 -1
  86. data/spec/unit/metadata_spec.rb +14 -17
  87. data/spec/unit/omnibus_spec.rb +1 -1
  88. data/spec/unit/packager_spec.rb +6 -13
  89. data/spec/unit/packagers/bff_spec.rb +2 -2
  90. data/spec/unit/packagers/ips_spec.rb +1 -0
  91. data/spec/unit/packagers/msi_spec.rb +2 -2
  92. data/spec/unit/packagers/pkg_spec.rb +354 -0
  93. data/spec/unit/packagers/pkgsrc_spec.rb +1 -1
  94. data/spec/unit/packagers/rpm_spec.rb +5 -5
  95. data/spec/unit/packagers/solaris_spec.rb +7 -7
  96. data/spec/unit/project_spec.rb +7 -7
  97. data/spec/unit/publisher_spec.rb +1 -2
  98. data/spec/unit/publishers/artifactory_publisher_spec.rb +2 -4
  99. data/spec/unit/publishers/s3_publisher_spec.rb +2 -4
  100. data/spec/unit/s3_cacher_spec.rb +19 -6
  101. data/spec/unit/s3_helpers_spec.rb +22 -3
  102. data/spec/unit/software_spec.rb +59 -120
  103. data/spec/unit/util_spec.rb +1 -2
  104. metadata +21 -21
@@ -49,10 +49,10 @@ module Omnibus
49
49
  end
50
50
 
51
51
  if compressors.include?(:tgz)
52
- return TGZ
52
+ TGZ
53
53
  else
54
54
  log.info(log_key) { "No compressor defined for `#{family}'." }
55
- return Null
55
+ Null
56
56
  end
57
57
  end
58
58
  module_function :for_current_system
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "fileutils"
17
+ require "fileutils" unless defined?(FileUtils)
18
18
 
19
19
  module Omnibus
20
20
  class Compressor::Base < Packager::Base
@@ -30,7 +30,7 @@ module Omnibus
30
30
  # @param [Project] project
31
31
  #
32
32
  def initialize(project)
33
- @project = project
33
+ @project = project
34
34
 
35
35
  # There can now be multiple packagers per platform
36
36
  # but windows is the only platform that uses multiple
@@ -234,8 +234,7 @@ module Omnibus
234
234
  pkg_name: packager.package_name,
235
235
  window_bounds: window_bounds,
236
236
  pkg_position: pkg_position,
237
- }
238
- )
237
+ })
239
238
 
240
239
  Dir.chdir(staging_dir) do
241
240
  shellout! <<-EOH.gsub(/^ {10}/, "")
@@ -260,8 +259,11 @@ module Omnibus
260
259
  sync
261
260
  hdiutil unmount "#{@device}"
262
261
  # Give some time to the system so unmount dmg
263
- sleep 5
264
- hdiutil detach "#{@device}" && \
262
+ ATTEMPTS=0
263
+ until [ $ATTEMPTS -eq 5 ] || hdiutil detach "#{@device}"; do
264
+ sleep 10
265
+ echo Attempt number $(( ATTEMPTS++ ))
266
+ done
265
267
  hdiutil convert \\
266
268
  "#{writable_dmg}" \\
267
269
  -format UDZO \\
@@ -316,10 +318,10 @@ module Omnibus
316
318
  Dir.chdir(staging_dir) do
317
319
  shellout! <<-EOH.gsub(/^ {10}/, "")
318
320
  # Convert the png to an icon
319
- sips -i "#{resource_path('icon.png')}"
321
+ sips -i "#{resource_path("icon.png")}"
320
322
 
321
323
  # Extract the icon into its own resource
322
- DeRez -only icns "#{resource_path('icon.png')}" > tmp.rsrc
324
+ DeRez -only icns "#{resource_path("icon.png")}" > tmp.rsrc
323
325
 
324
326
  # Append the icon reosurce to the DMG
325
327
  Rez -append tmp.rsrc -o "#{package_path}"
@@ -14,8 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "rubygems/package"
18
- require "zlib"
17
+ require "rubygems/package" unless defined?(Gem::Package)
18
+ require "zlib" unless defined?(Zlib)
19
19
 
20
20
  module Omnibus
21
21
  class Compressor::TGZ < Compressor::Base
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "singleton"
17
+ require "singleton" unless defined?(Singleton)
18
18
 
19
19
  module Omnibus
20
20
  class Config
@@ -285,7 +285,7 @@ module Omnibus
285
285
  #
286
286
  # @return [String, nil]
287
287
  default(:s3_access_key) do
288
- if s3_profile
288
+ if s3_profile || s3_iam_role_arn
289
289
  nil
290
290
  else
291
291
  raise MissingRequiredAttribute.new(self, :s3_access_key, "'ABCD1234'")
@@ -296,7 +296,7 @@ module Omnibus
296
296
  #
297
297
  # @return [String, nil]
298
298
  default(:s3_secret_key) do
299
- if s3_profile
299
+ if s3_profile || s3_iam_role_arn
300
300
  nil
301
301
  else
302
302
  raise MissingRequiredAttribute.new(self, :s3_secret_key, "'EFGH5678'")
@@ -308,6 +308,11 @@ module Omnibus
308
308
  # @return [String, nil]
309
309
  default(:s3_profile, nil)
310
310
 
311
+ # The AWS IAM role arn to use with S3 caching.
312
+ #
313
+ # @return [String, nil]
314
+ default(:s3_iam_role_arn, nil)
315
+
311
316
  # The region of the S3 bucket you want to cache software artifacts in.
312
317
  # Defaults to 'us-east-1'
313
318
  #
@@ -455,6 +460,11 @@ module Omnibus
455
460
  # @return [String, nil]
456
461
  default(:publish_s3_profile, nil)
457
462
 
463
+ # The AWS IAM role arn to use with S3 publisher.
464
+ #
465
+ # @return [String, nil]
466
+ default(:publish_s3_iam_role_arn, nil)
467
+
458
468
  # Directory pattern for the S3 publisher.
459
469
  # Interpolation of metadata keys is supported.
460
470
  #
@@ -1,4 +1,4 @@
1
- require "open-uri"
1
+ require "open-uri" unless defined?(OpenURI)
2
2
 
3
3
  module OpenURI
4
4
  class << self
@@ -14,8 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "openssl"
18
- require "pathname"
17
+ require "openssl" unless defined?(OpenSSL)
18
+ require "pathname" unless defined?(Pathname)
19
19
  require "omnibus/logging"
20
20
 
21
21
  module Omnibus
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "open-uri"
17
+ require "open-uri" unless defined?(OpenURI)
18
18
  require "ruby-progressbar"
19
19
 
20
20
  module Omnibus
@@ -77,7 +77,11 @@ module Omnibus
77
77
  end
78
78
  end
79
79
 
80
- file = open(from_url, options)
80
+ if RUBY_VERSION.to_f < 2.7
81
+ file = open(from_url, options)
82
+ else
83
+ file = URI.open(from_url, options)
84
+ end
81
85
  # This is a temporary file. Close and flush it before attempting to copy
82
86
  # it over.
83
87
  file.close
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "fileutils"
17
+ require "fileutils" unless defined?(FileUtils)
18
18
 
19
19
  module Omnibus
20
20
  class FileFetcher < Fetcher
@@ -276,6 +276,7 @@ module Omnibus
276
276
  unless commit_ref
277
277
  raise UnresolvableGitReference.new(ref)
278
278
  end
279
+
279
280
  commit_ref
280
281
  end
281
282
 
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "fileutils"
17
+ require "fileutils" unless defined?(FileUtils)
18
18
  require "omnibus/download_helpers"
19
19
 
20
20
  module Omnibus
@@ -31,7 +31,7 @@ module Omnibus
31
31
  ALL_EXTENSIONS = WIN_7Z_EXTENSIONS + TAR_EXTENSIONS
32
32
 
33
33
  # Digest types used for verifying file checksums
34
- DIGESTS = [:sha512, :sha256, :sha1, :md5].freeze
34
+ DIGESTS = %i{sha512 sha256 sha1 md5}.freeze
35
35
 
36
36
  #
37
37
  # A fetch is required if the downloaded_file (such as a tarball) does not
@@ -314,8 +314,7 @@ module Omnibus
314
314
  #
315
315
  # @return [[String]]
316
316
  #
317
- def extract_command
318
- end
317
+ def extract_command; end
319
318
 
320
319
  #
321
320
  # Primitively determine whether we should use gtar or tar to untar a file.
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "fileutils"
17
+ require "fileutils" unless defined?(FileUtils)
18
18
 
19
19
  module Omnibus
20
20
  class PathFetcher < Fetcher
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "fileutils"
17
+ require "fileutils" unless defined?(FileUtils)
18
18
 
19
19
  module Omnibus
20
20
  module FileSyncer
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "thor"
17
+ require "thor" unless defined?(Thor)
18
18
 
19
19
  module Omnibus
20
20
  class Generator < Thor::Group
@@ -73,7 +73,7 @@ module Omnibus
73
73
  class << self
74
74
  # Set the source root for Thor
75
75
  def source_root
76
- File.expand_path("../generator_files", __FILE__)
76
+ File.expand_path("generator_files", __dir__)
77
77
  end
78
78
  end
79
79
 
@@ -47,8 +47,8 @@ $ bin/omnibus clean <%= config[:name] %> --purge
47
47
  ### Publish
48
48
 
49
49
  Omnibus has a built-in mechanism for releasing to a variety of "backends", such
50
- as Amazon S3. You must set the proper credentials in your `omnibus.rb` config
51
- file or specify them via the command line.
50
+ as Amazon S3. You must set the proper credentials in your
51
+ [`omnibus.rb`](omnibus.rb) config file or specify them via the command line.
52
52
 
53
53
  ```shell
54
54
  $ bin/omnibus publish path/to/*.deb --backend s3
@@ -82,37 +82,41 @@ version of every software definition.
82
82
 
83
83
  Kitchen-based Build Environment
84
84
  -------------------------------
85
- Every Omnibus project ships will a project-specific
86
- [Berksfile](https://docs.chef.io/berkshelf.html) that will allow you to build your omnibus projects on all of the projects listed
87
- in the `.kitchen.yml`. You can add/remove additional platforms as needed by
88
- changing the list found in the `.kitchen.yml` `platforms` YAML stanza.
85
+ Every Omnibus project ships with a project-specific
86
+ [Berksfile](https://docs.chef.io/berkshelf.html) that will allow you to build
87
+ your omnibus projects on all of the platforms listed in the
88
+ [`.kitchen.yml`](.kitchen.yml). You can add/remove additional platforms as
89
+ needed by changing the list found in the [`.kitchen.yml`](.kitchen.yml)
90
+ `platforms` YAML stanza.
89
91
 
90
92
  This build environment is designed to get you up-and-running quickly. However,
91
- there is nothing that restricts you to building on other platforms. Simply use
92
- the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup
93
- your desired platform and execute the build steps listed above.
93
+ there is nothing that restricts you from building on other platforms. Simply use
94
+ the [omnibus cookbook](https://github.com/chef-cookbooks/omnibus) to setup your
95
+ desired platform and execute the build steps listed above.
94
96
 
95
97
  The default build environment requires Test Kitchen and VirtualBox for local
96
98
  development. Test Kitchen also exposes the ability to provision instances using
97
99
  various cloud providers like AWS, DigitalOcean, or OpenStack. For more
98
100
  information, please see the [Test Kitchen documentation](https://kitchen.ci/).
99
101
 
100
- Once you have tweaked your `.kitchen.yml` (or `.kitchen.local.yml`) to your
101
- liking, you can bring up an individual build environment using the `kitchen`
102
- command.
102
+ Once you have tweaked your [`.kitchen.yml`](.kitchen.yml) (or
103
+ [`.kitchen.local.yml`](.kitchen.local.yml)) to your liking, you can bring up an
104
+ individual build environment using the `kitchen` command.
105
+
103
106
 
104
107
  ```shell
105
- $ bin/kitchen converge ubuntu-1204
108
+ $ bin/kitchen converge ubuntu-1804
106
109
  ```
107
110
 
108
111
  Then login to the instance and build the project as described in the Usage
109
112
  section:
110
113
 
111
114
  ```shell
112
- $ bundle exec kitchen login ubuntu-1204
113
- [vagrant@ubuntu...] $ cd <%= config[:name] %>
115
+ $ bin/kitchen login ubuntu-1804
116
+ [vagrant@ubuntu...] $ . load-omnibus-toolchain.sh
117
+ [vagrant@ubuntu...] $ [ -e .bundle ] && sudo chown -R vagrant:vagrant .bundle
118
+ [vagrant@ubuntu...] $ cd <%= config[:name] %> # or 'cd <%= config[:name] %>/omnibus' if your omnibus project is embedded in your main project
114
119
  [vagrant@ubuntu...] $ bundle install
115
- [vagrant@ubuntu...] $ ...
116
120
  [vagrant@ubuntu...] $ bin/omnibus build <%= config[:name] %>
117
121
  ```
118
122
 
@@ -15,7 +15,7 @@
15
15
  #
16
16
 
17
17
  name "preparation"
18
- description "the steps required to preprare the build"
18
+ description "the steps required to prepare the build"
19
19
  default_version "1.0.0"
20
20
 
21
21
  license :project_license
@@ -31,10 +31,11 @@
31
31
  # Enable S3 asset caching
32
32
  # ------------------------------
33
33
  # use_s3_caching true
34
- # s3_access_key ENV['AWS_ACCESS_KEY_ID']
35
- # s3_secret_key ENV['AWS_SECRET_ACCESS_KEY']
36
- # s3_profile ENV['AWS_S3_PROFILE']
37
- # s3_bucket ENV['AWS_S3_BUCKET']
34
+ # s3_access_key ENV['AWS_ACCESS_KEY_ID']
35
+ # s3_secret_key ENV['AWS_SECRET_ACCESS_KEY']
36
+ # s3_profile ENV['AWS_S3_PROFILE']
37
+ # s3_iam_role_arn ENV['S3_IAM_ROLE_ARN']
38
+ # s3_bucket ENV['AWS_S3_BUCKET']
38
39
 
39
40
  # Customize compiler bits
40
41
  # ------------------------------
@@ -14,8 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "digest"
18
- require "fileutils"
17
+ require "digest" unless defined?(Digest)
18
+ require "fileutils" unless defined?(FileUtils)
19
19
 
20
20
  module Omnibus
21
21
  class GitCache
@@ -331,7 +331,7 @@ module Omnibus
331
331
  #
332
332
  def health_check_ldd
333
333
  regexp_ends = ".*(" + IGNORED_ENDINGS.map { |e| e.gsub(/\./, '\.') }.join("|") + ")$"
334
- regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(/\//, '\/') + ".*" }.join("|")
334
+ regexp_patterns = IGNORED_PATTERNS.map { |e| ".*" + e.gsub(%r{/}, '\/') + ".*" }.join("|")
335
335
  regexp = regexp_ends + "|" + regexp_patterns
336
336
 
337
337
  current_library = nil
@@ -428,6 +428,8 @@ module Omnibus
428
428
  ARCH_WHITELIST_LIBS
429
429
  when "mac_os_x"
430
430
  MAC_WHITELIST_LIBS
431
+ when "omnios"
432
+ OMNIOS_WHITELIST_LIBS
431
433
  when "solaris2"
432
434
  SOLARIS_WHITELIST_LIBS
433
435
  when "smartos"
@@ -14,8 +14,8 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "uri"
18
- require "fileutils"
17
+ require "uri" unless defined?(URI)
18
+ require "fileutils" unless defined?(FileUtils)
19
19
  require "omnibus/download_helpers"
20
20
  require "license_scout/collector"
21
21
  require "license_scout/reporter"
@@ -130,8 +130,7 @@ module Omnibus
130
130
  #
131
131
  # @return [void]
132
132
  #
133
- def execute_pre_build(software)
134
- end
133
+ def execute_pre_build(software); end
135
134
 
136
135
  # Callback that gets called by Software#build_me after the build is done.
137
136
  # Invokes license copying for the given software. This ensures that
@@ -246,7 +245,7 @@ module Omnibus
246
245
 
247
246
  out << "This product bundles #{name} #{version},\n"
248
247
  out << "which is available under a \"#{license}\" License.\n"
249
- if !license_files.empty?
248
+ unless license_files.empty?
250
249
  out << "For details, see:\n"
251
250
  license_files.each do |license_file|
252
251
  out << "#{license_package_location(name, license_file)}\n"
@@ -440,7 +439,7 @@ module Omnibus
440
439
 
441
440
  if Config.fatal_transitive_dependency_licensing_warnings && !transitive_dependency_licensing_warnings.empty?
442
441
  warnings_to_raise << transitive_dependency_licensing_warnings
443
- warnings_to_raise << "If you are encountering missing license or missing license file errors for **transitive** dependencies, you can provide overrides for the missing information at https://github.com/chef/license_scout/blob/master/lib/license_scout/overrides.rb#L93"
442
+ warnings_to_raise << "If you are encountering missing license or missing license file errors for **transitive** dependencies, you can provide overrides for the missing information at https://github.com/chef/license_scout/blob/1-stable/lib/license_scout/overrides.rb#L93. \n Promote license_scout to Rubygems with `/expeditor promote chef/license_scout:1-stable X.Y.Z` in slack."
444
443
  end
445
444
 
446
445
  warnings_to_raise.flatten!
@@ -17,7 +17,7 @@
17
17
  module Omnibus
18
18
  class Logger
19
19
 
20
- require "time"
20
+ require "time" unless defined?(Time.zone_offset)
21
21
 
22
22
  #
23
23
  # The amount of padding on the left column.
@@ -102,6 +102,7 @@ module Omnibus
102
102
  #
103
103
  def add(severity, progname, &block)
104
104
  return true if io.nil? || severity < level
105
+
105
106
  message = format_message(severity, progname, yield)
106
107
  MUTEX.synchronize { io.write(message) }
107
108
  true
@@ -138,7 +139,7 @@ module Omnibus
138
139
  else
139
140
  left = "#{format_severity(severity)} | "
140
141
  end
141
- "#{left.rjust(LEFT)}#{Time.now.iso8601()} | #{message}\n"
142
+ "#{left.rjust(LEFT)}#{Time.now.iso8601} | #{message}\n"
142
143
  end
143
144
 
144
145
  #
@@ -14,7 +14,7 @@
14
14
  # limitations under the License.
15
15
  #
16
16
 
17
- require "ffi_yajl"
17
+ require "ffi_yajl" unless defined?(FFI_Yajl)
18
18
 
19
19
  module Omnibus
20
20
  class Manifest
@@ -44,7 +44,7 @@ module Omnibus
44
44
  end
45
45
 
46
46
  def add(name, entry)
47
- if ! entry.is_a? Omnibus::ManifestEntry
47
+ unless entry.is_a? Omnibus::ManifestEntry
48
48
  raise NotAManifestEntry, "#{entry} is not an Omnibus:ManifestEntry"
49
49
  end
50
50