summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith84@gmail.com>2020-11-02 09:53:22 -0800
committerTim Smith <tsmith84@gmail.com>2020-11-02 09:53:22 -0800
commit86839a913f27ed683ad5a3e8df4e3f68bc9f06e9 (patch)
tree15da28d223c1fc9f516fe51f3b08ead743589564
parentaa61112cd1943cc8cb78d6a34101dba1610adaa3 (diff)
downloadchef-86839a913f27ed683ad5a3e8df4e3f68bc9f06e9.tar.gz
Freeze strings in chef-utils
This saves us memory and gets us ready for a world where this becomes the default. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--chef-utils/Gemfile1
-rw-r--r--chef-utils/Rakefile1
-rw-r--r--chef-utils/chef-utils.gemspec1
-rw-r--r--chef-utils/lib/chef-utils.rb1
-rw-r--r--chef-utils/lib/chef-utils/dist.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/architecture.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/cloud.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/default_paths.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/introspection.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/os.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/path_sanity.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/platform.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/platform_family.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/platform_version.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/service.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/train_helpers.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/virtualization.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/which.rb1
-rw-r--r--chef-utils/lib/chef-utils/dsl/windows.rb1
-rw-r--r--chef-utils/lib/chef-utils/internal.rb1
-rw-r--r--chef-utils/lib/chef-utils/mash.rb1
-rw-r--r--chef-utils/lib/chef-utils/version.rb1
-rw-r--r--chef-utils/lib/chef-utils/version_string.rb1
-rw-r--r--chef-utils/spec/spec_helper.rb1
-rw-r--r--chef-utils/spec/unit/dsl/architecture_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/cloud_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/dsl_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/introspection_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/os_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/path_sanity_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/platform_family_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/platform_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/service_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/virtualization_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/which_spec.rb1
-rw-r--r--chef-utils/spec/unit/dsl/windows_spec.rb1
-rw-r--r--chef-utils/spec/unit/mash_spec.rb1
37 files changed, 37 insertions, 0 deletions
diff --git a/chef-utils/Gemfile b/chef-utils/Gemfile
index 87fa3df1f2..2555cf15d9 100644
--- a/chef-utils/Gemfile
+++ b/chef-utils/Gemfile
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
source "https://rubygems.org"
gemspec
diff --git a/chef-utils/Rakefile b/chef-utils/Rakefile
index 4bb4605e0c..237f47f72b 100644
--- a/chef-utils/Rakefile
+++ b/chef-utils/Rakefile
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "bundler/gem_tasks"
task default: :spec
diff --git a/chef-utils/chef-utils.gemspec b/chef-utils/chef-utils.gemspec
index c601938245..836fef1ff9 100644
--- a/chef-utils/chef-utils.gemspec
+++ b/chef-utils/chef-utils.gemspec
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
lib = File.expand_path("lib", __dir__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "chef-utils/version"
diff --git a/chef-utils/lib/chef-utils.rb b/chef-utils/lib/chef-utils.rb
index c1b06ed3fb..57a1e4017c 100644
--- a/chef-utils/lib/chef-utils.rb
+++ b/chef-utils/lib/chef-utils.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dist.rb b/chef-utils/lib/chef-utils/dist.rb
index 2b554e541f..f8e05f04e4 100644
--- a/chef-utils/lib/chef-utils/dist.rb
+++ b/chef-utils/lib/chef-utils/dist.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
module ChefUtils
# This class is not fully implemented, depending on it is not recommended!
module Dist
diff --git a/chef-utils/lib/chef-utils/dsl/architecture.rb b/chef-utils/lib/chef-utils/dsl/architecture.rb
index 1d1cd643b7..e1ac4a099a 100644
--- a/chef-utils/lib/chef-utils/dsl/architecture.rb
+++ b/chef-utils/lib/chef-utils/dsl/architecture.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/cloud.rb b/chef-utils/lib/chef-utils/dsl/cloud.rb
index 6d9a8b7136..9d4de55656 100644
--- a/chef-utils/lib/chef-utils/dsl/cloud.rb
+++ b/chef-utils/lib/chef-utils/dsl/cloud.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/default_paths.rb b/chef-utils/lib/chef-utils/dsl/default_paths.rb
index f18bd93157..b2eb359273 100644
--- a/chef-utils/lib/chef-utils/dsl/default_paths.rb
+++ b/chef-utils/lib/chef-utils/dsl/default_paths.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/introspection.rb b/chef-utils/lib/chef-utils/dsl/introspection.rb
index 35a0be73bd..4edfb8d139 100644
--- a/chef-utils/lib/chef-utils/dsl/introspection.rb
+++ b/chef-utils/lib/chef-utils/dsl/introspection.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/os.rb b/chef-utils/lib/chef-utils/dsl/os.rb
index b7d2137180..da6850a77a 100644
--- a/chef-utils/lib/chef-utils/dsl/os.rb
+++ b/chef-utils/lib/chef-utils/dsl/os.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/path_sanity.rb b/chef-utils/lib/chef-utils/dsl/path_sanity.rb
index 1fbfbdccf3..7766ce3176 100644
--- a/chef-utils/lib/chef-utils/dsl/path_sanity.rb
+++ b/chef-utils/lib/chef-utils/dsl/path_sanity.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/platform.rb b/chef-utils/lib/chef-utils/dsl/platform.rb
index 322cf27cb2..f44cb811bb 100644
--- a/chef-utils/lib/chef-utils/dsl/platform.rb
+++ b/chef-utils/lib/chef-utils/dsl/platform.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/platform_family.rb b/chef-utils/lib/chef-utils/dsl/platform_family.rb
index d666229688..10d7b35901 100644
--- a/chef-utils/lib/chef-utils/dsl/platform_family.rb
+++ b/chef-utils/lib/chef-utils/dsl/platform_family.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/platform_version.rb b/chef-utils/lib/chef-utils/dsl/platform_version.rb
index 4d0a9247bd..33a534c5fb 100644
--- a/chef-utils/lib/chef-utils/dsl/platform_version.rb
+++ b/chef-utils/lib/chef-utils/dsl/platform_version.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/service.rb b/chef-utils/lib/chef-utils/dsl/service.rb
index ed7805806c..4dedc8b8d6 100644
--- a/chef-utils/lib/chef-utils/dsl/service.rb
+++ b/chef-utils/lib/chef-utils/dsl/service.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/train_helpers.rb b/chef-utils/lib/chef-utils/dsl/train_helpers.rb
index b4be878723..8cc676d34d 100644
--- a/chef-utils/lib/chef-utils/dsl/train_helpers.rb
+++ b/chef-utils/lib/chef-utils/dsl/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/chef-utils/lib/chef-utils/dsl/virtualization.rb b/chef-utils/lib/chef-utils/dsl/virtualization.rb
index ebc5d5228a..d2c1c5b531 100644
--- a/chef-utils/lib/chef-utils/dsl/virtualization.rb
+++ b/chef-utils/lib/chef-utils/dsl/virtualization.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/dsl/which.rb b/chef-utils/lib/chef-utils/dsl/which.rb
index c1aa64c159..49779f92a7 100644
--- a/chef-utils/lib/chef-utils/dsl/which.rb
+++ b/chef-utils/lib/chef-utils/dsl/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/chef-utils/lib/chef-utils/dsl/windows.rb b/chef-utils/lib/chef-utils/dsl/windows.rb
index 67d2852393..dc8cd4ebc0 100644
--- a/chef-utils/lib/chef-utils/dsl/windows.rb
+++ b/chef-utils/lib/chef-utils/dsl/windows.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/internal.rb b/chef-utils/lib/chef-utils/internal.rb
index aa52005912..e5a7e65c89 100644
--- a/chef-utils/lib/chef-utils/internal.rb
+++ b/chef-utils/lib/chef-utils/internal.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/lib/chef-utils/mash.rb b/chef-utils/lib/chef-utils/mash.rb
index 00a1444964..484e172b33 100644
--- a/chef-utils/lib/chef-utils/mash.rb
+++ b/chef-utils/lib/chef-utils/mash.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Copyright 2009-2016, Dan Kubb
# Permission is hereby granted, free of charge, to any person obtaining
diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb
index 8627258fd3..9b8739aa7d 100644
--- a/chef-utils/lib/chef-utils/version.rb
+++ b/chef-utils/lib/chef-utils/version.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
#
diff --git a/chef-utils/lib/chef-utils/version_string.rb b/chef-utils/lib/chef-utils/version_string.rb
index 744704dc63..345f0ab03e 100644
--- a/chef-utils/lib/chef-utils/version_string.rb
+++ b/chef-utils/lib/chef-utils/version_string.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
# Copyright:: Copyright 2017, Noah Kantrowitz
# License:: Apache License, Version 2.0
#
diff --git a/chef-utils/spec/spec_helper.rb b/chef-utils/spec/spec_helper.rb
index 0b193e2d9a..da4fe0a03e 100644
--- a/chef-utils/spec/spec_helper.rb
+++ b/chef-utils/spec/spec_helper.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
require "chef-utils"
# FIXME: dynamically generate this for accuracy
diff --git a/chef-utils/spec/unit/dsl/architecture_spec.rb b/chef-utils/spec/unit/dsl/architecture_spec.rb
index 30eab27bfb..a5336d05ef 100644
--- a/chef-utils/spec/unit/dsl/architecture_spec.rb
+++ b/chef-utils/spec/unit/dsl/architecture_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/cloud_spec.rb b/chef-utils/spec/unit/dsl/cloud_spec.rb
index 6cb7753b32..8a718dc37d 100644
--- a/chef-utils/spec/unit/dsl/cloud_spec.rb
+++ b/chef-utils/spec/unit/dsl/cloud_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/dsl_spec.rb b/chef-utils/spec/unit/dsl/dsl_spec.rb
index c03f3224ec..fd8869222f 100644
--- a/chef-utils/spec/unit/dsl/dsl_spec.rb
+++ b/chef-utils/spec/unit/dsl/dsl_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/introspection_spec.rb b/chef-utils/spec/unit/dsl/introspection_spec.rb
index 9275a9fc79..2a841dee68 100644
--- a/chef-utils/spec/unit/dsl/introspection_spec.rb
+++ b/chef-utils/spec/unit/dsl/introspection_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/os_spec.rb b/chef-utils/spec/unit/dsl/os_spec.rb
index 9230670487..967517b957 100644
--- a/chef-utils/spec/unit/dsl/os_spec.rb
+++ b/chef-utils/spec/unit/dsl/os_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/path_sanity_spec.rb b/chef-utils/spec/unit/dsl/path_sanity_spec.rb
index c75b99a751..50cadd7466 100644
--- a/chef-utils/spec/unit/dsl/path_sanity_spec.rb
+++ b/chef-utils/spec/unit/dsl/path_sanity_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/platform_family_spec.rb b/chef-utils/spec/unit/dsl/platform_family_spec.rb
index bcd0f3412c..fdf4584afd 100644
--- a/chef-utils/spec/unit/dsl/platform_family_spec.rb
+++ b/chef-utils/spec/unit/dsl/platform_family_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/platform_spec.rb b/chef-utils/spec/unit/dsl/platform_spec.rb
index 93b61f0532..216e15f112 100644
--- a/chef-utils/spec/unit/dsl/platform_spec.rb
+++ b/chef-utils/spec/unit/dsl/platform_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/service_spec.rb b/chef-utils/spec/unit/dsl/service_spec.rb
index 0288343940..bfb78441b2 100644
--- a/chef-utils/spec/unit/dsl/service_spec.rb
+++ b/chef-utils/spec/unit/dsl/service_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/virtualization_spec.rb b/chef-utils/spec/unit/dsl/virtualization_spec.rb
index 2b26f5514f..6ee7eb3d3b 100644
--- a/chef-utils/spec/unit/dsl/virtualization_spec.rb
+++ b/chef-utils/spec/unit/dsl/virtualization_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/which_spec.rb b/chef-utils/spec/unit/dsl/which_spec.rb
index 96e6296e5a..5ea5f6ccea 100644
--- a/chef-utils/spec/unit/dsl/which_spec.rb
+++ b/chef-utils/spec/unit/dsl/which_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/dsl/windows_spec.rb b/chef-utils/spec/unit/dsl/windows_spec.rb
index a1d20e854b..423cfe5187 100644
--- a/chef-utils/spec/unit/dsl/windows_spec.rb
+++ b/chef-utils/spec/unit/dsl/windows_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Copyright:: Copyright (c) Chef Software Inc.
# License:: Apache License, Version 2.0
diff --git a/chef-utils/spec/unit/mash_spec.rb b/chef-utils/spec/unit/mash_spec.rb
index 2991592ec1..3f83823773 100644
--- a/chef-utils/spec/unit/mash_spec.rb
+++ b/chef-utils/spec/unit/mash_spec.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
#
# Author:: Matthew Kent (<mkent@magoazul.com>)
# Copyright:: Copyright (c) Chef Software Inc.