summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Doherty <randomcamel@users.noreply.github.com>2015-08-24 17:48:26 -0700
committerChris Doherty <randomcamel@users.noreply.github.com>2015-08-24 17:48:26 -0700
commit44dfbe536e9291bc61b1191743d16342b4580ced (patch)
tree90e566a47f0069948b99f2bc218af56a9ea76bd0
parentd08bed6ed7d2fade6edbd169e12ac6d2ab11724f (diff)
parent08bc88af9d9482ef28c06e6e89d335604a99493f (diff)
downloadchef-zero-44dfbe536e9291bc61b1191743d16342b4580ced.tar.gz
Merge pull request #140 from terceiro/remove-chef-dep
Remove dependency on chef
-rw-r--r--lib/chef_zero/endpoints/policies_endpoint.rb7
-rw-r--r--spec/server_spec.rb1
2 files changed, 3 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
diff --git a/spec/server_spec.rb b/spec/server_spec.rb
index 558ef35..d46084f 100644
--- a/spec/server_spec.rb
+++ b/spec/server_spec.rb
@@ -1,4 +1,5 @@
require 'chef_zero/server'
+require 'net/http'
require 'uri'
describe ChefZero::Server do