proxima 2.1.0 → 2.1.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 87bc758660cc043c85eda6af5136be651d1aa850
4
- data.tar.gz: af9d1623a2d60193b98f3d25560cfb17d237309e
3
+ metadata.gz: e8eed8f62108a8840bc2f3dd904b44a0fe55a0c9
4
+ data.tar.gz: 9bf0e95d4233ae8f1b8d482b0f8ab490cdaa3ee9
5
5
  SHA512:
6
- metadata.gz: 5aef60de9d640f92ade02d055b526c7fcc23dae8876b1c49f390d44368ac72530bf4c555ca61df39d5a23136f7084f24893c8734307da0d80ceaa8630d33deab
7
- data.tar.gz: 8410ae7422b8fa465cabb61c555dd93aa1be1f83a81ab4af6cb3f66b46e977d601cf478444aaf90cbb92d211efa07db10daeb0b196d7a29038f34df1fea5a410
6
+ metadata.gz: 6d2eed6723fa0d8ee190c7170dd805110ccd8e43889ff5ef0f0f64178110fbf37c7a97a627a6447e5bff0f8944dbc64d156ec4464accbff60d87b5e0878ea5b0
7
+ data.tar.gz: f45e22445a1f491b9de8714370c23012a51cd679aa22cd114a3dee2096cc130006e3ee5a3d2678d4935c28d8f7d88dab8948696f0a99f14b89852df75495defe
@@ -7,8 +7,8 @@ module Proxima
7
7
  module HTTPMethods
8
8
 
9
9
  HTTP_METHODS.each do |http_method|
10
- define_method :"#{http_method}" do |path, opts = {}, &block|
11
- @response = self.class.api.public_send(:"#{http_method}", path, opts, &block)
10
+ define_method http_method do |path, opts = {}, &block|
11
+ @response = self.class.api.public_send(http_method, path, opts, &block)
12
12
  @response
13
13
  end
14
14
  end
@@ -16,8 +16,8 @@ module Proxima
16
16
  module ClassMethods
17
17
 
18
18
  HTTP_METHODS.each do |http_method|
19
- define_method :"#{http_method}" do |path, opts = {}, &block|
20
- @response = self.api.public_send(:"#{http_method}", path, opts, &block)
19
+ define_method http_method do |path, opts = {}, &block|
20
+ @response = self.api.public_send(http_method, path, opts, &block)
21
21
  @response
22
22
  end
23
23
  end
@@ -7,6 +7,7 @@ module Proxima
7
7
  def initialize(request, raw_response)
8
8
  @request = request
9
9
  @raw_response = raw_response
10
+ @headers = nil
10
11
  end
11
12
 
12
13
  def json
@@ -34,7 +35,7 @@ module Proxima
34
35
  end
35
36
 
36
37
  def headers
37
- @raw_response.each_header { |name, val| [from_header(name), val] }.to_h
38
+ @headers ||= @raw_response.each.to_h.map { |name, val| [from_header(name), val] }.to_h
38
39
  end
39
40
 
40
41
  private
@@ -1,5 +1,5 @@
1
1
 
2
2
 
3
3
  module Proxima
4
- VERSION = "2.1.0"
4
+ VERSION = "2.1.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxima
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Hurst