spice 1.0.0.rc → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (109) hide show
  1. data/.gitignore +2 -0
  2. data/Gemfile +0 -14
  3. data/README.md +1 -1
  4. data/Rakefile +1 -1
  5. data/TODO.md +2 -1
  6. data/lib/spice.rb +47 -72
  7. data/lib/spice/authentication.rb +23 -45
  8. data/lib/spice/base.rb +104 -0
  9. data/lib/spice/client.rb +8 -48
  10. data/lib/spice/config.rb +37 -19
  11. data/lib/spice/connection.rb +33 -117
  12. data/lib/spice/connection/clients.rb +26 -6
  13. data/lib/spice/connection/cookbooks.rb +19 -14
  14. data/lib/spice/connection/data_bags.rb +31 -20
  15. data/lib/spice/connection/environments.rb +6 -7
  16. data/lib/spice/connection/nodes.rb +23 -6
  17. data/lib/spice/connection/roles.rb +5 -5
  18. data/lib/spice/connection/search.rb +12 -12
  19. data/lib/spice/cookbook.rb +3 -29
  20. data/lib/spice/cookbook_version.rb +9 -61
  21. data/lib/spice/core_ext/array.rb +7 -0
  22. data/lib/spice/core_ext/enumerable.rb +11 -0
  23. data/lib/spice/core_ext/hash.rb +49 -0
  24. data/lib/spice/core_ext/mash.rb +219 -0
  25. data/lib/spice/data_bag.rb +3 -37
  26. data/lib/spice/data_bag_item.rb +7 -47
  27. data/lib/spice/environment.rb +12 -27
  28. data/lib/spice/error.rb +22 -10
  29. data/lib/spice/identity_map.rb +8 -0
  30. data/lib/spice/node.rb +13 -34
  31. data/lib/spice/request.rb +73 -11
  32. data/lib/spice/response/parse_json.rb +8 -3
  33. data/lib/spice/role.rb +8 -33
  34. data/lib/spice/version.rb +1 -1
  35. data/spec/fixtures/client.pem +27 -0
  36. data/spec/fixtures/clients/create.json +4 -0
  37. data/spec/fixtures/clients/index.json +5 -0
  38. data/spec/fixtures/clients/reregister.json +5 -0
  39. data/spec/fixtures/clients/show.json +8 -0
  40. data/spec/fixtures/clients/update.json +5 -0
  41. data/spec/fixtures/cookbook_versions/show.json +108 -0
  42. data/spec/fixtures/cookbook_versions/update.json +62 -0
  43. data/spec/fixtures/cookbooks/index-0.10.json +28 -0
  44. data/spec/fixtures/cookbooks/index-0.9.json +4 -0
  45. data/spec/fixtures/cookbooks/show-0.10.json +15 -0
  46. data/spec/fixtures/cookbooks/show-apache2-0.9.json +5 -0
  47. data/spec/fixtures/cookbooks/show-unicorn-0.9.json +5 -0
  48. data/spec/fixtures/data_bag_items/create.json +1 -0
  49. data/spec/fixtures/data_bag_items/show.json +4 -0
  50. data/spec/fixtures/data_bag_items/update.json +4 -0
  51. data/spec/fixtures/data_bags/create.json +3 -0
  52. data/spec/fixtures/data_bags/index.json +3 -0
  53. data/spec/fixtures/data_bags/show.json +3 -0
  54. data/spec/fixtures/environments/cookbook.json +15 -0
  55. data/spec/fixtures/environments/cookbooks.json +28 -0
  56. data/spec/fixtures/environments/create.json +1 -0
  57. data/spec/fixtures/environments/delete.json +8 -0
  58. data/spec/fixtures/environments/index.json +3 -0
  59. data/spec/fixtures/environments/show.json +8 -0
  60. data/spec/fixtures/environments/update.json +8 -0
  61. data/spec/fixtures/nodes/cookbooks.json +41 -0
  62. data/spec/fixtures/nodes/create.json +1 -0
  63. data/spec/fixtures/nodes/delete.json +17 -0
  64. data/spec/fixtures/nodes/index.json +3 -0
  65. data/spec/fixtures/nodes/show.json +17 -0
  66. data/spec/fixtures/nodes/update.json +13 -0
  67. data/spec/fixtures/roles/create.json +1 -0
  68. data/spec/fixtures/roles/delete.json +11 -0
  69. data/spec/fixtures/roles/index.json +3 -0
  70. data/spec/fixtures/roles/show.json +12 -0
  71. data/spec/fixtures/roles/update.json +11 -0
  72. data/spec/fixtures/search/client.json +1 -0
  73. data/spec/fixtures/search/data_bag.json +1 -0
  74. data/spec/fixtures/search/environment.json +1 -0
  75. data/spec/fixtures/search/node.json +1 -0
  76. data/spec/fixtures/search/role.json +1 -0
  77. data/spec/spec_helper.rb +5 -4
  78. data/spec/spice/base_spec.rb +34 -0
  79. data/spec/spice/client_spec.rb +0 -61
  80. data/spec/spice/config_spec.rb +14 -0
  81. data/spec/spice/connection/clients_spec.rb +82 -0
  82. data/spec/spice/connection/cookbooks_spec.rb +86 -0
  83. data/spec/spice/connection/data_bags_spec.rb +126 -0
  84. data/spec/spice/connection_spec.rb +63 -0
  85. data/spec/spice/cookbook_spec.rb +0 -61
  86. data/spec/spice/data_bag_item_spec.rb +7 -0
  87. data/spec/spice/data_bag_spec.rb +0 -160
  88. data/spec/spice/environment_spec.rb +0 -89
  89. data/spec/spice/node_spec.rb +0 -74
  90. data/spec/spice/role_spec.rb +0 -61
  91. data/spec/spice_spec.rb +8 -116
  92. data/spec/support/helpers.rb +58 -0
  93. data/spice.gemspec +13 -15
  94. metadata +227 -87
  95. data/.watchr +0 -22
  96. data/lib/spice/connection/authentication.rb +0 -47
  97. data/lib/spice/mock.rb +0 -46
  98. data/lib/spice/persistence.rb +0 -62
  99. data/spec/spice/chef_spec.rb +0 -52
  100. data/spec/spice/search_spec.rb +0 -2
  101. data/spec/support/chef_requests.rb +0 -0
  102. data/spec/support/client_requests.rb +0 -95
  103. data/spec/support/cookbook_requests.rb +0 -95
  104. data/spec/support/data_bag_item_requests.rb +0 -138
  105. data/spec/support/data_bag_requests.rb +0 -95
  106. data/spec/support/environment_requests.rb +0 -221
  107. data/spec/support/node_requests.rb +0 -138
  108. data/spec/support/respond_with_matcher.rb +0 -53
  109. data/spec/support/role_requests.rb +0 -95
