gemfather 2.3.0 → 2.3.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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b76d8257b078b1c9a56c0c3fb4dff29509b2fb2da8862e682e2c2902c775b858
|
4
|
+
data.tar.gz: 0b4d42add75aa92abf940832cae146804053d183fd8d5aa7e4fccd18b615e64b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fcb5fca115a0d15433419d9eefe531c0e30b16a9253831b469ea43d24fc0a84a795b055536ff5bf18004ea9294915f03d35fa37865633dc15132ab9a048efcf9
|
7
|
+
data.tar.gz: 9696bfe5be260edb7b29093aef9db3181d4c1ecdaf0a4cb43e6ba6f9d4e4619d44aa171bacfdd7808845ef7e0c5a9249968cd53c36465a5850bea96e69b9073a
|
@@ -9,6 +9,7 @@ module ApiGenerator
|
|
9
9
|
MAX_RETRIES = 3
|
10
10
|
RETRY_INTERVAL = 1
|
11
11
|
RETRY_BACKOFF_FACTOR = 1
|
12
|
+
CONNECTION_ERROR = ApiGenerator::Middleware::HttpErrors::ConnectionError
|
12
13
|
|
13
14
|
# rubocop:disable Metrics/MethodLength, Metrics/AbcSize
|
14
15
|
def self.extended(klass)
|
@@ -16,7 +17,7 @@ module ApiGenerator
|
|
16
17
|
|
17
18
|
klass.class_eval do
|
18
19
|
setting :api_endpoint, reader: true
|
19
|
-
setting :user_agent, USER_AGENT, reader: true
|
20
|
+
setting :user_agent, default: USER_AGENT, reader: true
|
20
21
|
|
21
22
|
setting :api_header, reader: true
|
22
23
|
setting :api_token, reader: true
|
@@ -27,19 +28,15 @@ module ApiGenerator
|
|
27
28
|
setting :ssl_verify, reader: true
|
28
29
|
setting :ca_file, reader: true
|
29
30
|
|
30
|
-
setting :open_timeout, OPEN_TIMEOUT, reader: true
|
31
|
-
setting :read_timeout, READ_TIMEOUT, reader: true
|
32
|
-
setting :max_retries, MAX_RETRIES, reader: true
|
33
|
-
setting :retry_interval, RETRY_INTERVAL, reader: true
|
34
|
-
setting :retry_backoff_factor, RETRY_BACKOFF_FACTOR, reader: true
|
31
|
+
setting :open_timeout, default: OPEN_TIMEOUT, reader: true
|
32
|
+
setting :read_timeout, default: READ_TIMEOUT, reader: true
|
33
|
+
setting :max_retries, default: MAX_RETRIES, reader: true
|
34
|
+
setting :retry_interval, default: RETRY_INTERVAL, reader: true
|
35
|
+
setting :retry_backoff_factor, default: RETRY_BACKOFF_FACTOR, reader: true
|
35
36
|
setting :logger, reader: true
|
36
37
|
setting :enable_instrumentation, reader: true
|
37
38
|
|
38
|
-
setting :retriable_errors,
|
39
|
-
[
|
40
|
-
ApiGenerator::Middleware::HttpErrors::ConnectionError,
|
41
|
-
],
|
42
|
-
reader: true
|
39
|
+
setting :retriable_errors, default: [CONNECTION_ERROR], reader: true
|
43
40
|
end
|
44
41
|
end
|
45
42
|
# rubocop:enable Metrics/MethodLength, Metrics/AbcSize
|
@@ -36,10 +36,13 @@ module ApiGenerator
|
|
36
36
|
|
37
37
|
private
|
38
38
|
|
39
|
+
# rubocop:disable Layout/LineLength
|
39
40
|
def check_app_name(app_name)
|
40
41
|
raise(Thor::Error, 'APP_NAME is not provided') unless app_name
|
41
42
|
raise(Thor::Error, "Folder #{app_name} name already exists") if Dir.exist?("./#{app_name}")
|
43
|
+
raise(Thor::Error, 'Api name can start only with letter or _') if app_name.chr.match(/[a-zA-Z_]/).nil?
|
42
44
|
end
|
45
|
+
# rubocop:enable Layout/LineLength
|
43
46
|
|
44
47
|
def setup_template_variables(app_name)
|
45
48
|
self.app_name = app_name
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemfather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.3.
|
4
|
+
version: 2.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domclick Ruby Team
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0.11'
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: '0.14'
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +38,6 @@ dependencies:
|
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: '0.11'
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: '0.14'
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: faraday
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -229,7 +223,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
229
223
|
- !ruby/object:Gem::Version
|
230
224
|
version: '0'
|
231
225
|
requirements: []
|
232
|
-
rubygems_version: 3.1.
|
226
|
+
rubygems_version: 3.1.6
|
233
227
|
signing_key:
|
234
228
|
specification_version: 4
|
235
229
|
summary: 'Gemfather: API client generator'
|