spice 0.0.2.beta → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spice (0.0.1.beta1)
4
+ spice (0.0.2.beta)
5
5
  mixlib-authentication
6
6
  rest-client
7
7
  yajl-ruby
@@ -9,24 +9,8 @@ PATH
9
9
  GEM
10
10
  remote: http://rubygems.org/
11
11
  specs:
12
- abstract (1.0.0)
13
12
  addressable (2.2.2)
14
13
  builder (3.0.0)
15
- bunny (0.6.0)
16
- chef (0.9.12)
17
- bunny (>= 0.6.0)
18
- erubis
19
- extlib
20
- highline
21
- json (>= 1.4.4, <= 1.4.6)
22
- mixlib-authentication (>= 1.1.0)
23
- mixlib-cli (>= 1.1.0)
24
- mixlib-config (>= 1.1.2)
25
- mixlib-log (>= 1.2.0)
26
- moneta
27
- ohai (>= 0.5.7)
28
- rest-client (>= 1.0.4, < 1.7.0)
29
- uuidtools
30
14
  crack (0.1.8)
31
15
  cucumber (0.10.0)
32
16
  builder (>= 2.1.2)
@@ -35,29 +19,14 @@ GEM
35
19
  json (~> 1.4.6)
36
20
  term-ansicolor (~> 1.0.5)
37
21
  diff-lcs (1.1.2)
38
- erubis (2.6.6)
39
- abstract (>= 1.0.0)
40
- extlib (0.9.15)
41
- forgery (0.3.6)
42
22
  gherkin (2.3.2)
43
23
  json (~> 1.4.6)
44
24
  term-ansicolor (~> 1.0.5)
45
- highline (1.6.1)
46
25
  json (1.4.6)
47
26
  mime-types (1.16)
48
27
  mixlib-authentication (1.1.4)
49
28
  mixlib-log
50
- mixlib-cli (1.2.0)
51
- mixlib-config (1.1.2)
52
29
  mixlib-log (1.2.0)
53
- moneta (0.6.0)
54
- ohai (0.5.8)
55
- extlib
56
- json (>= 1.4.4, <= 1.4.6)
57
- mixlib-cli
58
- mixlib-config
59
- mixlib-log
60
- systemu
61
30
  rcov (0.9.9)
62
31
  rest-client (1.6.1)
63
32
  mime-types (>= 1.16)
@@ -69,11 +38,8 @@ GEM
69
38
  rspec-expectations (2.4.0)
70
39
  diff-lcs (~> 1.1.2)
71
40
  rspec-mocks (2.4.0)
72
- systemu (1.2.0)
73
41
  term-ansicolor (1.0.5)
74
42
  timecop (0.3.5)
75
- uuidtools (2.1.1)
76
- vcr (1.4.0)
77
43
  webmock (1.6.1)
78
44
  addressable (>= 2.2.2)
79
45
  crack (>= 0.1.7)
@@ -84,16 +50,13 @@ PLATFORMS
84
50
  ruby
85
51
 
86
52
  DEPENDENCIES
87
- chef (= 0.9.12)
88
53
  cucumber (~> 0.10.0)
89
- forgery (~> 0.3.6)
90
54
  mixlib-authentication
91
55
  rcov
92
56
  rest-client
93
57
  rspec (~> 2.4.0)
94
58
  spice!
95
59
  timecop (~> 0.3.5)
96
- vcr (~> 1.4.0)
97
60
  webmock (~> 1.6.1)
98
61
  yajl-ruby
99
62
  yard (~> 0.6.4)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # spice
2
2
 
3
- Spice is a zesty Chef API wrapper. It's primary purpose is to let you integrate your apps with a (Chef)[http://opscode.com/chef] server easily and succinctly. Spice provides support for the (entire released Chef API)[http://wiki.opscode.com/display/chef/Server+API]
3
+ Spice is a zesty Chef API wrapper. It's primary purpose is to let you easily integrate your apps with a (Chef)[http://opscode.com/chef] server easily. Spice provides support for the [entire released Chef API](http://wiki.opscode.com/display/chef/Server+API)
4
4
 
