diff options
author | Tim Smith <tsmith@chef.io> | 2020-05-21 16:26:58 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-21 16:26:58 -0700 |
commit | 27bc2d2abd1c9adcd1c0dd64533562152ea313f6 (patch) | |
tree | c93d3621a7be9c40526380312e24c64d1f7cc520 | |
parent | 5f89754ac8645ad4837b296e09770ad600991b31 (diff) | |
parent | 01302581de7a5a522c8c4e1d29352590d3f12de0 (diff) | |
download | chef-27bc2d2abd1c9adcd1c0dd64533562152ea313f6.tar.gz |
Merge pull request #9899 from chef/bump_deps_15
Update all deps to current
62 files changed, 335 insertions, 408 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml index 55c729eb39..14a3d7196d 100644 --- a/.expeditor/verify.pipeline.yml +++ b/.expeditor/verify.pipeline.yml @@ -1,5 +1,7 @@ --- expeditor: + cached_folders: + - vendor defaults: buildkite: retry: @@ -21,7 +23,7 @@ steps: expeditor: executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 privileged: true - label: "Functional Specs Ubuntu :ruby: 2.6" @@ -34,7 +36,7 @@ steps: expeditor: executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 privileged: true - label: "Unit Specs Ubuntu :ruby: 2.6" @@ -44,11 +46,9 @@ steps: - bundle exec rake spec:unit - bundle exec rake component_specs expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 - label: "Integration Specs CentOS :ruby: 2.6" commands: @@ -58,7 +58,7 @@ steps: expeditor: executor: docker: - image: rubydistros/centos-7 + image: rubydistros/centos-7:2.6 privileged: true - label: "Functional Specs CentOS :ruby: 2.6" @@ -70,7 +70,7 @@ steps: expeditor: executor: docker: - image: rubydistros/centos-7 + image: rubydistros/centos-7:2.6 privileged: true - label: "Unit Specs CentOS :ruby: 2.6" @@ -80,11 +80,9 @@ steps: - bundle exec rake spec:unit - bundle exec rake component_specs expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/centos-7 + image: rubydistros/centos-7:2.6 - label: "Integration Specs openSUSE :ruby: 2.6" commands: @@ -95,7 +93,7 @@ steps: expeditor: executor: docker: - image: rubydistros/opensuse-15 + image: rubydistros/opensuse-15:2.6 privileged: true - label: "Functional Specs openSUSE :ruby: 2.6" @@ -107,7 +105,7 @@ steps: expeditor: executor: docker: - image: rubydistros/opensuse-15 + image: rubydistros/opensuse-15:2.6 privileged: true - label: "Unit Specs openSUSE :ruby: 2.6" @@ -117,11 +115,9 @@ steps: - bundle exec rake spec:unit - bundle exec rake component_specs expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/opensuse-15 + image: rubydistros/opensuse-15:2.6 - label: "Integration Specs Fedora :ruby: 2.6" commands: @@ -131,7 +127,7 @@ steps: expeditor: executor: docker: - image: rubydistros/fedora-latest + image: rubydistros/fedora-latest:2.6 privileged: true - label: "Functional Specs Fedora :ruby: 2.6" @@ -143,7 +139,7 @@ steps: expeditor: executor: docker: - image: rubydistros/fedora-latest + image: rubydistros/fedora-latest:2.6 privileged: true environment: - FORCE_FFI_YAJL=ext @@ -156,18 +152,14 @@ steps: - bundle exec rake spec:unit - bundle exec rake component_specs expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/fedora-latest + image: rubydistros/fedora-latest:2.6 - label: "Integration Specs Windows :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_win_integration.ps1 expeditor: - cached_folders: - - vendor executor: docker: host_os: windows @@ -180,8 +172,6 @@ steps: commands: - scripts/bk_tests/bk_win_functional.ps1 expeditor: - cached_folders: - - vendor executor: windows: privileged: true @@ -191,8 +181,6 @@ steps: commands: - /workdir/scripts/bk_tests/bk_run_choco.ps1 expeditor: - cached_folders: - - vendor executor: docker: host_os: windows @@ -202,8 +190,6 @@ steps: commands: - /workdir/scripts/bk_tests/bk_win_unit.ps1 expeditor: - cached_folders: - - vendor executor: docker: host_os: windows @@ -218,11 +204,9 @@ steps: - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen ruby_prof - bundle exec rake style expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 ######################################################################### # Tests Ruby 2.5 @@ -259,8 +243,6 @@ steps: - bundle exec rake spec:unit - bundle exec rake component_specs expeditor: - cached_folders: - - vendor executor: docker: image: ruby:2.5-buster @@ -269,70 +251,60 @@ steps: # EXTERNAL GEM TESTING ######################################################################### -- label: "Test chef-sugar gem :ruby: 2.6" +- label: "chef-sugar gem :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec tasks/bin/run_external_test chef/chef-sugar master rake expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 -- label: "Test chef-zero gem :ruby: 2.6" +- label: "chef-zero gem :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec tasks/bin/run_external_test chef/chef-zero master rake pedant expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 environment: - PEDANT_OPTS=--skip-oc_id - CHEF_FS=true -- label: "Test cheffish gem :ruby: 2.6" +- label: "cheffish gem :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec tasks/bin/run_external_test chef/cheffish master rake spec expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 -- label: "Test chefspec gem :ruby: 2.6" +- label: "chefspec gem :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec tasks/bin/run_external_test chefspec/chefspec master rake expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 -- label: "Test knife-windows gem :ruby: 2.6" +- label: "knife-windows gem :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec tasks/bin/run_external_test chef/knife-windows master rake spec expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 -- label: "Test berkshelf gem :ruby: 2.6" +- label: "berkshelf gem :ruby: 2.6" commands: - /workdir/scripts/bk_tests/bk_container_prep.sh - apt-get update -y @@ -341,21 +313,19 @@ steps: - bundle install --jobs=3 --retry=3 --path=vendor/bundle --without omnibus_package docgen - bundle exec tasks/bin/run_external_test berkshelf/berkshelf master rake expeditor: - cached_folders: - - vendor executor: docker: - image: rubydistros/ubuntu-18.04 + image: rubydistros/ubuntu-18.04:2.6 ######################################################################### # START TEST KITCHEN ONLY ######################################################################### -- label: "Kitchen Tests :amazon: 2" +- label: "Kitchen: Amazon Linux 201X" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-amazonlinux-2 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-amazonlinux artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -366,11 +336,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests :amazon: 201X" +- label: "Kitchen: Amazon Linux 2" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-amazonlinux-2 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-amazonlinux-2 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -381,11 +351,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Ubuntu: 16.04" +- label: "Kitchen: Ubuntu 16.04" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-ubuntu-1604 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-ubuntu-1604 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -397,11 +367,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Ubuntu: 18.04" +- label: "Kitchen: Ubuntu 18.04" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-ubuntu-1804 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-ubuntu-1804 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -412,11 +382,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Ubuntu: 20.04" +- label: "Kitchen: Ubuntu 20.04" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-ubuntu-2004 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-ubuntu-2004 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -427,11 +397,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Debian: 8" +- label: "Kitchen: Debian 8" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-debian-8 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-debian-8 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -442,11 +412,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Debian: 9" +- label: "Kitchen: Debian 9" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-debian-9 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-debian-9 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -457,11 +427,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Debian: 10" +- label: "Kitchen: Debian 10" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-debian-10 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-debian-10 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -472,11 +442,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests CentOS: 6" +- label: "Kitchen: CentOS 6" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-centos-6 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-centos-6 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -487,11 +457,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests CentOS: 7" +- label: "Kitchen: CentOS 7" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-centos-7 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-centos-7 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -502,11 +472,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests CentOS: 8" +- label: "Kitchen: CentOS 8" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-centos-8 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-centos-8 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -517,11 +487,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Oracle Linux: 6" +- label: "Kitchen: Oracle Linux 7" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-6 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-oraclelinux-7 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -532,11 +502,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Oracle Linux: 7" +- label: "Kitchen: Fedora latest" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-7 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-fedora-latest artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -547,26 +517,11 @@ steps: privileged: true single-use: true -- label: "Kitchen Tests Fedora: latest" +- label: "Kitchen: openSUSE Leap: 15" commands: - scripts/bk_tests/bk_linux_exec.sh - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-fedora-latest - artifact_paths: - - $PWD/.kitchen/logs/kitchen.log - env: - KITCHEN_YAML: kitchen.yml - expeditor: - executor: - linux: - privileged: true - single-use: true - -- label: "Kitchen Tests openSUSE Leap: 15" - commands: - - scripts/bk_tests/bk_linux_exec.sh - - cd kitchen-tests - - ~/.asdf/shims/bundle exec kitchen test end-to-end-opensuse-leap-15 + - /opt/omnibus-toolchain/bin/bundle exec kitchen test end-to-end-opensuse-leap-15 artifact_paths: - $PWD/.kitchen/logs/kitchen.log env: @@ -7,7 +7,6 @@ source "https://rubygems.org" # of bundler versions prior to 1.12.0 (https://github.com/bundler/bundler/commit/193a14fe5e0d56294c7b370a0e59f93b2c216eed) gem "chef", path: "." -# necessary until we release ohai 15 gem "ohai", git: "https://github.com/chef/ohai.git", branch: "15-stable" gem "chef-utils", path: File.expand_path("../chef-utils", __FILE__) if File.exist?(File.expand_path("../chef-utils", __FILE__)) @@ -23,6 +22,9 @@ end gem "cheffish", "~> 14" +# avoid bringing in the new http 4 gem that comes with other ffi baggage which breaks builds +gem "chef-telemetry", "=1.0.3" + group(:omnibus_package) do gem "appbundler" gem "rb-readline" @@ -30,7 +32,7 @@ group(:omnibus_package) do gem "inspec-core-bin", "~> 4.18" # need to provide the binaries for inspec gem "chef-vault" gem "ed25519" # ed25519 ssh key support done here as it's a native gem we can't put in train - gem "bcrypt_pbkdf" # ed25519 ssh key support done here as it's a native gem we can't put in train + gem "bcrypt_pbkdf", ">= 1.1.0.rc1" # ed25519 ssh key support done here as it's a native gem we can't put in train end group(:omnibus_package, :pry) do @@ -65,7 +67,6 @@ group(:development, :test) do gem "rspec-mocks", "~> 3.5" gem "rspec-expectations", "~> 3.5" gem "rspec_junit_formatter", "~> 0.2.0" - gem "simplecov" gem "webmock" gem "fauxhai-ng" # for chef-utils gem end @@ -84,6 +85,7 @@ eval_gemfile("./Gemfile.local") if File.exist?("./Gemfile.local") # These lines added for Windows development only. # For FFI to call into PowerShell we need the binaries and assemblies located # in the Ruby bindir. +# The Powershell DLL source lives here: https://github.com/chef/chef-powershell-shim # # We copy (and overwrite) these files every time "bundle <exec|install>" is # executed, just in case they have changed. diff --git a/Gemfile.lock b/Gemfile.lock index 74f9efbcbe..fd23c31a9f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,10 +1,10 @@ GIT remote: https://github.com/chef/chefstyle.git - revision: 274a01b0e3fc9a350962c3ea73005e2a0d3215f2 + revision: d8b485c06560bffe507ba519137a5aceb8ee0ac8 branch: master specs: - chefstyle (1.0.3) - rubocop (= 0.82.0) + chefstyle (1.0.5) + rubocop (= 0.83.0) GIT remote: https://github.com/chef/ohai.git @@ -135,13 +135,13 @@ GEM mixlib-cli (>= 1.4, < 3.0) mixlib-shellout (>= 2.0, < 4.0) ast (2.4.0) - bcrypt_pbkdf (1.0.1) - bcrypt_pbkdf (1.0.1-x64-mingw32) - bcrypt_pbkdf (1.0.1-x86-mingw32) + bcrypt_pbkdf (1.1.0.rc1) + bcrypt_pbkdf (1.1.0.rc1-x64-mingw32) + bcrypt_pbkdf (1.1.0.rc1-x86-mingw32) binding_of_caller (0.8.0) debug_inspector (>= 0.0.1) builder (3.2.4) - byebug (11.1.2) + byebug (11.1.3) chef-telemetry (1.0.3) chef-config concurrent-ruby (~> 1.0) @@ -163,7 +163,6 @@ GEM safe_yaml (~> 1.0.0) debug_inspector (0.0.3) diff-lcs (1.3) - docile (1.3.2) domain_name (0.5.20190701) unf (>= 0.0.5, < 1.0.0) ecma-re-validator (0.2.1) @@ -174,7 +173,7 @@ GEM erubis (2.7.0) faraday (1.0.1) multipart-post (>= 1.2, < 3) - fauxhai-ng (8.0.0) + fauxhai-ng (8.2.0) net-ssh ffi (1.12.2) ffi (1.12.2-x64-mingw32) @@ -190,7 +189,7 @@ GEM ffi (>= 1.0.1) gyoku (1.3.1) builder (>= 2.1.2) - hana (1.3.5) + hana (1.3.6) hashdiff (1.0.1) hashie (3.6.0) highline (1.7.10) @@ -206,7 +205,7 @@ GEM http_parser.rb (0.6.0) httpclient (2.8.3) iniparse (1.5.0) - inspec-core (4.18.104) + inspec-core (4.18.114) addressable (~> 2.4) chef-telemetry (~> 1.0) faraday (>= 0.9.0) @@ -214,12 +213,12 @@ GEM htmlentities (~> 4.3) json_schemer (~> 0.2.1) license-acceptance (>= 0.2.13, < 2.0) - method_source (~> 0.8) + method_source (>= 0.8, < 2.0) mixlib-log (~> 3.0) multipart-post (~> 2.0) parallel (~> 1.9) parslet (~> 1.5) - pry (~> 0) + pry (~> 0.13) rspec (~> 3.9) rspec-its (~> 1.2) rubyzip (~> 1.2, >= 1.2.2) @@ -231,11 +230,10 @@ GEM train-core (~> 3.0) tty-prompt (~> 0.17) tty-table (~> 0.10) - inspec-core-bin (4.18.104) - inspec-core (= 4.18.104) + inspec-core-bin (4.18.114) + inspec-core (= 4.18.114) ipaddress (0.8.3) iso8601 (0.12.1) - jaro_winkler (1.5.4) json (2.3.0) json_schemer (0.2.11) ecma-re-validator (~> 0.2) @@ -252,7 +250,7 @@ GEM logging (2.2.2) little-plugger (~> 1.1) multi_json (~> 1.10) - method_source (0.9.2) + method_source (1.0.0) mixlib-archive (1.0.5) mixlib-log mixlib-archive (1.0.5-universal-mingw32) @@ -281,27 +279,27 @@ GEM net-ssh-gateway (>= 1.2.0) nori (2.6.0) parallel (1.19.1) - parser (2.7.1.1) + parser (2.7.1.2) ast (~> 2.4.0) parslet (1.8.2) - pastel (0.7.3) + pastel (0.7.4) equatable (~> 0.6) tty-color (~> 0.5) plist (3.5.0) proxifier (1.0.3) - pry (0.12.2) - coderay (~> 1.1.0) - method_source (~> 0.9.0) - pry-byebug (3.8.0) + pry (0.13.1) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.9.0) byebug (~> 11.0) - pry (~> 0.10) + pry (~> 0.13.0) pry-remote (0.1.8) pry (~> 0.9) slop (~> 3.0) pry-stack_explorer (0.4.9.3) binding_of_caller (>= 0.7) pry (>= 0.9.11) - public_suffix (4.0.4) + public_suffix (4.0.5) rack (2.2.2) rainbow (3.0.0) rake (12.3.3) @@ -312,9 +310,9 @@ GEM rspec-core (~> 3.9.0) rspec-expectations (~> 3.9.0) rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rspec-core (3.9.2) + rspec-support (~> 3.9.3) + rspec-expectations (3.9.2) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) rspec-its (1.3.0) @@ -323,12 +321,11 @@ GEM rspec-mocks (3.9.1) diff-lcs (>= 1.2.0, < 2.0) rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (3.9.3) rspec_junit_formatter (0.2.3) builder (< 4) rspec-core (>= 2, < 4, != 2.12.0) - rubocop (0.82.0) - jaro_winkler (~> 1.5.1) + rubocop (0.83.0) parallel (~> 1.10) parser (>= 2.7.0.1) rainbow (>= 2.2.2, < 4.0) @@ -342,10 +339,6 @@ GEM rubyzip (1.3.0) safe_yaml (1.0.5) semverse (3.0.0) - simplecov (0.18.5) - docile (~> 1.1) - simplecov-html (~> 0.11) - simplecov-html (0.12.2) slop (3.6.0) sslshake (1.3.0) strings (0.1.8) @@ -360,7 +353,7 @@ GEM term-ansicolor (1.7.1) tins (~> 1.0) thor (1.0.1) - tins (1.24.1) + tins (1.25.0) sync tomlrb (1.3.0) train-core (3.2.28) @@ -446,7 +439,7 @@ GEM winrm (~> 2.0) wisper (2.0.1) wmi-lite (1.0.5) - yard (0.9.24) + yard (0.9.25) PLATFORMS ruby @@ -455,10 +448,11 @@ PLATFORMS DEPENDENCIES appbundler - bcrypt_pbkdf + bcrypt_pbkdf (>= 1.1.0.rc1) chef! chef-bin! chef-config! + chef-telemetry (= 1.0.3) chef-utils! chef-vault cheffish (~> 14) @@ -480,7 +474,6 @@ DEPENDENCIES rspec_junit_formatter (~> 0.2.0) ruby-prof (< 1.3.0) ruby-shadow - simplecov webmock yard @@ -37,7 +37,7 @@ task :super_install do sh("rake install") end -# Templating the powershell extensions so we can inject distro constants + # Templating the powershell extensions so we can inject distro constants template_file = ::File.join(::File.dirname(__FILE__), "distro", "templates", "powershell", "chef", "chef.psm1.erb") psm1_path = ::File.join(::File.dirname(__FILE__), "distro", "powershell", "chef") FileUtils.mkdir_p psm1_path diff --git a/chef-config/lib/chef-config/path_helper.rb b/chef-config/lib/chef-config/path_helper.rb index 4487dd2cf2..80cac88f97 100644 --- a/chef-config/lib/chef-config/path_helper.rb +++ b/chef-config/lib/chef-config/path_helper.rb @@ -268,7 +268,7 @@ module ChefConfig # Determine if the given path is protected by OS X System Integrity Protection. def self.is_sip_path?(path, node) if node["platform"] == "mac_os_x" && Gem::Version.new(node["platform_version"]) >= Gem::Version.new("10.11") - # @todo: parse rootless.conf for this? + # @todo: parse rootless.conf for this? sip_paths = [ "/System", "/bin", "/sbin", "/usr" ] diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb index 874e3a48c4..5cf814e7b3 100644 --- a/chef-config/spec/unit/config_spec.rb +++ b/chef-config/spec/unit/config_spec.rb @@ -186,29 +186,29 @@ RSpec.describe ChefConfig::Config do end describe "when configuring formatters" do - # if TTY and not(force-logger) - # formatter = configured formatter or default formatter - # formatter goes to STDOUT/ERR - # if log file is writeable - # log level is configured level or info - # log location is file - # else - # log level is warn - # log location is STDERR - # end - # elsif not(TTY) and force formatter - # formatter = configured formatter or default formatter - # if log_location specified - # formatter goes to log_location - # else - # formatter goes to STDOUT/ERR - # end - # else - # formatter = "null" - # log_location = configured-value or defualt - # log_level = info or defualt - # end - # + # if TTY and not(force-logger) + # formatter = configured formatter or default formatter + # formatter goes to STDOUT/ERR + # if log file is writeable + # log level is configured level or info + # log location is file + # else + # log level is warn + # log location is STDERR + # end + # elsif not(TTY) and force formatter + # formatter = configured formatter or default formatter + # if log_location specified + # formatter goes to log_location + # else + # formatter goes to STDOUT/ERR + # end + # else + # formatter = "null" + # log_location = configured-value or defualt + # log_level = info or defualt + # end + # it "has an empty list of formatters by default" do expect(ChefConfig::Config.formatters).to eq([]) end diff --git a/kitchen-tests/cookbooks/end_to_end/attributes/default.rb b/kitchen-tests/cookbooks/end_to_end/attributes/default.rb index 027d9881d8..332a3fe462 100644 --- a/kitchen-tests/cookbooks/end_to_end/attributes/default.rb +++ b/kitchen-tests/cookbooks/end_to_end/attributes/default.rb @@ -21,7 +21,7 @@ default["openssh"]["client"]["password_authentication"] = "yes" # turn off kerberos client-side default["openssh"]["client"]["gssapi_authentication"] = "no" default["openssh"]["client"]["check_host_ip"] = "no" -# everone turns strict host key checking off anyway +# everyone turns strict host key checking off anyway default["openssh"]["client"]["strict_host_key_checking"] = "no" # force protocol 2 default["openssh"]["client"]["protocol"] = "2" diff --git a/kitchen-tests/kitchen.yml b/kitchen-tests/kitchen.yml index 687a2b4b10..3ceb111f6a 100644 --- a/kitchen-tests/kitchen.yml +++ b/kitchen-tests/kitchen.yml @@ -17,16 +17,16 @@ provisioner: lifecycle: pre_converge: - remote: echo "Chef container's Chef / Ohai release:" - - remote: /opt/chef/embedded/bin/chef-client -v - - remote: /opt/chef/embedded/bin/ohai -v + - remote: /opt/chef/bin/chef-client -v + - remote: /opt/chef/bin/ohai -v - remote: /opt/chef/embedded/bin/rake --version - remote: /opt/chef/embedded/bin/bundle -v - remote: /opt/chef/embedded/bin/gem install appbundler appbundle-updater --no-doc - remote: /opt/chef/embedded/bin/appbundle-updater chef ohai <%= File.readlines('../Gemfile.lock', File.expand_path(File.dirname(__FILE__))).find { |l| l =~ /^\s+ohai \((\d+\.\d+\.\d+)\)/ }; 'v' + $1 %> --tarball --github chef/ohai - remote: /opt/chef/embedded/bin/appbundle-updater chef chef <%= ENV['BUILDKITE_COMMIT'] || %x(git rev-parse HEAD).chomp %> --tarball --github chef/chef - remote: echo "Installed Chef / Ohai release:" - - remote: /opt/chef/embedded/bin/chef-client -v - - remote: /opt/chef/embedded/bin/ohai -v + - remote: /opt/chef/bin/chef-client -v + - remote: /opt/chef/bin/ohai -v verifier: name: inspec @@ -74,6 +74,9 @@ platforms: pid_one_command: /sbin/init intermediate_instructions: - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers + - RUN yum install -y centos-release-scl + - RUN yum install -y devtoolset-7 + - RUN scl enable devtoolset-7 bash - name: centos-7 driver: @@ -91,13 +94,6 @@ platforms: - RUN yum -y install e2fsprogs - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers -- name: oraclelinux-6 - driver: - image: dokken/oraclelinux-6 - pid_one_command: /sbin/init - intermediate_instructions: - - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers - - name: oraclelinux-7 driver: image: dokken/oraclelinux-7 @@ -150,6 +146,7 @@ platforms: intermediate_instructions: - RUN /usr/bin/zypper --non-interactive update - RUN /usr/bin/zypper --non-interactive install cron + - RUN /usr/bin/zypper --non-interactive install insserv-compat suites: - name: end-to-end diff --git a/lib/chef/application/apply.rb b/lib/chef/application/apply.rb index 35aefc949d..6469e9b532 100644 --- a/lib/chef/application/apply.rb +++ b/lib/chef/application/apply.rb @@ -215,7 +215,7 @@ class Chef::Application::Apply < Chef::Application Chef::Application.fatal!("#{e.class}: #{e.message}", e) end - # Get this party started + # Get this party started def run(enforce_license = false) reconfigure check_license_acceptance if enforce_license diff --git a/lib/chef/application/exit_code.rb b/lib/chef/application/exit_code.rb index fb1519e573..3235bfadeb 100644 --- a/lib/chef/application/exit_code.rb +++ b/lib/chef/application/exit_code.rb @@ -139,8 +139,8 @@ class Chef def notify_on_deprecation(message) Chef.deprecated(:exit_code, message) rescue Chef::Exceptions::DeprecatedFeatureError - # Have to rescue this, otherwise this unhandled error preempts - # the current exit code assignment. + # Have to rescue this, otherwise this unhandled error preempts + # the current exit code assignment. end def non_standard_exit_code_warning(exit_code) diff --git a/lib/chef/chef_fs/chef_fs_data_store.rb b/lib/chef/chef_fs/chef_fs_data_store.rb index 689ae3bf8a..8237729e89 100644 --- a/lib/chef/chef_fs/chef_fs_data_store.rb +++ b/lib/chef/chef_fs/chef_fs_data_store.rb @@ -204,7 +204,7 @@ class Chef @memory_store.create(path, name, data, *options) elsif path[0] == "cookbooks" && path.length == 2 - # Do nothing. The entry gets created when the cookbook is created. + # Do nothing. The entry gets created when the cookbook is created. # /policy_groups/GROUP/policies/NAME elsif path[0] == "policy_groups" && path[2] == "policies" @@ -724,8 +724,8 @@ class Chef path[-1] = "#{path[-1]}.json" end - # /acls/containers|nodes|... do NOT drop into the next elsif, and do - # not get .json appended + # /acls/containers|nodes|... do NOT drop into the next elsif, and do + # not get .json appended # /nodes|clients|.../x.json elsif path.length == 2 diff --git a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb index e0d4bea665..aa6981f23c 100644 --- a/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/policies_dir.rb @@ -66,7 +66,7 @@ class Chef # } # } def children - # Grab the names of the children, append json, and make child entries + # Grab the names of the children, append json, and make child entries @children ||= begin result = [] data = root.get_json(api_path) diff --git a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb index b60b84cb68..0a1ee83c36 100644 --- a/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb +++ b/lib/chef/chef_fs/file_system/chef_server/rest_list_dir.rb @@ -71,7 +71,7 @@ class Chef # Children are foo.json and bar.json in this case. # def children - # Grab the names of the children, append json, and make child entries + # Grab the names of the children, append json, and make child entries @children ||= root.get_json(api_path).keys.sort.map do |key| make_child_entry(key, true) end diff --git a/lib/chef/chef_fs/file_system/multiplexed_dir.rb b/lib/chef/chef_fs/file_system/multiplexed_dir.rb index 2930dd5d8c..82fa146264 100644 --- a/lib/chef/chef_fs/file_system/multiplexed_dir.rb +++ b/lib/chef/chef_fs/file_system/multiplexed_dir.rb @@ -19,7 +19,7 @@ class Chef def children result = [] seen = {} - # If multiple things have the same name, the first one wins. + # If multiple things have the same name, the first one wins. multiplexed_dirs.each do |dir| dir.children.each do |child| if seen[child.name] diff --git a/lib/chef/cookbook_version.rb b/lib/chef/cookbook_version.rb index e9d21512d2..aa9130d10d 100644 --- a/lib/chef/cookbook_version.rb +++ b/lib/chef/cookbook_version.rb @@ -327,10 +327,10 @@ class Chef # extract the preference part from the path. if manifest_record_path =~ %r{(#{Regexp.escape(segment.to_s)}/[^/]+/#{Regexp.escape(dirname)})/.+$} - # Note the specificy_dirname includes the segment and - # dirname argument as above, which is what - # preferences_for_path returns. It could be - # "files/ubuntu-9.10/dirname", for example. + # Note the specificy_dirname includes the segment and + # dirname argument as above, which is what + # preferences_for_path returns. It could be + # "files/ubuntu-9.10/dirname", for example. specificity_dirname = $1 # Record the specificity_dirname only if it's in the list of diff --git a/lib/chef/deprecated.rb b/lib/chef/deprecated.rb index 7062e27aab..7962e96bfb 100644 --- a/lib/chef/deprecated.rb +++ b/lib/chef/deprecated.rb @@ -72,7 +72,7 @@ class Chef # Just in case someone uses a symbol in the config by mistake. silence_spec = silence_spec.to_s end - # Check for a silence by deprecation name, or by location. + # Check for a silence by deprecation name, or by location. self.class.deprecation_key == silence_spec || self.class.deprecation_id.to_s == silence_spec || "chef-#{self.class.deprecation_id}" == silence_spec.downcase || location.include?(silence_spec) end # check if this warning has been silenced by inline comment. diff --git a/lib/chef/dsl/platform_introspection.rb b/lib/chef/dsl/platform_introspection.rb index 166066bad7..50f30bda52 100644 --- a/lib/chef/dsl/platform_introspection.rb +++ b/lib/chef/dsl/platform_introspection.rb @@ -168,7 +168,7 @@ class Chef has_platform end - # Implementation class for determining platform family dependent values + # Implementation class for determining platform family dependent values class PlatformFamilyDependentValue # Create a platform family dependent value object. diff --git a/lib/chef/knife/bootstrap.rb b/lib/chef/knife/bootstrap.rb index 0c8efe722f..98efe6aae6 100644 --- a/lib/chef/knife/bootstrap.rb +++ b/lib/chef/knife/bootstrap.rb @@ -94,13 +94,13 @@ class Chef description: "For WinRM basic authentication when using the 'ssl' auth method.", boolean: true - # This option was provided in knife bootstrap windows winrm, - # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here. - # option :kerberos_keytab_file, - # :short => "-T KEYTAB_FILE", - # :long => "--keytab-file KEYTAB_FILE", - # :description => "The Kerberos keytab file used for authentication", - # :proc => Proc.new { |keytab| Chef::Config[:knife][:kerberos_keytab_file] = keytab } + # This option was provided in knife bootstrap windows winrm, + # but it is ignored in knife-windows/WinrmSession, and so remains unimplemeneted here. + # option :kerberos_keytab_file, + # :short => "-T KEYTAB_FILE", + # :long => "--keytab-file KEYTAB_FILE", + # :description => "The Kerberos keytab file used for authentication", + # :proc => Proc.new { |keytab| Chef::Config[:knife][:kerberos_keytab_file] = keytab } option :kerberos_realm, short: "-R KERBEROS_REALM", diff --git a/lib/chef/knife/cookbook_site_search.rb b/lib/chef/knife/cookbook_site_search.rb index 209a1ffba6..ad19ce9df4 100644 --- a/lib/chef/knife/cookbook_site_search.rb +++ b/lib/chef/knife/cookbook_site_search.rb @@ -24,7 +24,7 @@ class Chef class Knife class CookbookSiteSearch < Knife::SupermarketSearch - # Handle the subclassing (knife doesn't do this :() + # Handle the subclassing (knife doesn't do this :() dependency_loaders.concat(superclass.dependency_loaders) banner "knife cookbook site search QUERY (options)" diff --git a/lib/chef/knife/cookbook_site_show.rb b/lib/chef/knife/cookbook_site_show.rb index 2a3f654a65..accb528672 100644 --- a/lib/chef/knife/cookbook_site_show.rb +++ b/lib/chef/knife/cookbook_site_show.rb @@ -24,7 +24,7 @@ class Chef class Knife class CookbookSiteShow < Knife::SupermarketShow - # Handle the subclassing (knife doesn't do this :() + # Handle the subclassing (knife doesn't do this :() dependency_loaders.concat(superclass.dependency_loaders) banner "knife cookbook site show COOKBOOK [VERSION] (options)" diff --git a/lib/chef/knife/cookbook_site_unshare.rb b/lib/chef/knife/cookbook_site_unshare.rb index 372f79f8b4..6de7b55559 100644 --- a/lib/chef/knife/cookbook_site_unshare.rb +++ b/lib/chef/knife/cookbook_site_unshare.rb @@ -25,7 +25,7 @@ class Chef class Knife class CookbookSiteUnshare < Knife::SupermarketUnshare - # Handle the subclassing (knife doesn't do this :() + # Handle the subclassing (knife doesn't do this :() dependency_loaders.concat(superclass.dependency_loaders) banner "knife cookbook site unshare COOKBOOK (options)" diff --git a/lib/chef/mixin/create_path.rb b/lib/chef/mixin/create_path.rb index 6d6f66317e..26988556aa 100644 --- a/lib/chef/mixin/create_path.rb +++ b/lib/chef/mixin/create_path.rb @@ -53,14 +53,14 @@ class Chef private def create_dir(path) - # When doing multithreaded downloads into the file cache, the following - # interleaving raises an error here: - # - # thread1 thread2 - # File.directory?(create_path) <- false - # File.directory?(create_path) <- false - # Dir.mkdir(create_path) - # Dir.mkdir(create_path) <- raises Errno::EEXIST + # When doing multithreaded downloads into the file cache, the following + # interleaving raises an error here: + # + # thread1 thread2 + # File.directory?(create_path) <- false + # File.directory?(create_path) <- false + # Dir.mkdir(create_path) + # Dir.mkdir(create_path) <- raises Errno::EEXIST Chef::Log.trace("Creating directory #{path}") Dir.mkdir(path) rescue Errno::EEXIST diff --git a/lib/chef/node/mixin/deep_merge_cache.rb b/lib/chef/node/mixin/deep_merge_cache.rb index 8cde5a400a..e88e079895 100644 --- a/lib/chef/node/mixin/deep_merge_cache.rb +++ b/lib/chef/node/mixin/deep_merge_cache.rb @@ -19,9 +19,9 @@ class Chef class Node module Mixin module DeepMergeCache - # Cache of deep merged values by top-level key. This is a simple hash which has keys that are the - # top-level keys of the node object, and we save the computed deep-merge for that key here. There is - # no cache of subtrees. + # Cache of deep merged values by top-level key. This is a simple hash which has keys that are the + # top-level keys of the node object, and we save the computed deep-merge for that key here. There is + # no cache of subtrees. attr_accessor :deep_merge_cache def initialize @@ -31,10 +31,10 @@ class Chef @deep_merge_cache = {} end - # Invalidate a key in the deep_merge_cache. If called with nil, or no arg, this will invalidate - # the entire deep_merge cache. In the case of the user doing node.default['foo']['bar']['baz']= - # that eventually results in a call to reset_cache('foo') here. A node.default=hash_thing call - # must invalidate the entire cache and re-deep-merge the entire node object. + # Invalidate a key in the deep_merge_cache. If called with nil, or no arg, this will invalidate + # the entire deep_merge cache. In the case of the user doing node.default['foo']['bar']['baz']= + # that eventually results in a call to reset_cache('foo') here. A node.default=hash_thing call + # must invalidate the entire cache and re-deep-merge the entire node object. def reset_cache(path = nil) if path.nil? deep_merge_cache.clear diff --git a/lib/chef/provider/service/simple.rb b/lib/chef/provider/service/simple.rb index 754437b4a0..0d1a9ae786 100644 --- a/lib/chef/provider/service/simple.rb +++ b/lib/chef/provider/service/simple.rb @@ -117,9 +117,9 @@ class Chef logger.trace("#{@new_resource} is running") end rescue Mixlib::ShellOut::ShellCommandFailed, SystemCallError - # ShellOut sometimes throws different types of Exceptions than ShellCommandFailed. - # Temporarily catching different types of exceptions here until we get Shellout fixed. - # TODO: Remove the line before one we get the ShellOut fix. + # ShellOut sometimes throws different types of Exceptions than ShellCommandFailed. + # Temporarily catching different types of exceptions here until we get Shellout fixed. + # TODO: Remove the line before one we get the ShellOut fix. @status_load_success = false @current_resource.running false nil diff --git a/lib/chef/provider/windows_task.rb b/lib/chef/provider/windows_task.rb index e0ede765c2..52d94d31a1 100644 --- a/lib/chef/provider/windows_task.rb +++ b/lib/chef/provider/windows_task.rb @@ -426,7 +426,7 @@ class Chef when TaskScheduler::AT_LOGON # TODO: handle option for this trigger when TaskScheduler::AT_SYSTEMSTART - # TODO: handle option for this trigger + # TODO: handle option for this trigger end end diff --git a/lib/chef/resource/build_essential.rb b/lib/chef/resource/build_essential.rb index 0ed2fba151..3bca73333f 100644 --- a/lib/chef/resource/build_essential.rb +++ b/lib/chef/resource/build_essential.rb @@ -60,7 +60,7 @@ class Chef when fedora_derived? package %w{ autoconf bison flex gcc gcc-c++ gettext kernel-devel make m4 ncurses-devel patch } - # Ensure GCC 4 is available on older pre-6 EL + # Ensure GCC 4 is available on older pre-6 EL package %w{ gcc44 gcc44-c++ } if platform_family?("rhel") && node["platform_version"].to_i < 6 when freebsd? package "devel/gmake" diff --git a/lib/chef/resource/launchd.rb b/lib/chef/resource/launchd.rb index 39d95bbf69..938244d097 100644 --- a/lib/chef/resource/launchd.rb +++ b/lib/chef/resource/launchd.rb @@ -76,20 +76,20 @@ class Chef property :start_calendar_interval, [Hash, Array], description: "A Hash (similar to crontab) that defines the calendar frequency at which a job is started or an Array.", coerce: proc { |type| - # Coerce into an array of hashes to make validation easier + # Coerce into an array of hashes to make validation easier array = if type.is_a?(Array) type else [type] end - # Check to make sure that our array only has hashes + # Check to make sure that our array only has hashes unless array.all? { |obj| obj.is_a?(Hash) } error_msg = "start_calendar_interval must be a single hash or an array of hashes!" raise Chef::Exceptions::ValidationFailed, error_msg end - # Make sure the hashes don't have any incorrect keys/values + # Make sure the hashes don't have any incorrect keys/values array.each do |entry| allowed_keys = %w{Minute Hour Day Weekday Month} unless entry.keys.all? { |key| allowed_keys.include?(key) } @@ -105,7 +105,7 @@ class Chef end end - # Don't return array if we only have one entry + # Don't return array if we only have one entry if array.size == 1 array.first else diff --git a/lib/chef/resource/macos_userdefaults.rb b/lib/chef/resource/macos_userdefaults.rb index 4e0f6b3b38..2d0633be6c 100644 --- a/lib/chef/resource/macos_userdefaults.rb +++ b/lib/chef/resource/macos_userdefaults.rb @@ -61,9 +61,9 @@ class Chef desired_state: false, skip_docs: true - # coerce various ways of representing a boolean into either 0 (false) or 1 (true) - # which is what the defaults CLI expects. Why? Well defaults itself accepts a few - # different formats, but when you do a read command it all comes back as 1 or 0. + # coerce various ways of representing a boolean into either 0 (false) or 1 (true) + # which is what the defaults CLI expects. Why? Well defaults itself accepts a few + # different formats, but when you do a read command it all comes back as 1 or 0. def coerce_booleans(val) return 1 if [true, "TRUE", "1", "true", "YES", "yes"].include?(val) return 0 if [false, "FALSE", "0", "false", "NO", "no"].include?(val) diff --git a/lib/chef/resource/windows_firewall_rule.rb b/lib/chef/resource/windows_firewall_rule.rb index 32938c227b..3de986ecc9 100644 --- a/lib/chef/resource/windows_firewall_rule.rb +++ b/lib/chef/resource/windows_firewall_rule.rb @@ -41,7 +41,7 @@ class Chef description: "The local address the firewall rule applies to." property :local_port, [String, Integer, Array], - # split various formats of comma separated lists and provide a sorted array of strings to match PS output + # split various formats of comma separated lists and provide a sorted array of strings to match PS output coerce: proc { |d| d.is_a?(String) ? d.split(/\s*,\s*/).sort : Array(d).sort.map(&:to_s) }, description: "The local port the firewall rule applies to." @@ -49,7 +49,7 @@ class Chef description: "The remote address the firewall rule applies to." property :remote_port, [String, Integer, Array], - # split various formats of comma separated lists and provide a sorted array of strings to match PS output + # split various formats of comma separated lists and provide a sorted array of strings to match PS output coerce: proc { |d| d.is_a?(String) ? d.split(/\s*,\s*/).sort : Array(d).sort.map(&:to_s) }, description: "The remote port the firewall rule applies to." diff --git a/lib/chef/resource/windows_share.rb b/lib/chef/resource/windows_share.rb index eaf2429f75..0c57ff3bc1 100644 --- a/lib/chef/resource/windows_share.rb +++ b/lib/chef/resource/windows_share.rb @@ -149,8 +149,8 @@ class Chef raise "The windows_share resource relies on PowerShell cmdlets not present in Windows releases prior to 8/2012. Cannot continue!" if node["platform_version"].to_f < 6.3 end -# given the string output of Get-SmbShareAccess parse out -# arrays of full access users, change users, and read only users + # given the string output of Get-SmbShareAccess parse out + # arrays of full access users, change users, and read only users def parse_permissions(results_string) json_results = Chef::JSONCompat.from_json(results_string) json_results = [json_results] unless json_results.is_a?(Array) # single result is not an array @@ -171,8 +171,8 @@ class Chef [f_users, c_users, r_users] end -# local names are returned from Get-SmbShareAccess in the full format MACHINE\\NAME -# but users of this resource would simply say NAME so we need to strip the values for comparison + # local names are returned from Get-SmbShareAccess in the full format MACHINE\\NAME + # but users of this resource would simply say NAME so we need to strip the values for comparison def stripped_account(name) name.slice!("#{node["hostname"]}\\") name diff --git a/lib/chef/resource/windows_task.rb b/lib/chef/resource/windows_task.rb index 359892b35a..8b5ca79823 100644 --- a/lib/chef/resource/windows_task.rb +++ b/lib/chef/resource/windows_task.rb @@ -159,16 +159,16 @@ class Chef private - ## Resource is not idempotent when day, start_day is not provided with frequency :weekly - ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday .. - ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called + ## Resource is not idempotent when day, start_day is not provided with frequency :weekly + ## we set start_day when not given by user as current date based on which we set the day property for current current date day is monday .. + ## we set the monday as the day so at next run when new_resource.day is nil and current_resource day is monday due to which udpate gets called def idempotency_warning_for_frequency_weekly(day, start_day) if start_day.nil? && day.nil? logger.warn "To maintain idempotency for frequency :weekly provide start_day, start_time and day." end end - # Validate the passed value is numeric values only if it is a string + # Validate the passed value is numeric values only if it is a string def numeric_value_in_string?(val) return true if Integer(val) rescue ArgumentError @@ -194,7 +194,7 @@ class Chef end end - # returns true if frequency_modifer has values First, second, third, fourth, last, lastday + # returns true if frequency_modifer has values First, second, third, fourth, last, lastday def frequency_modifier_includes_days_of_weeks?(frequency_modifier) frequency_modifier = frequency_modifier.to_s.split(",") frequency_modifier.map! { |value| value.strip.upcase } @@ -209,7 +209,7 @@ class Chef raise ArgumentError, "Invalid value passed for `random_delay`. Please pass seconds as an Integer (e.g. 60) or a String with numeric values only (e.g. '60')." unless numeric_value_in_string?(random_delay) end - # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~f + # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~f def validate_start_day(start_day, frequency) if start_day && frequency == :none raise ArgumentError, "`start_day` property is not supported with frequency: #{frequency}" @@ -221,7 +221,7 @@ class Chef end end - # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~ + # @todo when we drop ruby 2.3 support this should be converted to .match?() instead of =~ def validate_start_time(start_time, frequency) if start_time raise ArgumentError, "`start_time` property is not supported with `frequency :none`" if frequency == :none @@ -321,7 +321,7 @@ class Chef end end - # This method returns true if day has values from 1-31 which is a days of moths and used with frequency :monthly + # This method returns true if day has values from 1-31 which is a days of moths and used with frequency :monthly def days_includes_days_of_months?(days) days.map! { |day| day.to_s.strip.downcase } (days - VALID_DAYS_OF_MONTH).empty? @@ -339,11 +339,11 @@ class Chef end end - # Converts the number of seconds to an ISO8601 duration format and returns it. - # Ref : https://github.com/arnau/ISO8601/blob/master/lib/iso8601/duration.rb#L18-L23 - # e.g. - # ISO8601::Duration.new(65707200).to_s - # returns 'PT65707200S' + # Converts the number of seconds to an ISO8601 duration format and returns it. + # Ref : https://github.com/arnau/ISO8601/blob/master/lib/iso8601/duration.rb#L18-L23 + # e.g. + # ISO8601::Duration.new(65707200).to_s + # returns 'PT65707200S' def sec_to_dur(seconds) ISO8601::Duration.new(seconds.to_i).to_s end diff --git a/lib/chef/util/dsc/lcm_output_parser.rb b/lib/chef/util/dsc/lcm_output_parser.rb index 2c052396e1..38c202a4bb 100644 --- a/lib/chef/util/dsc/lcm_output_parser.rb +++ b/lib/chef/util/dsc/lcm_output_parser.rb @@ -160,9 +160,9 @@ class Chef def self.parse_line(line) if match = line.match(/^.*?:.*?:\s*LCM:\s*\[(.*?)\](.*)/) - # If the line looks like - # What If: [machinename]: LCM: [op_action op_type] message - # extract op_action, op_type, and message + # If the line looks like + # What If: [machinename]: LCM: [op_action op_type] message + # extract op_action, op_type, and message operation, info = match.captures op_action, op_type = operation.strip.split(" ").map { |m| m.downcase.to_sym } else diff --git a/lib/chef/win32/api/file.rb b/lib/chef/win32/api/file.rb index 7aca1068e0..11a18e26d1 100644 --- a/lib/chef/win32/api/file.rb +++ b/lib/chef/win32/api/file.rb @@ -461,22 +461,22 @@ BOOL WINAPI DeviceIoControl( =end safe_attach_function :DeviceIoControl, %i{HANDLE DWORD LPVOID DWORD LPVOID DWORD LPDWORD pointer}, :BOOL -# BOOL WINAPI DeleteVolumeMountPoint( - # _In_ LPCTSTR lpszVolumeMountPoint -# ); + # BOOL WINAPI DeleteVolumeMountPoint( + # _In_ LPCTSTR lpszVolumeMountPoint + # ); safe_attach_function :DeleteVolumeMountPointW, [:LPCTSTR], :BOOL -# BOOL WINAPI SetVolumeMountPoint( - # _In_ LPCTSTR lpszVolumeMountPoint, - # _In_ LPCTSTR lpszVolumeName -# ); + # BOOL WINAPI SetVolumeMountPoint( + # _In_ LPCTSTR lpszVolumeMountPoint, + # _In_ LPCTSTR lpszVolumeName + # ); safe_attach_function :SetVolumeMountPointW, %i{LPCTSTR LPCTSTR}, :BOOL -# BOOL WINAPI GetVolumeNameForVolumeMountPoint( - # _In_ LPCTSTR lpszVolumeMountPoint, - # _Out_ LPTSTR lpszVolumeName, - # _In_ DWORD cchBufferLength -# ); + # BOOL WINAPI GetVolumeNameForVolumeMountPoint( + # _In_ LPCTSTR lpszVolumeMountPoint, + # _Out_ LPTSTR lpszVolumeName, + # _In_ DWORD cchBufferLength + # ); safe_attach_function :GetVolumeNameForVolumeMountPointW, %i{LPCTSTR LPTSTR DWORD}, :BOOL =begin @@ -538,12 +538,12 @@ BOOL WINAPI VerQueryValue( # ensures the handle is closed on exit of the block # FIXME: yard with @yield def file_search_handle(path) - # Workaround for CHEF-4419: - # Make sure paths starting with "/" has a drive letter - # assigned from the current working diretory. - # Note: With CHEF-4427 this issue will be fixed with a - # broader fix to map all the paths starting with "/" to - # SYSTEM_DRIVE on windows. + # Workaround for CHEF-4419: + # Make sure paths starting with "/" has a drive letter + # assigned from the current working diretory. + # Note: With CHEF-4427 this issue will be fixed with a + # broader fix to map all the paths starting with "/" to + # SYSTEM_DRIVE on windows. path = ::File.expand_path(path) if path.start_with? "/" path = canonical_encode_path(path) find_data = WIN32_FIND_DATA.new diff --git a/lib/chef/win32/file.rb b/lib/chef/win32/file.rb index 508ea3ae2a..44153e0992 100644 --- a/lib/chef/win32/file.rb +++ b/lib/chef/win32/file.rb @@ -171,7 +171,7 @@ class Chef rescue Chef::Exceptions::Win32APIFunctionNotImplemented => e raise e rescue Exception - # things are ok. + # things are ok. end def self.file_access_check(path, desired_access) diff --git a/lib/chef/win32/process.rb b/lib/chef/win32/process.rb index fa3286108c..17621f8518 100644 --- a/lib/chef/win32/process.rb +++ b/lib/chef/win32/process.rb @@ -82,8 +82,8 @@ class Chef (call_succeeded != 0) && (is_64_bit_process_result.get_int(0) != 0) end - # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights, - # AND the PROCESS_VM_READ right + # Must have PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION rights, + # AND the PROCESS_VM_READ right def self.get_process_memory_info(handle) memory_info = PROCESS_MEMORY_COUNTERS.new unless GetProcessMemoryInfo(handle.handle, memory_info, memory_info.size) diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock index 763dc49f2f..f1988e64f6 100644 --- a/omnibus/Gemfile.lock +++ b/omnibus/Gemfile.lock @@ -18,7 +18,7 @@ GIT GIT remote: https://github.com/chef/omnibus-software - revision: 74e9d02cf7f9b164d67789a0a0a7e167143db6fb + revision: 1193dc710f66809eb4abd69ea29b23234527acc5 branch: master specs: omnibus-software (4.0.0) @@ -29,28 +29,28 @@ GEM specs: addressable (2.7.0) public_suffix (>= 2.0.2, < 5.0) - artifactory (3.0.12) + artifactory (3.0.13) awesome_print (1.8.0) aws-eventstream (1.1.0) - aws-partitions (1.310.0) - aws-sdk-core (3.94.1) + aws-partitions (1.319.0) + aws-sdk-core (3.96.1) aws-eventstream (~> 1, >= 1.0.2) aws-partitions (~> 1, >= 1.239.0) aws-sigv4 (~> 1.1) jmespath (~> 1.0) - aws-sdk-kms (1.30.0) + aws-sdk-kms (1.31.0) aws-sdk-core (~> 3, >= 3.71.0) aws-sigv4 (~> 1.1) - aws-sdk-s3 (1.63.1) - aws-sdk-core (~> 3, >= 3.83.0) + aws-sdk-s3 (1.66.0) + aws-sdk-core (~> 3, >= 3.96.1) aws-sdk-kms (~> 1) aws-sigv4 (~> 1.1) aws-sigv4 (1.1.3) aws-eventstream (~> 1.0, >= 1.0.2) - bcrypt_pbkdf (1.0.1) - bcrypt_pbkdf (1.0.1-x64-mingw32) - bcrypt_pbkdf (1.0.1-x86-mingw32) - berkshelf (7.0.9) + bcrypt_pbkdf (1.1.0.rc1) + bcrypt_pbkdf (1.1.0.rc1-x64-mingw32) + bcrypt_pbkdf (1.1.0.rc1-x86-mingw32) + berkshelf (7.0.10) chef (>= 13.6.52) chef-config cleanroom (~> 1.0) @@ -64,12 +64,13 @@ GEM solve (~> 4.0) thor (>= 0.20) builder (3.2.4) - chef (15.10.12) + chef (16.1.0) addressable - bcrypt_pbkdf (~> 1.0) + bcrypt_pbkdf (= 1.1.0.rc1) bundler (>= 1.10) - chef-config (= 15.10.12) - chef-utils (= 15.10.12) + chef-config (= 16.1.0) + chef-utils (= 16.1.0) + chef-vault chef-zero (>= 14.0.11) diff-lcs (~> 1.2, >= 1.2.4) ed25519 (~> 1.2) @@ -77,7 +78,7 @@ GEM ffi (~> 1.9, >= 1.9.25) ffi-libarchive ffi-yajl (~> 2.2) - highline (>= 1.6.9, < 2) + highline (>= 1.6.9, < 3) iniparse (~> 1.4) license-acceptance (~> 1.0, >= 1.0.5) mixlib-archive (>= 0.4, < 2.0) @@ -88,7 +89,8 @@ GEM net-sftp (~> 2.1, >= 2.1.2) net-ssh (>= 4.2, < 6) net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (~> 15.0) + ohai (~> 16.0) + pastel plist (~> 3.2) proxifier (~> 1.0) syslog-logger (~> 1.6) @@ -96,12 +98,13 @@ GEM train-winrm (>= 0.2.5) tty-screen (~> 0.6) uuidtools (~> 2.1.5) - chef (15.10.12-universal-mingw32) + chef (16.1.0-universal-mingw32) addressable - bcrypt_pbkdf (~> 1.0) + bcrypt_pbkdf (= 1.1.0.rc1) bundler (>= 1.10) - chef-config (= 15.10.12) - chef-utils (= 15.10.12) + chef-config (= 16.1.0) + chef-utils (= 16.1.0) + chef-vault chef-zero (>= 14.0.11) diff-lcs (~> 1.2, >= 1.2.4) ed25519 (~> 1.2) @@ -109,7 +112,7 @@ GEM ffi (~> 1.9, >= 1.9.25) ffi-libarchive ffi-yajl (~> 2.2) - highline (>= 1.6.9, < 2) + highline (>= 1.6.9, < 3) iniparse (~> 1.4) iso8601 (~> 0.12.1) license-acceptance (~> 1.0, >= 1.0.5) @@ -121,7 +124,8 @@ GEM net-sftp (~> 2.1, >= 2.1.2) net-ssh (>= 4.2, < 6) net-ssh-multi (~> 1.2, >= 1.2.1) - ohai (~> 15.0) + ohai (~> 16.0) + pastel plist (~> 3.2) proxifier (~> 1.0) syslog-logger (~> 1.6) @@ -141,15 +145,16 @@ GEM win32-taskscheduler (~> 2.0) wmi-lite (~> 1.0) chef-cleanroom (1.0.2) - chef-config (15.10.12) + chef-config (16.1.0) addressable - chef-utils (= 15.10.12) + chef-utils (= 16.1.0) fuzzyurl mixlib-config (>= 2.2.12, < 4.0) mixlib-shellout (>= 2.0, < 4.0) tomlrb (~> 1.2) chef-sugar (5.1.9) - chef-utils (15.10.12) + chef-utils (16.1.0) + chef-vault (4.0.1) chef-zero (15.0.0) ffi-yajl (~> 2.2) hashie (>= 2.0, < 5.0) @@ -181,7 +186,7 @@ GEM gyoku (1.3.1) builder (>= 2.1.2) hashie (4.1.0) - highline (1.7.10) + highline (2.0.3) httpclient (2.8.3) iniparse (1.5.0) iostruct (0.0.4) @@ -242,8 +247,9 @@ GEM octokit (4.18.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) - ohai (15.9.1) - chef-config (>= 12.8, < 16) + ohai (16.1.1) + chef-config (>= 12.8, < 17) + chef-utils (>= 16.0, < 17) ffi (~> 1.9) ffi-yajl (~> 2.2) ipaddress @@ -254,7 +260,7 @@ GEM plist (~> 3.1) systemu (~> 2.6.4) wmi-lite (~> 1.0) - pastel (0.7.3) + pastel (0.7.4) equatable (~> 0.6) tty-color (~> 0.5) pedump (0.5.4) @@ -267,7 +273,7 @@ GEM plist (3.5.0) progressbar (1.10.1) proxifier (1.0.3) - public_suffix (4.0.4) + public_suffix (4.0.5) rack (2.2.2) rainbow (3.0.0) retryable (3.0.5) @@ -289,14 +295,14 @@ GEM structured_warnings (0.4.0) syslog-logger (1.6.8) systemu (2.6.5) - test-kitchen (2.4.0) + test-kitchen (2.5.1) bcrypt_pbkdf (~> 1.0) ed25519 (~> 1.2) license-acceptance (~> 1.0, >= 1.0.11) mixlib-install (~> 3.6) mixlib-shellout (>= 1.2, < 4.0) - net-scp (>= 1.1, < 3.0) - net-ssh (>= 2.9, < 6.0) + net-scp (>= 1.1, < 4.0) + net-ssh (>= 2.9, < 7.0) net-ssh-gateway (>= 1.2, < 3.0) thor (~> 0.19) winrm (~> 2.0) diff --git a/omnibus/README.md b/omnibus/README.md index 66bdb55448..6e49f091a5 100644 --- a/omnibus/README.md +++ b/omnibus/README.md @@ -24,7 +24,7 @@ You create a platform-specific package using the `build project` command: $ bundle exec omnibus build <PROJECT> ``` -The platform/architecture type of the package created will match the platform where the `build project` command is invoked. For example, running this command on a MacBook Pro will generate a Mac OS X package. After the build completes packages will be available in the `pkg/` folder. +The platform/architecture type of the package created will match the platform where the `build project` command is invoked. For example, running this command on a MacBook Pro will generate a macOS package. After the build completes packages will be available in the `pkg/` folder. ### Clean diff --git a/omnibus/omnibus-test.ps1 b/omnibus/omnibus-test.ps1 index 5585a97638..d5fb9c7bcd 100644 --- a/omnibus/omnibus-test.ps1 +++ b/omnibus/omnibus-test.ps1 @@ -91,7 +91,7 @@ winrm quickconfig -quiet bundle If ($lastexitcode -ne 0) { Exit $lastexitcode } -# FIXME: we need to add back unit and integration tests here. we have no converage of those on e.g. AIX +# FIXME: we need to add back unit and integration tests here. we have no coverage of those on e.g. AIX # # chocolatey functional tests fail so disable that tag directly <-- and this is a bug that needs fixing. bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation --tag ~choco_installed spec/functional diff --git a/omnibus/package-scripts/angrychef/postrm b/omnibus/package-scripts/angrychef/postrm index a153da7102..0963b1d901 100755 --- a/omnibus/package-scripts/angrychef/postrm +++ b/omnibus/package-scripts/angrychef/postrm @@ -45,6 +45,6 @@ if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-re # not a redhat-ish RPM-based system cleanup_symlinks elif [ "x$1" = "x0" ]; then - # RPM-based system and we're deinstalling rather than upgrading + # RPM-based system and we're uninstalling rather than upgrading cleanup_symlinks fi diff --git a/omnibus/package-scripts/chef/postrm b/omnibus/package-scripts/chef/postrm index a153da7102..0963b1d901 100755 --- a/omnibus/package-scripts/chef/postrm +++ b/omnibus/package-scripts/chef/postrm @@ -45,6 +45,6 @@ if [ ! -f /etc/redhat-release -a ! -f /etc/fedora-release -a ! -f /etc/system-re # not a redhat-ish RPM-based system cleanup_symlinks elif [ "x$1" = "x0" ]; then - # RPM-based system and we're deinstalling rather than upgrading + # RPM-based system and we're uninstalling rather than upgrading cleanup_symlinks fi diff --git a/scripts/bk_tests/bk_linux_exec.sh b/scripts/bk_tests/bk_linux_exec.sh index 743f1f9872..415f646a3c 100755 --- a/scripts/bk_tests/bk_linux_exec.sh +++ b/scripts/bk_tests/bk_linux_exec.sh @@ -19,26 +19,13 @@ curl -fsSL https://chef.io/chef/install.sh | sudo bash -s -- -P omnibus-toolchai export BUNDLE_GEMFILE=$PWD/kitchen-tests/Gemfile export FORCE_FFI_YAJL=ext export CHEF_LICENSE="accept-silent" -export PATH=$PATH:~/.asdf/shims:/opt/asdf/bin:/opt/asdf/shims:/opt/omnibus-toolchain/embedded/bin - -# Install ASDF software manager -echo "--- Installing ASDF software version manager from master" -sudo git clone https://github.com/asdf-vm/asdf.git /opt/asdf -. /opt/asdf/asdf.sh -. /opt/asdf/completions/asdf.bash - -echo "--- Installing Ruby 2.6.6" -/opt/asdf/bin/asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git - -/opt/asdf/bin/asdf install ruby 2.6.6 -/opt/asdf/bin/asdf global ruby 2.6.6 +export PATH=$PATH:/opt/omnibus-toolchain/embedded/bin # Update Gems +echo "--- Installing Gems" echo 'gem: --no-document' >> ~/.gemrc -gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2) -gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2) --force sudo iptables -L DOCKER || ( echo "DOCKER iptables chain missing" ; sudo iptables -N DOCKER ) -bundle install --jobs=3 --retry=3 --path=vendor/bundle +/opt/omnibus-toolchain/bin/bundle install --jobs=3 --retry=3 --path=../vendor/bundle echo "--- Config information" diff --git a/spec/functional/resource/user/dscl_spec.rb b/spec/functional/resource/user/dscl_spec.rb index 6a18e0fd19..462e4aaa0b 100644 --- a/spec/functional/resource/user/dscl_spec.rb +++ b/spec/functional/resource/user/dscl_spec.rb @@ -29,7 +29,7 @@ describe "Chef::Resource::User with Chef::Provider::User::Dscl provider", metada def clean_user shell_out!("/usr/bin/dscl . -delete '/Users/#{username}'") rescue Mixlib::ShellOut::ShellCommandFailed - # Raised when the user is already cleaned + # Raised when the user is already cleaned end def user_should_exist diff --git a/spec/functional/resource/user/mac_user_spec.rb b/spec/functional/resource/user/mac_user_spec.rb index 2a2a4f4eac..f383140d0a 100644 --- a/spec/functional/resource/user/mac_user_spec.rb +++ b/spec/functional/resource/user/mac_user_spec.rb @@ -29,7 +29,7 @@ describe "Chef::Resource::User with Chef::Provider::User::MacUser provider", met def clean_user shell_out!("/usr/bin/dscl . -delete '/Users/#{username}'") rescue Mixlib::ShellOut::ShellCommandFailed - # Raised when the user is already cleaned + # Raised when the user is already cleaned end def ensure_file_cache_path_exists diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d6d85e5286..c9d653adea 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -34,17 +34,6 @@ require "rspec/mocks" require "webmock/rspec" -if ENV["COVERAGE"] - require "simplecov" - SimpleCov.start do - add_filter "/spec/" - add_group "Remote File", "remote_file" - add_group "Resources", "/resource/" - add_group "Providers", "/provider/" - add_group "Knife", "knife" - end -end - require "chef" require "chef/knife" diff --git a/spec/support/shared/functional/file_resource.rb b/spec/support/shared/functional/file_resource.rb index ac37e2c735..7547d119bb 100644 --- a/spec/support/shared/functional/file_resource.rb +++ b/spec/support/shared/functional/file_resource.rb @@ -370,7 +370,7 @@ shared_examples_for "a configured file resource" do Chef::Config[:ssl_verify_mode] = :verify_none end - # note the stripping of the drive letter from the tmpdir on windows + # note the stripping of the drive letter from the tmpdir on windows let(:backup_glob) { File.join(CHEF_SPEC_BACKUP_PATH, test_file_dir.sub(/^([A-Za-z]:)/, ""), "#{file_base}*") } # Most tests update the resource, but a few do not. We need to test that the diff --git a/spec/unit/knife/role_env_run_list_add_spec.rb b/spec/unit/knife/role_env_run_list_add_spec.rb index 3696134dd3..13a05db33e 100644 --- a/spec/unit/knife/role_env_run_list_add_spec.rb +++ b/spec/unit/knife/role_env_run_list_add_spec.rb @@ -21,8 +21,8 @@ require "spec_helper" describe Chef::Knife::RoleEnvRunListAdd do before(:each) do -# Chef::Config[:role_name] = "websimian" -# Chef::Config[:env_name] = "QA" + # Chef::Config[:role_name] = "websimian" + # Chef::Config[:env_name] = "QA" @knife = Chef::Knife::RoleEnvRunListAdd.new @knife.config = { after: nil, @@ -36,10 +36,10 @@ describe Chef::Knife::RoleEnvRunListAdd do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should have an empty default run list" do @knife.run diff --git a/spec/unit/knife/role_env_run_list_clear_spec.rb b/spec/unit/knife/role_env_run_list_clear_spec.rb index cc608c918b..d4b9625550 100644 --- a/spec/unit/knife/role_env_run_list_clear_spec.rb +++ b/spec/unit/knife/role_env_run_list_clear_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListClear do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_env_run_list_remove_spec.rb b/spec/unit/knife/role_env_run_list_remove_spec.rb index 9bade8fac4..7f9b41475c 100644 --- a/spec/unit/knife/role_env_run_list_remove_spec.rb +++ b/spec/unit/knife/role_env_run_list_remove_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListRemove do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_env_run_list_replace_spec.rb b/spec/unit/knife/role_env_run_list_replace_spec.rb index 5a3365a686..93b233efdc 100644 --- a/spec/unit/knife/role_env_run_list_replace_spec.rb +++ b/spec/unit/knife/role_env_run_list_replace_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListReplace do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_env_run_list_set_spec.rb b/spec/unit/knife/role_env_run_list_set_spec.rb index 52ef1010b7..d35e4dbb17 100644 --- a/spec/unit/knife/role_env_run_list_set_spec.rb +++ b/spec/unit/knife/role_env_run_list_set_spec.rb @@ -44,10 +44,10 @@ describe Chef::Knife::RoleEnvRunListSet do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_add_spec.rb b/spec/unit/knife/role_run_list_add_spec.rb index 74235a019c..6f222ee80a 100644 --- a/spec/unit/knife/role_run_list_add_spec.rb +++ b/spec/unit/knife/role_run_list_add_spec.rb @@ -21,8 +21,8 @@ require "spec_helper" describe Chef::Knife::RoleRunListAdd do before(:each) do -# Chef::Config[:role_name] = "websimian" -# Chef::Config[:env_name] = "QA" + # Chef::Config[:role_name] = "websimian" + # Chef::Config[:env_name] = "QA" @knife = Chef::Knife::RoleRunListAdd.new @knife.config = { after: nil, @@ -36,10 +36,10 @@ describe Chef::Knife::RoleRunListAdd do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should have a run list with the monkey role" do @knife.run diff --git a/spec/unit/knife/role_run_list_clear_spec.rb b/spec/unit/knife/role_run_list_clear_spec.rb index 58730d42d5..327a9979b0 100644 --- a/spec/unit/knife/role_run_list_clear_spec.rb +++ b/spec/unit/knife/role_run_list_clear_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListClear do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_remove_spec.rb b/spec/unit/knife/role_run_list_remove_spec.rb index e1786d7bb6..200a559c08 100644 --- a/spec/unit/knife/role_run_list_remove_spec.rb +++ b/spec/unit/knife/role_run_list_remove_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListRemove do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_replace_spec.rb b/spec/unit/knife/role_run_list_replace_spec.rb index 6335f75a16..1957403fb1 100644 --- a/spec/unit/knife/role_run_list_replace_spec.rb +++ b/spec/unit/knife/role_run_list_replace_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListReplace do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/knife/role_run_list_set_spec.rb b/spec/unit/knife/role_run_list_set_spec.rb index 7733174870..06098c585e 100644 --- a/spec/unit/knife/role_run_list_set_spec.rb +++ b/spec/unit/knife/role_run_list_set_spec.rb @@ -43,10 +43,10 @@ describe Chef::Knife::RoleRunListSet do describe "run" do -# it "should display all the things" do -# @knife.run -# @role.to_json.should == 'show all the things' -# end + # it "should display all the things" do + # @knife.run + # @role.to_json.should == 'show all the things' + # end it "should load the node" do expect(Chef::Role).to receive(:load).with("will").and_return(@role) diff --git a/spec/unit/provider/git_spec.rb b/spec/unit/provider/git_spec.rb index 90364cfc2a..65289bf4c5 100644 --- a/spec/unit/provider/git_spec.rb +++ b/spec/unit/provider/git_spec.rb @@ -638,7 +638,7 @@ describe Chef::Provider::Git do expect(@provider).to receive(:enable_submodules) expect(@provider).to receive(:add_remotes) @provider.run_action(:checkout) - # @resource.should be_updated + # @resource.should be_updated end it "should not checkout if the destination exists or is a non empty directory" do @@ -676,7 +676,7 @@ describe Chef::Provider::Git do expect(@provider).to receive(:enable_submodules) expect(@provider).to receive(:add_remotes) @provider.run_action(:sync) - # @resource.should be_updated + # @resource.should be_updated end it "does not fetch any updates if the remote revision matches the current revision" do @@ -696,7 +696,7 @@ describe Chef::Provider::Git do expect(@provider).to receive(:action_checkout) expect(@provider).not_to receive(:shell_out!) @provider.run_action(:sync) - # @resource.should be_updated + # @resource.should be_updated end it "clones the repo instead of fetching updates if the deploy directory is empty" do diff --git a/spec/unit/provider/osx_profile_spec.rb b/spec/unit/provider/osx_profile_spec.rb index 017041bc60..9554f235f3 100644 --- a/spec/unit/provider/osx_profile_spec.rb +++ b/spec/unit/provider/osx_profile_spec.rb @@ -61,8 +61,8 @@ describe Chef::Provider::OsxProfile do "ProfileVersion" => 1 }], } end - # If anything is changed within this profile, be sure to update the - # ProfileUUID in all_profiles to match the new config specific UUID + # If anything is changed within this profile, be sure to update the + # ProfileUUID in all_profiles to match the new config specific UUID let(:test_profile) do { "PayloadIdentifier" => "com.testprofile.screensaver", diff --git a/spec/unit/provider/package/msu_spec.rb b/spec/unit/provider/package/msu_spec.rb index f71bd9a775..897ae254f0 100644 --- a/spec/unit/provider/package/msu_spec.rb +++ b/spec/unit/provider/package/msu_spec.rb @@ -261,9 +261,9 @@ describe Chef::Provider::Package::Msu, :windows_only do expect(cab_files).to eql(["msu_dir/IE10-Windows6.1-KB2859903-x86.CAB"]) end -# We couldn't find any msu file with multiple cab files in it. -# So we are not 100% sure about the structure of XML file in this case -# The specs below cover 2 possible XML formats + # We couldn't find any msu file with multiple cab files in it. + # So we are not 100% sure about the structure of XML file in this case + # The specs below cover 2 possible XML formats context "handles different xml formats for multiple cab files in the msu package" do it "parses xml file with multiple <package> tags" do xml_file = File.join(CHEF_SPEC_DATA, "sample_msu2.xml") diff --git a/spec/unit/provider/service/gentoo_service_spec.rb b/spec/unit/provider/service/gentoo_service_spec.rb index f9da2a828c..99c01b595b 100644 --- a/spec/unit/provider/service/gentoo_service_spec.rb +++ b/spec/unit/provider/service/gentoo_service_spec.rb @@ -37,7 +37,7 @@ describe Chef::Provider::Service::Gentoo do allow(File).to receive(:exists?).with("/etc/runlevels/default/chef").and_return(false) allow(File).to receive(:readable?).with("/etc/runlevels/default/chef").and_return(false) end - # new test: found_enabled state + # new test: found_enabled state # describe "load_current_resource" do it "should raise Chef::Exceptions::Service if /sbin/rc-update does not exist" do diff --git a/spec/unit/provider_resolver_spec.rb b/spec/unit/provider_resolver_spec.rb index e7ff875f5d..69068edae9 100644 --- a/spec/unit/provider_resolver_spec.rb +++ b/spec/unit/provider_resolver_spec.rb @@ -593,14 +593,14 @@ describe Chef::ProviderResolver do "debian" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Debian ], package: [ Chef::Resource::AptPackage, Chef::Provider::Package::Apt ], - # service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ], + # service: [ Chef::Resource::DebianService, Chef::Provider::Service::Debian ], "debian" => { "7.0" => { }, "6.0" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ], - # service: [ Chef::Resource::InsservService, Chef::Provider::Service::Insserv ], + # service: [ Chef::Resource::InsservService, Chef::Provider::Service::Insserv ], }, "5.0" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ], @@ -619,7 +619,7 @@ describe Chef::ProviderResolver do "linuxmint" => { "3.1.4" => { ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig ], - # service: [ Chef::Resource::UpstartService, Chef::Provider::Service::Upstart ], + # service: [ Chef::Resource::UpstartService, Chef::Provider::Service::Upstart ], }, }, "raspbian" => { @@ -667,7 +667,7 @@ describe Chef::ProviderResolver do # TODO should be Chef::Resource::PortagePackage package: [ Chef::Resource::Package, Chef::Provider::Package::Portage ], portage_package: [ Chef::Resource::PortagePackage, Chef::Provider::Package::Portage ], - # service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ], + # service: [ Chef::Resource::GentooService, Chef::Provider::Service::Gentoo ], "gentoo" => { "3.1.4" => { @@ -676,14 +676,14 @@ describe Chef::ProviderResolver do }, "rhel" => { - # service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ], + # service: [ Chef::Resource::SystemdService, Chef::Provider::Service::Systemd ], package: [ Chef::Resource::DnfPackage, Chef::Provider::Package::Dnf ], ifconfig: [ Chef::Resource::Ifconfig, Chef::Provider::Ifconfig::Redhat ], %w{amazon xcp xenserver ibm_powerkvm cloudlinux parallels} => { "3.1.4" => { package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ], - # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], + # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], }, }, %w{redhat centos scientific oracle} => { @@ -692,14 +692,14 @@ describe Chef::ProviderResolver do }, "6.0" => { package: [ Chef::Resource::YumPackage, Chef::Provider::Package::Yum ], - # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], + # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], }, }, "fedora" => { "15.0" => { }, "14.0" => { - # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], + # service: [ Chef::Resource::RedhatService, Chef::Provider::Service::Redhat ], }, }, }, @@ -761,7 +761,7 @@ describe Chef::ProviderResolver do package: [ Chef::Resource::Package, Chef::Provider::Package::Bff ], rpm_package: [ Chef::Resource::RpmPackage, Chef::Provider::Package::Rpm ], user: [ Chef::Resource::User::AixUser, Chef::Provider::User::Aix ], - # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ], + # service: [ Chef::Resource::AixService, Chef::Provider::Service::Aix ], "aix" => { "aix" => { diff --git a/spec/unit/run_context_spec.rb b/spec/unit/run_context_spec.rb index 6ccd5d0187..5bd7a360fb 100644 --- a/spec/unit/run_context_spec.rb +++ b/spec/unit/run_context_spec.rb @@ -138,7 +138,7 @@ describe Chef::RunContext do expect(node).to receive(:loaded_recipe).with(:ancient, "aliens") expect do run_context.include_recipe("ancient::aliens") - # In CHEF-5120, this becomes a Chef::Exceptions::MissingCookbookDependency error: + # In CHEF-5120, this becomes a Chef::Exceptions::MissingCookbookDependency error: end.to raise_error(Chef::Exceptions::CookbookNotFound) end diff --git a/tasks/dependencies.rb b/tasks/dependencies.rb index 64d365b941..fff594256a 100644 --- a/tasks/dependencies.rb +++ b/tasks/dependencies.rb @@ -33,9 +33,7 @@ namespace :dependencies do Dir.chdir(dir) do Bundler.with_clean_env do rm_f "#{dir}/Gemfile.lock" - sh "bundle lock --update --add-platform ruby" - sh "bundle lock --update --add-platform x64-mingw32" - sh "bundle lock --update --add-platform x86-mingw32" + sh "bundle lock --update --add-platform ruby x64-mingw32 x86-mingw32" end end end |