From d1da1e4d344f4ac8e2a75a3a86cb3741f6e71fcf Mon Sep 17 00:00:00 2001 From: Tim Smith Date: Fri, 30 Oct 2020 15:54:48 -0700 Subject: [PATCH] Freeze the strings we're not later modifying There's a few plugins that this couldn't be enabled on due to how we build strings, but for the most part this is an easy one to turn on and it shaves 1k from the runtime memory! Signed-off-by: Tim Smith --- Gemfile | 3 ++- Rakefile | 1 + bin/ohai | 1 + lib/ohai.rb | 1 + lib/ohai/application.rb | 1 + lib/ohai/common/dmi.rb | 1 + lib/ohai/config.rb | 1 + lib/ohai/dsl.rb | 1 + lib/ohai/dsl/plugin.rb | 1 + lib/ohai/dsl/plugin/versionvii.rb | 1 + lib/ohai/exception.rb | 1 + lib/ohai/hints.rb | 1 + lib/ohai/log.rb | 1 + lib/ohai/mash.rb | 1 + lib/ohai/mixin/azure_metadata.rb | 1 + lib/ohai/mixin/chef_utils_wiring.rb | 1 + lib/ohai/mixin/command.rb | 1 + lib/ohai/mixin/constant_helper.rb | 1 + lib/ohai/mixin/dmi_decode.rb | 1 + lib/ohai/mixin/do_metadata.rb | 1 + lib/ohai/mixin/ec2_metadata.rb | 1 + lib/ohai/mixin/gce_metadata.rb | 1 + lib/ohai/mixin/http_helper.rb | 1 + lib/ohai/mixin/network_helper.rb | 1 + lib/ohai/mixin/os.rb | 1 + lib/ohai/mixin/scaleway_metadata.rb | 1 + lib/ohai/mixin/seconds_to_human.rb | 1 + lib/ohai/mixin/shell_out.rb | 1 + lib/ohai/mixin/softlayer_metadata.rb | 1 + lib/ohai/mixin/string.rb | 1 + lib/ohai/mixin/train_helpers.rb | 1 + lib/ohai/mixin/which.rb | 1 + lib/ohai/plugin_config.rb | 1 + lib/ohai/plugins/aix/kernel.rb | 1 + lib/ohai/plugins/aix/memory.rb | 1 + lib/ohai/plugins/aix/network.rb | 1 + lib/ohai/plugins/aix/platform.rb | 1 + lib/ohai/plugins/aix/uptime.rb | 1 + lib/ohai/plugins/azure.rb | 1 + lib/ohai/plugins/bsd/virtualization.rb | 1 + lib/ohai/plugins/c.rb | 1 + lib/ohai/plugins/chef.rb | 1 + lib/ohai/plugins/cloud.rb | 1 + lib/ohai/plugins/command.rb | 1 + lib/ohai/plugins/cpu.rb | 1 + lib/ohai/plugins/darwin/hardware.rb | 1 + lib/ohai/plugins/darwin/memory.rb | 1 + lib/ohai/plugins/darwin/network.rb | 1 + lib/ohai/plugins/darwin/platform.rb | 1 + lib/ohai/plugins/darwin/virtualization.rb | 1 + lib/ohai/plugins/digital_ocean.rb | 1 + lib/ohai/plugins/dmi.rb | 1 + lib/ohai/plugins/docker.rb | 1 + lib/ohai/plugins/dragonflybsd/memory.rb | 1 + lib/ohai/plugins/dragonflybsd/network.rb | 1 + lib/ohai/plugins/dragonflybsd/platform.rb | 1 + lib/ohai/plugins/ec2.rb | 1 + lib/ohai/plugins/erlang.rb | 1 + lib/ohai/plugins/eucalyptus.rb | 1 + lib/ohai/plugins/fips.rb | 1 + lib/ohai/plugins/freebsd/memory.rb | 1 + lib/ohai/plugins/freebsd/network.rb | 1 + lib/ohai/plugins/freebsd/platform.rb | 1 + lib/ohai/plugins/gce.rb | 1 + lib/ohai/plugins/haskell.rb | 1 + lib/ohai/plugins/hostname.rb | 1 + lib/ohai/plugins/init_package.rb | 1 + lib/ohai/plugins/java.rb | 1 + lib/ohai/plugins/joyent.rb | 1 + lib/ohai/plugins/kernel.rb | 1 + lib/ohai/plugins/keys.rb | 1 + lib/ohai/plugins/languages.rb | 1 + lib/ohai/plugins/libvirt.rb | 1 + lib/ohai/plugins/linode.rb | 1 + lib/ohai/plugins/linux/block_device.rb | 1 + lib/ohai/plugins/linux/hostnamectl.rb | 1 + lib/ohai/plugins/linux/interrupts.rb | 1 + lib/ohai/plugins/linux/ipc.rb | 1 + lib/ohai/plugins/linux/lsb.rb | 1 + lib/ohai/plugins/linux/lspci.rb | 1 + lib/ohai/plugins/linux/machineid.rb | 1 + lib/ohai/plugins/linux/mdadm.rb | 1 + lib/ohai/plugins/linux/memory.rb | 1 + lib/ohai/plugins/linux/network.rb | 1 + lib/ohai/plugins/linux/platform.rb | 1 + lib/ohai/plugins/linux/selinux.rb | 1 + lib/ohai/plugins/linux/sessions.rb | 1 + lib/ohai/plugins/linux/sysctl.rb | 1 + lib/ohai/plugins/linux/systemd_paths.rb | 1 + lib/ohai/plugins/linux/virtualization.rb | 1 + lib/ohai/plugins/netbsd/memory.rb | 1 + lib/ohai/plugins/netbsd/network.rb | 1 + lib/ohai/plugins/netbsd/platform.rb | 1 + lib/ohai/plugins/network.rb | 1 + lib/ohai/plugins/ohai.rb | 1 + lib/ohai/plugins/ohai_time.rb | 1 + lib/ohai/plugins/openbsd/memory.rb | 1 + lib/ohai/plugins/openbsd/network.rb | 1 + lib/ohai/plugins/openbsd/platform.rb | 1 + lib/ohai/plugins/openstack.rb | 1 + lib/ohai/plugins/os.rb | 1 + lib/ohai/plugins/packages.rb | 1 + lib/ohai/plugins/passwd.rb | 1 + lib/ohai/plugins/platform.rb | 1 + lib/ohai/plugins/ps.rb | 1 + lib/ohai/plugins/rackspace.rb | 1 + lib/ohai/plugins/root_group.rb | 1 + lib/ohai/plugins/scala.rb | 1 + lib/ohai/plugins/scaleway.rb | 1 + lib/ohai/plugins/scsi.rb | 1 + lib/ohai/plugins/shells.rb | 1 + lib/ohai/plugins/softlayer.rb | 1 + lib/ohai/plugins/solaris2/dmi.rb | 1 + lib/ohai/plugins/solaris2/memory.rb | 1 + lib/ohai/plugins/solaris2/network.rb | 1 + lib/ohai/plugins/solaris2/platform.rb | 1 + lib/ohai/plugins/solaris2/virtualization.rb | 1 + lib/ohai/plugins/ssh_host_key.rb | 1 + lib/ohai/plugins/sysconf.rb | 1 + lib/ohai/plugins/timezone.rb | 1 + lib/ohai/plugins/train.rb | 1 + lib/ohai/plugins/uptime.rb | 1 + lib/ohai/plugins/virtualbox.rb | 1 + lib/ohai/plugins/vmware.rb | 1 + lib/ohai/plugins/windows/dmi.rb | 1 + lib/ohai/plugins/windows/drivers.rb | 1 + lib/ohai/plugins/windows/memory.rb | 1 + lib/ohai/plugins/windows/network.rb | 1 + lib/ohai/plugins/windows/platform.rb | 1 + lib/ohai/plugins/windows/system_enclosure.rb | 1 + lib/ohai/plugins/windows/virtualization.rb | 1 + lib/ohai/plugins/zpools.rb | 1 + lib/ohai/provides_map.rb | 1 + lib/ohai/runner.rb | 1 + lib/ohai/system.rb | 1 + lib/ohai/train_transport.rb | 1 + lib/ohai/util/file_helper.rb | 1 + lib/ohai/util/ip_helper.rb | 1 + lib/ohai/util/win32.rb | 1 + lib/ohai/version.rb | 1 + ohai.gemspec | 1 + tasks/spellcheck.rb | 1 + 142 files changed, 143 insertions(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 8e609dac1..7c6c16c43 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true source "https://rubygems.org" gemspec @@ -22,6 +23,6 @@ end group :debug do gem "pry" gem "pry-byebug" - gem "pry-stack_explorer", "~> 0.4.0" # pin until we drop ruby < 2.6 + gem "pry-stack_explorer" gem "rb-readline" end diff --git a/Rakefile b/Rakefile index 6d6a3a2ca..f323ce127 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bundler/gem_tasks" begin diff --git a/bin/ohai b/bin/ohai index 06024da11..2d86ffa91 100755 --- a/bin/ohai +++ b/bin/ohai @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) 2008-2016 Chef Software, Inc. diff --git a/lib/ohai.rb b/lib/ohai.rb index 040141b09..031dd00c6 100644 --- a/lib/ohai.rb +++ b/lib/ohai.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/application.rb b/lib/ohai/application.rb index 64472245e..b468c1a38 100644 --- a/lib/ohai/application.rb +++ b/lib/ohai/application.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Mathieu Sauve-Frankel # Copyright:: Copyright (c) 2009 Mathieu Sauve-Frankel. diff --git a/lib/ohai/common/dmi.rb b/lib/ohai/common/dmi.rb index d9aefa741..faa440a71 100644 --- a/lib/ohai/common/dmi.rb +++ b/lib/ohai/common/dmi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Kurt Yoder (ktyopscode@yoderhome.com) # Copyright:: Copyright (c) 2010 Kurt Yoder diff --git a/lib/ohai/config.rb b/lib/ohai/config.rb index f86a26522..88200cf67 100644 --- a/lib/ohai/config.rb +++ b/lib/ohai/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Claire McQuin () diff --git a/lib/ohai/dsl.rb b/lib/ohai/dsl.rb index 2d7a437b8..535529e83 100644 --- a/lib/ohai/dsl.rb +++ b/lib/ohai/dsl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Serdar Sutay () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/dsl/plugin.rb b/lib/ohai/dsl/plugin.rb index 7e72c41f1..cc561d363 100644 --- a/lib/ohai/dsl/plugin.rb +++ b/lib/ohai/dsl/plugin.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Claire McQuin () diff --git a/lib/ohai/dsl/plugin/versionvii.rb b/lib/ohai/dsl/plugin/versionvii.rb index 7e41be24d..6386c2edf 100644 --- a/lib/ohai/dsl/plugin/versionvii.rb +++ b/lib/ohai/dsl/plugin/versionvii.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Serdar Sutay () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/exception.rb b/lib/ohai/exception.rb index 995f894e8..3c43fb5ce 100644 --- a/lib/ohai/exception.rb +++ b/lib/ohai/exception.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/hints.rb b/lib/ohai/hints.rb index 85e3b49e3..19e85a006 100644 --- a/lib/ohai/hints.rb +++ b/lib/ohai/hints.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Serdar Sutay () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/log.rb b/lib/ohai/log.rb index 08f1cba2e..664afca4a 100644 --- a/lib/ohai/log.rb +++ b/lib/ohai/log.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mash.rb b/lib/ohai/mash.rb index d386af259..c303ba321 100644 --- a/lib/ohai/mash.rb +++ b/lib/ohai/mash.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/azure_metadata.rb b/lib/ohai/mixin/azure_metadata.rb index ded5077b3..3f2a0d4eb 100644 --- a/lib/ohai/mixin/azure_metadata.rb +++ b/lib/ohai/mixin/azure_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Smith () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/chef_utils_wiring.rb b/lib/ohai/mixin/chef_utils_wiring.rb index cb037d438..22ebdd336 100644 --- a/lib/ohai/mixin/chef_utils_wiring.rb +++ b/lib/ohai/mixin/chef_utils_wiring.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/command.rb b/lib/ohai/mixin/command.rb index 030844a76..02bd724ae 100644 --- a/lib/ohai/mixin/command.rb +++ b/lib/ohai/mixin/command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $stderr.puts "WARN: Ohai::Mixin::Command is deprecated, please use Ohai::Mixin::ShellOut or remove if the reference is unnecessary" require_relative "shell_out" Ohai::Mixin::Command = Ohai::Mixin::ShellOut unless defined?(Ohai::Mixin::Command) diff --git a/lib/ohai/mixin/constant_helper.rb b/lib/ohai/mixin/constant_helper.rb index 2d8c9c268..a02aa6fa2 100644 --- a/lib/ohai/mixin/constant_helper.rb +++ b/lib/ohai/mixin/constant_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Serdar Sutay () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/dmi_decode.rb b/lib/ohai/mixin/dmi_decode.rb index 57143d7b3..354e337db 100644 --- a/lib/ohai/mixin/dmi_decode.rb +++ b/lib/ohai/mixin/dmi_decode.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Smith # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/do_metadata.rb b/lib/ohai/mixin/do_metadata.rb index b390b2ede..2599ff247 100644 --- a/lib/ohai/mixin/do_metadata.rb +++ b/lib/ohai/mixin/do_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Author:: Dylan Page () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/ec2_metadata.rb b/lib/ohai/mixin/ec2_metadata.rb index f24472d27..c043c1ddf 100644 --- a/lib/ohai/mixin/ec2_metadata.rb +++ b/lib/ohai/mixin/ec2_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Dysinger () # Author:: Benjamin Black () diff --git a/lib/ohai/mixin/gce_metadata.rb b/lib/ohai/mixin/gce_metadata.rb index 280d72dd3..e0ba93fb2 100644 --- a/lib/ohai/mixin/gce_metadata.rb +++ b/lib/ohai/mixin/gce_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Ranjib Dey () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/http_helper.rb b/lib/ohai/mixin/http_helper.rb index 592ac8960..6f02f6bf5 100644 --- a/lib/ohai/mixin/http_helper.rb +++ b/lib/ohai/mixin/http_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/network_helper.rb b/lib/ohai/mixin/network_helper.rb index 829da6f60..bb6d13675 100644 --- a/lib/ohai/mixin/network_helper.rb +++ b/lib/ohai/mixin/network_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Serdar Sutay () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/os.rb b/lib/ohai/mixin/os.rb index 8cbbdb069..008370924 100644 --- a/lib/ohai/mixin/os.rb +++ b/lib/ohai/mixin/os.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/scaleway_metadata.rb b/lib/ohai/mixin/scaleway_metadata.rb index cef5beb69..cd6128790 100644 --- a/lib/ohai/mixin/scaleway_metadata.rb +++ b/lib/ohai/mixin/scaleway_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Jonathan Amiez () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/seconds_to_human.rb b/lib/ohai/mixin/seconds_to_human.rb index 9649fc5fe..97b388dee 100644 --- a/lib/ohai/mixin/seconds_to_human.rb +++ b/lib/ohai/mixin/seconds_to_human.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/shell_out.rb b/lib/ohai/mixin/shell_out.rb index 18c2ee38c..d91a15655 100644 --- a/lib/ohai/mixin/shell_out.rb +++ b/lib/ohai/mixin/shell_out.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Tim Smith () diff --git a/lib/ohai/mixin/softlayer_metadata.rb b/lib/ohai/mixin/softlayer_metadata.rb index b2fc9c6c4..fa3a55828 100644 --- a/lib/ohai/mixin/softlayer_metadata.rb +++ b/lib/ohai/mixin/softlayer_metadata.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Alexey Karpik # Author:: Peter Schroeter diff --git a/lib/ohai/mixin/string.rb b/lib/ohai/mixin/string.rb index a0c7bcb8d..7f1811ad7 100644 --- a/lib/ohai/mixin/string.rb +++ b/lib/ohai/mixin/string.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: James Gartrell () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/mixin/train_helpers.rb b/lib/ohai/mixin/train_helpers.rb index 929513883..809aa60e2 100644 --- a/lib/ohai/mixin/train_helpers.rb +++ b/lib/ohai/mixin/train_helpers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/mixin/which.rb b/lib/ohai/mixin/which.rb index b21ee640f..b2821e369 100644 --- a/lib/ohai/mixin/which.rb +++ b/lib/ohai/mixin/which.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugin_config.rb b/lib/ohai/plugin_config.rb index aad56aab4..9e622cb62 100644 --- a/lib/ohai/plugin_config.rb +++ b/lib/ohai/plugin_config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/aix/kernel.rb b/lib/ohai/plugins/aix/kernel.rb index d78799025..3d8178c86 100644 --- a/lib/ohai/plugins/aix/kernel.rb +++ b/lib/ohai/plugins/aix/kernel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joshua Timberman # Author:: Isa Farnik () diff --git a/lib/ohai/plugins/aix/memory.rb b/lib/ohai/plugins/aix/memory.rb index b4832a634..2869dcdc0 100644 --- a/lib/ohai/plugins/aix/memory.rb +++ b/lib/ohai/plugins/aix/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joshua Timberman # Author:: Isa Farnik () diff --git a/lib/ohai/plugins/aix/network.rb b/lib/ohai/plugins/aix/network.rb index 9a24ebabe..e16f2004d 100644 --- a/lib/ohai/plugins/aix/network.rb +++ b/lib/ohai/plugins/aix/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Kaustubh Deorukhkar () # Author:: Prabhu Das () diff --git a/lib/ohai/plugins/aix/platform.rb b/lib/ohai/plugins/aix/platform.rb index 1d04669bf..10e670305 100644 --- a/lib/ohai/plugins/aix/platform.rb +++ b/lib/ohai/plugins/aix/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joshua Timberman # Author:: Isa Farnik () diff --git a/lib/ohai/plugins/aix/uptime.rb b/lib/ohai/plugins/aix/uptime.rb index b85a290e8..a341d0c36 100644 --- a/lib/ohai/plugins/aix/uptime.rb +++ b/lib/ohai/plugins/aix/uptime.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Kurt Yoder () # Author:: Isa Farnik () diff --git a/lib/ohai/plugins/azure.rb b/lib/ohai/plugins/azure.rb index 99eae86cf..f82246660 100644 --- a/lib/ohai/plugins/azure.rb +++ b/lib/ohai/plugins/azure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 # diff --git a/lib/ohai/plugins/bsd/virtualization.rb b/lib/ohai/plugins/bsd/virtualization.rb index 445d1e754..dde694e06 100644 --- a/lib/ohai/plugins/bsd/virtualization.rb +++ b/lib/ohai/plugins/bsd/virtualization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/c.rb b/lib/ohai/plugins/c.rb index e3eee7d7f..fb064e819 100644 --- a/lib/ohai/plugins/c.rb +++ b/lib/ohai/plugins/c.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Doug MacEachern # Copyright:: Copyright (c) 2010 VMware, Inc. diff --git a/lib/ohai/plugins/chef.rb b/lib/ohai/plugins/chef.rb index fc588ea37..8a01e68ca 100644 --- a/lib/ohai/plugins/chef.rb +++ b/lib/ohai/plugins/chef.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tollef Fog Heen # Copyright:: Copyright (c) 2010 Tollef Fog Heen diff --git a/lib/ohai/plugins/cloud.rb b/lib/ohai/plugins/cloud.rb index 9570b7129..a49044fb6 100644 --- a/lib/ohai/plugins/cloud.rb +++ b/lib/ohai/plugins/cloud.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Cary Penniman () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/command.rb b/lib/ohai/plugins/command.rb index a07f60793..a9c413622 100644 --- a/lib/ohai/plugins/command.rb +++ b/lib/ohai/plugins/command.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/cpu.rb b/lib/ohai/plugins/cpu.rb index fd410dd2a..9cbb7abbe 100644 --- a/lib/ohai/plugins/cpu.rb +++ b/lib/ohai/plugins/cpu.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Bryan McLellan (btm@loftninjas.org) diff --git a/lib/ohai/plugins/darwin/hardware.rb b/lib/ohai/plugins/darwin/hardware.rb index 87535b276..a24fa7560 100644 --- a/lib/ohai/plugins/darwin/hardware.rb +++ b/lib/ohai/plugins/darwin/hardware.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Nate Walck () # Copyright:: Copyright (c) 2016-present Facebook, Inc. diff --git a/lib/ohai/plugins/darwin/memory.rb b/lib/ohai/plugins/darwin/memory.rb index 306e4df13..d76bd5db4 100644 --- a/lib/ohai/plugins/darwin/memory.rb +++ b/lib/ohai/plugins/darwin/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Patrick Collins () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/darwin/network.rb b/lib/ohai/plugins/darwin/network.rb index 9bc043438..ddbd59ff1 100644 --- a/lib/ohai/plugins/darwin/network.rb +++ b/lib/ohai/plugins/darwin/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Benjamin Black () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/darwin/platform.rb b/lib/ohai/plugins/darwin/platform.rb index c744ad53e..7ea38c121 100644 --- a/lib/ohai/plugins/darwin/platform.rb +++ b/lib/ohai/plugins/darwin/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/darwin/virtualization.rb b/lib/ohai/plugins/darwin/virtualization.rb index c14d08573..ac5a096b4 100644 --- a/lib/ohai/plugins/darwin/virtualization.rb +++ b/lib/ohai/plugins/darwin/virtualization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Pavel Yudin () # Author:: Tim Smith () diff --git a/lib/ohai/plugins/digital_ocean.rb b/lib/ohai/plugins/digital_ocean.rb index 884cc76e8..d18304b64 100644 --- a/lib/ohai/plugins/digital_ocean.rb +++ b/lib/ohai/plugins/digital_ocean.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Dylan Page () # Author:: Stafford Brunk () diff --git a/lib/ohai/plugins/dmi.rb b/lib/ohai/plugins/dmi.rb index 75f026c37..c9d4ecaf0 100644 --- a/lib/ohai/plugins/dmi.rb +++ b/lib/ohai/plugins/dmi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Kurt Yoder (ktyopscode@yoderhome.com) # Copyright:: Copyright (c) 2010 Kurt Yoder diff --git a/lib/ohai/plugins/docker.rb b/lib/ohai/plugins/docker.rb index 5e9e8ec07..92e7a5c46 100644 --- a/lib/ohai/plugins/docker.rb +++ b/lib/ohai/plugins/docker.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/dragonflybsd/memory.rb b/lib/ohai/plugins/dragonflybsd/memory.rb index 287875263..250f4289a 100644 --- a/lib/ohai/plugins/dragonflybsd/memory.rb +++ b/lib/ohai/plugins/dragonflybsd/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/dragonflybsd/network.rb b/lib/ohai/plugins/dragonflybsd/network.rb index 401bf73e8..8296f99c8 100644 --- a/lib/ohai/plugins/dragonflybsd/network.rb +++ b/lib/ohai/plugins/dragonflybsd/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/dragonflybsd/platform.rb b/lib/ohai/plugins/dragonflybsd/platform.rb index ca80f7f7b..f237e8093 100644 --- a/lib/ohai/plugins/dragonflybsd/platform.rb +++ b/lib/ohai/plugins/dragonflybsd/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/ec2.rb b/lib/ohai/plugins/ec2.rb index abe23455f..1942ae420 100644 --- a/lib/ohai/plugins/ec2.rb +++ b/lib/ohai/plugins/ec2.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Dysinger () # Author:: Benjamin Black () diff --git a/lib/ohai/plugins/erlang.rb b/lib/ohai/plugins/erlang.rb index 153c90d1d..be33baba5 100644 --- a/lib/ohai/plugins/erlang.rb +++ b/lib/ohai/plugins/erlang.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joe Williams () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/eucalyptus.rb b/lib/ohai/plugins/eucalyptus.rb index 079fcd530..31d69c2d7 100644 --- a/lib/ohai/plugins/eucalyptus.rb +++ b/lib/ohai/plugins/eucalyptus.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Dysinger () # Author:: Benjamin Black () diff --git a/lib/ohai/plugins/fips.rb b/lib/ohai/plugins/fips.rb index 13b0c3b7c..7cf40fdf9 100644 --- a/lib/ohai/plugins/fips.rb +++ b/lib/ohai/plugins/fips.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Matt Wrock () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/freebsd/memory.rb b/lib/ohai/plugins/freebsd/memory.rb index 0b0cf3272..d7c043389 100644 --- a/lib/ohai/plugins/freebsd/memory.rb +++ b/lib/ohai/plugins/freebsd/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/freebsd/network.rb b/lib/ohai/plugins/freebsd/network.rb index 1263086ab..9ec9498cd 100644 --- a/lib/ohai/plugins/freebsd/network.rb +++ b/lib/ohai/plugins/freebsd/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/freebsd/platform.rb b/lib/ohai/plugins/freebsd/platform.rb index 957f0a303..66b90b53a 100644 --- a/lib/ohai/plugins/freebsd/platform.rb +++ b/lib/ohai/plugins/freebsd/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/gce.rb b/lib/ohai/plugins/gce.rb index cd0bd63c2..90d63e963 100644 --- a/lib/ohai/plugins/gce.rb +++ b/lib/ohai/plugins/gce.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Ranjib Dey () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/haskell.rb b/lib/ohai/plugins/haskell.rb index 50d08b3df..5ae27ae15 100644 --- a/lib/ohai/plugins/haskell.rb +++ b/lib/ohai/plugins/haskell.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Author:: Chris Dituri () # Copyright:: Copyright (c) 2016 Chris Dituri # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/hostname.rb b/lib/ohai/plugins/hostname.rb index ed9e86645..0e6c7a4df 100644 --- a/lib/ohai/plugins/hostname.rb +++ b/lib/ohai/plugins/hostname.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Benjamin Black () diff --git a/lib/ohai/plugins/init_package.rb b/lib/ohai/plugins/init_package.rb index 20a8f5127..fa2b94539 100644 --- a/lib/ohai/plugins/init_package.rb +++ b/lib/ohai/plugins/init_package.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Caleb Tennis () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/java.rb b/lib/ohai/plugins/java.rb index 0dcebc95d..55b9ce700 100644 --- a/lib/ohai/plugins/java.rb +++ b/lib/ohai/plugins/java.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Benjamin Black () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/joyent.rb b/lib/ohai/plugins/joyent.rb index 8df1774ce..84a7c3138 100644 --- a/lib/ohai/plugins/joyent.rb +++ b/lib/ohai/plugins/joyent.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author: sawanoboriyu@higanworks.com # Copyright (C) 2014 HiganWorks LLC diff --git a/lib/ohai/plugins/kernel.rb b/lib/ohai/plugins/kernel.rb index 2ec841df9..d6de9e535 100644 --- a/lib/ohai/plugins/kernel.rb +++ b/lib/ohai/plugins/kernel.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Benjamin Black () diff --git a/lib/ohai/plugins/keys.rb b/lib/ohai/plugins/keys.rb index 1d962d95f..920a06b55 100644 --- a/lib/ohai/plugins/keys.rb +++ b/lib/ohai/plugins/keys.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Cookbook Name:: apache2 # Recipe:: default diff --git a/lib/ohai/plugins/languages.rb b/lib/ohai/plugins/languages.rb index bd20b1b44..68e87d8a9 100644 --- a/lib/ohai/plugins/languages.rb +++ b/lib/ohai/plugins/languages.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/libvirt.rb b/lib/ohai/plugins/libvirt.rb index dd4861f3e..15b0fa40c 100644 --- a/lib/ohai/plugins/libvirt.rb +++ b/lib/ohai/plugins/libvirt.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Benjamin Black () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/linode.rb b/lib/ohai/plugins/linode.rb index 60cdb2108..c1cb8ae31 100644 --- a/lib/ohai/plugins/linode.rb +++ b/lib/ohai/plugins/linode.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Aaron Kalin () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/linux/block_device.rb b/lib/ohai/plugins/linux/block_device.rb index 419021ad8..36905fc4a 100644 --- a/lib/ohai/plugins/linux/block_device.rb +++ b/lib/ohai/plugins/linux/block_device.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/linux/hostnamectl.rb b/lib/ohai/plugins/linux/hostnamectl.rb index 10a7ec991..fb718e98a 100644 --- a/lib/ohai/plugins/linux/hostnamectl.rb +++ b/lib/ohai/plugins/linux/hostnamectl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca () # Copyright:: Copyright (c) 2016 Facebook diff --git a/lib/ohai/plugins/linux/interrupts.rb b/lib/ohai/plugins/linux/interrupts.rb index cd5f4272c..790233393 100644 --- a/lib/ohai/plugins/linux/interrupts.rb +++ b/lib/ohai/plugins/linux/interrupts.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca # Copyright:: Copyright (c) 2020 Facebook diff --git a/lib/ohai/plugins/linux/ipc.rb b/lib/ohai/plugins/linux/ipc.rb index 552ddc8f1..a11b50ad5 100644 --- a/lib/ohai/plugins/linux/ipc.rb +++ b/lib/ohai/plugins/linux/ipc.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Jay Vana # Author:: Davide Cavalca diff --git a/lib/ohai/plugins/linux/lsb.rb b/lib/ohai/plugins/linux/lsb.rb index 382d15341..0f3497b79 100644 --- a/lib/ohai/plugins/linux/lsb.rb +++ b/lib/ohai/plugins/linux/lsb.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/linux/lspci.rb b/lib/ohai/plugins/linux/lspci.rb index 4d51a7d05..08b2a6d9b 100644 --- a/lib/ohai/plugins/linux/lspci.rb +++ b/lib/ohai/plugins/linux/lspci.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joerg Herzinger # Author:: Phil Dibowitz diff --git a/lib/ohai/plugins/linux/machineid.rb b/lib/ohai/plugins/linux/machineid.rb index c87a15f08..1877afb99 100644 --- a/lib/ohai/plugins/linux/machineid.rb +++ b/lib/ohai/plugins/linux/machineid.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca () # Copyright:: Copyright (c) 2016 Facebook diff --git a/lib/ohai/plugins/linux/mdadm.rb b/lib/ohai/plugins/linux/mdadm.rb index b33b4b0d1..f7bfc5280 100644 --- a/lib/ohai/plugins/linux/mdadm.rb +++ b/lib/ohai/plugins/linux/mdadm.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Smith # Author:: Phil Dibowitz diff --git a/lib/ohai/plugins/linux/memory.rb b/lib/ohai/plugins/linux/memory.rb index 328cb49f4..f49df32de 100644 --- a/lib/ohai/plugins/linux/memory.rb +++ b/lib/ohai/plugins/linux/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/linux/network.rb b/lib/ohai/plugins/linux/network.rb index 03fbffa4a..874114c8e 100644 --- a/lib/ohai/plugins/linux/network.rb +++ b/lib/ohai/plugins/linux/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Chris Read diff --git a/lib/ohai/plugins/linux/platform.rb b/lib/ohai/plugins/linux/platform.rb index 31c4d75cd..f9a738292 100644 --- a/lib/ohai/plugins/linux/platform.rb +++ b/lib/ohai/plugins/linux/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/linux/selinux.rb b/lib/ohai/plugins/linux/selinux.rb index 996ce78e4..25115df89 100644 --- a/lib/ohai/plugins/linux/selinux.rb +++ b/lib/ohai/plugins/linux/selinux.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca # Copyright:: Copyright (c) 2020 Facebook diff --git a/lib/ohai/plugins/linux/sessions.rb b/lib/ohai/plugins/linux/sessions.rb index bc503f858..96295ddb8 100644 --- a/lib/ohai/plugins/linux/sessions.rb +++ b/lib/ohai/plugins/linux/sessions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca # Copyright:: Copyright (c) 2016 Facebook diff --git a/lib/ohai/plugins/linux/sysctl.rb b/lib/ohai/plugins/linux/sysctl.rb index 2d621183a..1ea6f5fd4 100644 --- a/lib/ohai/plugins/linux/sysctl.rb +++ b/lib/ohai/plugins/linux/sysctl.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joshua Miller # Copyright:: Copyright (c) 2019 Facebook diff --git a/lib/ohai/plugins/linux/systemd_paths.rb b/lib/ohai/plugins/linux/systemd_paths.rb index 31451e46c..37c41296d 100644 --- a/lib/ohai/plugins/linux/systemd_paths.rb +++ b/lib/ohai/plugins/linux/systemd_paths.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca # Copyright:: Copyright (c) 2017 Facebook diff --git a/lib/ohai/plugins/linux/virtualization.rb b/lib/ohai/plugins/linux/virtualization.rb index c9e693034..7d7485714 100644 --- a/lib/ohai/plugins/linux/virtualization.rb +++ b/lib/ohai/plugins/linux/virtualization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Thom May () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/netbsd/memory.rb b/lib/ohai/plugins/netbsd/memory.rb index 65cc86990..7583ed422 100644 --- a/lib/ohai/plugins/netbsd/memory.rb +++ b/lib/ohai/plugins/netbsd/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Mathieu Sauve-Frankel # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/netbsd/network.rb b/lib/ohai/plugins/netbsd/network.rb index ccd3ea8d9..5e970058a 100644 --- a/lib/ohai/plugins/netbsd/network.rb +++ b/lib/ohai/plugins/netbsd/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/netbsd/platform.rb b/lib/ohai/plugins/netbsd/platform.rb index 81f4f660e..88ee102dd 100644 --- a/lib/ohai/plugins/netbsd/platform.rb +++ b/lib/ohai/plugins/netbsd/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/network.rb b/lib/ohai/plugins/network.rb index e07adc008..be8f26f31 100644 --- a/lib/ohai/plugins/network.rb +++ b/lib/ohai/plugins/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/ohai.rb b/lib/ohai/plugins/ohai.rb index 3b6ed737b..12724318d 100644 --- a/lib/ohai/plugins/ohai.rb +++ b/lib/ohai/plugins/ohai.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tollef Fog Heen # Copyright:: Copyright (c) 2010 Tollef Fog Heen diff --git a/lib/ohai/plugins/ohai_time.rb b/lib/ohai/plugins/ohai_time.rb index 110696608..6347f15db 100644 --- a/lib/ohai/plugins/ohai_time.rb +++ b/lib/ohai/plugins/ohai_time.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/openbsd/memory.rb b/lib/ohai/plugins/openbsd/memory.rb index ab7de696c..956942704 100644 --- a/lib/ohai/plugins/openbsd/memory.rb +++ b/lib/ohai/plugins/openbsd/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Mathieu Sauve-Frankel # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/openbsd/network.rb b/lib/ohai/plugins/openbsd/network.rb index 083d187e6..6a2fbce9c 100644 --- a/lib/ohai/plugins/openbsd/network.rb +++ b/lib/ohai/plugins/openbsd/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/openbsd/platform.rb b/lib/ohai/plugins/openbsd/platform.rb index 3d43e57ee..b457ac35f 100644 --- a/lib/ohai/plugins/openbsd/platform.rb +++ b/lib/ohai/plugins/openbsd/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan (btm@loftninjas.org) # Copyright:: Copyright (c) 2009 Bryan McLellan diff --git a/lib/ohai/plugins/openstack.rb b/lib/ohai/plugins/openstack.rb index d1b7dfa58..1c1f7abc5 100644 --- a/lib/ohai/plugins/openstack.rb +++ b/lib/ohai/plugins/openstack.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Matt Ray () # Author:: Tim Smith () diff --git a/lib/ohai/plugins/os.rb b/lib/ohai/plugins/os.rb index 9159fa707..71b21c4f0 100644 --- a/lib/ohai/plugins/os.rb +++ b/lib/ohai/plugins/os.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Isa Farnik () diff --git a/lib/ohai/plugins/packages.rb b/lib/ohai/plugins/packages.rb index 9b7da66eb..7ab0e0aa7 100644 --- a/lib/ohai/plugins/packages.rb +++ b/lib/ohai/plugins/packages.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Author:: "Christian Höltje" # Author:: "Christopher M. Luciano" # Author:: Shahul Khajamohideen () diff --git a/lib/ohai/plugins/passwd.rb b/lib/ohai/plugins/passwd.rb index 781aba943..a2e336328 100644 --- a/lib/ohai/plugins/passwd.rb +++ b/lib/ohai/plugins/passwd.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Ohai.plugin(:Passwd) do provides "etc", "current_user" diff --git a/lib/ohai/plugins/platform.rb b/lib/ohai/plugins/platform.rb index cc4967c83..0c8d63de7 100644 --- a/lib/ohai/plugins/platform.rb +++ b/lib/ohai/plugins/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/ps.rb b/lib/ohai/plugins/ps.rb index 734262ae8..7c5ffc8f4 100644 --- a/lib/ohai/plugins/ps.rb +++ b/lib/ohai/plugins/ps.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Bryan McLellan () diff --git a/lib/ohai/plugins/rackspace.rb b/lib/ohai/plugins/rackspace.rb index 5576ba603..83603f86b 100644 --- a/lib/ohai/plugins/rackspace.rb +++ b/lib/ohai/plugins/rackspace.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Cary Penniman () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/root_group.rb b/lib/ohai/plugins/root_group.rb index 28dba9bbf..34f677f63 100644 --- a/lib/ohai/plugins/root_group.rb +++ b/lib/ohai/plugins/root_group.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Joseph Anthony Pasquale Holsten () # Copyright:: Copyright (c) 2013 Joseph Anthony Pasquale Holsten diff --git a/lib/ohai/plugins/scala.rb b/lib/ohai/plugins/scala.rb index 4bfb91530..c3965a12b 100644 --- a/lib/ohai/plugins/scala.rb +++ b/lib/ohai/plugins/scala.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Author:: Christopher M Luciano () # © Copyright IBM Corporation 2015. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/scaleway.rb b/lib/ohai/plugins/scaleway.rb index efee560c3..d6d434445 100644 --- a/lib/ohai/plugins/scaleway.rb +++ b/lib/ohai/plugins/scaleway.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Jonathan Amiez () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/scsi.rb b/lib/ohai/plugins/scsi.rb index 412acecbb..7a554adca 100644 --- a/lib/ohai/plugins/scsi.rb +++ b/lib/ohai/plugins/scsi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Phil Dibowitz # Copyright:: Copyright (c) 2018 Facebook, Inc. diff --git a/lib/ohai/plugins/shells.rb b/lib/ohai/plugins/shells.rb index 06d20e6ae..92eead7d8 100644 --- a/lib/ohai/plugins/shells.rb +++ b/lib/ohai/plugins/shells.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Smith () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/softlayer.rb b/lib/ohai/plugins/softlayer.rb index fd48e9fa9..18a373c6a 100644 --- a/lib/ohai/plugins/softlayer.rb +++ b/lib/ohai/plugins/softlayer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Alexey Karpik # Author:: Peter Schroeter diff --git a/lib/ohai/plugins/solaris2/dmi.rb b/lib/ohai/plugins/solaris2/dmi.rb index 9e4b63434..d4cf0d675 100644 --- a/lib/ohai/plugins/solaris2/dmi.rb +++ b/lib/ohai/plugins/solaris2/dmi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Kurt Yoder (ktyopscode@yoderhome.com) # Copyright:: Copyright (c) 2010 Kurt Yoder diff --git a/lib/ohai/plugins/solaris2/memory.rb b/lib/ohai/plugins/solaris2/memory.rb index c2933b0f5..04e8dd175 100644 --- a/lib/ohai/plugins/solaris2/memory.rb +++ b/lib/ohai/plugins/solaris2/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # License:: Apache License, Version 2.0 # diff --git a/lib/ohai/plugins/solaris2/network.rb b/lib/ohai/plugins/solaris2/network.rb index fd59615f4..754a53e74 100644 --- a/lib/ohai/plugins/solaris2/network.rb +++ b/lib/ohai/plugins/solaris2/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Benjamin Black () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/solaris2/platform.rb b/lib/ohai/plugins/solaris2/platform.rb index e2ace48d4..1a9d0ac57 100644 --- a/lib/ohai/plugins/solaris2/platform.rb +++ b/lib/ohai/plugins/solaris2/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Benjamin Black () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/solaris2/virtualization.rb b/lib/ohai/plugins/solaris2/virtualization.rb index 8912a0916..18e0911e6 100644 --- a/lib/ohai/plugins/solaris2/virtualization.rb +++ b/lib/ohai/plugins/solaris2/virtualization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Sean Walbran () # Author:: Kurt Yoder () diff --git a/lib/ohai/plugins/ssh_host_key.rb b/lib/ohai/plugins/ssh_host_key.rb index 0d31f95c7..124660716 100644 --- a/lib/ohai/plugins/ssh_host_key.rb +++ b/lib/ohai/plugins/ssh_host_key.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Bryan McLellan # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/sysconf.rb b/lib/ohai/plugins/sysconf.rb index c2deee96a..dccdb6300 100644 --- a/lib/ohai/plugins/sysconf.rb +++ b/lib/ohai/plugins/sysconf.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Davide Cavalca # Copyright:: Copyright (c) 2016 Facebook diff --git a/lib/ohai/plugins/timezone.rb b/lib/ohai/plugins/timezone.rb index 26a63e429..1d542e434 100644 --- a/lib/ohai/plugins/timezone.rb +++ b/lib/ohai/plugins/timezone.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: John Bellone () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/train.rb b/lib/ohai/plugins/train.rb index cd0c89bdb..6d48c4cc1 100644 --- a/lib/ohai/plugins/train.rb +++ b/lib/ohai/plugins/train.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/uptime.rb b/lib/ohai/plugins/uptime.rb index fc24d6763..708feadf7 100644 --- a/lib/ohai/plugins/uptime.rb +++ b/lib/ohai/plugins/uptime.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Bryan McLellan () diff --git a/lib/ohai/plugins/virtualbox.rb b/lib/ohai/plugins/virtualbox.rb index 705923625..60ec0213d 100644 --- a/lib/ohai/plugins/virtualbox.rb +++ b/lib/ohai/plugins/virtualbox.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Tim Smith # Author:: Joshua Colson diff --git a/lib/ohai/plugins/vmware.rb b/lib/ohai/plugins/vmware.rb index edcae742b..cce39e3e7 100644 --- a/lib/ohai/plugins/vmware.rb +++ b/lib/ohai/plugins/vmware.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: "Dan Robinson" # Author:: "Christopher M. Luciano" diff --git a/lib/ohai/plugins/windows/dmi.rb b/lib/ohai/plugins/windows/dmi.rb index cf7994040..4665dd77a 100644 --- a/lib/ohai/plugins/windows/dmi.rb +++ b/lib/ohai/plugins/windows/dmi.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Pete Higgins (pete@peterhiggins.org) # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/windows/drivers.rb b/lib/ohai/plugins/windows/drivers.rb index f0985e303..5a3d6c4b9 100644 --- a/lib/ohai/plugins/windows/drivers.rb +++ b/lib/ohai/plugins/windows/drivers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/plugins/windows/memory.rb b/lib/ohai/plugins/windows/memory.rb index b8bd84a1e..b8b682dd1 100644 --- a/lib/ohai/plugins/windows/memory.rb +++ b/lib/ohai/plugins/windows/memory.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # License:: Apache License, Version 2.0 # diff --git a/lib/ohai/plugins/windows/network.rb b/lib/ohai/plugins/windows/network.rb index f2a9eb328..77c1be8c4 100644 --- a/lib/ohai/plugins/windows/network.rb +++ b/lib/ohai/plugins/windows/network.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: James Gartrell () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/windows/platform.rb b/lib/ohai/plugins/windows/platform.rb index 220c9225a..727c3fd7e 100644 --- a/lib/ohai/plugins/windows/platform.rb +++ b/lib/ohai/plugins/windows/platform.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: James Gartrell () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/windows/system_enclosure.rb b/lib/ohai/plugins/windows/system_enclosure.rb index d6c1bbae8..02d01e722 100644 --- a/lib/ohai/plugins/windows/system_enclosure.rb +++ b/lib/ohai/plugins/windows/system_enclosure.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Stuart Preston () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/plugins/windows/virtualization.rb b/lib/ohai/plugins/windows/virtualization.rb index 9f5395885..5820d973d 100644 --- a/lib/ohai/plugins/windows/virtualization.rb +++ b/lib/ohai/plugins/windows/virtualization.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Pavel Yudin () # Author:: Tim Smith () diff --git a/lib/ohai/plugins/zpools.rb b/lib/ohai/plugins/zpools.rb index e27bf6102..bcf7574b4 100644 --- a/lib/ohai/plugins/zpools.rb +++ b/lib/ohai/plugins/zpools.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Jason J. W. Williams (williamsjj@digitar.com) # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/provides_map.rb b/lib/ohai/provides_map.rb index 5a70163a2..2c4a732a6 100644 --- a/lib/ohai/provides_map.rb +++ b/lib/ohai/provides_map.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Author:: Daniel DeLeo () diff --git a/lib/ohai/runner.rb b/lib/ohai/runner.rb index 72808d2e3..de478895f 100644 --- a/lib/ohai/runner.rb +++ b/lib/ohai/runner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Claire McQuin () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/system.rb b/lib/ohai/system.rb index e78e6bb44..ded1447e7 100644 --- a/lib/ohai/system.rb +++ b/lib/ohai/system.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/train_transport.rb b/lib/ohai/train_transport.rb index 366132acd..8bdfe694c 100644 --- a/lib/ohai/train_transport.rb +++ b/lib/ohai/train_transport.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Author:: Bryan McLellan # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0 diff --git a/lib/ohai/util/file_helper.rb b/lib/ohai/util/file_helper.rb index 019d39d7b..100953163 100644 --- a/lib/ohai/util/file_helper.rb +++ b/lib/ohai/util/file_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true $stderr.puts "WARN: Ohai::Util::FileHelper is deprecated, please use Ohai::Mixin::Which or remove if the reference is unnecessary" require_relative "../mixin/which" module Ohai::Util diff --git a/lib/ohai/util/ip_helper.rb b/lib/ohai/util/ip_helper.rb index 8b56eecf9..866179355 100644 --- a/lib/ohai/util/ip_helper.rb +++ b/lib/ohai/util/ip_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Stafford Brunk () # License:: Apache License, Version 2.0 diff --git a/lib/ohai/util/win32.rb b/lib/ohai/util/win32.rb index 2d18f5430..6adcd3cad 100644 --- a/lib/ohai/util/win32.rb +++ b/lib/ohai/util/win32.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Author:: Adam Edwards () # # Copyright:: Copyright (c) Chef Software Inc. diff --git a/lib/ohai/version.rb b/lib/ohai/version.rb index 37bdd108b..670e1a3a4 100644 --- a/lib/ohai/version.rb +++ b/lib/ohai/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Author:: Adam Jacob () # Copyright:: Copyright (c) Chef Software Inc. diff --git a/ohai.gemspec b/ohai.gemspec index 95fc2ff84..854805db7 100644 --- a/ohai.gemspec +++ b/ohai.gemspec @@ -1,3 +1,4 @@ +# frozen_string_literal: true $:.unshift File.expand_path("lib", __dir__) require "ohai/version" diff --git a/tasks/spellcheck.rb b/tasks/spellcheck.rb index 076173fa1..ee9942835 100644 --- a/tasks/spellcheck.rb +++ b/tasks/spellcheck.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # # Copyright:: Copyright (c) Chef Software Inc. # License:: Apache License, Version 2.0