protip 0.16.0 → 0.16.1

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: bfabbad582a0baed0a872fb8ffa205fe9bd3aeee
4
- data.tar.gz: abd9f3a79716f0b5923172b16ed25cd7b888b7ca
3
+ metadata.gz: a9ea460dbf9a7bceb905b32a1202fee025bbe25f
4
+ data.tar.gz: 08a5a2c8a8fb608cf162be4b94123696a91a4c15
5
5
  SHA512:
6
- metadata.gz: 97722deb1b3e9f6ae27e68df39a874fd7023eab4bb04da165fcfa8be35ad87403618f59b6a1ad33cd7d8fa0bca3e78ccf9952349d47976eda5b58ed59106d782
7
- data.tar.gz: 796ef25a07172c55eb75259e809995d4e92003c9437e0ef2dbc3cc877aa811cca89ccfa470bf7f5ce9ff560ab70d30c5cbf365cd2238a91814425b1ad9b556e8
6
+ metadata.gz: 4ee2af6b394b1b6f79878ab6390b5cf76df5bfa15b80d56b05964cecd4197c818589597782dcd262dd0f2f12f2f51dbc1e0a28559a0aa2431d8ab69a85283edd
7
+ data.tar.gz: b12f50a1691d8423644469ad4dfe02236a95b1f125b6f0bb8c8666a949e9f2548d3d1b8b757bdc92a1cecd784d51f4e2965c8b8a35ae1a81fd7617415c23f594
data/lib/protip/error.rb CHANGED
@@ -8,6 +8,12 @@ module Protip
8
8
  def initialize(request, response)
9
9
  @request = request
10
10
  @response = response
11
+
12
+ msg = <<-MSG
13
+ Received HTTP #{response.code} from #{request.uri}. Response:
14
+ #{response.body}
15
+ MSG
16
+ super(msg)
11
17
  end
12
18
 
13
19
  def inspect
@@ -667,7 +667,13 @@ module Protip::ResourceTest # Namespace for internal constants
667
667
  # Set up an errors instance variable that we can set actual messages on
668
668
  @errors = Protip::Messages::Errors.new
669
669
 
670
- exception = Protip::UnprocessableEntityError.new mock, mock
670
+ request = mock
671
+ request.stubs(:uri).returns('http://some.uri')
672
+
673
+ response = mock
674
+ response.stubs(code: 500, body: @errors.to_proto)
675
+
676
+ exception = Protip::UnprocessableEntityError.new request, response
671
677
  exception.stubs(:errors).returns @errors
672
678
  client.stubs(:request).raises(exception)
673
679
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.16.0
4
+ version: 0.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - AngelList
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-07 00:00:00.000000000 Z
11
+ date: 2016-01-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activemodel
@@ -215,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
215
215
  version: '0'
216
216
  requirements: []
217
217
  rubyforge_project:
218
- rubygems_version: 2.4.5.1
218
+ rubygems_version: 2.4.5
219
219
  signing_key:
220
220
  specification_version: 4
221
221
  summary: Resources backed by protobuf messages