@@ -2,67 +2,6 @@ require 'spec_helper'
2
2
 
3
3
  module Spice
4
4
  describe Role do
5
- describe ".all" do
6
- before { stub_role_list }
7
- subject { Role.all }
8
-
9
- it { should have_body(role_list_response) }
10
- it { should respond_with(200) }
11
- end
12
-
13
- describe ".show" do
14
- context "if the role is found" do
15
- before { stub_role_show }
16
- subject { Role.show(:name => "testrole") }
17
-
18
- it { should have_body(role_show_response) }
19
- it { should respond_with(200) }
20
- end
21
-
22
- context "if the role is not found" do
23
- before { stub_role_show(404) }
24
- subject { Role.show(:name => "testrole") }
25
-
26
- it { should_not have_body(role_show_response) }
27
- it { should respond_with(404) }
28
- end
29
- end
30
-
31
- describe ".create" do
32
- context "if the role can be created" do
33
- before { stub_role_create }
34
- subject { Role.create(:name => "testrole") }
35
-
36
- it { should have_body(role_create_response) }
37
- it { should respond_with(201) }
38
- end
39
-
40
- context "if the role already exists" do
41
- before { stub_role_create(409) }
42
- subject { Role.create(:name => "testrole") }
43
-
44
- it { should have_body(role_conflict) }
45
- it { should respond_with(409) }
46
- end
47
- end
48
-
49
- describe ".delete" do
50
- context "if the role can be deleted" do
51
- before { stub_role_delete }
52
- subject { Role.delete(:name => "testrole") }
53
-
54
- it { should have_body(role_delete_response) }
55
- it { should respond_with(200) }
56
- end
57
5
 
58
- context "if the role cannot be deleted" do
59
- before { stub_role_delete(404) }
60
- subject { Role.delete(:name => "testrole") }
61
-
62
- it { should have_body(role_not_found) }
63
- it { should respond_with(404) }
64
- end
65
- end
66
-
67
6
  end
