spice 0.0.1.alpha.2 → 0.0.2.beta

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,42 @@
1
+ require 'spec_helper'
2
+
3
+ def setup_chef_client
4
+ setup_authentication
5
+ Spice.host = 'localhost'
6
+ Spice.client_name = "testclient"
7
+ Spice.key_file = "/tmp/keyfile.pem"
8
+ Spice.connect!
9
+ end
10
+
11
+ def setup_authentication
12
+ File.open("/tmp/keyfile.pem","w+") do |f|
13
+ f.write(%Q{-----BEGIN RSA PRIVATE KEY-----
14
+ MIIEowIBAAKCAQEAqd1K3siOLkxiU0B98QzP+qbT3uPaCIGGR+EAO8mXMpTUNfPv
15
+ Kr4NeIV8kqfrngghYF3Y2Ky0e3Ifl3b7UQTfrSofmyoC/EBBA4dH2ygUoYtP0aIi
16
+ sdxnSpYhX9PXavZ4POkDuO3SKRUEuC71OzIQQ3GijXA8L1JRBTOb0QiC7vBSuwaM
17
+ 15qAqW4FGs7jYyG909AERY3AQTmZZ8TsAY07fqv4BC8a6965dzBp3GD5KY/IuRlN
18
+ hoqp1xQdqZ8C0nNk6akWoia9/NMs4rULpuiPSeVOSDX0iGcOMFG6Ur5ihBl8S+Dy
19
+ 96QpNU3Xx/puhALbGxPkoyELwmhuZRmpMo3YDQIDAQABAoIBABYifAsj30MxOO7Y
20
+ TJEItmFXM+yrjFHnbvQW4czorAcvVafiLZxIP8Egw+bocs+ZB6BjGkrB1pLvgCZg
21
+ nscj93G9N3kktFbimJY5Hqf0RRv352LN2e+LZPpXLeoq1LtferOVOaLzeptX3dGS
22
+ bOpVz8C6IhCEO5N/Coe+/eLzVPyFpibhlNpQPPUbPP8mpL2d0oro4GHcO0lcdm0t
23
+ 5iAs7drwOcA97dntBZFwMj5tA0d6ujgc88lS3eNqZAx5TsOKh+yetNMpO+GJlXFO
24
+ koiJ4ZF6Fx6/5R+iX+ejtebA3GPdPAHSMxmVUGWDOeRTdpsqsEyDXsLADb1FTVnk
25
+ B4WPvRECgYEA1GkyU2CUw3kcKAQrxfmGdDuTbwSG7/Np9nCie57PDE16CQd6BP5H
26
+ cRbOoC10/h2gJmaqODV7PJmeimOd5C74xiLfZ8TZvg+nv2NOwbGMLbU9PiZcjda9
27
+ YEVmya6UpMBZdD73yir5PUPHiws3Xx0+8CKpD/nfDhfOVPTIzrJyDMMCgYEAzLj0
28
+ 2NLWhI17KxNpFV76XlEHmwwhKKCN0HsFj/qSmPQZsRn5Xph9wgH2ey+ag12IOVGe
29
+ kbYPz1/74uzfkZpye4ysn1cvDUXbPbAzdBJ8VT/kmQpB1+ZRFRi7xUf+AEp54932
30
+ FObLehFPo+w0SKNHeJqKY0k/k/0/AwpapLwVeu8CgYEAh8nYSkTr1SqPPWWtNhqW
31
+ Qaf0UHxsZukNTGYk+TJE2nCNG0iUUKzdrwYNgYiNygXWY7YuC1DlP5BVMdMNFNqS
32
+ XtfcSdImAMKxUkCCEIEYRAAg7qJHeMVWuzyiwTvB+rCcfxvh/HQMcYXrApBhDYT8
33
+ vzbpLTVnyvKdDOKPnNOm5VECgYBajhGX+yLyfRaXRj28O0fqAlOn7KSaMPKp3lDm
34
+ kALab1cR9JhOlItEDtQ1RyhEpVHFcOoAMBUsOJvVk8uMv1GWfvI4hTsF1vmUfuUz
35
+ mZ2vo9R9MYFQe8sv1sHwENk0zby+44afVjt5IkElFC1IWBkcKte99T+POXzu3lyb
36
+ 86pYtwKBgEaeHGw4mSbnz6aecPbshGYrV3CkPRO9z6nAiC6lp6a0PYJAPNDrvqdg
37
+ 5h0uCkb5FfgWIOq2tCUYY/ZrSglE17wPmd8iRAN7wb+prKAHOh+o4P0k1EtviNdU
38
+ 8JgshucQzoeIygNfo2QG3vfsfA/4V9aa/yb/bqHPsJHBgnuSVjv+
39
+ -----END RSA PRIVATE KEY-----})
40
+ end
41
+ end
42
+
@@ -0,0 +1,18 @@
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
@@ -0,0 +1,8 @@
1
+ # require 'vcr'
2
+ #
3
+ # VCR.config do |c|
4
+ # c.cassette_library_dir = 'spec/cassettes'
5
+ # c.stub_with :webmock
6
+ # c.ignore_localhost = true
7
+ # c.default_cassette_options = { :record => :all }
8
+ # end
data/spice.gemspec CHANGED
@@ -18,8 +18,16 @@ Gem::Specification.new do |s|
18
18
  s.add_dependency "mixlib-authentication"
