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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 145c3036d351832f6a590800eaa9df5d4efc9cc0
4
- data.tar.gz: 80dc8017be3bed7cd90832c1556c827b11fcb5a6
3
+ metadata.gz: 4b8396b43a867c8dd3f0d7ad9554cc452af65098
4
+ data.tar.gz: fdb8ed9700cc348cdc4f551c9ca32563a44bffea
5
5
  SHA512:
6
- metadata.gz: 04d056ccbd097228d9762913b6e86d60a46b7faef5352d59f90e1d5057ff72de239bfbcc6c2ef8a2885864a2ea21f75092c3edd77789b4313af4b9b4930bda00
7
- data.tar.gz: 77d65a4918a44dec680c6551f4d0117b89171e84a9f0e87dfc877365b215000f5e4e08abea1b46989e62f96d4ed5403dacea89974dc394929503d2523bf8e55f
6
+ metadata.gz: 91da69da6c145512a3a3b9af1687f54ce49b3f86d0e0bfb28be52b68599487a365b0cee23a44cb66be0f5d30b223a59d0940a3660c924e9e699cac30701a9b35
7
+ data.tar.gz: d1bb9654e039f2636737cd33c7ae25fd657ec1c0cb5229c2d7ed3653cf97abfbe256e7e07692df06072f5d252d51e854e45d856b8eae06a01f02f9a1d0b416af
@@ -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)
@@ -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.1
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-02 00:00:00.000000000 Z
11
+ date: 2014-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json