68
7
  end
@@ -1,121 +1,13 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
1
+ require 'spec_helper'
2
2
 
3
- describe "Spice" do
4
- describe ".default_server_url" do
5
- it "should default to 'http://localhost:4000'" do
6
- Spice.default_server_url.should == "http://localhost:4000"
7
- end
8
- it "should not be settable" do
9
- lambda { Spice.default_server_url = "chef.example.com" }.should raise_error
10
- end
11
- end
12
-
13
- describe ".default_chef_version" do
14
- it "should default to '0.10.4'" do
15
- Spice.default_chef_version.should == "0.10.4"
16
- end
17
- it "should not be settable" do
18
- lambda { Spice.default_chef_version = "0.9.12" }.should raise_error
19
- end
20
- end
21
-
22
- describe ".server_url" do
23
- it "should default to 'localhost' if not set" do
24
- Spice.server_url.should == "http://localhost:4000"
25
- end
26
- it "should be settable" do
27
- Spice.server_url = "https://chef.example.com:4000"
28
- Spice.server_url.should == "https://chef.example.com:4000"
29
- end
30
- end
31
-
32
- describe ".chef_version" do
33
- it "should default to '0.10.4' if not set" do
34
- Spice.chef_version.should == "0.10.4"
35
- end
36
- it "should be settable" do
37
- Spice.chef_version = "0.9.12"
38
- Spice.chef_version.should == "0.9.12"
39
- end
40
- end
41
-
42
- describe ".client_name" do
43
- before { Spice.reset! }
44
- it "should not have a default" do
45
- Spice.client_name.should be_nil
46
- end
47
- it "should be settable" do
48
- Spice.client_name = "testclient"
49
- Spice.client_name.should == "testclient"
50
- end
3
+ describe Spice do
4
+ after do
5
+ Spice.reset
51
6
  end
52
7
 
53
- describe ".key_file" do
54
- before { Spice.reset! }
55
-
56
- it "should not have a default" do
57
- Spice.key_file.should be_nil
58
- end
59
- it "should be settable" do
60
- Spice.key_file = "/tmp/keyfile.pem"
61
- Spice.key_file.should == "/tmp/keyfile.pem"
62
- end
63
- it "should raise exception if it does not exist" do
64
- lambda { Spice.key_file = "/tmp/badkey.pem" }.should raise_error(Errno::ENOENT)
65
- end
66
- end
67
-
68
- describe ".connection" do
69
- before { Spice.reset! }
70
-
71
- it "should not have a default" do
72
- Spice.connection.should be_nil
73
- end
74
- end
75
-
76
-
77
- describe ".reset!" do
78
- before do
79
- Spice.server_url = "chef.example.com"
80
- Spice.key_file = "/tmp/keyfile.pem"
81
- Spice.client_name = "testduder"
82
- end
83
- it "should reset Spice.server_url" do
84
- Spice.reset!
85
- Spice.server_url.should == "http://localhost:4000"
86
- end
87
- it "should reset Spice.chef_version" do
88
- Spice.reset!
89
- Spice.chef_version.should == "0.10.4"
90
- end
91
- it "should unset Spice.key_file" do
92
- Spice.reset!
93
- Spice.key_file.should be_nil
94
- end
95
- it "should unset Spice.connection" do
96
- Spice.reset!
97
- Spice.connection.should be_nil
98
- end
99
- end
100
-
101
- describe ".connect!" do
102
- it "should create a connection object" do
103
- Spice.connect!
104
- Spice.connection.should be_a_kind_of(Spice::Connection)
105
- end
106
- it "connection should contain a server_url" do
107
- Spice.connection.server_url.should == "http://localhost:4000"
108
- end
109
- end
110
-
111
- describe ".autoconfigure!" do
112
- it "should locate /etc/chef/client.rb and create a connection object" do
113
- end
114
-
115
- it "should locate ~/.chef/client.rb and create a connection object" do
116
- end
117
-
118
- it "should locate ~/.chef/knife.rb and create a connection object" do
8
+ describe '.new' do
9
+ it "returns a Spice::Connection" do
10
+ Spice.new.should be_a Spice::Connection
119
11
  end
120
12
  end
