my_api_client 0.16.1 → 0.17.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +90 -15
  3. data/.rubocop.yml +4 -0
  4. data/.rubocop_challenge.yml +2 -0
  5. data/.rubocop_todo.yml +24 -1
  6. data/CHANGELOG.md +25 -0
  7. data/Gemfile.lock +14 -15
  8. data/README.jp.md +60 -0
  9. data/lib/generators/rspec/templates/api_client_spec.rb.erb +22 -15
  10. data/lib/my_api_client/base.rb +2 -2
  11. data/lib/my_api_client/errors.rb +1 -0
  12. data/lib/my_api_client/request/executor.rb +1 -1
  13. data/lib/my_api_client/version.rb +1 -1
  14. data/my_api/Gemfile.lock +24 -24
  15. data/rails_app/rails_5.2/.rspec +3 -0
  16. data/rails_app/rails_5.2/Gemfile +18 -0
  17. data/rails_app/rails_5.2/Gemfile.lock +171 -0
  18. data/rails_app/rails_5.2/README.md +24 -0
  19. data/rails_app/rails_5.2/Rakefile +8 -0
  20. data/rails_app/rails_5.2/app/controllers/application_controller.rb +4 -0
  21. data/rails_app/rails_5.2/app/jobs/application_job.rb +4 -0
  22. data/rails_app/rails_5.2/bin/bundle +5 -0
  23. data/rails_app/rails_5.2/bin/rails +6 -0
  24. data/rails_app/rails_5.2/bin/rake +6 -0
  25. data/rails_app/rails_5.2/bin/setup +27 -0
  26. data/rails_app/rails_5.2/bin/update +27 -0
  27. data/rails_app/rails_5.2/config.ru +7 -0
  28. data/rails_app/rails_5.2/config/application.rb +37 -0
  29. data/rails_app/rails_5.2/config/boot.rb +6 -0
  30. data/rails_app/rails_5.2/config/credentials.yml.enc +1 -0
  31. data/rails_app/rails_5.2/config/environment.rb +7 -0
  32. data/rails_app/rails_5.2/config/environments/development.rb +41 -0
  33. data/rails_app/rails_5.2/config/environments/production.rb +70 -0
  34. data/rails_app/rails_5.2/config/environments/test.rb +38 -0
  35. data/rails_app/rails_5.2/config/initializers/application_controller_renderer.rb +9 -0
  36. data/rails_app/rails_5.2/config/initializers/backtrace_silencers.rb +8 -0
  37. data/rails_app/rails_5.2/config/initializers/cors.rb +17 -0
  38. data/rails_app/rails_5.2/config/initializers/filter_parameter_logging.rb +6 -0
  39. data/rails_app/rails_5.2/config/initializers/inflections.rb +17 -0
  40. data/rails_app/rails_5.2/config/initializers/mime_types.rb +5 -0
  41. data/rails_app/rails_5.2/config/initializers/wrap_parameters.rb +11 -0
  42. data/rails_app/rails_5.2/config/locales/en.yml +33 -0
  43. data/rails_app/rails_5.2/config/routes.rb +5 -0
  44. data/rails_app/rails_5.2/config/spring.rb +8 -0
  45. data/rails_app/rails_5.2/public/robots.txt +1 -0
  46. data/rails_app/rails_5.2/spec/rails_helper.rb +14 -0
  47. data/rails_app/rails_5.2/spec/spec_helper.rb +13 -0
  48. data/rails_app/rails_6.0/.rspec +3 -0
  49. data/rails_app/rails_6.0/Gemfile +17 -0
  50. data/rails_app/rails_6.0/Gemfile.lock +186 -0
  51. data/rails_app/rails_6.0/README.md +24 -0
  52. data/rails_app/rails_6.0/Rakefile +8 -0
  53. data/rails_app/rails_6.0/app/controllers/application_controller.rb +4 -0
  54. data/rails_app/rails_6.0/app/jobs/application_job.rb +9 -0
  55. data/rails_app/rails_6.0/bin/rails +6 -0
  56. data/rails_app/rails_6.0/bin/rake +6 -0
  57. data/rails_app/rails_6.0/bin/setup +27 -0
  58. data/rails_app/rails_6.0/config.ru +7 -0
  59. data/rails_app/rails_6.0/config/application.rb +39 -0
  60. data/rails_app/rails_6.0/config/boot.rb +6 -0
  61. data/rails_app/rails_6.0/config/credentials.yml.enc +1 -0
  62. data/rails_app/rails_6.0/config/environment.rb +7 -0
  63. data/rails_app/rails_6.0/config/environments/development.rb +39 -0
  64. data/rails_app/rails_6.0/config/environments/production.rb +90 -0
  65. data/rails_app/rails_6.0/config/environments/test.rb +41 -0
  66. data/rails_app/rails_6.0/config/initializers/application_controller_renderer.rb +9 -0
  67. data/rails_app/rails_6.0/config/initializers/backtrace_silencers.rb +8 -0
  68. data/rails_app/rails_6.0/config/initializers/cors.rb +17 -0
  69. data/rails_app/rails_6.0/config/initializers/filter_parameter_logging.rb +6 -0
  70. data/rails_app/rails_6.0/config/initializers/inflections.rb +17 -0
  71. data/rails_app/rails_6.0/config/initializers/mime_types.rb +5 -0
  72. data/rails_app/rails_6.0/config/initializers/wrap_parameters.rb +11 -0
  73. data/rails_app/rails_6.0/config/locales/en.yml +33 -0
  74. data/rails_app/rails_6.0/config/routes.rb +5 -0
  75. data/rails_app/rails_6.0/config/spring.rb +8 -0
  76. data/rails_app/rails_6.0/public/robots.txt +1 -0
  77. data/rails_app/rails_6.0/spec/rails_helper.rb +14 -0
  78. data/rails_app/rails_6.0/spec/spec_helper.rb +13 -0
  79. metadata +66 -2
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+
8
+ Rails.application.configure do
9
+ # Settings specified here will take precedence over those in config/application.rb.
10
+
11
+ config.cache_classes = false
12
+ config.action_view.cache_template_loading = true
13
+
14
+ # Do not eager load code on boot. This avoids loading your whole application
15
+ # just for the purpose of running a single test. If you are using a tool that
16
+ # preloads Rails for running tests, you may have to set it to true.
17
+ config.eager_load = false
18
+
19
+ # Configure public file server for tests with Cache-Control for performance.
20
+ config.public_file_server.enabled = true
21
+ config.public_file_server.headers = {
22
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}",
23
+ }
24
+
25
+ # Show full error reports and disable caching.
26
+ config.consider_all_requests_local = true
27
+ config.action_controller.perform_caching = false
28
+ config.cache_store = :null_store
29
+
30
+ # Raise exceptions instead of rendering exception templates.
31
+ config.action_dispatch.show_exceptions = false
32
+
33
+ # Disable request forgery protection in test environment.
34
+ config.action_controller.allow_forgery_protection = false
35
+
36
+ # Print deprecation notices to the stderr.
37
+ config.active_support.deprecation = :stderr
38
+
39
+ # Raises error for missing translations.
40
+ # config.action_view.raise_on_missing_translations = true
41
+ end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # ActiveSupport::Reloader.to_prepare do
5
+ # ApplicationController.renderer.defaults.merge!(
6
+ # http_host: 'example.org',
7
+ # https: false
8
+ # )
9
+ # end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
5
+ # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
6
+
7
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
8
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Avoid CORS issues when API is called from the frontend app.
5
+ # Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
6
+
7
+ # Read more: https://github.com/cyu/rack-cors
8
+
9
+ # Rails.application.config.middleware.insert_before 0, Rack::Cors do
10
+ # allow do
11
+ # origins 'example.com'
12
+ #
13
+ # resource '*',
14
+ # headers: :any,
15
+ # methods: [:get, :post, :put, :patch, :delete, :options, :head]
16
+ # end
17
+ # end
@@ -0,0 +1,6 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # Configure sensitive parameters which will be filtered from the log file.
6
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new inflection rules using the following format. Inflections
5
+ # are locale specific, and you may define rules for as many different
6
+ # locales as you wish. All of these examples are active by default:
7
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
8
+ # inflect.plural /^(ox)$/i, '\1en'
9
+ # inflect.singular /^(ox)en/i, '\1'
10
+ # inflect.irregular 'person', 'people'
11
+ # inflect.uncountable %w( fish sheep )
12
+ # end
13
+
14
+ # These inflection rules are supported but not enabled by default:
15
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
16
+ # inflect.acronym 'RESTful'
17
+ # end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ # Be sure to restart your server when you modify this file.
3
+
4
+ # Add new mime types for use in respond_to blocks:
5
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Be sure to restart your server when you modify this file.
4
+
5
+ # This file contains settings for ActionController::ParamsWrapper which
6
+ # is enabled by default.
7
+
8
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
9
+ ActiveSupport.on_load(:action_controller) do
10
+ wrap_parameters format: [:json]
11
+ end
@@ -0,0 +1,33 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ hello: "Hello world"
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ Rails.application.routes.draw do
4
+ # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html
5
+ end
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ Spring.watch(
4
+ '.ruby-version',
5
+ '.rbenv-vars',
6
+ 'tmp/restart.txt',
7
+ 'tmp/caching-dev.txt'
8
+ )
@@ -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.16.1
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-08-26 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -333,6 +333,70 @@ files:
333
333
  - my_api/spec/fixtures/payloads/posts-show.json
334
334
  - my_api/spec/spec_helper.rb
335
335
  - my_api_client.gemspec
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
336
400
  homepage: https://github.com/ryz310/my_api_client
337
401
  licenses:
338
402
  - MIT