Skip to content

Commit

Permalink
Resolve new chefstyle warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Smith <tsmith@chef.io>
  • Loading branch information
tas50 committed Aug 25, 2020
1 parent 654df04 commit fe80025
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/ohai/plugins/ec2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def looks_like_ec2?
end

collect_data do
require "base64"
require "base64" unless defined?(Base64)

if looks_like_ec2?
logger.trace("Plugin EC2: looks_like_ec2? == true")
Expand Down
2 changes: 1 addition & 1 deletion lib/ohai/plugins/shard.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def default_digest_algorithm
def digest_algorithm
case Ohai.config[:plugin][:shard_seed][:digest_algorithm] || default_digest_algorithm
when "md5"
require "digest/md5"
require "digest/md5" unless defined?(Digest::MD5)
Digest::MD5
when "sha256"
require "openssl/digest"
Expand Down

0 comments on commit fe80025

Please sign in to comment.