121
- end
13
+ end
@@ -0,0 +1,58 @@
1
+ # encoding: utf-8
2
+ # unless ENV['CI']
3
+ # require 'simplecov'
4
+ # SimpleCov.start do
5
+ # add_filter 'spec'
6
+ # end
7
+ # end
8
+
9
+ require 'spice'
10
+ require 'rspec'
11
+ require 'timecop'
12
+ require 'webmock/rspec'
13
+
14
+ def a_delete(path, server_url=Spice.server_url)
15
+ a_request(:delete, server_url + path)
16
+ end
17
+
18
+ def a_get(path, server_url=Spice.server_url)
19
+ a_request(:get, server_url + path)
20
+ end
21
+
22
+ def a_post(path, server_url=Spice.server_url)
23
+ a_request(:post, server_url + path)
24
+ end
25
+
26
+ def a_put(path, server_url=Spice.server_url)
27
+ a_request(:put, server_url + path)
28
+ end
29
+
30
+ def stub_delete(path, server_url=Spice.server_url)
31
+ stub_request(:delete, server_url + path)
32
+ end
33
+
34
+ def stub_get(path, server_url=Spice.server_url)
35
+ stub_request(:get, server_url + path)
36
+ end
37
+
38
+ def stub_post(path, server_url=Spice.server_url)
39
+ stub_request(:post, server_url + path)
40
+ end
41
+
42
+ def stub_put(path, server_url=Spice.server_url)
43
+ stub_request(:put, server_url + path)
44
+ end
45
+
46
+ def fixture_path
47
+ File.expand_path("../../fixtures", __FILE__)
48
+ end
49
+
50
+ def fixture(file)
51
+ File.new(fixture_path + '/' + file)
52
+ end
53
+
54
+ def fake_key
55
+ File.expand_path("../../fixtures/client.pem", __FILE__)
56
+ end
57
+
58
+ alias :fake_key_path :fake_key
@@ -6,29 +6,27 @@ Gem::Specification.new do |s|
6
6
  s.name = "spice"
7
7
  s.version = Spice::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
- s.authors = ["Dan Ryan"]
10
- s.email = ["hi@iamdanryan.com"]
11
- s.homepage = "http://github.com/danryan/spice"
9
+ s.authors = [ "Dan Ryan" ]
10
+ s.email = [ "hi@iamdanryan.com" ]
11
+ s.homepage = "https://github.com/danryan/spice"
12
12
  s.summary = %q{Chef API wrapper}
13
13
  s.description = %q{Spice is a zesty Chef API wrapper. Its primary purpose is to let you easily integrate your apps with a Chef server easily. Spice provides support for the entire released Chef API}
14
14
 
15
15
  s.rubyforge_project = "spice"
16
-
17
- s.add_dependency "virtus", ">= 0.3.0"
18
- s.add_dependency "aequitas", ">= 0.0.2"
19
- s.add_dependency "activemodel"
20
- s.add_dependency "faraday"
16
+ s.add_dependency "faraday", "~> 0.8.0"
21
17
  s.add_dependency "mixlib-authentication", '>= 1.1.4'
22
18
  s.add_dependency "yajl-ruby", '>= 1.1.0'
19
+ s.add_dependency "fakefs"
23
20
 
24
- s.add_development_dependency 'rspec', '>= 2.6.0'
25
- s.add_development_dependency "webmock", ">= 1.6.2"
21
+ s.add_development_dependency 'simplecov'
22
+ s.add_development_dependency 'rspec', '>= 2.8.0'
23
+ s.add_development_dependency "webmock", ">= 1.8.2"
26
24
  s.add_development_dependency "timecop", ">= 0.3.5"
27
- s.add_development_dependency 'guard', '>= 0.6.2'
28
- s.add_development_dependency 'guard-rspec', '>= 0.4.2'
29
- s.add_development_dependency 'guard-spork', '>= 0.2.1'
30
- s.add_development_dependency 'spork', '>= 0.9.0.rc8'
31
- s.add_development_dependency 'rb-fsevent', '>= 0.4.3.1'
25
+ s.add_development_dependency 'guard', '>= 1.0.1'
26
+ s.add_development_dependency 'guard-rspec', '>= 0.6.0'
27
+ s.add_development_dependency 'guard-spork', '>= 0.5.2'
28
+ s.add_development_dependency 'spork', '>= 1.0.0.rc2'
29
+ s.add_development_dependency 'rb-fsevent', '>= 0.9.0'
32
30
  s.add_development_dependency 'growl', '>= 1.0.3'
33
31
 