19
19
  s.add_dependency "yajl-ruby"
20
20
 
21
- s.add_development_dependency "rspec", "2.4.0"
22
-
21
+ s.add_development_dependency "yard", "~> 0.6.4"
22
+ s.add_development_dependency "rspec", "~> 2.4.0"
23
+ s.add_development_dependency "cucumber", "~> 0.10.0"
24
+ s.add_development_dependency "webmock", "~> 1.6.1"
25
+ s.add_development_dependency "vcr", "~> 1.4.0"
26
+ 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
+ s.add_development_dependency "rcov"
30
+
23
31
  s.files = `git ls-files`.split("\n")
24
32
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
25
33
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
metadata CHANGED
@@ -5,10 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 1
9
- - alpha
10
8
  - 2
11
- version: 0.0.1.alpha.2
9
+ - beta
10
+ version: 0.0.2.beta
12
11
  platform: ruby
13
12
  authors:
14
13
  - Dan Ryan
@@ -16,7 +15,7 @@ autorequire:
16
15
  bindir: bin
17
16
  cert_chain: []
18
17
 
19
- date: 2011-01-08 00:00:00 -05:00
18
+ date: 2011-01-10 00:00:00 -05:00
20
19
  default_executable:
21
20
  dependencies:
22
21
  - !ruby/object:Gem::Dependency
@@ -59,12 +58,27 @@ dependencies:
59
58
  type: :runtime
60
59
  version_requirements: *id003
61
60
  - !ruby/object:Gem::Dependency
62
- name: rspec
61
+ name: yard
63
62
  prerelease: false
64
63
  requirement: &id004 !ruby/object:Gem::Requirement
65
64
  none: false
66
65
  requirements:
67
- - - "="
66
+ - - ~>
67
+ - !ruby/object:Gem::Version
68
+ segments:
69
+ - 0
70
+ - 6
71
+ - 4
72
+ version: 0.6.4
73
+ type: :development
74
+ version_requirements: *id004
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec
77
+ prerelease: false
78
+ requirement: &id005 !ruby/object:Gem::Requirement
79
+ none: false
80
+ requirements:
81
+ - - ~>
68
82
  - !ruby/object:Gem::Version
69
83
  segments:
70
84
  - 2
@@ -72,7 +86,110 @@ dependencies:
72
86
  - 0
73
87
  version: 2.4.0
74
88
  type: :development
