rail-locator-api 1.0.34 → 1.0.35

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
  SHA256:
3
- metadata.gz: ccb40fb17c07a91468660c4bf642e94c902c6468395c9f66a91a01bd186e122d
4
- data.tar.gz: d06c77b47de8ee341e08945dcd229440efc615fd6456d80832c7e1178344cdf1
3
+ metadata.gz: 0b615e28535741f010ad218a4f844b1ed47d83e05841d4b87035181959316bbe
4
+ data.tar.gz: b0970713fd66072b17b29611523620a8a2aa2055987212c19e400a6bbb6cd5eb
5
5
  SHA512:
6
- metadata.gz: 5ed439487c1336378a567afdccb504fbdfc4e979a5d3d71328eef300bdc7fe871ba589a109769cb4e135c204ed0b0e1d2a9b91432e909920bf4205e8059891ee
7
- data.tar.gz: eb0964dcc6902a1758602daad125b961a5a8dca96d3e65d018dd638e24ecae19426bfd1fcaa48015db3772e6b36bfd16b96b021a0be7866264828d82a8cdd06a
6
+ metadata.gz: c609f8abe8f9ab850dfae270eb47c5d9776cf9274239adbdc250a9b153d92905061677c26ab88f6363e02bf7aa17bbc8c57d6f5f3d0260561320ec58695db2ff
7
+ data.tar.gz: c98d9b3f48a73a2c9ac4f6f51044a245f6391ec9c2fd82064edc95b3be1358dd86178faac77c51c1d369a064e5358af133ed932ff57852aff9ccca2f06742988
@@ -311,7 +311,7 @@ module RailLocatorApi
311
311
  begin
312
312
  headers = response.headers
313
313
  body = MultiJson.load(response.body, symbolize_keys: symbolize_keys)
314
- parsed_response = Response.new(headers: headers, body: body)
314
+ parsed_response = Response.new(headers: headers, body: body, status_code: response.env.status)
315
315
  rescue MultiJson::ParseError
316
316
  error_params = { title: "UNPARSEABLE_RESPONSE", status_code: 500 }
317
317
  error = RailLocatorApiError.new("Unparseable response: #{response.body}", error_params)
@@ -1,10 +1,11 @@
1
1
  module RailLocatorApi
2
2
  class Response
3
- attr_accessor :body, :headers
3
+ attr_accessor :body, :headers, :status_code
4
4
 
5
- def initialize(body: {}, headers: {})
5
+ def initialize(body: {}, headers: {}, status_code: nil)
6
6
  @body = body
7
7
  @headers = headers
8
+ @status_code = status_code
8
9
  end
9
10
  end
10
11
  end
@@ -1,3 +1,3 @@
1
1
  module RailLocatorApi
2
- VERSION = "1.0.34"
2
+ VERSION = "1.0.35"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rail-locator-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.34
4
+ version: 1.0.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Osetrov