34
32
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,52 +1,67 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spice
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.rc
5
- prerelease: 6
4
+ version: 1.0.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dan Ryan
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-12 00:00:00.000000000 Z
12
+ date: 2012-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: virtus
16
- requirement: &70252408715180 !ruby/object:Gem::Requirement
15
+ name: faraday
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
- - - ! '>='
19
+ - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.3.0
21
+ version: 0.8.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70252408715180
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.0
25
30
  - !ruby/object:Gem::Dependency
26
- name: aequitas
27
- requirement: &70252408714580 !ruby/object:Gem::Requirement
31
+ name: mixlib-authentication
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
31
36
  - !ruby/object:Gem::Version
32
- version: 0.0.2
37
+ version: 1.1.4
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70252408714580
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 1.1.4
36
46
  - !ruby/object:Gem::Dependency
37
- name: activemodel
38
- requirement: &70252408713960 !ruby/object:Gem::Requirement
47
+ name: yajl-ruby
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ! '>='
42
52
  - !ruby/object:Gem::Version
43
- version: '0'
53
+ version: 1.1.0
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *70252408713960
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: 1.1.0
47
62
  - !ruby/object:Gem::Dependency
48
- name: faraday
49
- requirement: &70252408713220 !ruby/object:Gem::Requirement
63
+ name: fakefs
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ! '>='
@@ -54,54 +69,63 @@ dependencies:
54
69
  version: '0'
55
70
  type: :runtime
56
71
  prerelease: false
57
- version_requirements: *70252408713220
58
- - !ruby/object:Gem::Dependency
59
- name: mixlib-authentication
60
- requirement: &70252408711780 !ruby/object:Gem::Requirement
72
+ version_requirements: !ruby/object:Gem::Requirement
61
73
  none: false
62
74
  requirements:
63
75
  - - ! '>='
64
76
  - !ruby/object:Gem::Version
65
- version: 1.1.4
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: *70252408711780
77
+ version: '0'
69
78
  - !ruby/object:Gem::Dependency
70
- name: yajl-ruby
71
- requirement: &70252408710960 !ruby/object:Gem::Requirement
79
+ name: simplecov
80
+ requirement: !ruby/object:Gem::Requirement
72
81
  none: false
73
82
  requirements:
74
83
  - - ! '>='
75
84
  - !ruby/object:Gem::Version
76
- version: 1.1.0
77
- type: :runtime
85
+ version: '0'
86
+ type: :development
78
87
  prerelease: false
79
- version_requirements: *70252408710960
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
80
94
  - !ruby/object:Gem::Dependency
81
95
  name: rspec
82
- requirement: &70252408709640 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
83
97
  none: false
84
98
  requirements:
85
99
  - - ! '>='
86
100
  - !ruby/object:Gem::Version
87
- version: 2.6.0
101
+ version: 2.8.0
88
102
  type: :development
89
103
  prerelease: false
90
- version_requirements: *70252408709640
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: 2.8.0
91
110
  - !ruby/object:Gem::Dependency
92
111
  name: webmock
93
- requirement: &70252408709080 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
94
113
  none: false
95
114
  requirements:
96
115
  - - ! '>='
97
116
  - !ruby/object:Gem::Version
98
- version: 1.6.2
117
+ version: 1.8.2
99
118
  type: :development
100
119
  prerelease: false
101
- version_requirements: *70252408709080
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: 1.8.2
102
126
  - !ruby/object:Gem::Dependency
103
127
  name: timecop
104
- requirement: &70252408708260 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
105
129
  none: false
106
130
  requirements:
107
131
  - - ! '>='
@@ -109,65 +133,95 @@ dependencies:
109
133
  version: 0.3.5
110
134
  type: :development
111
135
  prerelease: false
112
- version_requirements: *70252408708260
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ! '>='
140
+ - !ruby/object:Gem::Version
141
+ version: 0.3.5
113
142
  - !ruby/object:Gem::Dependency
114
143
  name: guard
115
- requirement: &70252408707260 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
116
145
  none: false
117
146
  requirements:
118
147
  - - ! '>='
119
148
  - !ruby/object:Gem::Version
120
- version: 0.6.2
149
+ version: 1.0.1
121
150
  type: :development
122
151
  prerelease: false
123
- version_requirements: *70252408707260
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: 1.0.1
124
158
  - !ruby/object:Gem::Dependency
125
159
  name: guard-rspec
