api_recipes 2.10.0 → 2.10.2
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 +4 -4
- data/lib/api_recipes/configuration.rb +4 -3
- data/lib/api_recipes/endpoint.rb +6 -1
- data/lib/api_recipes/exceptions.rb +1 -1
- data/lib/api_recipes/version.rb +1 -1
- data/lib/api_recipes.rb +4 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 901f6a4dff9765f9942e3da126a3f26329421514ae47ae13ed5c5e2849f24ade
|
4
|
+
data.tar.gz: 0c1fa41443789ca366f27424b862aa46028648b2d914255d8454c159697ba7d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 353664249eab70f9ab15835a0ae4d460363f92fbfe53b11dc2371a96aedd04483b81c68d0b5a6b3dc52b954c3bff3410ed92b18a04f752958c7317772116d9d6
|
7
|
+
data.tar.gz: 78630e64218cfc64f9e2217ad1e846f378e39c323553f04c8029c97ad6e19404574d2a3854bad619b2aece4d7d70087351e5968ccba954bb80c5fc1d137d0213
|
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'yaml'
|
2
2
|
require 'erb'
|
3
|
+
require 'logger'
|
3
4
|
|
4
5
|
module ApiRecipes
|
5
6
|
class Configuration
|
@@ -33,7 +34,7 @@ module ApiRecipes
|
|
33
34
|
# Merge file contents into apis_configs
|
34
35
|
data.each do |api, params|
|
35
36
|
if apis_configs[api]
|
36
|
-
logger.
|
37
|
+
logger.debug "File at #{file_path} overrides config for '#{api}' API"
|
37
38
|
end
|
38
39
|
apis_configs[api] = params
|
39
40
|
end
|
@@ -53,7 +54,7 @@ module ApiRecipes
|
|
53
54
|
|
54
55
|
def logger
|
55
56
|
unless @logger
|
56
|
-
log = ::Logger.new(log_to)
|
57
|
+
log = ::Logger.new(log_to || STDOUT)
|
57
58
|
log.level = normalize_log_level
|
58
59
|
log.progname = 'ApiRecipes'
|
59
60
|
@logger = log
|
@@ -77,7 +78,7 @@ module ApiRecipes
|
|
77
78
|
when :error, ::Logger::ERROR, 'error' then ::Logger::ERROR
|
78
79
|
when :fatal, ::Logger::FATAL, 'fatal' then ::Logger::FATAL
|
79
80
|
else
|
80
|
-
Logger::
|
81
|
+
ENV['LOG_LEVEL'] || Logger::DEBUG
|
81
82
|
end
|
82
83
|
end
|
83
84
|
end
|
data/lib/api_recipes/endpoint.rb
CHANGED
@@ -48,7 +48,7 @@ module ApiRecipes
|
|
48
48
|
@expected_code = expected_code
|
49
49
|
@response = response
|
50
50
|
unless message
|
51
|
-
message = "response code for request on route '#{@path}' has returned '#{@response.code}', but '#{@expected_code}' was expected
|
51
|
+
message = "response code for request on route '#{@path}' has returned '#{@response.code}', but '#{@expected_code}' was expected"
|
52
52
|
end
|
53
53
|
super(message)
|
54
54
|
end
|
data/lib/api_recipes/version.rb
CHANGED
data/lib/api_recipes.rb
CHANGED
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.10.
|
4
|
+
version: 2.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Verlato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: http
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
requirements: []
|
71
|
-
rubygems_version: 3.
|
71
|
+
rubygems_version: 3.5.4
|
72
72
|
signing_key:
|
73
73
|
specification_version: 4
|
74
74
|
summary: Consume HTTP APIs with style
|