stupeflix 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/stupeflix/version.rb +1 -1
- data/lib/stupeflix.rb +4 -2
- metadata +1 -1
data/lib/stupeflix/version.rb
CHANGED
data/lib/stupeflix.rb
CHANGED
@@ -21,14 +21,16 @@ module Stupeflix
|
|
21
21
|
|
22
22
|
def definition= d
|
23
23
|
params, headers = req('PUT', d, 'text/xml', Time.now.to_i, url = "#{self.url}/definition/")
|
24
|
-
self.class.put url, query: params, headers: headers, body: d
|
24
|
+
r = self.class.put url, query: params, headers: headers, body: d
|
25
|
+
raise RuntimeError("Invalid response: #{r.response.code}") unless r.response.code.to_i == 200
|
25
26
|
end
|
26
27
|
|
27
28
|
# TODO make this an array or..?
|
28
29
|
def profiles= profiles_xml
|
29
30
|
params, headers = req('POST', body = "ProfilesXML=#{::CGI::escape profiles_xml}",
|
30
31
|
'application/x-www-form-urlencoded', Time.now.to_i, url = "#{self.url}/")
|
31
|
-
self.class.post url, query: params, headers: headers, body: body
|
32
|
+
r = self.class.post url, query: params, headers: headers, body: body
|
33
|
+
raise RuntimeError("Invalid response: #{r.response.code}") unless r.response.code.to_i == 200
|
32
34
|
end
|
33
35
|
|
34
36
|
def status
|