126
- requirement: &70252408705920 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
127
161
  none: false
128
162
  requirements:
129
163
  - - ! '>='
130
164
  - !ruby/object:Gem::Version
131
- version: 0.4.2
165
+ version: 0.6.0
132
166
  type: :development
133
167
  prerelease: false
134
- version_requirements: *70252408705920
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: 0.6.0
135
174
  - !ruby/object:Gem::Dependency
136
175
  name: guard-spork
137
- requirement: &70252408705040 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
138
177
  none: false
139
178
  requirements:
140
179
  - - ! '>='
141
180
  - !ruby/object:Gem::Version
142
- version: 0.2.1
181
+ version: 0.5.2
143
182
  type: :development
144
183
  prerelease: false
145
- version_requirements: *70252408705040
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: 0.5.2
146
190
  - !ruby/object:Gem::Dependency
147
191
  name: spork
148
- requirement: &70252408704200 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
149
193
  none: false
150
194
  requirements:
151
195
  - - ! '>='
152
196
  - !ruby/object:Gem::Version
153
- version: 0.9.0.rc8
197
+ version: 1.0.0.rc2
154
198
  type: :development
155
199
  prerelease: false
156
- version_requirements: *70252408704200
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ! '>='
204
+ - !ruby/object:Gem::Version
205
+ version: 1.0.0.rc2
157
206
  - !ruby/object:Gem::Dependency
158
207
  name: rb-fsevent
159
- requirement: &70252408703560 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
160
209
  none: false
161
210
  requirements:
162
211
  - - ! '>='
163
212
  - !ruby/object:Gem::Version
164
- version: 0.4.3.1
213
+ version: 0.9.0
165
214
  type: :development
166
215
  prerelease: false
167
- version_requirements: *70252408703560
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ! '>='
220
+ - !ruby/object:Gem::Version
221
+ version: 0.9.0
168
222
  - !ruby/object:Gem::Dependency
169
223
  name: growl
170
- requirement: &70252408703080 !ruby/object:Gem::Requirement
224
+ requirement: !ruby/object:Gem::Requirement
171
225
  none: false
172
226
  requirements:
173
227
  - - ! '>='
@@ -175,7 +229,12 @@ dependencies:
175
229
  version: 1.0.3
176
230
  type: :development
177
231
  prerelease: false
178
- version_requirements: *70252408703080
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: 1.0.3
179
238
  description: Spice is a zesty Chef API wrapper. Its primary purpose is to let you
180
239
  easily integrate your apps with a Chef server easily. Spice provides support for
181
240
  the entire released Chef API
@@ -188,7 +247,6 @@ files:
188
247
  - .document
189
248
  - .gitignore
190
249
  - .rspec
191
- - .watchr
192
250
  - CHANGELOG.md
193
251
  - Gemfile
194
252
  - Guardfile
@@ -198,10 +256,10 @@ files:
198
256
  - TODO.md
199
257
  - lib/spice.rb
200
258
  - lib/spice/authentication.rb
259
+ - lib/spice/base.rb
201
260
  - lib/spice/client.rb
202
261
  - lib/spice/config.rb
203
262
  - lib/spice/connection.rb
204
- - lib/spice/connection/authentication.rb
205
263
  - lib/spice/connection/clients.rb
206
264
  - lib/spice/connection/cookbooks.rb
207
265
  - lib/spice/connection/data_bags.rb
@@ -211,42 +269,83 @@ files:
211
269
  - lib/spice/connection/search.rb
212
270
  - lib/spice/cookbook.rb
213
271
  - lib/spice/cookbook_version.rb
272
+ - lib/spice/core_ext/array.rb
273
+ - lib/spice/core_ext/enumerable.rb
274
+ - lib/spice/core_ext/hash.rb
275
+ - lib/spice/core_ext/mash.rb
214
276
  - lib/spice/data_bag.rb
215
277
  - lib/spice/data_bag_item.rb
216
278
  - lib/spice/environment.rb
217
279
  - lib/spice/error.rb
218
- - lib/spice/mock.rb
280
+ - lib/spice/identity_map.rb
219
281
  - lib/spice/node.rb
220
- - lib/spice/persistence.rb
221
282
  - lib/spice/request.rb
222
283
  - lib/spice/request/auth.rb
223
284
  - lib/spice/response/client_error.rb
224
285
  - lib/spice/response/parse_json.rb
