my_api_client 0.14.0.pre → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +179 -38
- data/.dependabot/config.yml +19 -1
- data/.envrc.skeleton +1 -0
- data/.rubocop.yml +9 -1
- data/.rubocop_challenge.yml +5 -0
- data/.rubocop_todo.yml +29 -1
- data/CHANGELOG.md +177 -1
- data/Gemfile.lock +47 -45
- data/README.jp.md +156 -21
- data/bin/console +4 -0
- data/example/api_clients/application_api_client.rb +13 -0
- data/example/api_clients/my_error_api_client.rb +34 -0
- data/example/api_clients/my_errors.rb +27 -0
- data/example/api_clients/my_pagination_api_client.rb +18 -0
- data/example/api_clients/my_rest_api_client.rb +48 -0
- data/example/api_clients/my_status_api_client.rb +22 -0
- data/lib/generators/rails/templates/application_api_client.rb.erb +0 -11
- data/lib/generators/rspec/templates/api_client_spec.rb.erb +22 -15
- data/lib/my_api_client.rb +7 -0
- data/lib/my_api_client/base.rb +4 -2
- data/lib/my_api_client/default_error_handlers.rb +64 -0
- data/lib/my_api_client/error_handling.rb +6 -6
- data/lib/my_api_client/error_handling/generator.rb +23 -7
- data/lib/my_api_client/errors.rb +1 -53
- data/lib/my_api_client/errors/api_limit_error.rb +6 -0
- data/lib/my_api_client/errors/client_error.rb +93 -0
- data/lib/my_api_client/errors/network_error.rb +43 -0
- data/lib/my_api_client/errors/server_error.rb +42 -0
- data/lib/my_api_client/request.rb +29 -34
- data/lib/my_api_client/request/basic.rb +32 -0
- data/lib/my_api_client/request/executor.rb +1 -1
- data/lib/my_api_client/request/pagination.rb +39 -0
- data/lib/my_api_client/rspec/matchers/request_to.rb +3 -4
- data/lib/my_api_client/version.rb +1 -1
- data/my_api/.envrc.skeleton +3 -0
- data/my_api/.gitignore +14 -0
- data/my_api/.jetskeep +1 -0
- data/my_api/.rspec +3 -0
- data/my_api/.ruby-version +1 -0
- data/my_api/Gemfile +23 -0
- data/my_api/Gemfile.lock +243 -0
- data/my_api/Procfile +7 -0
- data/my_api/README.md +54 -0
- data/my_api/Rakefile +4 -0
- data/my_api/app/controllers/application_controller.rb +5 -0
- data/my_api/app/controllers/error_controller.rb +21 -0
- data/my_api/app/controllers/pagination_controller.rb +58 -0
- data/my_api/app/controllers/rest_controller.rb +60 -0
- data/my_api/app/controllers/status_controller.rb +11 -0
- data/my_api/app/helpers/application_helper.rb +5 -0
- data/my_api/app/jobs/application_job.rb +7 -0
- data/my_api/app/models/application_item.rb +5 -0
- data/my_api/config.ru +7 -0
- data/my_api/config/application.rb +73 -0
- data/my_api/config/dynamodb.yml +22 -0
- data/my_api/config/environments/development.rb +9 -0
- data/my_api/config/environments/production.rb +11 -0
- data/my_api/config/environments/test.rb +9 -0
- data/my_api/config/routes.rb +17 -0
- data/my_api/db/.gitkeep +0 -0
- data/my_api/public/404.html +67 -0
- data/my_api/public/422.html +67 -0
- data/my_api/public/500.html +66 -0
- data/my_api/public/favicon.ico +0 -0
- data/my_api/public/index.html +91 -0
- data/my_api/spec/controllers/error_controller_spec.rb +43 -0
- data/my_api/spec/controllers/pagination_controller_spec.rb +73 -0
- data/my_api/spec/controllers/rest_controller_spec.rb +99 -0
- data/my_api/spec/controllers/status_controller_spec.rb +47 -0
- data/my_api/spec/fixtures/payloads/posts-index.json +51 -0
- data/my_api/spec/fixtures/payloads/posts-show.json +53 -0
- data/my_api/spec/spec_helper.rb +31 -0
- data/rails_app/rails_5.2/.rspec +3 -0
- data/rails_app/rails_5.2/Gemfile +18 -0
- data/rails_app/rails_5.2/Gemfile.lock +171 -0
- data/rails_app/rails_5.2/README.md +24 -0
- data/rails_app/rails_5.2/Rakefile +8 -0
- data/rails_app/rails_5.2/app/controllers/application_controller.rb +4 -0
- data/rails_app/rails_5.2/app/jobs/application_job.rb +4 -0
- data/rails_app/rails_5.2/bin/bundle +5 -0
- data/rails_app/rails_5.2/bin/rails +6 -0
- data/rails_app/rails_5.2/bin/rake +6 -0
- data/rails_app/rails_5.2/bin/setup +27 -0
- data/rails_app/rails_5.2/bin/update +27 -0
- data/rails_app/rails_5.2/config.ru +7 -0
- data/rails_app/rails_5.2/config/application.rb +37 -0
- data/rails_app/rails_5.2/config/boot.rb +6 -0
- data/rails_app/rails_5.2/config/credentials.yml.enc +1 -0
- data/rails_app/rails_5.2/config/environment.rb +7 -0
- data/rails_app/rails_5.2/config/environments/development.rb +41 -0
- data/rails_app/rails_5.2/config/environments/production.rb +70 -0
- data/rails_app/rails_5.2/config/environments/test.rb +38 -0
- data/rails_app/rails_5.2/config/initializers/application_controller_renderer.rb +9 -0
- data/rails_app/rails_5.2/config/initializers/backtrace_silencers.rb +8 -0
- data/rails_app/rails_5.2/config/initializers/cors.rb +17 -0
- data/rails_app/rails_5.2/config/initializers/filter_parameter_logging.rb +6 -0
- data/rails_app/rails_5.2/config/initializers/inflections.rb +17 -0
- data/rails_app/rails_5.2/config/initializers/mime_types.rb +5 -0
- data/rails_app/rails_5.2/config/initializers/wrap_parameters.rb +11 -0
- data/rails_app/rails_5.2/config/locales/en.yml +33 -0
- data/rails_app/rails_5.2/config/routes.rb +5 -0
- data/rails_app/rails_5.2/config/spring.rb +8 -0
- data/rails_app/rails_5.2/public/robots.txt +1 -0
- data/rails_app/rails_5.2/spec/rails_helper.rb +14 -0
- data/rails_app/rails_5.2/spec/spec_helper.rb +13 -0
- data/rails_app/rails_6.0/.rspec +3 -0
- data/rails_app/rails_6.0/Gemfile +17 -0
- data/rails_app/rails_6.0/Gemfile.lock +186 -0
- data/rails_app/rails_6.0/README.md +24 -0
- data/rails_app/rails_6.0/Rakefile +8 -0
- data/rails_app/rails_6.0/app/controllers/application_controller.rb +4 -0
- data/rails_app/rails_6.0/app/jobs/application_job.rb +9 -0
- data/rails_app/rails_6.0/bin/rails +6 -0
- data/rails_app/rails_6.0/bin/rake +6 -0
- data/rails_app/rails_6.0/bin/setup +27 -0
- data/rails_app/rails_6.0/config.ru +7 -0
- data/rails_app/rails_6.0/config/application.rb +39 -0
- data/rails_app/rails_6.0/config/boot.rb +6 -0
- data/rails_app/rails_6.0/config/credentials.yml.enc +1 -0
- data/rails_app/rails_6.0/config/environment.rb +7 -0
- data/rails_app/rails_6.0/config/environments/development.rb +39 -0
- data/rails_app/rails_6.0/config/environments/production.rb +90 -0
- data/rails_app/rails_6.0/config/environments/test.rb +41 -0
- data/rails_app/rails_6.0/config/initializers/application_controller_renderer.rb +9 -0
- data/rails_app/rails_6.0/config/initializers/backtrace_silencers.rb +8 -0
- data/rails_app/rails_6.0/config/initializers/cors.rb +17 -0
- data/rails_app/rails_6.0/config/initializers/filter_parameter_logging.rb +6 -0
- data/rails_app/rails_6.0/config/initializers/inflections.rb +17 -0
- data/rails_app/rails_6.0/config/initializers/mime_types.rb +5 -0
- data/rails_app/rails_6.0/config/initializers/wrap_parameters.rb +11 -0
- data/rails_app/rails_6.0/config/locales/en.yml +33 -0
- data/rails_app/rails_6.0/config/routes.rb +5 -0
- data/rails_app/rails_6.0/config/spring.rb +8 -0
- data/rails_app/rails_6.0/public/robots.txt +1 -0
- data/rails_app/rails_6.0/spec/rails_helper.rb +14 -0
- data/rails_app/rails_6.0/spec/spec_helper.rb +13 -0
- metadata +120 -5
- data/renovate.json +0 -21
@@ -0,0 +1 @@
|
|
1
|
+
# See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
ENV['RAILS_ENV'] ||= 'test'
|
5
|
+
require File.expand_path('../config/environment', __dir__)
|
6
|
+
abort('The Rails environment is running in production mode!') if Rails.env.production?
|
7
|
+
require 'rspec/rails'
|
8
|
+
require 'my_api_client/rspec'
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.use_active_record = false
|
12
|
+
config.infer_spec_type_from_file_location!
|
13
|
+
config.filter_rails_from_backtrace!
|
14
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.configure do |config|
|
4
|
+
config.expect_with :rspec do |expectations|
|
5
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
6
|
+
end
|
7
|
+
|
8
|
+
config.mock_with :rspec do |mocks|
|
9
|
+
mocks.verify_partial_doubles = true
|
10
|
+
end
|
11
|
+
|
12
|
+
config.shared_context_metadata_behavior = :apply_to_host_groups
|
13
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: my_api_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.17.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ryz310
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -234,6 +234,7 @@ files:
|
|
234
234
|
- ".gitignore"
|
235
235
|
- ".rspec"
|
236
236
|
- ".rubocop.yml"
|
237
|
+
- ".rubocop_challenge.yml"
|
237
238
|
- ".rubocop_todo.yml"
|
238
239
|
- CHANGELOG.md
|
239
240
|
- CODE_OF_CONDUCT.md
|
@@ -245,6 +246,12 @@ files:
|
|
245
246
|
- Rakefile
|
246
247
|
- bin/console
|
247
248
|
- bin/setup
|
249
|
+
- example/api_clients/application_api_client.rb
|
250
|
+
- example/api_clients/my_error_api_client.rb
|
251
|
+
- example/api_clients/my_errors.rb
|
252
|
+
- example/api_clients/my_pagination_api_client.rb
|
253
|
+
- example/api_clients/my_rest_api_client.rb
|
254
|
+
- example/api_clients/my_status_api_client.rb
|
248
255
|
- gemfiles/rails_4.2.gemfile
|
249
256
|
- gemfiles/rails_5.0.gemfile
|
250
257
|
- gemfiles/rails_5.1.gemfile
|
@@ -261,17 +268,24 @@ files:
|
|
261
268
|
- lib/my_api_client.rb
|
262
269
|
- lib/my_api_client/base.rb
|
263
270
|
- lib/my_api_client/config.rb
|
271
|
+
- lib/my_api_client/default_error_handlers.rb
|
264
272
|
- lib/my_api_client/error_handling.rb
|
265
273
|
- lib/my_api_client/error_handling/generator.rb
|
266
274
|
- lib/my_api_client/error_handling/retry_option_processor.rb
|
267
275
|
- lib/my_api_client/errors.rb
|
276
|
+
- lib/my_api_client/errors/api_limit_error.rb
|
277
|
+
- lib/my_api_client/errors/client_error.rb
|
278
|
+
- lib/my_api_client/errors/network_error.rb
|
279
|
+
- lib/my_api_client/errors/server_error.rb
|
268
280
|
- lib/my_api_client/exceptions.rb
|
269
281
|
- lib/my_api_client/integrations/bugsnag.rb
|
270
282
|
- lib/my_api_client/params/params.rb
|
271
283
|
- lib/my_api_client/params/request.rb
|
272
284
|
- lib/my_api_client/request.rb
|
285
|
+
- lib/my_api_client/request/basic.rb
|
273
286
|
- lib/my_api_client/request/executor.rb
|
274
287
|
- lib/my_api_client/request/logger.rb
|
288
|
+
- lib/my_api_client/request/pagination.rb
|
275
289
|
- lib/my_api_client/rspec.rb
|
276
290
|
- lib/my_api_client/rspec/matcher_helper.rb
|
277
291
|
- lib/my_api_client/rspec/matchers/be_handled_as_an_error.rb
|
@@ -280,8 +294,109 @@ files:
|
|
280
294
|
- lib/my_api_client/service_abstract.rb
|
281
295
|
- lib/my_api_client/sleeper.rb
|
282
296
|
- lib/my_api_client/version.rb
|
297
|
+
- my_api/.envrc.skeleton
|
298
|
+
- my_api/.gitignore
|
299
|
+
- my_api/.jetskeep
|
300
|
+
- my_api/.rspec
|
301
|
+
- my_api/.ruby-version
|
302
|
+
- my_api/Gemfile
|
303
|
+
- my_api/Gemfile.lock
|
304
|
+
- my_api/Procfile
|
305
|
+
- my_api/README.md
|
306
|
+
- my_api/Rakefile
|
307
|
+
- my_api/app/controllers/application_controller.rb
|
308
|
+
- my_api/app/controllers/error_controller.rb
|
309
|
+
- my_api/app/controllers/pagination_controller.rb
|
310
|
+
- my_api/app/controllers/rest_controller.rb
|
311
|
+
- my_api/app/controllers/status_controller.rb
|
312
|
+
- my_api/app/helpers/application_helper.rb
|
313
|
+
- my_api/app/jobs/application_job.rb
|
314
|
+
- my_api/app/models/application_item.rb
|
315
|
+
- my_api/config.ru
|
316
|
+
- my_api/config/application.rb
|
317
|
+
- my_api/config/dynamodb.yml
|
318
|
+
- my_api/config/environments/development.rb
|
319
|
+
- my_api/config/environments/production.rb
|
320
|
+
- my_api/config/environments/test.rb
|
321
|
+
- my_api/config/routes.rb
|
322
|
+
- my_api/db/.gitkeep
|
323
|
+
- my_api/public/404.html
|
324
|
+
- my_api/public/422.html
|
325
|
+
- my_api/public/500.html
|
326
|
+
- my_api/public/favicon.ico
|
327
|
+
- my_api/public/index.html
|
328
|
+
- my_api/spec/controllers/error_controller_spec.rb
|
329
|
+
- my_api/spec/controllers/pagination_controller_spec.rb
|
330
|
+
- my_api/spec/controllers/rest_controller_spec.rb
|
331
|
+
- my_api/spec/controllers/status_controller_spec.rb
|
332
|
+
- my_api/spec/fixtures/payloads/posts-index.json
|
333
|
+
- my_api/spec/fixtures/payloads/posts-show.json
|
334
|
+
- my_api/spec/spec_helper.rb
|
283
335
|
- my_api_client.gemspec
|
284
|
-
-
|
336
|
+
- rails_app/rails_5.2/.rspec
|
337
|
+
- rails_app/rails_5.2/Gemfile
|
338
|
+
- rails_app/rails_5.2/Gemfile.lock
|
339
|
+
- rails_app/rails_5.2/README.md
|
340
|
+
- rails_app/rails_5.2/Rakefile
|
341
|
+
- rails_app/rails_5.2/app/controllers/application_controller.rb
|
342
|
+
- rails_app/rails_5.2/app/jobs/application_job.rb
|
343
|
+
- rails_app/rails_5.2/bin/bundle
|
344
|
+
- rails_app/rails_5.2/bin/rails
|
345
|
+
- rails_app/rails_5.2/bin/rake
|
346
|
+
- rails_app/rails_5.2/bin/setup
|
347
|
+
- rails_app/rails_5.2/bin/update
|
348
|
+
- rails_app/rails_5.2/config.ru
|
349
|
+
- rails_app/rails_5.2/config/application.rb
|
350
|
+
- rails_app/rails_5.2/config/boot.rb
|
351
|
+
- rails_app/rails_5.2/config/credentials.yml.enc
|
352
|
+
- rails_app/rails_5.2/config/environment.rb
|
353
|
+
- rails_app/rails_5.2/config/environments/development.rb
|
354
|
+
- rails_app/rails_5.2/config/environments/production.rb
|
355
|
+
- rails_app/rails_5.2/config/environments/test.rb
|
356
|
+
- rails_app/rails_5.2/config/initializers/application_controller_renderer.rb
|
357
|
+
- rails_app/rails_5.2/config/initializers/backtrace_silencers.rb
|
358
|
+
- rails_app/rails_5.2/config/initializers/cors.rb
|
359
|
+
- rails_app/rails_5.2/config/initializers/filter_parameter_logging.rb
|
360
|
+
- rails_app/rails_5.2/config/initializers/inflections.rb
|
361
|
+
- rails_app/rails_5.2/config/initializers/mime_types.rb
|
362
|
+
- rails_app/rails_5.2/config/initializers/wrap_parameters.rb
|
363
|
+
- rails_app/rails_5.2/config/locales/en.yml
|
364
|
+
- rails_app/rails_5.2/config/routes.rb
|
365
|
+
- rails_app/rails_5.2/config/spring.rb
|
366
|
+
- rails_app/rails_5.2/public/robots.txt
|
367
|
+
- rails_app/rails_5.2/spec/rails_helper.rb
|
368
|
+
- rails_app/rails_5.2/spec/spec_helper.rb
|
369
|
+
- rails_app/rails_6.0/.rspec
|
370
|
+
- rails_app/rails_6.0/Gemfile
|
371
|
+
- rails_app/rails_6.0/Gemfile.lock
|
372
|
+
- rails_app/rails_6.0/README.md
|
373
|
+
- rails_app/rails_6.0/Rakefile
|
374
|
+
- rails_app/rails_6.0/app/controllers/application_controller.rb
|
375
|
+
- rails_app/rails_6.0/app/jobs/application_job.rb
|
376
|
+
- rails_app/rails_6.0/bin/rails
|
377
|
+
- rails_app/rails_6.0/bin/rake
|
378
|
+
- rails_app/rails_6.0/bin/setup
|
379
|
+
- rails_app/rails_6.0/config.ru
|
380
|
+
- rails_app/rails_6.0/config/application.rb
|
381
|
+
- rails_app/rails_6.0/config/boot.rb
|
382
|
+
- rails_app/rails_6.0/config/credentials.yml.enc
|
383
|
+
- rails_app/rails_6.0/config/environment.rb
|
384
|
+
- rails_app/rails_6.0/config/environments/development.rb
|
385
|
+
- rails_app/rails_6.0/config/environments/production.rb
|
386
|
+
- rails_app/rails_6.0/config/environments/test.rb
|
387
|
+
- rails_app/rails_6.0/config/initializers/application_controller_renderer.rb
|
388
|
+
- rails_app/rails_6.0/config/initializers/backtrace_silencers.rb
|
389
|
+
- rails_app/rails_6.0/config/initializers/cors.rb
|
390
|
+
- rails_app/rails_6.0/config/initializers/filter_parameter_logging.rb
|
391
|
+
- rails_app/rails_6.0/config/initializers/inflections.rb
|
392
|
+
- rails_app/rails_6.0/config/initializers/mime_types.rb
|
393
|
+
- rails_app/rails_6.0/config/initializers/wrap_parameters.rb
|
394
|
+
- rails_app/rails_6.0/config/locales/en.yml
|
395
|
+
- rails_app/rails_6.0/config/routes.rb
|
396
|
+
- rails_app/rails_6.0/config/spring.rb
|
397
|
+
- rails_app/rails_6.0/public/robots.txt
|
398
|
+
- rails_app/rails_6.0/spec/rails_helper.rb
|
399
|
+
- rails_app/rails_6.0/spec/spec_helper.rb
|
285
400
|
homepage: https://github.com/ryz310/my_api_client
|
286
401
|
licenses:
|
287
402
|
- MIT
|
@@ -297,9 +412,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
297
412
|
version: 2.4.0
|
298
413
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
299
414
|
requirements:
|
300
|
-
- - "
|
415
|
+
- - ">="
|
301
416
|
- !ruby/object:Gem::Version
|
302
|
-
version:
|
417
|
+
version: '0'
|
303
418
|
requirements: []
|
304
419
|
rubygems_version: 3.1.2
|
305
420
|
signing_key:
|
data/renovate.json
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"extends": [
|
3
|
-
"config:base"
|
4
|
-
],
|
5
|
-
"packageRules": [
|
6
|
-
{
|
7
|
-
"updateTypes": ["major"],
|
8
|
-
"labels": ["renovate", "major"]
|
9
|
-
},
|
10
|
-
{
|
11
|
-
"updateTypes": ["minor"],
|
12
|
-
"labels": ["renovate", "minor", "auto merge"],
|
13
|
-
"automerge": true
|
14
|
-
},
|
15
|
-
{
|
16
|
-
"updateTypes": ["patch"],
|
17
|
-
"labels": ["renovate", "patch", "auto merge"],
|
18
|
-
"automerge": true
|
19
|
-
}
|
20
|
-
]
|
21
|
-
}
|