75
- version_requirements: *id004
89
+ version_requirements: *id005
90
+ - !ruby/object:Gem::Dependency
91
+ name: cucumber
92
+ prerelease: false
93
+ requirement: &id006 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ~>
97
+ - !ruby/object:Gem::Version
98
+ segments:
99
+ - 0
100
+ - 10
101
+ - 0
102
+ version: 0.10.0
103
+ type: :development
104
+ version_requirements: *id006
105
+ - !ruby/object:Gem::Dependency
106
+ name: webmock
107
+ prerelease: false
108
+ requirement: &id007 !ruby/object:Gem::Requirement
109
+ none: false
110
+ requirements:
111
+ - - ~>
112
+ - !ruby/object:Gem::Version
113
+ segments:
114
+ - 1
115
+ - 6
116
+ - 1
117
+ version: 1.6.1
118
+ type: :development
119
+ 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
+ - !ruby/object:Gem::Dependency
136
+ name: timecop
137
+ prerelease: false
138
+ requirement: &id009 !ruby/object:Gem::Requirement
139
+ none: false
140
+ requirements:
141
+ - - ~>
142
+ - !ruby/object:Gem::Version
143
+ segments:
144
+ - 0
145
+ - 3
146
+ - 5
147
+ version: 0.3.5
148
+ 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
180
+ - !ruby/object:Gem::Dependency
181
+ name: rcov
182
+ prerelease: false
183
+ requirement: &id012 !ruby/object:Gem::Requirement
184
+ none: false
185
+ requirements:
186
+ - - ">="
187
+ - !ruby/object:Gem::Version
188
+ segments:
189
+ - 0
190
+ version: "0"
191
+ type: :development
192
+ version_requirements: *id012
76
193
  description: A zesty Chef API wrapper
77
194
  email:
78
195
  - hi@iamdanryan.com
@@ -92,9 +209,11 @@ files:
92
209
  - Notes.md
93
210
  - README.md
94
211
  - Rakefile
212
+ - TODO.md
95
213
  - features/spice.feature
96
214
  - features/step_definitions/spice_steps.rb
97
215
  - features/support/env.rb
216
+ - file.txt
98
217
  - lib/spice.rb
99
218
  - lib/spice/authentication.rb
100
219
  - lib/spice/chef.rb
@@ -103,10 +222,22 @@ files:
103
222
  - lib/spice/cookbook.rb
104
223
  - lib/spice/data_bag.rb
105
224
  - lib/spice/node.rb
225
+ - lib/spice/role.rb
106
226
  - lib/spice/version.rb
107
227
  - pkg/spice-0.0.1.alpha.1.gem
108
228
  - spec/spec_helper.rb
229
+ - spec/spice/authentication_spec.rb
230
+ - spec/spice/chef_spec.rb
231
+ - spec/spice/client_spec.rb
232
+ - spec/spice/connection_spec.rb
233
+ - spec/spice/cookbook_spec.rb
234
+ - spec/spice/data_bag_spec.rb
235
+ - spec/spice/node_spec.rb
236
+ - spec/spice/role_spec.rb
109
237
  - spec/spice_spec.rb
238
+ - spec/support/authentication.rb
239
+ - spec/support/headers.rb
240
+ - spec/support/vcr.rb
110
241
  - spice.gemspec
111
242
  has_rdoc: true
112
243
  homepage: http://github.com/danryan/spice
@@ -147,4 +278,15 @@ test_files:
147
278
  - features/step_definitions/spice_steps.rb
148
279
  - features/support/env.rb
149
280
  - spec/spec_helper.rb
281
+ - spec/spice/authentication_spec.rb
282
+ - spec/spice/chef_spec.rb
283
+ - spec/spice/client_spec.rb
284
+ - spec/spice/connection_spec.rb
285
+ - spec/spice/cookbook_spec.rb
286
+ - spec/spice/data_bag_spec.rb
287
+ - spec/spice/node_spec.rb
288
+ - spec/spice/role_spec.rb
150
289
  - spec/spice_spec.rb
290
+ - spec/support/authentication.rb
291
+ - spec/support/headers.rb
292
+ - spec/support/vcr.rb