225
286
  - lib/spice/role.rb
226
287
  - lib/spice/version.rb
288
+ - spec/fixtures/client.pem
289
+ - spec/fixtures/clients/create.json
290
+ - spec/fixtures/clients/index.json
291
+ - spec/fixtures/clients/reregister.json
292
+ - spec/fixtures/clients/show.json
293
+ - spec/fixtures/clients/update.json
294
+ - spec/fixtures/cookbook_versions/show.json
295
+ - spec/fixtures/cookbook_versions/update.json
296
+ - spec/fixtures/cookbooks/index-0.10.json
297
+ - spec/fixtures/cookbooks/index-0.9.json
298
+ - spec/fixtures/cookbooks/show-0.10.json
299
+ - spec/fixtures/cookbooks/show-apache2-0.9.json
300
+ - spec/fixtures/cookbooks/show-unicorn-0.9.json
301
+ - spec/fixtures/data_bag_items/create.json
302
+ - spec/fixtures/data_bag_items/show.json
303
+ - spec/fixtures/data_bag_items/update.json
304
+ - spec/fixtures/data_bags/create.json
305
+ - spec/fixtures/data_bags/index.json
306
+ - spec/fixtures/data_bags/show.json
307
+ - spec/fixtures/environments/cookbook.json
308
+ - spec/fixtures/environments/cookbooks.json
309
+ - spec/fixtures/environments/create.json
310
+ - spec/fixtures/environments/delete.json
311
+ - spec/fixtures/environments/index.json
312
+ - spec/fixtures/environments/show.json
313
+ - spec/fixtures/environments/update.json
314
+ - spec/fixtures/nodes/cookbooks.json
315
+ - spec/fixtures/nodes/create.json
316
+ - spec/fixtures/nodes/delete.json
317
+ - spec/fixtures/nodes/index.json
318
+ - spec/fixtures/nodes/show.json
319
+ - spec/fixtures/nodes/update.json
320
+ - spec/fixtures/roles/create.json
321
+ - spec/fixtures/roles/delete.json
322
+ - spec/fixtures/roles/index.json
323
+ - spec/fixtures/roles/show.json
324
+ - spec/fixtures/roles/update.json
325
+ - spec/fixtures/search/client.json
326
+ - spec/fixtures/search/data_bag.json
327
+ - spec/fixtures/search/environment.json
328
+ - spec/fixtures/search/node.json
329
+ - spec/fixtures/search/role.json
227
330
  - spec/spec_helper.rb
228
331
  - spec/spice/authentication_spec.rb
229
- - spec/spice/chef_spec.rb
332
+ - spec/spice/base_spec.rb
230
333
  - spec/spice/client_spec.rb
334
+ - spec/spice/config_spec.rb
335
+ - spec/spice/connection/clients_spec.rb
336
+ - spec/spice/connection/cookbooks_spec.rb
337
+ - spec/spice/connection/data_bags_spec.rb
231
338
  - spec/spice/connection_spec.rb
232
339
  - spec/spice/cookbook_spec.rb
340
+ - spec/spice/data_bag_item_spec.rb
233
341
  - spec/spice/data_bag_spec.rb
234
342
  - spec/spice/environment_spec.rb
235
343
  - spec/spice/node_spec.rb
236
344
  - spec/spice/role_spec.rb
237
- - spec/spice/search_spec.rb
238
345
  - spec/spice_spec.rb
239
- - spec/support/chef_requests.rb
240
- - spec/support/client_requests.rb
241
- - spec/support/cookbook_requests.rb
242
- - spec/support/data_bag_item_requests.rb
243
- - spec/support/data_bag_requests.rb
244
- - spec/support/environment_requests.rb
245
- - spec/support/node_requests.rb
246
- - spec/support/respond_with_matcher.rb
247
- - spec/support/role_requests.rb
346
+ - spec/support/helpers.rb
248
347
  - spice.gemspec
249
- homepage: http://github.com/danryan/spice
348
+ homepage: https://github.com/danryan/spice
250
349
  licenses: []
251
350
  post_install_message:
252
351
  rdoc_options: []
@@ -260,39 +359,80 @@ required_ruby_version: !ruby/object:Gem::Requirement
260
359
  version: '0'
261
360
  segments:
262
361
  - 0
263
- hash: -2243516170777733948
362
+ hash: -250161291934596075
264
363
  required_rubygems_version: !ruby/object:Gem::Requirement
