summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-03-11 20:27:05 -0700
committerTim Smith <tsmith@chef.io>2019-03-11 20:27:05 -0700
commite200fe00ee5494ec6473c8a569c20e1cc2e199ab (patch)
tree5857bd8b5c1d4425c5bdd1ec66c2c7452ab00f70
parent62c6ff31ea837b2b4c361e413191090fc9e4b4a7 (diff)
downloadchef-kill_old_ruby_speccs.tar.gz
Note that this helper method is no longer a backportkill_old_ruby_speccs
This was an undocumented method that was removed from Ruby 2.5. It's ours now. https://github.com/ruby/ruby/commit/25d56ea7b7b52dc81af30c92a9a0e2d2dab6ff27 Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--spec/support/chef_helpers.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/support/chef_helpers.rb b/spec/support/chef_helpers.rb
index 444e5a30c8..4ac6102887 100644
--- a/spec/support/chef_helpers.rb
+++ b/spec/support/chef_helpers.rb
@@ -1,4 +1,4 @@
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -13,6 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
+
CHEF_SPEC_DATA = File.expand_path(File.dirname(__FILE__) + "/../data/")
CHEF_SPEC_ASSETS = File.expand_path(File.dirname(__FILE__) + "/../functional/assets/")
CHEF_SPEC_BACKUP_PATH = File.join(Dir.tmpdir, "test-backup-path")
@@ -29,9 +30,7 @@ def sha256_checksum(path)
OpenSSL::Digest::SHA256.hexdigest(File.read(path))
end
-# From Ruby 1.9.2+
-# Here for backwards compatibility with Ruby 1.8.7
-# http://rubydoc.info/stdlib/tmpdir/1.9.2/Dir/Tmpname
+# extracted from Ruby < 2.5 to return a unique temp file name without creating it
def make_tmpname(prefix_suffix, n = nil)
case prefix_suffix
when String