spice 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ # Release Notes - Spice - Version 1.0.4
2
+
3
+ * Fix hosted Chef usage - https://github.com/danryan/spice/pull/23
4
+ *
5
+
1
6
  # Release Notes - Spice - Version 1.0.3
2
7
 
3
8
  * Fix create_node method. This was throwing a Spice::Error::NotFound exception because it was generating a wrong path (/nodes//nodes/...). The get_node() call at the end of the method returns the full node object. If just the attributes were used to create the node object, many things were missing.
data/lib/spice.rb CHANGED
@@ -25,7 +25,7 @@ module Spice
25
25
  end # def respond_to?
26
26
 
27
27
  def mock
28
- Spice.server_url = 'http://localhost:4000'
28
+ Spice.server_url = 'http://localhost:4000/organizations/spice'
29
29
  Spice.client_name = "testclient"
30
30
  Spice.client_key = Spice.read_key_file(File.expand_path("../../spec/fixtures/client.pem", __FILE__))
31
31
  Spice.chef_version = "0.10.10"
data/lib/spice/request.rb CHANGED
@@ -46,12 +46,13 @@ module Spice
46
46
  json_params = params ? MultiJson.dump(params) : ""
47
47
  uri = server_url
48
48
  uri = URI(uri) unless uri.respond_to?(:host)
49
- uri += path
50
-
51
- headers = signature_headers(method.to_s.upcase.to_sym, uri.path, json_params)
49
+ full_path = uri.path + URI(path).path
50
+ full_path_and_params = uri.path + path
51
+
52
+ headers = signature_headers(method.to_s.upcase.to_sym, full_path, json_params)
52
53
  # puts headers.inspect
53
54
  # puts client_key.inspect
54
- response = connection.run_request(method.to_sym, path, nil, headers) do |request|
55
+ response = connection.run_request(method.to_sym, full_path_and_params, nil, headers) do |request|
55
56
  request.options[:raw] = true if options[:raw]
56
57
 
57
58
  # puts request.inspect
data/lib/spice/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Spice
2
- VERSION = "1.0.3"
2
+ VERSION = "1.0.4"
3
3
  end
metadata CHANGED
@@ -1,137 +1,146 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: spice
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.3
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
5
  prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 4
10
+ version: 1.0.4
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Dan Ryan
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-06-26 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-08-28 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: faraday
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 0.8.0
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
- requirements:
25
+ requirements:
27
26
  - - ~>
28
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ hash: 63
29
+ segments:
30
+ - 0
31
+ - 8
32
+ - 0
29
33
  version: 0.8.0
30
- - !ruby/object:Gem::Dependency
31
- name: mixlib-authentication
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ! '>='
36
- - !ruby/object:Gem::Version
37
- version: 1.1.4
38
34
  type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: mixlib-authentication
39
38
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
41
40
  none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 27
45
+ segments:
46
+ - 1
47
+ - 1
48
+ - 4
45
49
  version: 1.1.4
46
- - !ruby/object:Gem::Dependency
47
- name: multi_json
48
- requirement: !ruby/object:Gem::Requirement
49
- none: false
50
- requirements:
51
- - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 1.3.6
54
50
  type: :runtime
51
+ version_requirements: *id002
52
+ - !ruby/object:Gem::Dependency
53
+ name: multi_json
55
54
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
55
+ requirement: &id003 !ruby/object:Gem::Requirement
57
56
  none: false
58
- requirements:
57
+ requirements:
59
58
  - - ~>
60
- - !ruby/object:Gem::Version
59
+ - !ruby/object:Gem::Version
60
+ hash: 23
61
+ segments:
62
+ - 1
63
+ - 3
64
+ - 6
61
65
  version: 1.3.6
62
- - !ruby/object:Gem::Dependency
66
+ type: :runtime
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
63
69
  name: rspec
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: 2.8.0
70
- type: :development
71
70
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
71
+ requirement: &id004 !ruby/object:Gem::Requirement
73
72
  none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ hash: 47
77
+ segments:
78
+ - 2
79
+ - 8
80
+ - 0
77
81
  version: 2.8.0
78
- - !ruby/object:Gem::Dependency
79
- name: webmock
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: 1.8.2
86
82
  type: :development
83
+ version_requirements: *id004
84
+ - !ruby/object:Gem::Dependency
85
+ name: webmock
87
86
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
87
+ requirement: &id005 !ruby/object:Gem::Requirement
89
88
  none: false
90
- requirements:
91
- - - ! '>='
92
- - !ruby/object:Gem::Version
89
+ requirements:
90
+ - - ">="
91
+ - !ruby/object:Gem::Version
92
+ hash: 51
93
+ segments:
94
+ - 1
95
+ - 8
96
+ - 2
93
97
  version: 1.8.2
94
- - !ruby/object:Gem::Dependency
95
- name: timecop
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ! '>='
100
- - !ruby/object:Gem::Version
101
- version: 0.3.5
102
98
  type: :development
99
+ version_requirements: *id005
100
+ - !ruby/object:Gem::Dependency
101
+ name: timecop
103
102
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
103
+ requirement: &id006 !ruby/object:Gem::Requirement
105
104
  none: false
106
- requirements:
107
- - - ! '>='
108
- - !ruby/object:Gem::Version
105
+ requirements:
106
+ - - ">="
107
+ - !ruby/object:Gem::Version
108
+ hash: 25
109
+ segments:
110
+ - 0
111
+ - 3
112
+ - 5
109
113
  version: 0.3.5
110
- - !ruby/object:Gem::Dependency
111
- name: spork
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: 1.0.0.rc2
118
114
  type: :development
115
+ version_requirements: *id006
116
+ - !ruby/object:Gem::Dependency
117
+ name: spork
119
118
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
119
+ requirement: &id007 !ruby/object:Gem::Requirement
121
120
  none: false
122
- requirements:
123
- - - ! '>='
124
- - !ruby/object:Gem::Version
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ hash: 5869077
125
+ segments:
126
+ - 1
127
+ - 0
128
+ - 0
129
+ - rc
130
+ - 2
125
131
  version: 1.0.0.rc2
126
- description: Spice is a zesty Chef API wrapper. Its primary purpose is to let you
127
- easily integrate your apps with a Chef server easily. Spice provides support for
128
- the entire released Chef API
129
- email:
132
+ type: :development
133
+ version_requirements: *id007
134
+ description: 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
135
+ email:
130
136
  - hi@iamdanryan.com
131
137
  executables: []
138
+
132
139
  extensions: []
140
+
133
141
  extra_rdoc_files: []
134
- files:
142
+
143
+ files:
135
144
  - .bundle/config
136
145
  - .document
137
146
  - .documentup.json
@@ -238,31 +247,39 @@ files:
238
247
  - spec/support/helpers.rb
239
248
  - spice.gemspec
240
249
  homepage: https://github.com/danryan/spice
241
- licenses:
250
+ licenses:
242
251
  - MIT
243
252
  post_install_message:
244
253
  rdoc_options: []
245
- require_paths:
254
+
255
+ require_paths:
246
256
  - lib
247
- required_ruby_version: !ruby/object:Gem::Requirement
257
+ required_ruby_version: !ruby/object:Gem::Requirement
248
258
  none: false
249
- requirements:
250
- - - ! '>='
251
- - !ruby/object:Gem::Version
252
- version: '0'
253
- required_rubygems_version: !ruby/object:Gem::Requirement
259
+ requirements:
260
+ - - ">="
261
+ - !ruby/object:Gem::Version
262
+ hash: 3
263
+ segments:
264
+ - 0
265
+ version: "0"
266
+ required_rubygems_version: !ruby/object:Gem::Requirement
254
267
  none: false
255
- requirements:
256
- - - ! '>='
257
- - !ruby/object:Gem::Version
258
- version: '0'
268
+ requirements:
269
+ - - ">="
270
+ - !ruby/object:Gem::Version
271
+ hash: 3
272
+ segments:
273
+ - 0
274
+ version: "0"
259
275
  requirements: []
276
+
260
277
  rubyforge_project: spice
261
278
  rubygems_version: 1.8.21
262
279
  signing_key:
263
280
  specification_version: 3
264
281
  summary: Chef API wrapper
265
- test_files:
282
+ test_files:
266
283
  - spec/fixtures/client.pem
267
284
  - spec/fixtures/clients/create.json
268
285
  - spec/fixtures/clients/index.json