api_recipes 2.7.0 → 2.7.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
  SHA256:
3
- metadata.gz: 8ac0841819d455adb4d85f88d7858e33cfaa17bf35316811f5a6d7c75879b271
4
- data.tar.gz: ddacdca3095b42cdc14c51e066a52d237c85dfc0ba79419342168d7667f0b12e
3
+ metadata.gz: 3c49acd995e584ae959722b5bccb248e1c532289e0be89ebda5e1f59d6a81e8e
4
+ data.tar.gz: 92dbb6ce976e6a22d9f5a8b54e5c0fd62d585afb2b0222fe2cf99f885364d52d
5
5
  SHA512:
6
- metadata.gz: ec9f37f976b33f9386b4f201f4200ce33fdc526510f31984b591823c093c187037c7c8fc6c967fd33094b41f5343b4810ae251a89d3a9922e55b565f7f648503
7
- data.tar.gz: 4c2f41152de95562744e8b60e8d14ca4adbbd4a88487d89f52149ba9bfd6b9bff3bf830bedc1aee9c59787e541ad5386d151baea552b11e7c63a8eac1e795b85
6
+ metadata.gz: f327fb50389e63e750cc6c349af86ad791b27196da80cd78434afbb050868cd56e0b91e9825abc62d621a8adf1afeb8b18ac1c04b72cfdea99ad516526752726
7
+ data.tar.gz: 1763a9298481a31923acd934dde45da4f3e105537e35182f65d189eaa7f0128ebfbb96d7409fbf7c6974d389bb495e07d21edae6cf145c6b011520769ad571c6
@@ -11,6 +11,7 @@ module ApiRecipes
11
11
  def data
12
12
  return @data unless @data.nil?
13
13
 
14
+ # TODO: rescue nil?
14
15
  @data = @original_response.parse
15
16
  end
16
17
 
@@ -43,7 +43,7 @@ module ApiRecipes
43
43
 
44
44
  def build_url_from_path
45
45
  attrs = {
46
- scheme: settings[:protocol],
46
+ scheme: settings[:protocol].to_s,
47
47
  host: settings[:host],
48
48
  port: port,
49
49
  path: path
@@ -90,12 +90,12 @@ module ApiRecipes
90
90
  end
91
91
 
92
92
  def port
93
- settings[:port] || case settings[:protocol]
94
- when 'http'
95
- 80
96
- when 'https'
97
- 443
98
- end
93
+ settings[:port].to_s || case settings[:protocol].to_s
94
+ when 'http'
95
+ '80'
96
+ when 'https'
97
+ '443'
98
+ end
99
99
  end
100
100
 
101
101
  def prepare_request
@@ -1,3 +1,3 @@
1
1
  module ApiRecipes
2
- VERSION = '2.7.0'.freeze
2
+ VERSION = '2.7.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api_recipes
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.0
4
+ version: 2.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alessandro Verlato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-11-30 00:00:00.000000000 Z
11
+ date: 2020-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http