summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Terceiro <terceiro@debian.org>2015-06-14 15:57:45 -0300
committerAntonio Terceiro <terceiro@debian.org>2015-06-14 17:00:03 -0300
commiteb78e23269692086421b35c23857064df8535b34 (patch)
tree179fe9a1e114af813904665493a61ffa3afa5b1c
parentfdf63f101fd2810ac9159a61fc34f8bb0697bd12 (diff)
downloadchef-zero-eb78e23269692086421b35c23857064df8535b34.tar.gz
Remove implicit dependency on chef
You don't want chef-zero depending on chef, since chef already depends on chef-zero and circular dependencies are a pain to deal with. This closes issue #136
-rw-r--r--lib/chef_zero/endpoints/policies_endpoint.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/chef_zero/endpoints/policies_endpoint.rb b/lib/chef_zero/endpoints/policies_endpoint.rb
index 83d503c..ddb2e9b 100644
--- a/lib/chef_zero/endpoints/policies_endpoint.rb
+++ b/lib/chef_zero/endpoints/policies_endpoint.rb
@@ -1,8 +1,5 @@
require 'ffi_yajl'
-require 'chef/version_class'
-require 'chef/exceptions'
-
require 'chef_zero/endpoints/rest_object_endpoint'
require 'chef_zero/chef_data/data_normalizer'
@@ -142,9 +139,9 @@ module ChefZero
end
def valid_version?(version_string)
- Chef::Version.new(version_string)
+ Gem::Version.new(version_string)
true
- rescue Chef::Exceptions::InvalidCookbookVersion
+ rescue ArgumentError
false
end