diff options
author | Chris Doherty <randomcamel@users.noreply.github.com> | 2015-08-24 17:48:26 -0700 |
---|---|---|
committer | Chris Doherty <randomcamel@users.noreply.github.com> | 2015-08-24 17:48:26 -0700 |
commit | 44dfbe536e9291bc61b1191743d16342b4580ced (patch) | |
tree | 90e566a47f0069948b99f2bc218af56a9ea76bd0 | |
parent | d08bed6ed7d2fade6edbd169e12ac6d2ab11724f (diff) | |
parent | 08bc88af9d9482ef28c06e6e89d335604a99493f (diff) | |
download | chef-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.rb | 7 | ||||
-rw-r--r-- | spec/server_spec.rb | 1 |
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 |