chef 12.20.3 → 12.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/VERSION +1 -1
- data/acceptance/.shared/kitchen_acceptance/.kitchen.ec2.yml +1 -0
- data/chef.gemspec +1 -1
- data/lib/chef/cookbook/synchronizer.rb +1 -1
- data/lib/chef/formatters/error_description.rb +18 -1
- data/lib/chef/platform/service_helpers.rb +1 -1
- data/lib/chef/property.rb +4 -0
- data/lib/chef/version.rb +1 -1
- data/spec/functional/mixin/powershell_out_spec.rb +20 -4
- data/spec/functional/resource/group_spec.rb +19 -13
- data/spec/functional/resource/user/useradd_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- data/spec/support/platform_helpers.rb +5 -0
- data/spec/unit/cookbook/synchronizer_spec.rb +12 -0
- data/spec/unit/formatters/error_description_spec.rb +52 -7
- data/spec/unit/provider_resolver_spec.rb +10 -10
- data/tasks/changelog.rb +4 -6
- metadata +10 -4
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA1:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: dc22d5fbbee25b481abe4fb3ba2ee92644e265a4
         | 
| 4 | 
            +
              data.tar.gz: e528ca22e29da3d99967cca0e00f6350ad4cf7f3
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 2e2c18119e148482bc477a38c9c62a1ce7d8cf348e8cbc80570b551ed4538f9771a8cfe0c7d3dc10e410cbef48eb31f2cdf8efe5de2cfba25f472573c30fb670
         | 
| 7 | 
            +
              data.tar.gz: fca9e5a4f9d4d54197e0bd1594ebb3fbc87636f9bba63135a98fcdbbd7d0b89be61d67eaff09ffbffb4b136b460016b0a4d32496a19cb088360a8ec9b89455a9
         | 
    
        data/Gemfile
    CHANGED
    
    
    
        data/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            12. | 
| 1 | 
            +
            12.21.1
         | 
| @@ -19,6 +19,7 @@ driver: | |
| 19 19 | 
             
              subnet_id: subnet-19ac017c
         | 
| 20 20 | 
             
              security_group_ids: ["sg-e401eb83", "sg-96274af3"]
         | 
| 21 21 | 
             
              instance_type: m3.large
         | 
| 22 | 
            +
              retryable_tries: 120
         | 
| 22 23 | 
             
            #  associate_public_ip: true  # Don't enable public IP, as subnet specified is behind VPN
         | 
| 23 24 |  | 
| 24 25 | 
             
            # busser installation relies on this
         | 
    
        data/chef.gemspec
    CHANGED
    
    | @@ -32,7 +32,7 @@ Gem::Specification.new do |s| | |
| 32 32 | 
             
              s.add_dependency "erubis", "~> 2.7"
         | 
| 33 33 | 
             
              s.add_dependency "diff-lcs", "~> 1.2", ">= 1.2.4"
         | 
| 34 34 |  | 
| 35 | 
            -
              s.add_dependency "chef-zero", ">= 4.8"
         | 
| 35 | 
            +
              s.add_dependency "chef-zero", ">= 4.8", "< 13"
         | 
| 36 36 |  | 
| 37 37 | 
             
              s.add_dependency "plist", "~> 3.2"
         | 
| 38 38 | 
             
              s.add_dependency "iniparse", "~> 1.4"
         | 
| @@ -202,7 +202,7 @@ class Chef | |
| 202 202 | 
             
                    ( cookbook_name, segment, file ) = md[1..3]
         | 
| 203 203 | 
             
                    if have_cookbook?(cookbook_name)
         | 
| 204 204 | 
             
                      manifest_segment = cookbook_segment(cookbook_name, segment)
         | 
| 205 | 
            -
                      if manifest_segment.select { |manifest_record| manifest_record["path"] == "#{segment}/#{file}" }.empty?
         | 
| 205 | 
            +
                      if manifest_segment.nil? || manifest_segment.select { |manifest_record| manifest_record["path"] == "#{segment}/#{file}" }.empty?
         | 
