diff options
author | tyler-ball <tball@chef.io> | 2018-08-06 13:08:03 -0600 |
---|---|---|
committer | tyler-ball <tball@chef.io> | 2018-08-06 13:08:03 -0600 |
commit | 3a5f21249c3e2560b73d5881ca7ab3e8ddb24dac (patch) | |
tree | 44bbf0b0d4bc8a142c60f1773196c13eb97c9d28 | |
parent | 522d04e230cb0d5d8b7878baed568d069ea2d8c0 (diff) | |
download | chef-3a5f21249c3e2560b73d5881ca7ab3e8ddb24dac.tar.gz |
Backporting https://github.com/chef/chef/pull/7104 to Chef 13
Signed-off-by: tyler-ball <tball@chef.io>
-rw-r--r-- | .travis.yml | 54 | ||||
-rw-r--r-- | lib/chef/file_content_management/tempfile.rb | 6 |
2 files changed, 30 insertions, 30 deletions
diff --git a/.travis.yml b/.travis.yml index c4f1ba3911..07395448ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,7 +39,7 @@ matrix: bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen - env: INTEGRATION_SPECS_24: 1 - rvm: 2.4.3 + rvm: 2.4.4 sudo: true script: sudo -E $(which bundle) exec rake spec:integration; bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen @@ -51,7 +51,7 @@ matrix: bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen - env: FUNCTIONAL_SPECS_24: 1 - rvm: 2.4.3 + rvm: 2.4.4 sudo: true script: sudo -E $(which bundle) exec rake spec:functional; bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen @@ -65,7 +65,7 @@ matrix: bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen - env: UNIT_SPECS_24: 1 - rvm: 2.4.3 + rvm: 2.4.4 sudo: true script: - sudo -E $(which bundle) exec rake spec:unit; @@ -73,13 +73,13 @@ matrix: bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen - env: CHEFSTYLE: 1 - rvm: 2.4.3 + rvm: 2.4.4 script: bundle exec rake style # also remove integration / external tests bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen - env: AUDIT_CHECK: 1 - rvm: 2.4.3 + rvm: 2.4.4 script: bundle exec bundle-audit check --update # also remove integration / external tests bundler_args: --without ci docgen guard integration maintenance omnibus_package --frozen @@ -89,45 +89,45 @@ matrix: - env: TEST_GEM: sethvargo/chef-sugar script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake - rvm: 2.4.3 + rvm: 2.4.4 - env: PEDANT_OPTS: --skip-oc_id TEST_GEM: chef/chef-zero script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake spec cheffs - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: chef/cheffish script: bundle exec tasks/bin/run_external_test $TEST_GEM cheffish-13 rake spec - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: chefspec/chefspec script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: foodcritic/foodcritic script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake test - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: poise/halite script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake spec - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: chef/knife-windows script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake unit_spec - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: poise/poise script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake spec - rvm: 2.4.3 + rvm: 2.4.4 - env: TEST_GEM: chef/knife-windows script: bundle exec tasks/bin/run_external_test $TEST_GEM master rake unit_spec - rvm: 2.4.3 + rvm: 2.4.4 ### START TEST KITCHEN ONLY ### # # Temporarily Disable Amazon Linux 2 # - # - rvm: 2.4.3 + # - rvm: 2.4.4 # services: docker # sudo: required # gemfile: kitchen-tests/Gemfile @@ -144,7 +144,7 @@ matrix: # env: # - AMAZON=LATEST # - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -161,7 +161,7 @@ matrix: env: - UBUNTU=14.04 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -178,7 +178,7 @@ matrix: env: - UBUNTU=16.04 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -195,7 +195,7 @@ matrix: env: - DEBIAN=7 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -212,7 +212,7 @@ matrix: env: - DEBIAN=8 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -229,7 +229,7 @@ matrix: env: - DEBIAN=9 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -246,7 +246,7 @@ matrix: env: - CENTOS=6 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -263,7 +263,7 @@ matrix: env: - CENTOS=7 - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -280,7 +280,7 @@ matrix: env: - FEDORA=latest - KITCHEN_YAML=.kitchen.travis.yml - - rvm: 2.4.3 + - rvm: 2.4.4 services: docker sudo: required gemfile: kitchen-tests/Gemfile @@ -297,7 +297,7 @@ matrix: env: - OPENSUSELEAP=42 - KITCHEN_YAML=.kitchen.travis.yml -# - rvm: 2.4.3 +# - rvm: 2.4.4 # services: docker # sudo: required # gemfile: kitchen-tests/Gemfile @@ -314,7 +314,7 @@ matrix: # env: # - AWESOME_CUSTOMERS_UBUNTU=1 # - KITCHEN_YAML=.kitchen.travis.yml -# - rvm: 2.4.3 +# - rvm: 2.4.4 # services: docker # sudo: required # gemfile: kitchen-tests/Gemfile @@ -332,7 +332,7 @@ matrix: # - AWESOME_CUSTOMERS_RHEL=1 # - KITCHEN_YAML=.kitchen.travis.yml # ### END TEST KITCHEN ONLY ### - - rvm: 2.4.3 + - rvm: 2.4.4 sudo: required before_install: - gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) diff --git a/lib/chef/file_content_management/tempfile.rb b/lib/chef/file_content_management/tempfile.rb index cf59a87996..3d22069be2 100644 --- a/lib/chef/file_content_management/tempfile.rb +++ b/lib/chef/file_content_management/tempfile.rb @@ -1,6 +1,6 @@ # # Author:: Lamont Granquist (<lamont@chef.io>) -# Copyright:: Copyright 2013-2016, Chef Software Inc. +# Copyright:: Copyright 2013-2018, Chef Software Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -68,7 +68,7 @@ class Chef # the leading "[.]chef-" here should be considered a public API and should not be changed basename.insert 0, "chef-" basename.insert 0, "." unless Chef::Platform.windows? # dotfile if we're not on windows - basename + basename.scrub end # this is similar to File.extname() but greedy about the extension (from the first dot, not the last dot) @@ -76,7 +76,7 @@ class Chef # complexity here is due to supporting mangling non-UTF8 strings (e.g. latin-1 filenames with characters that are illegal in UTF-8) b = File.basename(@new_resource.path) i = b.index(".") - i.nil? ? "" : b[i..-1] + i.nil? ? "" : b[i..-1].scrub end # Returns the possible directories for the tempfile to be created in. |