265
364
  none: false
266
365
  requirements:
267
- - - ! '>'
366
+ - - ! '>='
268
367
  - !ruby/object:Gem::Version
269
- version: 1.3.1
368
+ version: '0'
369
+ segments:
370
+ - 0
371
+ hash: -250161291934596075
270
372
  requirements: []
271
373
  rubyforge_project: spice
272
- rubygems_version: 1.8.17
374
+ rubygems_version: 1.8.21
273
375
  signing_key:
274
376
  specification_version: 3
275
377
  summary: Chef API wrapper
276
378
  test_files:
379
+ - spec/fixtures/client.pem
380
+ - spec/fixtures/clients/create.json
381
+ - spec/fixtures/clients/index.json
382
+ - spec/fixtures/clients/reregister.json
383
+ - spec/fixtures/clients/show.json
384
+ - spec/fixtures/clients/update.json
385
+ - spec/fixtures/cookbook_versions/show.json
386
+ - spec/fixtures/cookbook_versions/update.json
387
+ - spec/fixtures/cookbooks/index-0.10.json
388
+ - spec/fixtures/cookbooks/index-0.9.json
389
+ - spec/fixtures/cookbooks/show-0.10.json
390
+ - spec/fixtures/cookbooks/show-apache2-0.9.json
391
+ - spec/fixtures/cookbooks/show-unicorn-0.9.json
392
+ - spec/fixtures/data_bag_items/create.json
393
+ - spec/fixtures/data_bag_items/show.json
394
+ - spec/fixtures/data_bag_items/update.json
395
+ - spec/fixtures/data_bags/create.json
396
+ - spec/fixtures/data_bags/index.json
397
+ - spec/fixtures/data_bags/show.json
398
+ - spec/fixtures/environments/cookbook.json
399
+ - spec/fixtures/environments/cookbooks.json
400
+ - spec/fixtures/environments/create.json
401
+ - spec/fixtures/environments/delete.json
402
+ - spec/fixtures/environments/index.json
403
+ - spec/fixtures/environments/show.json
404
+ - spec/fixtures/environments/update.json
405
+ - spec/fixtures/nodes/cookbooks.json
406
+ - spec/fixtures/nodes/create.json
407
+ - spec/fixtures/nodes/delete.json
408
+ - spec/fixtures/nodes/index.json
409
+ - spec/fixtures/nodes/show.json
410
+ - spec/fixtures/nodes/update.json
411
+ - spec/fixtures/roles/create.json
412
+ - spec/fixtures/roles/delete.json
413
+ - spec/fixtures/roles/index.json
414
+ - spec/fixtures/roles/show.json
415
+ - spec/fixtures/roles/update.json
416
+ - spec/fixtures/search/client.json
417
+ - spec/fixtures/search/data_bag.json
418
+ - spec/fixtures/search/environment.json
419
+ - spec/fixtures/search/node.json
420
+ - spec/fixtures/search/role.json
277
421
  - spec/spec_helper.rb
278
422
  - spec/spice/authentication_spec.rb
279
- - spec/spice/chef_spec.rb
423
+ - spec/spice/base_spec.rb
280
424
  - spec/spice/client_spec.rb
425
+ - spec/spice/config_spec.rb
426
+ - spec/spice/connection/clients_spec.rb
427
+ - spec/spice/connection/cookbooks_spec.rb
428
+ - spec/spice/connection/data_bags_spec.rb
281
429
  - spec/spice/connection_spec.rb
282
430
  - spec/spice/cookbook_spec.rb
431
+ - spec/spice/data_bag_item_spec.rb
283
432
  - spec/spice/data_bag_spec.rb
284
433
  - spec/spice/environment_spec.rb
285
434
  - spec/spice/node_spec.rb
286
435
  - spec/spice/role_spec.rb
287
- - spec/spice/search_spec.rb
288
436
  - spec/spice_spec.rb
289
- - spec/support/chef_requests.rb
290
- - spec/support/client_requests.rb
291
- - spec/support/cookbook_requests.rb
292
- - spec/support/data_bag_item_requests.rb
293
- - spec/support/data_bag_requests.rb
294
- - spec/support/environment_requests.rb
295
- - spec/support/node_requests.rb
296
- - spec/support/respond_with_matcher.rb
297
- - spec/support/role_requests.rb
437
+ - spec/support/helpers.rb
298
438
  has_rdoc: