my_api_client 0.24.0 → 0.26.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +5 -23
  3. data/.rubocop.yml +7 -0
  4. data/.rubocop_todo.yml +3 -2
  5. data/CHANGELOG.md +33 -0
  6. data/Gemfile.lock +49 -38
  7. data/README.jp.md +2 -4
  8. data/README.md +7 -3
  9. data/lib/generators/generator_helper.rb +4 -0
  10. data/lib/my_api_client/rspec/stub.rb +1 -1
  11. data/lib/my_api_client/version.rb +1 -1
  12. data/my_api/Gemfile +2 -2
  13. data/my_api/Gemfile.lock +107 -92
  14. data/my_api_client.gemspec +3 -2
  15. data/rails_app/rails_6.0/Gemfile.lock +20 -20
  16. data/rails_app/rails_6.1/Gemfile.lock +21 -21
  17. data/rails_app/rails_7.0/Gemfile.lock +20 -20
  18. metadata +21 -43
  19. data/gemfiles/rails_5.0.gemfile +0 -16
  20. data/gemfiles/rails_5.1.gemfile +0 -16
  21. data/gemfiles/rails_5.2.gemfile +0 -16
  22. data/rails_app/rails_5.2/.rspec +0 -3
  23. data/rails_app/rails_5.2/Gemfile +0 -17
  24. data/rails_app/rails_5.2/Gemfile.lock +0 -180
  25. data/rails_app/rails_5.2/README.md +0 -24
  26. data/rails_app/rails_5.2/Rakefile +0 -8
  27. data/rails_app/rails_5.2/app/controllers/application_controller.rb +0 -4
  28. data/rails_app/rails_5.2/app/jobs/application_job.rb +0 -4
  29. data/rails_app/rails_5.2/bin/bundle +0 -5
  30. data/rails_app/rails_5.2/bin/rails +0 -6
  31. data/rails_app/rails_5.2/bin/rake +0 -6
  32. data/rails_app/rails_5.2/bin/setup +0 -27
  33. data/rails_app/rails_5.2/bin/update +0 -27
  34. data/rails_app/rails_5.2/config/application.rb +0 -37
  35. data/rails_app/rails_5.2/config/boot.rb +0 -6
  36. data/rails_app/rails_5.2/config/credentials.yml.enc +0 -1
  37. data/rails_app/rails_5.2/config/environment.rb +0 -7
  38. data/rails_app/rails_5.2/config/environments/development.rb +0 -41
  39. data/rails_app/rails_5.2/config/environments/production.rb +0 -70
  40. data/rails_app/rails_5.2/config/environments/test.rb +0 -38
  41. data/rails_app/rails_5.2/config/initializers/application_controller_renderer.rb +0 -9
  42. data/rails_app/rails_5.2/config/initializers/backtrace_silencers.rb +0 -8
  43. data/rails_app/rails_5.2/config/initializers/cors.rb +0 -17
  44. data/rails_app/rails_5.2/config/initializers/filter_parameter_logging.rb +0 -6
  45. data/rails_app/rails_5.2/config/initializers/inflections.rb +0 -17
  46. data/rails_app/rails_5.2/config/initializers/mime_types.rb +0 -5
  47. data/rails_app/rails_5.2/config/initializers/wrap_parameters.rb +0 -11
  48. data/rails_app/rails_5.2/config/locales/en.yml +0 -33
  49. data/rails_app/rails_5.2/config/routes.rb +0 -5
  50. data/rails_app/rails_5.2/config/spring.rb +0 -8
  51. data/rails_app/rails_5.2/config.ru +0 -7
  52. data/rails_app/rails_5.2/public/robots.txt +0 -1
  53. data/rails_app/rails_5.2/spec/rails_helper.rb +0 -14
  54. data/rails_app/rails_5.2/spec/spec_helper.rb +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 625b09ebe3b913ebf52c369554945368280eedb5610c6c9af64d0f0115ff4414
4
- data.tar.gz: e2bd5807d57814f29ffed4cbc4a708f21925ab3546734d00e10296073a987240
3
+ metadata.gz: 04b65801b00f389260d1c5e565c9bf62141dca015f7d63a1f2f55a9432202971
4
+ data.tar.gz: 0cb50201bdc0877a6bff65300907be74910c62ee29112c782ac513f6e153c243
5
5
  SHA512:
6
- metadata.gz: 7e4b479a449d2c7d06953b9daf954c37d4861fa02f42af93275774668c690792292784ca69cdc9fae68d3ee347bc09e595ac15837904ada9635526448afd146d
7
- data.tar.gz: f0e4b6b765fb5e14080531ea09d51226cea45fa6b6ad81077b39ffa41ade1656dc4cf2818bbbded6955ed91117df7e2093ec0f89969990734a8b6d6baaccf3f0
6
+ metadata.gz: f2404378034857782c548971e5812a791ebe7902b5a73b63a56eb85a52e5d29aef6eee64c654377a4564ee33ac30f11e3d0c2e60dca391a658d7786cddb4ea50
7
+ data.tar.gz: 5daea5828a938350e909238b2c3d217e5dc49f792626689791b033648650ffc6b8f99eaa4edbe4a100d41212d811732d2072d40d4f79252752e034a4cbc413bd
data/.circleci/config.yml CHANGED
@@ -12,12 +12,12 @@ references:
12
12
  - &ruby_version
13
13
  ruby_version:
14
14
  type: enum
15
- enum: &ruby_version_enum ["2.7", "3.0", "3.1"]
16
- default: "3.1"
15
+ enum: &ruby_version_enum ["2.7", "3.0", "3.1", "3.2"]
16
+ default: "3.2"
17
17
  - &rails_version
18
18
  rails_version:
19
19
  type: enum
20
- enum: &rails_version_enum ["5.2", "6.0", "6.1", "7.0"]
20
+ enum: &rails_version_enum ["6.0", "6.1", "7.0"]
21
21
  default: "7.0"
22
22
  - &bundler_options
23
23
  bundler_options:
@@ -153,7 +153,7 @@ commands:
153
153
  name: Install Bundler 2.x
154
154
  command: gem install bundler -v '~> 2.0'
155
155
  - ruby-orbs/bundle-install:
156
- cache_key_prefix: v1-dependencies-<< parameters.ruby_version >>
156
+ cache_key_prefix: v2-dependencies-<< parameters.ruby_version >>
157
157
  bundle_extra_args: << parameters.bundler_options >>
158
158
  restore_bundled_with: false
159
159
  test_and_deploy_for_api:
@@ -252,7 +252,7 @@ jobs:
252
252
  - code-climate/install
253
253
  - code-climate/sum-coverage:
254
254
  input: codeclimate.*.json
255
- parts: 20
255
+ parts: 24
256
256
  - code-climate/upload-coverage
257
257
  rubocop:
258
258
  executor: gem_executor
@@ -287,30 +287,12 @@ workflows:
287
287
  ruby_version: *ruby_version_enum
288
288
  rails_version: *rails_version_enum
289
289
  bundler_options: ["--with integrations", "--without integrations"]
290
- exclude:
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
290
  - verify_generator:
304
291
  name: verify_generator_on_ruby_<< matrix.ruby_version >>_and_rails_<< matrix.rails_version >>
305
292
  matrix:
306
293
  parameters:
307
294
  ruby_version: *ruby_version_enum
308
295
  rails_version: *rails_version_enum
309
- exclude:
310
- - ruby_version: "3.0"
311
- rails_version: "5.2"
312
- - ruby_version: "3.1"
313
- rails_version: "5.2"
314
296
  - test_api:
315
297
  ruby_version: "2.7" # Jets supports only Ruby 2.x
316
298
  - rubocop
data/.rubocop.yml CHANGED
@@ -1,5 +1,6 @@
1
1
  require:
2
2
  - rubocop-performance
3
+ - rubocop-rake
3
4
  - rubocop-rspec
4
5
 
5
6
  inherit_from: .rubocop_todo.yml
@@ -11,6 +12,9 @@ AllCops:
11
12
  - rails_app/**/*
12
13
  - vendor/bundle/**/*
13
14
 
15
+ Gemspec/DevelopmentDependencies:
16
+ Enabled: false
17
+
14
18
  Layout/LineLength:
15
19
  Max: 100
16
20
  Exclude:
@@ -51,6 +55,9 @@ RSpec/FilePath:
51
55
  - "spec/lib/my_api_client/errors/**/*"
52
56
  - "spec/lib/my_api_client/rspec/**/*"
53
57
 
58
+ RSpec/IndexedLet:
59
+ Max: 3
60
+
54
61
  RSpec/NestedGroups:
55
62
  Max: 5
56
63
 
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2022-10-23 23:31:24 UTC using RuboCop version 1.33.0.
3
+ # on 2023-02-06 23:31:23 UTC using RuboCop version 1.41.1.
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
@@ -22,6 +22,7 @@ Lint/MissingSuper:
22
22
  - 'lib/my_api_client/integrations/bugsnag.rb'
23
23
  - 'lib/my_api_client/request/executor.rb'
24
24
  - 'lib/my_api_client/sleeper.rb'
25
+ - 'spec/lib/my_api_client/rspec/matchers/be_handled_as_an_error_spec.rb'
25
26
 
26
27
  # Offense count: 6
27
28
  # Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
@@ -32,7 +33,7 @@ Naming/VariableNumber:
32
33
  - 'spec/lib/my_api_client/error_handling_spec.rb'
33
34
  - 'spec/lib/my_api_client/request/executor_spec.rb'
34
35
 
35
- # Offense count: 60
36
+ # Offense count: 101
36
37
  # Configuration parameters: AllowSubject.
37
38
  RSpec/MultipleMemoizedHelpers:
38
39
  Max: 15
data/CHANGELOG.md CHANGED
@@ -1,5 +1,38 @@
1
1
  # Change log
2
2
 
3
+ ## v0.26.0 (Jul 04, 2023)
4
+
5
+ ### Bugfix
6
+
7
+ - [#914](https://github.com/ryz310/my_api_client/pull/914) Fix error that generating api client failed on Rails 7 ([@ryz310](https://github.com/ryz310))
8
+
9
+ ### Dependabot
10
+
11
+ - [#889](https://github.com/ryz310/my_api_client/pull/889) Bump yard from 0.9.32 to 0.9.34 ([@ryz310](https://github.com/ryz310))
12
+ - [#893](https://github.com/ryz310/my_api_client/pull/893) Bump jsonpath from 1.1.2 to 1.1.3 ([@ryz310](https://github.com/ryz310))
13
+ - [#897](https://github.com/ryz310/my_api_client/pull/897) Bump rubocop-performance from 1.17.1 to 1.18.0 ([@ryz310](https://github.com/ryz310))
14
+ - [#912](https://github.com/ryz310/my_api_client/pull/912) Bump activesupport from 7.0.5.1 to 7.0.6 ([@ryz310](https://github.com/ryz310))
15
+ - [#913](https://github.com/ryz310/my_api_client/pull/913) Bump faraday from 2.7.8 to 2.7.9 ([@ryz310](https://github.com/ryz310))
16
+
17
+ ## v0.25.0 (Feb 12, 2023)
18
+
19
+ ### Breaking Change
20
+
21
+ - [#864](https://github.com/ryz310/my_api_client/pull/864) Support Ruby 3.2 and drop support for Rails 5.2 ([@ryz310](https://github.com/ryz310))
22
+
23
+ ### Rubocop Challenge
24
+
25
+ - [#809](https://github.com/ryz310/my_api_client/pull/809) Style/RedundantConstantBase-20221208233100 ([@ryz310](https://github.com/ryz310))
26
+ - [#812](https://github.com/ryz310/my_api_client/pull/812) Lint/RedundantCopDisableDirective-20221211233112 ([@ryz310](https://github.com/ryz310))
27
+ - [#862](https://github.com/ryz310/my_api_client/pull/862) Performance/StringInclude-20230206233100 ([@ryz310](https://github.com/ryz310))
28
+
29
+ ### Dependabot
30
+
31
+ - [#830](https://github.com/ryz310/my_api_client/pull/830) ryz310/dependabot/bundler/simplecov-0.22.0 ([@ryz310](https://github.com/ryz310))
32
+ - [#858](https://github.com/ryz310/my_api_client/pull/858) Bump faraday from 2.7.3 to 2.7.4 ([@ryz310](https://github.com/ryz310))
33
+ - [#859](https://github.com/ryz310/my_api_client/pull/859) Bump activesupport from 7.0.4.1 to 7.0.4.2 ([@ryz310](https://github.com/ryz310))
34
+ - [#863](https://github.com/ryz310/my_api_client/pull/863) Bump bugsnag from 6.25.1 to 6.25.2 ([@ryz310](https://github.com/ryz310))
35
+
3
36
  ## v0.24.0 (Nov 07, 2022)
4
37
 
5
38
  ### Feature
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- my_api_client (0.24.0)
5
- activesupport (>= 5.2.0)
4
+ my_api_client (0.26.0)
5
+ activesupport (>= 6.0.0)
6
6
  faraday (>= 0.17.1)
7
7
  jsonpath
8
8
  sawyer (>= 0.8.2)
@@ -10,103 +10,113 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- activesupport (7.0.4)
13
+ activesupport (7.0.6)
14
14
  concurrent-ruby (~> 1.0, >= 1.0.2)
15
15
  i18n (>= 1.6, < 2)
16
16
  minitest (>= 5.1)
17
17
  tzinfo (~> 2.0)
18
- addressable (2.8.1)
18
+ addressable (2.8.4)
19
19
  public_suffix (>= 2.0.2, < 6.0)
20
20
  ast (2.4.2)
21
- bugsnag (6.24.2)
21
+ bugsnag (6.25.2)
22
22
  concurrent-ruby (~> 1.0)
23
23
  byebug (11.1.3)
24
24
  coderay (1.1.3)
25
- concurrent-ruby (1.1.10)
25
+ concurrent-ruby (1.2.2)
26
26
  crack (0.4.5)
27
27
  rexml
28
28
  diff-lcs (1.5.0)
29
29
  docile (1.4.0)
30
- faraday (2.6.0)
30
+ faraday (2.7.9)
31
31
  faraday-net_http (>= 2.0, < 3.1)
32
32
  ruby2_keywords (>= 0.0.4)
33
- faraday-net_http (3.0.1)
33
+ faraday-net_http (3.0.2)
34
34
  hashdiff (1.0.1)
35
- i18n (1.12.0)
35
+ i18n (1.14.1)
36
36
  concurrent-ruby (~> 1.0)
37
- json (2.6.2)
38
- jsonpath (1.1.2)
37
+ json (2.6.3)
38
+ jsonpath (1.1.3)
39
39
  multi_json
40
+ language_server-protocol (3.17.0.3)
40
41
  method_source (1.0.0)
41
- minitest (5.16.3)
42
+ minitest (5.18.1)
42
43
  multi_json (1.15.0)
43
- parallel (1.22.1)
44
- parser (3.1.2.1)
44
+ parallel (1.23.0)
45
+ parser (3.2.2.3)
45
46
  ast (~> 2.4.1)
46
- pry (0.14.1)
47
+ racc
48
+ pry (0.14.2)
47
49
  coderay (~> 1.1)
48
50
  method_source (~> 1.0)
49
51
  pry-byebug (3.10.1)
50
52
  byebug (~> 11.0)
51
53
  pry (>= 0.13, < 0.15)
52
- public_suffix (5.0.0)
54
+ public_suffix (5.0.1)
55
+ racc (1.7.1)
53
56
  rainbow (3.1.1)
54
57
  rake (13.0.6)
55
- regexp_parser (2.6.0)
58
+ regexp_parser (2.8.1)
56
59
  rexml (3.2.5)
57
60
  rspec (3.12.0)
58
61
  rspec-core (~> 3.12.0)
59
62
  rspec-expectations (~> 3.12.0)
60
63
  rspec-mocks (~> 3.12.0)
61
- rspec-core (3.12.0)
64
+ rspec-core (3.12.2)
62
65
  rspec-support (~> 3.12.0)
63
- rspec-expectations (3.12.0)
66
+ rspec-expectations (3.12.3)
64
67
  diff-lcs (>= 1.2.0, < 2.0)
65
68
  rspec-support (~> 3.12.0)
66
- rspec-mocks (3.12.0)
69
+ rspec-mocks (3.12.5)
67
70
  diff-lcs (>= 1.2.0, < 2.0)
68
71
  rspec-support (~> 3.12.0)
69
- rspec-support (3.12.0)
72
+ rspec-support (3.12.1)
70
73
  rspec_junit_formatter (0.6.0)
71
74
  rspec-core (>= 2, < 4, != 2.12.0)
72
- rubocop (1.38.0)
75
+ rubocop (1.54.0)
73
76
  json (~> 2.3)
77
+ language_server-protocol (>= 3.17.0)
74
78
  parallel (~> 1.10)
75
- parser (>= 3.1.2.1)
79
+ parser (>= 3.2.2.3)
76
80
  rainbow (>= 2.2.2, < 4.0)
77
81
  regexp_parser (>= 1.8, < 3.0)
78
82
  rexml (>= 3.2.5, < 4.0)
79
- rubocop-ast (>= 1.23.0, < 2.0)
83
+ rubocop-ast (>= 1.28.0, < 2.0)
80
84
  ruby-progressbar (~> 1.7)
81
- unicode-display_width (>= 1.4.0, < 3.0)
82
- rubocop-ast (1.23.0)
83
- parser (>= 3.1.1.0)
84
- rubocop-performance (1.15.0)
85
+ unicode-display_width (>= 2.4.0, < 3.0)
86
+ rubocop-ast (1.29.0)
87
+ parser (>= 3.2.1.0)
88
+ rubocop-capybara (2.18.0)
89
+ rubocop (~> 1.41)
90
+ rubocop-factory_bot (2.23.1)
91
+ rubocop (~> 1.33)
92
+ rubocop-performance (1.18.0)
85
93
  rubocop (>= 1.7.0, < 2.0)
86
94
  rubocop-ast (>= 0.4.0)
87
- rubocop-rspec (2.15.0)
95
+ rubocop-rake (0.6.0)
96
+ rubocop (~> 1.0)
97
+ rubocop-rspec (2.22.0)
88
98
  rubocop (~> 1.33)
89
- ruby-progressbar (1.11.0)
99
+ rubocop-capybara (~> 2.17)
100
+ rubocop-factory_bot (~> 2.22)
101
+ ruby-progressbar (1.13.0)
90
102
  ruby2_keywords (0.0.5)
91
103
  sawyer (0.9.2)
92
104
  addressable (>= 2.3.5)
93
105
  faraday (>= 0.17.3, < 3)
94
- simplecov (0.21.2)
106
+ simplecov (0.22.0)
95
107
  docile (~> 1.1)
96
108
  simplecov-html (~> 0.11)
97
109
  simplecov_json_formatter (~> 0.1)
98
110
  simplecov-html (0.12.3)
99
111
  simplecov_json_formatter (0.1.4)
100
- tzinfo (2.0.5)
112
+ tzinfo (2.0.6)
101
113
  concurrent-ruby (~> 1.0)
102
- unicode-display_width (2.3.0)
114
+ unicode-display_width (2.4.2)
103
115
  webmock (3.18.1)
104
116
  addressable (>= 2.8.0)
105
117
  crack (>= 0.3.2)
106
118
  hashdiff (>= 0.4.0, < 2.0.0)
107
- webrick (1.7.0)
108
- yard (0.9.28)
109
- webrick (~> 1.7.0)
119
+ yard (0.9.34)
110
120
 
111
121
  PLATFORMS
112
122
  ruby
@@ -121,10 +131,11 @@ DEPENDENCIES
121
131
  rspec_junit_formatter
122
132
  rubocop
123
133
  rubocop-performance
134
+ rubocop-rake
124
135
  rubocop-rspec
125
- simplecov (= 0.21.2)
136
+ simplecov (= 0.22.0)
126
137
  webmock
127
138
  yard
128
139
 
129
140
  BUNDLED WITH
130
- 2.3.11
141
+ 2.3.26
data/README.jp.md CHANGED
@@ -12,8 +12,8 @@ MyApiClient は API リクエストクラスを作成するための汎用的な
12
12
 
13
13
  ## Supported Versions
14
14
 
15
- - Ruby 2.7, 3.0, 3.1
16
- - Rails 5.2, 6.0, 6.1, 7.0
15
+ - Ruby 2.7, 3.0, 3.1, 3.2
16
+ - Rails 6.0, 6.1, 7.0
17
17
 
18
18
  ## Installation
19
19
 
@@ -223,7 +223,6 @@ error_handling json: { '$.errors.code': 10..19 }, with: :my_error_handling
223
223
 
224
224
  `headers` には `Hash` の Key に レスポンスのヘッダーキーを指定して、 Value とマッチするかどうかでエラーハンドリングできます。Value には `String` `Regexp` が指定可能です。
225
225
 
226
-
227
226
  ```ruby
228
227
  error_handling headers: { 'www-authenticate': /invalid token/ }, with: :my_error_handling
229
228
  ```
@@ -237,7 +236,6 @@ www-authenticate: Bearer error="invalid_token", error_description="invalid token
237
236
  content-length: 104
238
237
  ```
239
238
 
240
-
241
239
  `with` にはインスタンスメソッド名を指定することで、エラーを検出した際、例外を発生させる前に任意のメソッドを実行させることができます。メソッドに渡される引数は `block` 定義の場合と同じく `params` と `logger` です。なお、 `block` と `with` は同時には利用できません。
242
240
 
243
241
  ```ruby
data/README.md CHANGED
@@ -1,4 +1,8 @@
1
- [![CircleCI](https://circleci.com/gh/ryz310/my_api_client.svg?style=svg)](https://circleci.com/gh/ryz310/my_api_client) [![Gem Version](https://badge.fury.io/rb/my_api_client.svg)](https://badge.fury.io/rb/my_api_client) [![Maintainability](https://api.codeclimate.com/v1/badges/861a2c8f168bbe995107/maintainability)](https://codeclimate.com/github/ryz310/my_api_client/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/861a2c8f168bbe995107/test_coverage)](https://codeclimate.com/github/ryz310/my_api_client/test_coverage) [![Dependabot Status](https://api.dependabot.com/badges/status?host=github&repo=ryz310/my_api_client)](https://dependabot.com)
1
+ [![CircleCI](https://circleci.com/gh/ryz310/my_api_client.svg?style=svg)](https://circleci.com/gh/ryz310/my_api_client)
2
+ [![Gem Version](https://badge.fury.io/rb/my_api_client.svg)](https://badge.fury.io/rb/my_api_client)
3
+ [![Maintainability](https://api.codeclimate.com/v1/badges/861a2c8f168bbe995107/maintainability)](https://codeclimate.com/github/ryz310/my_api_client/maintainability)
4
+ [![Test Coverage](https://api.codeclimate.com/v1/badges/861a2c8f168bbe995107/test_coverage)](https://codeclimate.com/github/ryz310/my_api_client/test_coverage)
5
+ ![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/ryz310/my_api_client)
2
6
 
3
7
  日本語ドキュメントは [こちら](README.jp.md)
4
8
 
@@ -12,8 +16,8 @@ It is supposed to be used in Ruby on Rails, but it is made to work in other envi
12
16
 
13
17
  ## Supported Versions
14
18
 
15
- - Ruby 2.7, 3.0, 3.1
16
- - Rails 5.2, 6.0, 6.1, 7.0
19
+ - Ruby 2.7, 3.0, 3.1, 3.2
20
+ - Rails 6.0, 6.1, 7.0
17
21
 
18
22
  ## Installation
19
23
 
@@ -3,6 +3,10 @@
3
3
  module MyApiClient
4
4
  # The helper module for source generators
5
5
  module GeneratorHelper
6
+ def self.included(base)
7
+ base.include(Rails::Generators::ResourceHelpers)
8
+ end
9
+
6
10
  def yeild_request_arguments
7
11
  requests.each do |request|
8
12
  http_method, pathname = request.split(':')
@@ -86,7 +86,7 @@ module MyApiClient
86
86
  when Proc
87
87
  stub_as_resource(options.call(*request))
88
88
  when Hash
89
- if options[:raise] # rubocop:disable Style/GuardClause
89
+ if options[:raise]
90
90
  raise process_raise_option(options[:raise], options[:response], options[:status_code])
91
91
  elsif options[:response]
92
92
  stub_as_resource(options[:response])
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MyApiClient
4
- VERSION = '0.24.0'
4
+ VERSION = '0.26.0'
5
5
  end
data/my_api/Gemfile CHANGED
@@ -2,12 +2,12 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'jets', '~> 3.1.5'
5
+ gem 'jets', '~> 4.0.1'
6
6
 
7
7
  gem 'dynomite'
8
8
 
9
9
  # See: https://github.com/boltops-tools/jets/issues/523
10
- gem 'nokogiri', '~> 1.13.8'
10
+ gem 'nokogiri', '~> 1.15.2'
11
11
 
12
12
  # development and test groups are not bundled as part of the deployment
13
13
  group :development, :test do