patchboard 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/patchboard/action.rb +1 -0
- data/lib/patchboard/resource.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4b8396b43a867c8dd3f0d7ad9554cc452af65098
|
4
|
+
data.tar.gz: fdb8ed9700cc348cdc4f551c9ca32563a44bffea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91da69da6c145512a3a3b9af1687f54ce49b3f86d0e0bfb28be52b68599487a365b0cee23a44cb66be0f5d30b223a59d0940a3660c924e9e699cac30701a9b35
|
7
|
+
data.tar.gz: d1bb9654e039f2636737cd33c7ae25fd657ec1c0cb5229c2d7ed3653cf97abfbe256e7e07692df06072f5d252d51e854e45d856b8eae06a01f02f9a1d0b416af
|
data/lib/patchboard/action.rb
CHANGED
@@ -43,6 +43,7 @@ class Patchboard
|
|
43
43
|
raw = self.http.request @method, url, options.merge(:response => :object)
|
44
44
|
response = Response.new(raw)
|
45
45
|
if response.status != @status
|
46
|
+
# TODO: custom exception classes, express response body in such.
|
46
47
|
raise "Unexpected response status: #{response.status}"
|
47
48
|
end
|
48
49
|
out = @api.decorate(resource.context, @response_schema, response.data)
|
data/lib/patchboard/resource.rb
CHANGED
@@ -61,7 +61,7 @@ class Patchboard
|
|
61
61
|
if mapping.query
|
62
62
|
# TODO: find a way to define this at runtime, not once
|
63
63
|
# for every instance.
|
64
|
-
instance.define_singleton_method key do |params|
|
64
|
+
instance.define_singleton_method key do |params={}|
|
65
65
|
params[:url] = value[:url]
|
66
66
|
url = mapping.generate_url(params)
|
67
67
|
mapping.klass.new context, :url => url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: patchboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matthew King
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|