5
5
  ## Installation
6
6
 
@@ -74,9 +74,9 @@ Make the client "sweet" an admin:
74
74
 
75
75
  Spice.connection.put("/clients/sweet", :admin => true)
76
76
 
77
- Scope out (the official Chef API docs)[http://wiki.opscode.com/display/chef/Server+API] for a full list of wicked awesome things you can do.
77
+ Scope out [the official Chef API docs](http://wiki.opscode.com/display/chef/Server+API) for a full list of wicked awesome things you can do.
78
78
 
79
- ## High-level use
79
+ ### High-level use
80
80
 
81
81
  TODO
82
82
 
data/lib/spice/client.rb CHANGED
@@ -17,20 +17,24 @@ module Spice
17
17
  end
18
18
 
19
19
  def self.show(options={})
20
+ raise ArgumentError, "Option :name must be present" unless options[:name]
20
21
  name = options.delete(:name)
21
22
  connection.get("/clients/#{name}")
22
23
  end
23
24
 
24
25
  def self.create(options={})
26
+ raise ArgumentError, "Option :name must be present" unless options[:name]
25
27
  connection.post("/clients", options)
26
28
  end
27
29
 
28
30
  def self.update(options={})
31
+ raise ArgumentError, "Option :name must be present" unless options[:name]
29
32
  name = options.delete(:name)
30
33
  connection.put("/clients/#{name}", options)
31
34
  end
32
35
 
33
36
  def self.delete(options={})
37
+ raise ArgumentError, "Option :name must be present" unless options[:name]
34
38
  name = options.delete(:name)
35
39
  connection.delete("/clients/#{name}", options)
36
40
  end
@@ -9,6 +9,7 @@ module Spice
9
9
  end
10
10
 
11
11
  def self.show(options={})
12
+ raise ArgumentError, "Option :name must be present" unless options[:name]
12
13
  name = options.delete(:name)
13
14
  connection.get("/cookbooks/#{name}")
14
15
  end
@@ -18,11 +19,13 @@ module Spice
18
19
  end
19
20
 
20
21
  def self.update(options={})
22
+ raise ArgumentError, "Option :name must be present" unless options[:name]
21
23
  name = options.delete(:name)
22
24
  connection.put("/cookbooks/#{name}", options)
23
25
  end
24
26
 
25
27
  def self.delete(options={})
28
+ raise ArgumentError, "Option :name must be present" unless options[:name]
26
29
  name = options.delete(:name)
27
30
  connection.delete("/cookbooks/#{name}", options)
28
31
  end
@@ -9,6 +9,7 @@ module Spice
9
9
  end
10
10
 
11
11
  def self.show(options={})
12
+ raise ArgumentError, "Option :name must be present" unless options[:name]
12
13
  name = options.delete(:name)
13
14
  connection.get("/data/#{name}")
14
15
  end
@@ -18,11 +19,13 @@ module Spice
18
19
  end
19
20
 
20
21
  def self.update(options={})
22
+ raise ArgumentError, "Option :name must be present" unless options[:name]
21
23
  name = options.delete(:name)
22
24
  connection.put("/data/#{name}", options)
23
25
  end
24
26
 
25
27
  def self.delete(options={})
28
+ raise ArgumentError, "Option :name must be present" unless options[:name]
26
29
  name = options.delete(:name)
27
30
  connection.delete("/data/#{name}", options)
28
31
  end
data/lib/spice/node.rb CHANGED
@@ -9,6 +9,7 @@ module Spice
9
9
  end
10
10
 
11
11
  def self.show(options={})
12
+ raise ArgumentError, "Option :name must be present" unless options[:name]
12
13
  name = options.delete(:name)
13
14
  connection.get("/nodes/#{name}")
14
15
  end
@@ -18,11 +19,13 @@ module Spice
18
19
  end
19
20
 
20
21
  def self.update(options={})
22
+ raise ArgumentError, "Option :name must be present" unless options[:name]
21
23
  name = options.delete(:name)
22
24
  connection.put("/nodes/#{name}", options)
23
25
  end
24
26
 
25
27
  def self.delete(options={})
28
+ raise ArgumentError, "Option :name must be present" unless options[:name]
26
29
  name = options.delete(:name)
27
30
  connection.delete("/nodes/#{name}", options)
28
31
  end
data/lib/spice/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spice
2
- VERSION = "0.0.2.beta"
2
+ VERSION = "0.2.0"
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -6,9 +6,7 @@ Bundler.require
6
6
  require 'rspec'
7
7
  require 'webmock/rspec'
8
8
  require 'timecop'
9
- require 'forgery'
10
9
  require 'spice'
11
- require 'chef'
12
10
 
13
11
  # Requires supporting files with custom matchers and macros, etc,
14
12
  # in ./support/ and its subdirectories.
@@ -2,68 +2,111 @@ require 'spec_helper'
2
2
 
3
3
  module Spice
4
4
  describe Client do
5
- describe ".list" do
6
- # setup_authentication
7
- let(:chef) { setup_chef_client }
5
+ describe ".all" do
6
+ before { setup_chef_client }
7
+
8
8
  it "returns a list of clients" do
9
- VCR.use_cassette 'client/list', :record => :new_episodes do
10
- # chef.get_rest("/clients")
11
- end
9
+ stub_client_list
10
+ Client.all.length.should == 1
12
11
  end
13
12
  end
14
-
13
+
15
14
  describe ".show" do
16
- # VCR.use_cassette 'client/show', :record => :new_episodes do
17
- # Client.show(:name => "testclient")
18
- # end
19
- let(:chef) { setup_chef_client }
20
- it "returns a valid client" do
21
- VCR.use_cassette 'client/show', :record => :new_episodes do
22
- # chef.get_rest("/clients/admin")
15
+ before { setup_chef_client }
16
+
17
+ context "valid" do
18
+ it "returns a valid client" do
19
+ stub_client_show("monkeypants")
20
+ client = Client.show(:name => "monkeypants")
21
+ client["name"].should == "monkeypants"
22
+ client["admin"].should == true
23
23
  end
24
24
  end
25
- it "returns nothing when a client is not found" do
26
- VCR.use_cassette 'client/show_not_found', :record => :new_episodes do
27
- # chef.get_rest("/clients/badclient")
25
+
26
+ context "errors" do
27
+ it "return a 404 when a client is not found" do
28
+ stub_client_show("applesauce", 404)
29
+ lambda { Client.show(:name => "applesauce") }.
30
+ should raise_error(RestClient::ResourceNotFound)
31
+ end
32
+
33
+ it "raises ArgumentError if option :name not present" do
34
+ stub_client_show("pizza")
35
+ lambda {Client.show() }.should raise_error ArgumentError
28
36
  end
29
37
  end
30
38
  end
31
-
39
+
32
40
  describe ".create" do
33
- let(:chef) { setup_chef_client }
34
- it "creates a valid non-admin client" do
35
- VCR.use_cassette 'client/create_nonadmin', :record => :new_episodes do
36
- # chef.post_rest("/clients", JSON.generate(:name => "lkjasdf", :admin => false))
37
- Client.create(:name => "kijasf", :admin => false)
41
+ before { setup_chef_client }
42
+
43
+ context "valid" do
44
+ it "creates a valid non-admin client" do
45
+ stub_client_create("spork")
46
+ client = Client.create(:name => "spork", :admin => false)
47
+ client["private_key"].should == "RSA PRIVATE KEY"
48
+ client["uri"].should == "http://http://localhost:4000/clients/spork"
49
+ end
50
+
51
+ it "creates a valid admin client" do
52
+ stub_client_create("pants", true)
53
+ response = Client.create(:name => "pants", :admin => true)
54
+ response["private_key"].should == "RSA PRIVATE KEY"
55
+ response["uri"].should == "http://http://localhost:4000/clients/pants"
56
+
57
+ stub_client_show("pants")
58
+ client = Client.show(:name => "pants")
59
+ client["admin"].should == true
60
+ end
61
+ end
62
+
63
+ context "errors" do
64
+ it "does not create a client that already exists" do
65
+ stub_client_create("pants", false, 409)
66
+ lambda { Client.create(:name => "pants", :admin => false) }.
67
+ should raise_error(RestClient::Conflict)
68
+ end
69
+ end
70
+ end
71
+
72
+ describe ".update" do
73
+ before { setup_chef_client }
74
+
75
+ context "valid" do
76
+ it "makes a client an admin" do
77
+ stub_client_update("awesome", true, false, 200)
78
+ Client.update(:name => "awesome", :admin => true, :private_key => false)
79
+ end
80
+
81
+ it "regenerates the client private key" do
82
+ stub_client_update("awesome", false, true, 200)
83
+ Client.update(:name => "awesome", :admin => false, :private_key => true)
84
+ end
85
+ end
86
+ end
87
+
88
+ describe ".delete" do
89
+ before { setup_chef_client }
90
+
91
+ context "valid" do
92
+ it "deletes a client" do
93
+ stub_client_delete("spork")
94
+ Client.delete(:name => "spork")
95
+ end
96
+ end
97
+
98
+ context "errors" do
99
+ it "raises ArgumentError if option :name not present" do
100
+ stub_client_delete("pizza")
101
+ lambda {Client.delete }.should raise_error ArgumentError
102
+ end
103
+
104
+ it "does not delete a non-existent client" do
105
+ stub_client_delete("spork", 404)
106
+ lambda { Client.delete(:name => "spork") }.
107
+ should raise_error(RestClient::ResourceNotFound)
38
108
  end
39
109
  end
40
- # it "creates a valid admin client" do
41
- # VCR.use_cassette 'client/create', :record => :new_episodes do
42
- # chef.post_rest("/clients", JSON.parse(:name => "testclient", :admin => true))
43
- # end
44
- # end
45
- it "does not create a client that already exists"
46
110
  end
47
- #
48
- # describe ".update" do
49
- # setup_authentication
50
- #
51
- # let(:name) { Forgery::Name.first_name.downcase.to_s }
52
- # before { Client.create(:name => name) }
53
- # VCR.use_cassette 'client/update', :record => :new_episodes do
54
- # Client.update(:name => "name")
55
- # end
56
- # end
57
- #
58
- # describe ".delete" do
59
- # setup_authentication
60
- #
61
- # let(:name) { Forgery::Name.first_name.downcase.to_s }
62
- # before { Client.create(:name => name) }
63
- #
64
- # VCR.use_cassette 'client/delete', :record => :new_episodes do
65
- # Client.delete(:name => name)
66
- # end
67
- # end
68
111
  end
69
112
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  module Spice
4
4
  describe Cookbook do
5
- describe ".list" do
5
+ describe ".all" do
6
6
  VCR.use_cassette 'cookbook/list', :record => :new_episodes do
7
7
  Cookbook.list
8
8
  end
@@ -2,34 +2,24 @@ require 'spec_helper'
2
2
 
3
3
  module Spice
4
4
  describe DataBag do
5
- describe ".list" do
6
- VCR.use_cassette 'data/list', :record => :new_episodes do
7
- DataBag.list
8
- end
5
+ describe ".all" do
6
+ DataBag.list
9
7
  end
10
-
8
+
11
9
  describe ".show" do
12
- VCR.use_cassette 'data/show', :record => :new_episodes do
13
- DataBag.show(:name => "testdata")
14
- end
10
+ DataBag.show(:name => "testdata")
15
11
  end
16
-
12
+
17
13
  describe ".create" do
18
- VCR.use_cassette 'data/create', :record => :new_episodes do
19
- DataBag.create(:name => "testdata")
20
- end
14
+ DataBag.create(:name => "testdata")
21
15
  end
22
-
16
+
23
17
  describe ".update" do
24
- VCR.use_cassette 'data/update', :record => :new_episodes do
25
- DataBag.update(:name => "testdata")
26
- end
18
+ DataBag.update(:name => "testdata")
27
19
  end
28
-
20
+
29
21
  describe ".delete" do
30
- VCR.use_cassette 'data/delete', :record => :new_episodes do
31
- DataBag.delete(:name => "testdata")
32
- end
22
+ DataBag.delete(:name => "testdata")
33
23
  end
34
24
  end
35
25
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  module Spice
4
4
  describe Node do
5
- describe ".list" do
5
+ describe ".all" do
6
6
  VCR.use_cassette 'node/list', :record => :new_episodes do
7
7
  Node.list
8
8
  end
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  module Spice
4
4
  describe Role do
5
- describe ".list" do
5
+ describe ".all" do
6
6
  VCR.use_cassette 'role/list', :record => :new_episodes do
7
7
  Role.list
8
8
  end
@@ -0,0 +1,97 @@
1
+ def stub_client_list(name="testclient")
2
+ stub_request(:get, "http://localhost:4000/clients").
3
+ to_return(
4
+ :status => 200,
5
+ :body => "{\"#{name}\":\"http://localhost:4000/clients/#{name}\"}",
6
+ :headers => {})
7
+ end
8
+
9
+ def stub_client_show(name, status=200)
10
+ case status
11
+ when 200
12
+ stub_request(:get, "http://localhost:4000/clients/#{name}").
13
+ to_return(
14
+ :status => status,
15
+ :body => %Q{{"name": "#{name}",
16
+ "chef_type": "client",
17
+ "json_class": "Chef::ApiClient",
18
+ "public_key": "RSA PUBLIC KEY",
19
+ "_rev": "1-68532bf2122a54464db6ad65a24e2225",
20
+ "admin": true}
21
+ }
22
+ )
23
+ when 404
24
+ stub_request(:get, "http://localhost:4000/clients/#{name}").
25
+ to_return(
26
+ :status => status,
27
+ :body => "{\"error\":[\"Cannot load client #{name}\"]}")
28
+ end
29
+ end
30
+
31
+ def stub_client_create(name, admin=false, status=201)
32
+ case status
33
+ when 201
34
+ stub_request(:post, "http://localhost:4000/clients").
35
+ with(
36
+ :body => "{\"name\":\"#{name}\",\"admin\":#{admin}}").
37
+ to_return(
38
+ :status => status,
39
+ :body => %Q{
40
+ {
41
+ "private_key":"RSA PRIVATE KEY",
42
+ "uri":"http://http://localhost:4000/clients/#{name}"}
43
+ },
44
+ :headers => {}
45
+ )
46
+ when 409
47
+ stub_request(:post, "http://localhost:4000/clients").
48
+ with(
49
+ :body => "{\"name\":\"#{name}\",\"admin\":#{admin}}").
50
+ to_return(
51
+ :status => status,
52
+ :body => %Q{
53
+ {
54
+ "private_key":"RSA PRIVATE KEY",
55
+ "uri":"http://http://localhost:4000/clients/#{name}"}
56
+ },
57
+ :headers => {}
58
+ )
59
+ end
60
+ end
61
+
62
+ def stub_client_update(name, admin=false, private_key=false, status=200)
63
+ case status
64
+ when 200
65
+ stub_request(:put, "http://localhost:4000/clients/#{name}").
66
+ with(:body => "{\"admin\":#{admin},\"private_key\":#{private_key}}").
67
+ to_return(
68
+ :status => status,
69
+ :body => %Q{{#{"\"private_key\":\"RSA PRIVATE KEY\"," if private_key}\"admin\": true}
70
+ }
71
+ )
72
+ # when 404
73
+ # stub_request(:get, "http://localhost:4000/clients/#{name}").
74
+ # to_return(
75
+ # :status => status,
76
+ # :body => "{\"error\":[\"Cannot load client #{name}\"]}")
77
+ end
78
+ end
79
+
80
+ def stub_client_delete(name, status=200)
81
+ case status
82
+ when 200
83
+ stub_request(:delete, "http://localhost:4000/clients/#{name}").
84
+ with(:body => "").
85
+ to_return(
86
+ :status => status,
87
+ :body => ""
88
+ )
89
+ when 404
90
+ stub_request(:delete, "http://localhost:4000/clients/#{name}").
91
+ with(:body => "").
92
+ to_return(
93
+ :status => status,
94
+ :body => "{\"error\":[\"Cannot load client sasdasdf\"]}"
95
+ )
96
+ end
97
+ end
data/spice.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |s|
10
10
  s.email = ["hi@iamdanryan.com"]
11
11
  s.homepage = "http://github.com/danryan/spice"
12
12
  s.summary = %q{Chef API wrapper}
13
- s.description = %q{A zesty Chef API wrapper}
13
+ s.description = %q{Spice is a zesty Chef API wrapper. It's primary purpose is to let you easily integrate your apps with a (Chef)[http://opscode.com/chef] server easily. Spice provides support for the [entire released Chef API](http://wiki.opscode.com/display/chef/Server+API)}
14
14
 
15
15
  s.rubyforge_project = "spice"
16
16
 
@@ -22,10 +22,7 @@ Gem::Specification.new do |s|
22
22
  s.add_development_dependency "rspec", "~> 2.4.0"
23
23
  s.add_development_dependency "cucumber", "~> 0.10.0"
24
24
  s.add_development_dependency "webmock", "~> 1.6.1"
25
- s.add_development_dependency "vcr", "~> 1.4.0"
26
25
  s.add_development_dependency "timecop", "~> 0.3.5"
27
- s.add_development_dependency "forgery", "~> 0.3.6"
28
- s.add_development_dependency "chef", "0.9.12"
29
26
  s.add_development_dependency "rcov"
30
27
 
31
28
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spice
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 0
8
7
  - 2
9
- - beta
10
- version: 0.0.2.beta
8
+ - 0
9
+ version: 0.2.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Dan Ryan
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-01-10 00:00:00 -05:00
17
+ date: 2011-01-11 00:00:00 -05:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -117,25 +116,10 @@ dependencies:
117
116
  version: 1.6.1
118
117
  type: :development
119
118
  version_requirements: *id007
120
- - !ruby/object:Gem::Dependency
121
- name: vcr
122
- prerelease: false
123
- requirement: &id008 !ruby/object:Gem::Requirement
124
- none: false
125
- requirements:
126
- - - ~>
127
- - !ruby/object:Gem::Version
128
- segments:
129
- - 1
130
- - 4
131
- - 0
132
- version: 1.4.0
133
- type: :development
134
- version_requirements: *id008
135
119
  - !ruby/object:Gem::Dependency
136
120
  name: timecop
137
121
  prerelease: false
138
- requirement: &id009 !ruby/object:Gem::Requirement
122
+ requirement: &id008 !ruby/object:Gem::Requirement
139
123
  none: false
140
124
  requirements:
141
125
  - - ~>
@@ -146,41 +130,11 @@ dependencies:
146
130
  - 5
147
131
  version: 0.3.5
148
132
  type: :development
149
- version_requirements: *id009
150
- - !ruby/object:Gem::Dependency
151
- name: forgery
152
- prerelease: false
153
- requirement: &id010 !ruby/object:Gem::Requirement
154
- none: false
155
- requirements:
156
- - - ~>
157
- - !ruby/object:Gem::Version
158
- segments:
159
- - 0
160
- - 3
161
- - 6
162
- version: 0.3.6
163
- type: :development
164
- version_requirements: *id010
165
- - !ruby/object:Gem::Dependency
166
- name: chef
167
- prerelease: false
168
- requirement: &id011 !ruby/object:Gem::Requirement
169
- none: false
170
- requirements:
171
- - - "="
172
- - !ruby/object:Gem::Version
173
- segments:
174
- - 0
175
- - 9
176
- - 12
177
- version: 0.9.12
178
- type: :development
179
- version_requirements: *id011
133
+ version_requirements: *id008
180
134
  - !ruby/object:Gem::Dependency
181
135
  name: rcov
182
136
  prerelease: false
183
- requirement: &id012 !ruby/object:Gem::Requirement
137
+ requirement: &id009 !ruby/object:Gem::Requirement
184
138
  none: false
185
139
  requirements:
186
140
  - - ">="
@@ -189,8 +143,8 @@ dependencies:
189
143
  - 0
190
144
  version: "0"
191
145
  type: :development
192
- version_requirements: *id012
193
- description: A zesty Chef API wrapper
146
+ version_requirements: *id009
147
+ description: Spice is a zesty Chef API wrapper. It's primary purpose is to let you easily integrate your apps with a (Chef)[http://opscode.com/chef] server easily. Spice provides support for the [entire released Chef API](http://wiki.opscode.com/display/chef/Server+API)
194
148
  email:
195
149
  - hi@iamdanryan.com
196
150
  executables: []
@@ -236,7 +190,7 @@ files:
236
190
  - spec/spice/role_spec.rb
237
191
  - spec/spice_spec.rb
238
192
  - spec/support/authentication.rb
239
- - spec/support/headers.rb
193
+ - spec/support/requests.rb
240
194
  - spec/support/vcr.rb
241
195
  - spice.gemspec
242
196
  has_rdoc: true
@@ -259,13 +213,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
259
213
  required_rubygems_version: !ruby/object:Gem::Requirement
260
214
  none: false
261
215
  requirements:
262
- - - ">"
216
+ - - ">="
263
217
  - !ruby/object:Gem::Version
264
218
  segments:
265
- - 1
266
- - 3
267
- - 1
268
- version: 1.3.1
219
+ - 0
220
+ version: "0"
269
221
  requirements: []
270
222
 
271
223
  rubyforge_project: spice
@@ -288,5 +240,5 @@ test_files:
288
240
  - spec/spice/role_spec.rb
289
241
  - spec/spice_spec.rb
290
242
  - spec/support/authentication.rb
291
- - spec/support/headers.rb
243
+ - spec/support/requests.rb
292
244
  - spec/support/vcr.rb
@@ -1,18 +0,0 @@
1
- def get_clients_headers
2
- {
3
- 'Accept'=>'application/json',
4
- 'Accept-Encoding'=>'gzip, deflate',
5
- 'Host'=>'http://localhost:4000',
6
- 'User-Agent'=>'Ruby',
7
- 'X-Ops-Authorization-1'=>'TwH5yBkqfvYolI+yQu6xcCLXWnoN3a8y8fwJ2gDF0AKVkYZQPIYi+gVHEMyW',
8
- 'X-Ops-Authorization-2'=>'fAgDhLE251LbJxixFo53P7E7IH5US0RiIwqNCekUn/R9oHHvk+Et4+HpxCcd',
9
- 'X-Ops-Authorization-3'=>'79BMWKB9so9Ob1ozfwljkSEd/eHxas7GAR/M9RgATGV/mL1v065/tScqFm8g',
10
- 'X-Ops-Authorization-4'=>'oNdYRwPkmZi+dPRp2ulQnY7HMiyber+QqQwkhnNsrreyh3gS1ANdj+L8djOS',
11
- 'X-Ops-Authorization-5'=>'Cb7zZAVq3AVclngCH1sjrOOO5Y/6tW+d7RBJrPutKoSWwhTZs0JWMJS+kyNP',
12
- 'X-Ops-Authorization-6'=>'1gIk63ATNnfc4vrmRRUl/SgY6s+exL3sxg5g2+CPJw==',
13
- 'X-Ops-Content-Hash'=>'2jmj7l5rSw0yVb/vlWAYkK/YBwk=',
14
- 'X-Ops-Sign'=>'version=1.0',
15
- 'X-Ops-Timestamp'=>'0000-01-01T05:00:00Z',
16
- 'X-Ops-Userid'=>'testclient'
17
- }
18
- end