my_api_client 0.22.0 → 0.24.0
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/.circleci/config.yml +26 -26
- data/.rubocop.yml +14 -10
- data/.rubocop_todo.yml +2 -2
- data/CHANGELOG.md +220 -157
- data/Gemfile +0 -2
- data/Gemfile.lock +51 -68
- data/README.jp.md +38 -22
- data/README.md +25 -11
- data/example/api_clients/application_api_client.rb +1 -1
- data/example/api_clients/my_errors.rb +9 -0
- data/example/api_clients/my_header_api_client.rb +38 -0
- data/lib/my_api_client/error_handling/generator.rb +16 -3
- data/lib/my_api_client/errors/network_error.rb +3 -3
- data/lib/my_api_client/errors.rb +2 -2
- data/lib/my_api_client/integrations/bugsnag.rb +2 -2
- data/lib/my_api_client/version.rb +1 -1
- data/my_api/Gemfile +2 -2
- data/my_api/Gemfile.lock +94 -94
- data/my_api/app/controllers/header_controller.rb +12 -0
- data/my_api/app/controllers/pagination_controller.rb +1 -1
- data/my_api/config/routes.rb +1 -0
- data/my_api/spec/controllers/error_controller_spec.rb +1 -1
- data/my_api/spec/controllers/header_controller_spec.rb +33 -0
- data/my_api/spec/controllers/pagination_controller_spec.rb +1 -1
- data/my_api/spec/controllers/rest_controller_spec.rb +1 -1
- data/my_api/spec/controllers/status_controller_spec.rb +1 -1
- data/my_api_client.gemspec +1 -1
- data/rails_app/rails_5.2/Gemfile.lock +8 -8
- data/rails_app/rails_6.0/Gemfile +1 -0
- data/rails_app/rails_6.0/Gemfile.lock +84 -98
- data/rails_app/rails_6.1/Gemfile.lock +89 -99
- data/rails_app/rails_7.0/Gemfile.lock +132 -69
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 625b09ebe3b913ebf52c369554945368280eedb5610c6c9af64d0f0115ff4414
|
4
|
+
data.tar.gz: e2bd5807d57814f29ffed4cbc4a708f21925ab3546734d00e10296073a987240
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e4b479a449d2c7d06953b9daf954c37d4861fa02f42af93275774668c690792292784ca69cdc9fae68d3ee347bc09e595ac15837904ada9635526448afd146d
|
7
|
+
data.tar.gz: f0e4b6b765fb5e14080531ea09d51226cea45fa6b6ad81077b39ffa41ade1656dc4cf2818bbbded6955ed91117df7e2093ec0f89969990734a8b6d6baaccf3f0
|
data/.circleci/config.yml
CHANGED
@@ -12,17 +12,17 @@ references:
|
|
12
12
|
- &ruby_version
|
13
13
|
ruby_version:
|
14
14
|
type: enum
|
15
|
-
enum: &ruby_version_enum [
|
16
|
-
default:
|
15
|
+
enum: &ruby_version_enum ["2.7", "3.0", "3.1"]
|
16
|
+
default: "3.1"
|
17
17
|
- &rails_version
|
18
18
|
rails_version:
|
19
19
|
type: enum
|
20
|
-
enum: &rails_version_enum [
|
21
|
-
default:
|
20
|
+
enum: &rails_version_enum ["5.2", "6.0", "6.1", "7.0"]
|
21
|
+
default: "7.0"
|
22
22
|
- &bundler_options
|
23
23
|
bundler_options:
|
24
24
|
type: string
|
25
|
-
default:
|
25
|
+
default: ""
|
26
26
|
|
27
27
|
executors:
|
28
28
|
api_executor:
|
@@ -35,14 +35,14 @@ executors:
|
|
35
35
|
parameters:
|
36
36
|
<<: *ruby_version
|
37
37
|
docker:
|
38
|
-
|
38
|
+
- image: cimg/ruby:<< parameters.ruby_version >>
|
39
39
|
working_directory: ~/repo
|
40
40
|
rails_executor:
|
41
41
|
parameters:
|
42
42
|
<<: *ruby_version
|
43
43
|
<<: *rails_version
|
44
44
|
docker:
|
45
|
-
|
45
|
+
- image: cimg/ruby:<< parameters.ruby_version >>
|
46
46
|
working_directory: ~/repo/rails_app/rails_<< parameters.rails_version >>
|
47
47
|
|
48
48
|
commands:
|
@@ -109,7 +109,7 @@ commands:
|
|
109
109
|
name: Run RuboCop
|
110
110
|
command: bundle exec rubocop
|
111
111
|
yardoc:
|
112
|
-
description:
|
112
|
+
description: "Generate YARDoc"
|
113
113
|
steps:
|
114
114
|
- run: bundle exec yardoc -o ./yardoc
|
115
115
|
- store_artifacts:
|
@@ -286,20 +286,20 @@ workflows:
|
|
286
286
|
parameters:
|
287
287
|
ruby_version: *ruby_version_enum
|
288
288
|
rails_version: *rails_version_enum
|
289
|
-
bundler_options: [
|
289
|
+
bundler_options: ["--with integrations", "--without integrations"]
|
290
290
|
exclude:
|
291
|
-
- ruby_version:
|
292
|
-
rails_version:
|
293
|
-
bundler_options:
|
294
|
-
- ruby_version:
|
295
|
-
rails_version:
|
296
|
-
bundler_options:
|
297
|
-
- ruby_version:
|
298
|
-
rails_version:
|
299
|
-
bundler_options:
|
300
|
-
- ruby_version:
|
301
|
-
rails_version:
|
302
|
-
bundler_options:
|
291
|
+
- ruby_version: "3.0"
|
292
|
+
rails_version: "5.2"
|
293
|
+
bundler_options: "--with integrations"
|
294
|
+
- ruby_version: "3.0"
|
295
|
+
rails_version: "5.2"
|
296
|
+
bundler_options: "--without integrations"
|
297
|
+
- ruby_version: "3.1"
|
298
|
+
rails_version: "5.2"
|
299
|
+
bundler_options: "--with integrations"
|
300
|
+
- ruby_version: "3.1"
|
301
|
+
rails_version: "5.2"
|
302
|
+
bundler_options: "--without integrations"
|
303
303
|
- verify_generator:
|
304
304
|
name: verify_generator_on_ruby_<< matrix.ruby_version >>_and_rails_<< matrix.rails_version >>
|
305
305
|
matrix:
|
@@ -307,12 +307,12 @@ workflows:
|
|
307
307
|
ruby_version: *ruby_version_enum
|
308
308
|
rails_version: *rails_version_enum
|
309
309
|
exclude:
|
310
|
-
- ruby_version:
|
311
|
-
rails_version:
|
312
|
-
- ruby_version:
|
313
|
-
rails_version:
|
310
|
+
- ruby_version: "3.0"
|
311
|
+
rails_version: "5.2"
|
312
|
+
- ruby_version: "3.1"
|
313
|
+
rails_version: "5.2"
|
314
314
|
- test_api:
|
315
|
-
ruby_version:
|
315
|
+
ruby_version: "2.7" # Jets supports only Ruby 2.x
|
316
316
|
- rubocop
|
317
317
|
- yardoc
|
318
318
|
- upload-coverage:
|
data/.rubocop.yml
CHANGED
@@ -5,7 +5,7 @@ require:
|
|
5
5
|
inherit_from: .rubocop_todo.yml
|
6
6
|
|
7
7
|
AllCops:
|
8
|
-
TargetRubyVersion: 2.
|
8
|
+
TargetRubyVersion: 2.7
|
9
9
|
NewCops: enable
|
10
10
|
Exclude:
|
11
11
|
- rails_app/**/*
|
@@ -18,10 +18,10 @@ Layout/LineLength:
|
|
18
18
|
|
19
19
|
Metrics/BlockLength:
|
20
20
|
Exclude:
|
21
|
-
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
21
|
+
- "my_api_client.gemspec"
|
22
|
+
- "lib/my_api_client/rspec/matchers/**/*"
|
23
|
+
- "spec/**/*"
|
24
|
+
- "my_api/spec/**/*"
|
25
25
|
|
26
26
|
Metrics/MethodLength:
|
27
27
|
Max: 15
|
@@ -39,20 +39,24 @@ Style/TrailingCommaInHashLiteral:
|
|
39
39
|
|
40
40
|
RSpec/DescribeClass:
|
41
41
|
Exclude:
|
42
|
-
-
|
43
|
-
-
|
42
|
+
- "spec/integrations/api_clients/**/*"
|
43
|
+
- "spec/lib/my_api_client/rspec/matchers/**/*"
|
44
44
|
|
45
45
|
RSpec/ExampleLength:
|
46
46
|
Max: 10
|
47
47
|
|
48
48
|
RSpec/FilePath:
|
49
49
|
Exclude:
|
50
|
-
-
|
51
|
-
-
|
52
|
-
-
|
50
|
+
- "spec/lib/my_api_client/integrations/**/*"
|
51
|
+
- "spec/lib/my_api_client/errors/**/*"
|
52
|
+
- "spec/lib/my_api_client/rspec/**/*"
|
53
53
|
|
54
54
|
RSpec/NestedGroups:
|
55
55
|
Max: 5
|
56
56
|
|
57
57
|
RSpec/MultipleExpectations:
|
58
58
|
Max: 4
|
59
|
+
|
60
|
+
RSpec/Rails/HaveHttpStatus:
|
61
|
+
Exclude:
|
62
|
+
- "my_api/spec/controllers/**/*"
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2022-10-23 23:31:24 UTC using RuboCop version 1.33.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -24,7 +24,7 @@ Lint/MissingSuper:
|
|
24
24
|
- 'lib/my_api_client/sleeper.rb'
|
25
25
|
|
26
26
|
# Offense count: 6
|
27
|
-
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers.
|
27
|
+
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
|
28
28
|
# SupportedStyles: snake_case, normalcase, non_integer
|
29
29
|
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339
|
30
30
|
Naming/VariableNumber:
|