my_api_client 0.14.0 → 0.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (113) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +99 -53
  3. data/.dependabot/config.yml +19 -1
  4. data/.rubocop.yml +5 -1
  5. data/.rubocop_challenge.yml +5 -0
  6. data/.rubocop_todo.yml +53 -1
  7. data/CHANGELOG.md +192 -0
  8. data/Gemfile +0 -3
  9. data/Gemfile.lock +60 -56
  10. data/README.jp.md +159 -24
  11. data/bin/console +4 -0
  12. data/example/api_clients/application_api_client.rb +2 -10
  13. data/example/api_clients/my_pagination_api_client.rb +18 -0
  14. data/example/api_clients/my_rest_api_client.rb +9 -3
  15. data/lib/generators/rails/USAGE +1 -1
  16. data/lib/generators/rails/api_client_generator.rb +6 -0
  17. data/lib/generators/rails/templates/api_client.rb.erb +1 -1
  18. data/lib/generators/rails/templates/application_api_client.rb.erb +0 -11
  19. data/lib/generators/rspec/USAGE +1 -1
  20. data/lib/generators/rspec/api_client_generator.rb +6 -0
  21. data/lib/generators/rspec/templates/api_client_spec.rb.erb +23 -16
  22. data/lib/my_api_client.rb +7 -0
  23. data/lib/my_api_client/base.rb +4 -2
  24. data/lib/my_api_client/default_error_handlers.rb +64 -0
  25. data/lib/my_api_client/error_handling.rb +6 -6
  26. data/lib/my_api_client/error_handling/generator.rb +23 -7
  27. data/lib/my_api_client/errors.rb +1 -53
  28. data/lib/my_api_client/errors/api_limit_error.rb +6 -0
  29. data/lib/my_api_client/errors/client_error.rb +93 -0
  30. data/lib/my_api_client/errors/network_error.rb +43 -0
  31. data/lib/my_api_client/errors/server_error.rb +42 -0
  32. data/lib/my_api_client/params/params.rb +1 -3
  33. data/lib/my_api_client/request.rb +29 -34
  34. data/lib/my_api_client/request/basic.rb +32 -0
  35. data/lib/my_api_client/request/executor.rb +1 -1
  36. data/lib/my_api_client/request/pagination.rb +39 -0
  37. data/lib/my_api_client/version.rb +1 -1
  38. data/my_api/.ruby-version +1 -1
  39. data/my_api/Gemfile.lock +86 -86
  40. data/my_api/README.md +6 -0
  41. data/my_api/app/controllers/pagination_controller.rb +58 -0
  42. data/my_api/config/routes.rb +1 -0
  43. data/my_api/spec/controllers/pagination_controller_spec.rb +73 -0
  44. data/my_api/spec/controllers/rest_controller_spec.rb +23 -5
  45. data/my_api/spec/spec_helper.rb +5 -0
  46. data/my_api_client.gemspec +2 -2
  47. data/rails_app/rails_5.2/.rspec +3 -0
  48. data/rails_app/rails_5.2/Gemfile +17 -0
  49. data/rails_app/rails_5.2/Gemfile.lock +171 -0
  50. data/rails_app/rails_5.2/README.md +24 -0
  51. data/rails_app/rails_5.2/Rakefile +8 -0
  52. data/rails_app/rails_5.2/app/controllers/application_controller.rb +4 -0
  53. data/rails_app/rails_5.2/app/jobs/application_job.rb +4 -0
  54. data/rails_app/rails_5.2/bin/bundle +5 -0
  55. data/rails_app/rails_5.2/bin/rails +6 -0
  56. data/rails_app/rails_5.2/bin/rake +6 -0
  57. data/rails_app/rails_5.2/bin/setup +27 -0
  58. data/rails_app/rails_5.2/bin/update +27 -0
  59. data/rails_app/rails_5.2/config.ru +7 -0
  60. data/rails_app/rails_5.2/config/application.rb +37 -0
  61. data/rails_app/rails_5.2/config/boot.rb +6 -0
  62. data/rails_app/rails_5.2/config/credentials.yml.enc +1 -0
  63. data/rails_app/rails_5.2/config/environment.rb +7 -0
  64. data/rails_app/rails_5.2/config/environments/development.rb +41 -0
  65. data/rails_app/rails_5.2/config/environments/production.rb +70 -0
  66. data/rails_app/rails_5.2/config/environments/test.rb +38 -0
  67. data/rails_app/rails_5.2/config/initializers/application_controller_renderer.rb +9 -0
  68. data/rails_app/rails_5.2/config/initializers/backtrace_silencers.rb +8 -0
  69. data/rails_app/rails_5.2/config/initializers/cors.rb +17 -0
  70. data/rails_app/rails_5.2/config/initializers/filter_parameter_logging.rb +6 -0
  71. data/rails_app/rails_5.2/config/initializers/inflections.rb +17 -0
  72. data/rails_app/rails_5.2/config/initializers/mime_types.rb +5 -0
  73. data/rails_app/rails_5.2/config/initializers/wrap_parameters.rb +11 -0
  74. data/rails_app/rails_5.2/config/locales/en.yml +33 -0
  75. data/rails_app/rails_5.2/config/routes.rb +5 -0
  76. data/rails_app/rails_5.2/config/spring.rb +8 -0
  77. data/rails_app/rails_5.2/public/robots.txt +1 -0
  78. data/rails_app/rails_5.2/spec/rails_helper.rb +14 -0
  79. data/rails_app/rails_5.2/spec/spec_helper.rb +13 -0
  80. data/rails_app/rails_6.0/.rspec +3 -0
  81. data/rails_app/rails_6.0/Gemfile +17 -0
  82. data/rails_app/rails_6.0/Gemfile.lock +186 -0
  83. data/rails_app/rails_6.0/README.md +24 -0
  84. data/rails_app/rails_6.0/Rakefile +8 -0
  85. data/rails_app/rails_6.0/app/controllers/application_controller.rb +4 -0
  86. data/rails_app/rails_6.0/app/jobs/application_job.rb +9 -0
  87. data/rails_app/rails_6.0/bin/rails +6 -0
  88. data/rails_app/rails_6.0/bin/rake +6 -0
  89. data/rails_app/rails_6.0/bin/setup +27 -0
  90. data/rails_app/rails_6.0/config.ru +7 -0
  91. data/rails_app/rails_6.0/config/application.rb +39 -0
  92. data/rails_app/rails_6.0/config/boot.rb +6 -0
  93. data/rails_app/rails_6.0/config/credentials.yml.enc +1 -0
  94. data/rails_app/rails_6.0/config/environment.rb +7 -0
  95. data/rails_app/rails_6.0/config/environments/development.rb +39 -0
  96. data/rails_app/rails_6.0/config/environments/production.rb +90 -0
  97. data/rails_app/rails_6.0/config/environments/test.rb +41 -0
  98. data/rails_app/rails_6.0/config/initializers/application_controller_renderer.rb +9 -0
  99. data/rails_app/rails_6.0/config/initializers/backtrace_silencers.rb +8 -0
  100. data/rails_app/rails_6.0/config/initializers/cors.rb +17 -0
  101. data/rails_app/rails_6.0/config/initializers/filter_parameter_logging.rb +6 -0
  102. data/rails_app/rails_6.0/config/initializers/inflections.rb +17 -0
  103. data/rails_app/rails_6.0/config/initializers/mime_types.rb +5 -0
  104. data/rails_app/rails_6.0/config/initializers/wrap_parameters.rb +11 -0
  105. data/rails_app/rails_6.0/config/locales/en.yml +33 -0
  106. data/rails_app/rails_6.0/config/routes.rb +5 -0
  107. data/rails_app/rails_6.0/config/spring.rb +8 -0
  108. data/rails_app/rails_6.0/public/robots.txt +1 -0
  109. data/rails_app/rails_6.0/spec/rails_helper.rb +14 -0
  110. data/rails_app/rails_6.0/spec/spec_helper.rb +13 -0
  111. metadata +81 -8
  112. data/gemfiles/rails_4.2.gemfile +0 -15
  113. data/renovate.json +0 -21
@@ -1,15 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- # This file was generated by Appraisal
4
-
5
- source 'https://rubygems.org'
6
-
7
- git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
8
-
9
- gem 'activesupport', '~> 4.2.0'
10
-
11
- group :integrations, optional: true do
12
- gem 'bugsnag', '>= 6.11.0'
13
- end
14
-
15
- gemspec
@@ -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
- }