summaryrefslogtreecommitdiff
path: root/lib/chef/environment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chef/environment.rb')
-rw-r--r--lib/chef/environment.rb6
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/chef/environment.rb b/lib/chef/environment.rb
index 621a122440..be05b58989 100644
--- a/lib/chef/environment.rb
+++ b/lib/chef/environment.rb
@@ -3,7 +3,7 @@
# Author:: Seth Falcon (<seth@chef.io>)
# Author:: John Keiser (<jkeiser@ospcode.com>)
# Author:: Kyle Goodwin (<kgoodwin@primerevenue.com>)
-# Copyright:: Copyright 2010-2016, Chef Software Inc.
+# Copyright:: Copyright 2010-2018, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -34,8 +34,6 @@ class Chef
include Chef::Mixin::ParamsValidate
include Chef::Mixin::FromFile
- attr_accessor :chef_server_rest
-
COMBINED_COOKBOOK_CONSTRAINT = /(.+)(?:[\s]+)((?:#{Chef::VersionConstraint::OPS.join('|')})(?:[\s]+).+)$/
def initialize(chef_server_rest: nil)
@@ -297,7 +295,7 @@ class Chef
def self.validate_cookbook_versions(cv)
return false unless cv.kind_of?(Hash)
- cv.each do |cookbook, version|
+ cv.each_value do |version|
return false unless Chef::Environment.validate_cookbook_version(version)
end
true