| 206 206 | 
             
                        Chef::Log.info("Removing #{cache_file} from the cache; its is no longer in the cookbook manifest.")
         | 
| 207 207 | 
             
                        cache.delete(cache_file)
         | 
| 208 208 | 
             
                        @events.removed_cookbook_file(cache_file)
         | 
| @@ -17,6 +17,8 @@ | |
| 17 17 | 
             
            # limitations under the License.
         | 
| 18 18 | 
             
            #
         | 
| 19 19 |  | 
| 20 | 
            +
            require "chef/version"
         | 
| 21 | 
            +
             | 
| 20 22 | 
             
            class Chef
         | 
| 21 23 | 
             
              module Formatters
         | 
| 22 24 | 
             
                # == Formatters::ErrorDescription
         | 
| @@ -45,7 +47,7 @@ class Chef | |
| 45 47 | 
             
                        display_section(heading, text, out)
         | 
| 46 48 | 
             
                      end
         | 
| 47 49 | 
             
                    end
         | 
| 48 | 
            -
                    display_section(" | 
| 50 | 
            +
                    display_section("System Info:", error_context_info, out)
         | 
| 49 51 | 
             
                  end
         | 
| 50 52 |  | 
| 51 53 | 
             
                  def for_json
         | 
| @@ -64,6 +66,21 @@ class Chef | |
| 64 66 | 
             
                    out.puts "\n"
         | 
| 65 67 | 
             
                  end
         | 
| 66 68 |  | 
| 69 | 
            +
                  def error_context_info
         | 
| 70 | 
            +
                    context_info = { chef_version: Chef::VERSION }
         | 
| 71 | 
            +
                    if Chef.node
         | 
| 72 | 
            +
                      context_info[:platform] = Chef.node["platform"]
         | 
| 73 | 
            +
                      context_info[:platform_version] = Chef.node["platform_version"]
         | 
| 74 | 
            +
                    end
         | 
| 75 | 
            +
                    # A string like "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]"
         | 
| 76 | 
            +
                    context_info[:ruby] = RUBY_DESCRIPTION
         | 
| 77 | 
            +
                    # The argv[0] value.
         | 
| 78 | 
            +
                    context_info[:program_name] = $PROGRAM_NAME
         | 
| 79 | 
            +
                    # This is kind of wonky but it's the only way to get the entry path script.
         | 
| 80 | 
            +
                    context_info[:executable] = File.realpath(caller.last[/^(.*):\d+:in /, 1])
         | 
| 81 | 
            +
                    context_info.map { |k, v| "#{k}=#{v}" }.join("\n")
         | 
| 82 | 
            +
                  end
         | 
| 83 | 
            +
             | 
| 67 84 | 
             
                end
         | 
| 68 85 | 
             
              end
         | 
| 69 86 | 
             
            end
         | 
    
        data/lib/chef/property.rb
    CHANGED
    
    | @@ -657,6 +657,10 @@ class Chef | |
| 657 657 | 
             
                  # as needed.
         | 
| 658 658 | 
             
                  return if Chef::Resource.properties.keys.include?(name)
         | 
| 659 659 |  | 
| 660 | 
            +
                  # Special case for `supports` as it was moved in Chef 13 and this is causing
         | 
| 661 | 
            +
                  # some user confusion in cookbooks that need to support both 12 and 13.
         | 
| 662 | 
            +
                  return if name.to_s == "supports"
         | 
| 663 | 
            +
             | 
| 660 664 | 
             
                  # Emit the deprecation.
         | 
| 661 665 | 
             
                  resource_name = declared_in.respond_to?(:resource_name) ? declared_in.resource_name : declared_in
         | 
| 662 666 | 
             
                  Chef.deprecated(:property_name_collision, "Property `#{name}` of resource `#{resource_name}` overwrites an existing method. " \
         | 
    
        data/lib/chef/version.rb
    CHANGED
    
    
| @@ -22,8 +22,16 @@ describe Chef::Mixin::PowershellOut, windows_only: true do | |
| 22 22 | 
             
              include Chef::Mixin::PowershellOut
         | 
| 23 23 |  | 
| 24 24 | 
             
              describe "#powershell_out" do
         | 
| 25 | 
            -
                 | 
| 26 | 
            -
                   | 
| 25 | 
            +
                context "for windows version less than 10", windows_lt_10: true do
         | 
| 26 | 
            +
                  it "runs a powershell command and collects stdout" do
         | 
| 27 | 
            +
                    expect(powershell_out("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+VM\(M\)\s+CPU\(s\)\s+Id\s+/
         | 
| 28 | 
            +
                  end
         | 
| 29 | 
            +
                end
         | 
| 30 | 
            +
             | 
| 31 | 
            +
                context "for windows version greater than 10", windows_gte_10: true do
         | 
| 32 | 
            +
                  it "runs a powershell command and collects stdout" do
         | 
| 33 | 
            +
                    expect(powershell_out("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+CPU\(s\)\s+Id\s+SI\s+ProcessName\s+/
         | 
| 34 | 
            +
                  end
         | 
| 27 35 | 
             
                end
         | 
| 28 36 |  | 
| 29 37 | 
             
                it "does not raise exceptions when the command is invalid" do
         | 
| @@ -32,8 +40,16 @@ describe Chef::Mixin::PowershellOut, windows_only: true do | |
| 32 40 | 
             
              end
         | 
| 33 41 |  | 
| 34 42 | 
             
              describe "#powershell_out!" do
         | 
| 35 | 
            -
                 | 
| 36 | 
            -
                   | 
| 43 | 
            +
                context "for windows version less than 10", windows_lt_10: true do
         | 
| 44 | 
            +
                  it "runs a powershell command and collects stdout" do
         | 
| 45 | 
            +
                    expect(powershell_out!("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+VM\(M\)\s+CPU\(s\)\s+Id\s+/
         | 
| 46 | 
            +
                  end
         | 
| 47 | 
            +
                end
         | 
| 48 | 
            +
             | 
| 49 | 
            +
                context "for windows version less than 10", windows_gte_10: true do
         | 
| 50 | 
            +
                  it "runs a powershell command and collects stdout" do
         | 
| 51 | 
            +
                    expect(powershell_out("get-process").run_command.stdout).to match /Handles\s+NPM\(K\)\s+PM\(K\)\s+WS\(K\)\s+CPU\(s\)\s+Id\s+SI\s+ProcessName\s+/
         | 
| 52 | 
            +
                  end
         | 
| 37 53 | 
             
                end
         | 
| 38 54 |  | 
| 39 55 | 
             
                it "raises exceptions when the command is invalid" do
         | 
| @@ -335,19 +335,6 @@ downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestree" end | |
| 335 335 | 
             
                  end
         | 
| 336 336 | 
             
                end
         | 
| 337 337 |  | 
| 338 | 
            -
                describe "when group name length is more than 256", :windows_only do
         | 
| 339 | 
            -
                  let!(:group_name) do
         | 
| 340 | 
            -
                    "theoldmanwalkingdownthestreetalwayshadagood\
         | 
| 341 | 
            -
            smileonhisfacetheoldmanwalkingdownthestreetalwayshadagoodsmileonhisface\
         | 
| 342 | 
            -
            theoldmanwalkingdownthestreetalwayshadagoodsmileonhisfacetheoldmanwalking\
         | 
| 343 | 
            -
            downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestreeQQQQQQ" end
         | 
| 344 | 
            -
             | 
| 345 | 
            -
                  it "should not create a group" do
         | 
| 346 | 
            -
                    expect { group_resource.run_action(:create) }.to raise_error(ArgumentError)
         | 
| 347 | 
            -
                    group_should_not_exist(group_name)
         | 
| 348 | 
            -
                  end
         | 
| 349 | 
            -
                end
         | 
| 350 | 
            -
             | 
| 351 338 | 
             
                # not_supported_on_solaris because of the use of excluded_members
         | 
| 352 339 | 
             
                describe "should raise an error when same member is included in the members and excluded_members", :not_supported_on_solaris do
         | 
| 353 340 | 
             
                  it "should raise an error" do
         | 
| @@ -359,6 +346,25 @@ downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestreeQQQQQQ" end | |
| 359 346 | 
             
                end
         | 
| 360 347 | 
             
              end
         | 
| 361 348 |  | 
| 349 | 
            +
              # Note:This testcase is written separately from the `group create action` defined above because
         | 
| 350 | 
            +
              # for group name > 256, Windows 2016 returns "The parameter is incorrect"
         | 
| 351 | 
            +
              context "group create action: when group name length is more than 256", :windows_only do
         | 
| 352 | 
            +
                let!(:group_name) do
         | 
| 353 | 
            +
                  "theoldmanwalkingdownthestreetalwayshadagood\
         | 
| 354 | 
            +
            smileonhisfacetheoldmanwalkingdownthestreetalwayshadagoodsmileonhisface\
         | 
| 355 | 
            +
            theoldmanwalkingdownthestreetalwayshadagoodsmileonhisfacetheoldmanwalking\
         | 
| 356 | 
            +
            downthestreetalwayshadagoodsmileonhisfacetheoldmanwalkingdownthestreeQQQQQQ" end
         | 
| 357 | 
            +
             | 
| 358 | 
            +
                it "should not create a group" do
         | 
| 359 | 
            +
                  expect { group_resource.run_action(:create) }.to raise_error(ArgumentError)
         | 
| 360 | 
            +
                  if windows_gte_10?
         | 
| 361 | 
            +
                    expect { Chef::Util::Windows::NetGroup.new(group_name).local_get_members }.to raise_error(ArgumentError, /The parameter is incorrect./)
         | 
| 362 | 
            +
                  else
         | 
| 363 | 
            +
                    group_should_not_exist(group_name)
         | 
| 364 | 
            +
                  end
         | 
| 365 | 
            +
                end
         | 
| 366 | 
            +
              end
         | 
| 367 | 
            +
             | 
| 362 368 | 
             
              describe "group remove action" do
         | 
| 363 369 | 
             
                describe "when there is a group" do
         | 
| 364 370 | 
             
                  before do
         | 
| @@ -639,7 +639,7 @@ describe Chef::Provider::User::Useradd, metadata do | |
| 639 639 | 
             
                    # TODO: platform_family should be setup in spec_helper w/ tags
         | 
| 640 640 | 
             
                    if %w{opensuse}.include?(OHAI_SYSTEM["platform_family"]) ||
         | 
| 641 641 | 
             
                        (%w{suse}.include?(OHAI_SYSTEM["platform_family"]) &&
         | 
| 642 | 
            -
                        OHAI_SYSTEM["platform_version"].to_f < 12. | 
| 642 | 
            +
                        OHAI_SYSTEM["platform_version"].to_f < 12.0)
         | 
| 643 643 | 
             
                      # suse 11.x gets this right:
         | 
| 644 644 | 
             
                      it "errors out trying to unlock the user" do
         | 
| 645 645 | 
             
                        expect(@error).to be_a(Mixlib::ShellOut::ShellCommandFailed)
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -146,6 +146,8 @@ RSpec.configure do |config| | |
| 146 146 | 
             
              config.filter_run_excluding :windows64_only => true unless windows64?
         | 
| 147 147 | 
             
              config.filter_run_excluding :windows32_only => true unless windows32?
         | 
| 148 148 | 
             
              config.filter_run_excluding :windows_nano_only => true unless windows_nano_server?
         | 
| 149 | 
            +
              config.filter_run_excluding :windows_gte_10 => true unless windows_gte_10?
         | 
| 150 | 
            +
              config.filter_run_excluding :windows_lt_10 => true if windows_gte_10?
         | 
| 149 151 | 
             
              config.filter_run_excluding :ruby64_only => true unless ruby_64bit?
         | 
| 150 152 | 
             
              config.filter_run_excluding :ruby32_only => true unless ruby_32bit?
         | 
| 151 153 | 
             
              config.filter_run_excluding :windows_powershell_dsc_only => true unless windows_powershell_dsc?
         | 
| @@ -67,6 +67,11 @@ def windows_2012r2? | |
| 67 67 | 
             
              (host_version && host_version.start_with?("6.3"))
         | 
| 68 68 | 
             
            end
         | 
| 69 69 |  | 
| 70 | 
            +
            def windows_gte_10?
         | 
| 71 | 
            +
              return false unless windows?
         | 
| 72 | 
            +
              Gem::Requirement.new(">= 10").satisfied_by?(Gem::Version.new(host_version))
         | 
| 73 | 
            +
            end
         | 
| 74 | 
            +
             | 
| 70 75 | 
             
            def host_version
         | 
| 71 76 | 
             
              @host_version ||= begin
         | 
| 72 77 | 
             
                wmi = WmiLite::Wmi.new
         | 
| @@ -191,6 +191,18 @@ describe Chef::CookbookSynchronizer do | |
| 191 191 | 
             
                  allow(synchronizer).to receive(:cache).and_return(file_cache)
         | 
| 192 192 | 
             
                  synchronizer.remove_deleted_files
         | 
| 193 193 | 
             
                end
         | 
| 194 | 
            +
             | 
| 195 | 
            +
                it "removes files not in the manifest" do
         | 
| 196 | 
            +
                  not_in_manifest_cb_file = %w{cookbooks/valid1/test/deleted.rb cookbooks/valid1/spec/deleted.rb}
         | 
| 197 | 
            +
                  expect(file_cache).to receive(:find).with(File.join(%w{cookbooks ** {*,.*}})).and_return(not_in_manifest_cb_file)
         | 
| 198 | 
            +
                  expect(synchronizer).to receive(:have_cookbook?).with("valid1").at_least(:once).and_return(true)
         | 
| 199 | 
            +
                  expect(file_cache).to receive(:delete).with("cookbooks/valid1/test/deleted.rb")
         | 
| 200 | 
            +
                  expect(file_cache).to receive(:delete).with("cookbooks/valid1/spec/deleted.rb")
         | 
| 201 | 
            +
                  expect(synchronizer).to receive(:cookbook_segment).with("valid1", "test").at_least(:once).and_return(nil)
         | 
| 202 | 
            +
                  expect(synchronizer).to receive(:cookbook_segment).with("valid1", "spec").at_least(:once).and_return(nil)
         | 
| 203 | 
            +
                  allow(synchronizer).to receive(:cache).and_return(file_cache)
         | 
| 204 | 
            +
                  synchronizer.remove_deleted_files
         | 
| 205 | 
            +
                end
         | 
| 194 206 | 
             
              end
         | 
| 195 207 |  | 
| 196 208 | 
             
              let(:cookbook_a_default_recipe_tempfile) do
         | 
| @@ -49,7 +49,21 @@ describe Chef::Formatters::ErrorDescription do | |
| 49 49 |  | 
| 50 50 | 
             
              describe "#display" do
         | 
| 51 51 | 
             
                before do
         | 
| 52 | 
            -
                  stub_const(" | 
| 52 | 
            +
                  stub_const("Chef::VERSION", "1.2.3")
         | 
| 53 | 
            +
                  stub_const("RUBY_DESCRIPTION", "ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]")
         | 
| 54 | 
            +
                  allow(subject).to receive(:caller) { Kernel.caller + ["/test/bin/chef-client:1:in `<main>'"] }
         | 
| 55 | 
            +
                  allow(File).to receive(:realpath).and_call_original
         | 
| 56 | 
            +
                  allow(File).to receive(:realpath).with("/test/bin/chef-client").and_return("/test/bin/chef-client")
         | 
| 57 | 
            +
                end
         | 
| 58 | 
            +
             | 
| 59 | 
            +
                around do |ex|
         | 
| 60 | 
            +
                  old_program_name = $PROGRAM_NAME
         | 
| 61 | 
            +
                  begin
         | 
| 62 | 
            +
                    $PROGRAM_NAME = "chef-client"
         | 
| 63 | 
            +
                    ex.run
         | 
| 64 | 
            +
                  ensure
         | 
| 65 | 
            +
                    $PROGRAM_NAME = old_program_name
         | 
| 66 | 
            +
                  end
         | 
| 53 67 | 
             
                end
         | 
| 54 68 |  | 
| 55 69 | 
             
                context "when no sections have been added" do
         | 
| @@ -60,9 +74,12 @@ describe Chef::Formatters::ErrorDescription do | |
| 60 74 | 
             
            test title
         | 
| 61 75 | 
             
            ================================================================================
         | 
| 62 76 |  | 
| 63 | 
            -
             | 
| 64 | 
            -
             | 
| 65 | 
            -
             | 
| 77 | 
            +
            System Info:
         | 
| 78 | 
            +
            ------------
         | 
| 79 | 
            +
            chef_version=1.2.3
         | 
| 80 | 
            +
            ruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
         | 
| 81 | 
            +
            program_name=chef-client
         | 
| 82 | 
            +
            executable=/test/bin/chef-client
         | 
| 66 83 |  | 
| 67 84 | 
             
                    END
         | 
| 68 85 | 
             
                  end
         | 
| @@ -84,9 +101,37 @@ test heading | |
| 84 101 | 
             
            ------------
         | 
| 85 102 | 
             
            test text
         | 
| 86 103 |  | 
| 87 | 
            -
             | 
| 88 | 
            -
             | 
| 89 | 
            -
             | 
| 104 | 
            +
            System Info:
         | 
| 105 | 
            +
            ------------
         | 
| 106 | 
            +
            chef_version=1.2.3
         | 
| 107 | 
            +
            ruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
         | 
| 108 | 
            +
            program_name=chef-client
         | 
| 109 | 
            +
            executable=/test/bin/chef-client
         | 
| 110 | 
            +
             | 
| 111 | 
            +
                    END
         | 
| 112 | 
            +
                  end
         | 
| 113 | 
            +
             | 
| 114 | 
            +
                end
         | 
| 115 | 
            +
             | 
| 116 | 
            +
                context "when node object is available" do
         | 
| 117 | 
            +
                  it "should output the expected sections" do
         | 
| 118 | 
            +
                    # This can't be in a before block because the spec-wide helper calls a
         | 
| 119 | 
            +
                    # reset on global values.
         | 
| 120 | 
            +
                    Chef.set_node({ "platform" => "openvms", "platform_version" => "8.4-2L1" })
         | 
| 121 | 
            +
                    subject.display(out)
         | 
| 122 | 
            +
                    expect(out.out.string).to eq <<-END
         | 
| 123 | 
            +
            ================================================================================
         | 
| 124 | 
            +
            test title
         | 
| 125 | 
            +
            ================================================================================
         | 
| 126 | 
            +
             | 
| 127 | 
            +
            System Info:
         | 
| 128 | 
            +
            ------------
         | 
| 129 | 
            +
            chef_version=1.2.3
         | 
| 130 | 
            +
            platform=openvms
         | 
| 131 | 
            +
            platform_version=8.4-2L1
         | 
| 132 | 
            +
            ruby=ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
         | 
| 133 | 
            +
            program_name=chef-client
         | 
| 134 | 
            +
            executable=/test/bin/chef-client
         | 
| 90 135 |  | 
| 91 136 | 
             
                    END
         | 
| 92 137 | 
             
                  end
         | 
| @@ -192,34 +192,34 @@ describe Chef::ProviderResolver do | |
| 192 192 | 
             
                      stub_service_providers(:debian, :invokercd, :upstart, :systemd)
         | 
| 193 193 | 
             
                    end
         | 
| 194 194 |  | 
| 195 | 
            -
                    it "when  | 
| 195 | 
            +
                    it "when both the SysV init and Systemd script exists, it returns a Service::Debian provider" do
         | 
| 196 196 | 
             
                      stub_service_configs(:initd, :systemd)
         | 
| 197 197 | 
             
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 198 198 | 
             
                    end
         | 
| 199 199 |  | 
| 200 | 
            -
                    it "when  | 
| 200 | 
            +
                    it "when SysV, Upstart, and Systemd scripts exist, it returns a Service::Systemd provider" do
         | 
| 201 201 | 
             
                      stub_service_configs(:initd, :upstart, :systemd)
         | 
| 202 202 | 
             
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 203 203 | 
             
                    end
         | 
| 204 204 |  | 
| 205 | 
            -
                    it "when  | 
| 205 | 
            +
                    it "when both the Upstart and Systemd scripts exists, it returns a Service::Systemd provider" do
         | 
| 206 206 | 
             
                      stub_service_configs(:upstart, :systemd)
         | 
| 207 207 | 
             
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 208 208 | 
             
                    end
         | 
| 209 209 |  | 
| 210 | 
            -
                    it "when both do not exist, it calls the old style provider resolver and returns a  | 
| 210 | 
            +
                    it "when both do not exist, it calls the old style provider resolver and returns a Systemd Provider" do
         | 
| 211 211 | 
             
                      stub_service_configs(:systemd)
         | 
| 212 212 | 
             
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 213 213 | 
             
                    end
         | 
| 214 214 |  | 
| 215 | 
            -
                    it "when only the SysV init script exists, it returns a Service:: | 
| 215 | 
            +
                    it "when only the SysV init script exists, it returns a Service::Systemd provider" do
         | 
| 216 216 | 
             
                      stub_service_configs(:initd)
         | 
| 217 | 
            -
                      expect(resolved_provider).to eql(Chef::Provider::Service:: | 
| 217 | 
            +
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 218 218 | 
             
                    end
         | 
| 219 219 |  | 
| 220 | 
            -
                    it "when both SysV and Upstart scripts exist, it returns a Service:: | 
| 220 | 
            +
                    it "when both SysV and Upstart scripts exist, it returns a Service::Systemd provider" do
         | 
| 221 221 | 
             
                      stub_service_configs(:initd, :upstart)
         | 
| 222 | 
            -
                      expect(resolved_provider).to eql(Chef::Provider::Service:: | 
| 222 | 
            +
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 223 223 | 
             
                    end
         | 
| 224 224 |  | 
| 225 225 | 
             
                    it "when only the Upstart script exists, it returns a Service::Upstart provider" do
         | 
| @@ -227,7 +227,7 @@ describe Chef::ProviderResolver do | |
| 227 227 | 
             
                      expect(resolved_provider).to eql(Chef::Provider::Service::Upstart)
         | 
| 228 228 | 
             
                    end
         | 
| 229 229 |  | 
| 230 | 
            -
                    it "when both do not exist, it calls the old style provider resolver and returns a  | 
| 230 | 
            +
                    it "when both do not exist, it calls the old style provider resolver and returns a Systemd Provider" do
         | 
| 231 231 | 
             
                      stub_service_configs
         | 
| 232 232 | 
             
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 233 233 | 
             
                    end
         | 
| @@ -410,7 +410,7 @@ describe Chef::ProviderResolver do | |
| 410 410 | 
             
                      stub_service_providers(:debian, :invokercd, :upstart, :systemd)
         | 
| 411 411 | 
             
                      stub_service_configs(:initd, :upstart)
         | 
| 412 412 | 
             
                      mock_shellout_command("/bin/systemctl list-unit-files", exitstatus: 1)
         | 
| 413 | 
            -
                      expect(resolved_provider).to eql(Chef::Provider::Service:: | 
| 413 | 
            +
                      expect(resolved_provider).to eql(Chef::Provider::Service::Systemd)
         | 
| 414 414 | 
             
                    end
         | 
| 415 415 | 
             
                  end
         | 
| 416 416 |  | 
    
        data/tasks/changelog.rb
    CHANGED
    
    | @@ -4,7 +4,7 @@ begin | |
| 4 4 |  | 
| 5 5 | 
             
              namespace :changelog do
         | 
| 6 6 | 
             
                # Fetch the latest version from mixlib-install
         | 
| 7 | 
            -
                latest_stable_version = Mixlib::Install.available_versions("chef", "stable").last
         | 
| 7 | 
            +
                latest_stable_version = Mixlib::Install.available_versions("chef", "stable").select { |n| n.start_with? "12" }.last
         | 
| 8 8 |  | 
| 9 9 | 
             
                # Take the changelog from the latest stable release and put it into history.
         | 
| 10 10 | 
             
                task :archive do
         | 
| @@ -17,13 +17,11 @@ begin | |
| 17 17 | 
             
                # recent stable version and HEAD.
         | 
| 18 18 | 
             
                GitHubChangelogGenerator::RakeTask.new :update do |config|
         | 
| 19 19 | 
             
                  config.future_release = "v#{Chef::VERSION}"
         | 
| 20 | 
            -
                  config. | 
| 20 | 
            +
                  config.since_tag = "v#{latest_stable_version}"
         | 
| 21 | 
            +
                  config.release_branch = "chef-12"
         | 
| 21 22 | 
             
                  config.max_issues = 0
         | 
| 22 23 | 
             
                  config.add_issues_wo_labels = false
         | 
| 23 | 
            -
                  config. | 
| 24 | 
            -
                  config.bug_labels = "bug,Bug,Improvement,Upstream Bug".split(",")
         | 
| 25 | 
            -
                  config.exclude_labels = "duplicate,question,invalid,wontfix,no_changelog,Exclude From Changelog,Question,Discussion,Meta: Exclude From Changelog".split(",")
         | 
| 26 | 
            -
                  config.header = "This changelog reflects the current state of chef's master branch on github and may not reflect the current released version of chef, which is [](https://badge.fury.io/rb/chef)."
         | 
| 24 | 
            +
                  config.header = "This changelog reflects the current state of chef's chef-12 branch on github and may not reflect the current released version of chef, which is [](https://badge.fury.io/rb/chef)."
         | 
| 27 25 | 
             
                end
         | 
| 28 26 | 
             
              end
         | 
| 29 27 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: chef
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 12. | 
| 4 | 
            +
              version: 12.21.1
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Adam Jacob
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2017- | 
| 11 | 
            +
            date: 2017-06-20 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: chef-config
         | 
| @@ -16,14 +16,14 @@ dependencies: | |
| 16 16 | 
             
                requirements:
         | 
| 17 17 | 
             
                - - '='
         | 
| 18 18 | 
             
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            -
                    version: 12. | 
| 19 | 
            +
                    version: 12.21.1
         | 
| 20 20 | 
             
              type: :runtime
         | 
| 21 21 | 
             
              prerelease: false
         | 
| 22 22 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 23 | 
             
                requirements:
         | 
| 24 24 | 
             
                - - '='
         | 
| 25 25 | 
             
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            -
                    version: 12. | 
| 26 | 
            +
                    version: 12.21.1
         | 
| 27 27 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 28 28 | 
             
              name: mixlib-cli
         | 
| 29 29 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -249,6 +249,9 @@ dependencies: | |
| 249 249 | 
             
                - - ">="
         | 
| 250 250 | 
             
                  - !ruby/object:Gem::Version
         | 
| 251 251 | 
             
                    version: '4.8'
         | 
| 252 | 
            +
                - - "<"
         | 
| 253 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 254 | 
            +
                    version: '13'
         | 
| 252 255 | 
             
              type: :runtime
         | 
| 253 256 | 
             
              prerelease: false
         | 
| 254 257 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| @@ -256,6 +259,9 @@ dependencies: | |
| 256 259 | 
             
                - - ">="
         | 
| 257 260 | 
             
                  - !ruby/object:Gem::Version
         | 
| 258 261 | 
             
                    version: '4.8'
         | 
| 262 | 
            +
                - - "<"
         | 
| 263 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 264 | 
            +
                    version: '13'
         | 
| 259 265 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 260 266 | 
             
              name: plist
         | 
| 261 267 | 
             
              requirement: !ruby/object:Gem::Requirement
         |