my_api_client 0.14.0 → 0.18.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 +99 -53
- data/.dependabot/config.yml +19 -1
- data/.rubocop.yml +5 -1
- data/.rubocop_challenge.yml +5 -0
- data/.rubocop_todo.yml +53 -1
- data/CHANGELOG.md +192 -0
- data/Gemfile +0 -3
- data/Gemfile.lock +60 -56
- data/README.jp.md +159 -24
- data/bin/console +4 -0
- data/example/api_clients/application_api_client.rb +2 -10
- data/example/api_clients/my_pagination_api_client.rb +18 -0
- data/example/api_clients/my_rest_api_client.rb +9 -3
- data/lib/generators/rails/USAGE +1 -1
- data/lib/generators/rails/api_client_generator.rb +6 -0
- data/lib/generators/rails/templates/api_client.rb.erb +1 -1
- data/lib/generators/rails/templates/application_api_client.rb.erb +0 -11
- data/lib/generators/rspec/USAGE +1 -1
- data/lib/generators/rspec/api_client_generator.rb +6 -0
- data/lib/generators/rspec/templates/api_client_spec.rb.erb +23 -16
- 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/params/params.rb +1 -3
- 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/version.rb +1 -1
- data/my_api/.ruby-version +1 -1
- data/my_api/Gemfile.lock +86 -86
- data/my_api/README.md +6 -0
- data/my_api/app/controllers/pagination_controller.rb +58 -0
- data/my_api/config/routes.rb +1 -0
- data/my_api/spec/controllers/pagination_controller_spec.rb +73 -0
- data/my_api/spec/controllers/rest_controller_spec.rb +23 -5
- data/my_api/spec/spec_helper.rb +5 -0
- data/my_api_client.gemspec +2 -2
- data/rails_app/rails_5.2/.rspec +3 -0
- data/rails_app/rails_5.2/Gemfile +17 -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 +81 -8
- data/gemfiles/rails_4.2.gemfile +0 -15
- data/renovate.json +0 -21
@@ -0,0 +1 @@
|
|
1
|
+
# See http://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
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
|
5
|
+
|
6
|
+
gem 'bootsnap', '>= 1.4.2', require: false
|
7
|
+
gem 'my_api_client', path: '../..'
|
8
|
+
gem 'rails', '~> 6.0.3'
|
9
|
+
|
10
|
+
group :development, :test do
|
11
|
+
gem 'byebug', platforms: %i[mri mingw x64_mingw]
|
12
|
+
gem 'rspec-rails'
|
13
|
+
end
|
14
|
+
|
15
|
+
group :development do
|
16
|
+
gem 'spring'
|
17
|
+
end
|
@@ -0,0 +1,186 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
my_api_client (0.17.0)
|
5
|
+
activesupport (>= 5.0.0)
|
6
|
+
faraday (>= 0.17.1)
|
7
|
+
jsonpath
|
8
|
+
sawyer (>= 0.8.2)
|
9
|
+
|
10
|
+
GEM
|
11
|
+
remote: https://rubygems.org/
|
12
|
+
specs:
|
13
|
+
actioncable (6.0.3.3)
|
14
|
+
actionpack (= 6.0.3.3)
|
15
|
+
nio4r (~> 2.0)
|
16
|
+
websocket-driver (>= 0.6.1)
|
17
|
+
actionmailbox (6.0.3.3)
|
18
|
+
actionpack (= 6.0.3.3)
|
19
|
+
activejob (= 6.0.3.3)
|
20
|
+
activerecord (= 6.0.3.3)
|
21
|
+
activestorage (= 6.0.3.3)
|
22
|
+
activesupport (= 6.0.3.3)
|
23
|
+
mail (>= 2.7.1)
|
24
|
+
actionmailer (6.0.3.3)
|
25
|
+
actionpack (= 6.0.3.3)
|
26
|
+
actionview (= 6.0.3.3)
|
27
|
+
activejob (= 6.0.3.3)
|
28
|
+
mail (~> 2.5, >= 2.5.4)
|
29
|
+
rails-dom-testing (~> 2.0)
|
30
|
+
actionpack (6.0.3.3)
|
31
|
+
actionview (= 6.0.3.3)
|
32
|
+
activesupport (= 6.0.3.3)
|
33
|
+
rack (~> 2.0, >= 2.0.8)
|
34
|
+
rack-test (>= 0.6.3)
|
35
|
+
rails-dom-testing (~> 2.0)
|
36
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
37
|
+
actiontext (6.0.3.3)
|
38
|
+
actionpack (= 6.0.3.3)
|
39
|
+
activerecord (= 6.0.3.3)
|
40
|
+
activestorage (= 6.0.3.3)
|
41
|
+
activesupport (= 6.0.3.3)
|
42
|
+
nokogiri (>= 1.8.5)
|
43
|
+
actionview (6.0.3.3)
|
44
|
+
activesupport (= 6.0.3.3)
|
45
|
+
builder (~> 3.1)
|
46
|
+
erubi (~> 1.4)
|
47
|
+
rails-dom-testing (~> 2.0)
|
48
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
49
|
+
activejob (6.0.3.3)
|
50
|
+
activesupport (= 6.0.3.3)
|
51
|
+
globalid (>= 0.3.6)
|
52
|
+
activemodel (6.0.3.3)
|
53
|
+
activesupport (= 6.0.3.3)
|
54
|
+
activerecord (6.0.3.3)
|
55
|
+
activemodel (= 6.0.3.3)
|
56
|
+
activesupport (= 6.0.3.3)
|
57
|
+
activestorage (6.0.3.3)
|
58
|
+
actionpack (= 6.0.3.3)
|
59
|
+
activejob (= 6.0.3.3)
|
60
|
+
activerecord (= 6.0.3.3)
|
61
|
+
marcel (~> 0.3.1)
|
62
|
+
activesupport (6.0.3.3)
|
63
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
64
|
+
i18n (>= 0.7, < 2)
|
65
|
+
minitest (~> 5.1)
|
66
|
+
tzinfo (~> 1.1)
|
67
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
68
|
+
addressable (2.7.0)
|
69
|
+
public_suffix (>= 2.0.2, < 5.0)
|
70
|
+
bootsnap (1.4.8)
|
71
|
+
msgpack (~> 1.0)
|
72
|
+
builder (3.2.4)
|
73
|
+
byebug (11.1.3)
|
74
|
+
concurrent-ruby (1.1.7)
|
75
|
+
crass (1.0.6)
|
76
|
+
diff-lcs (1.4.4)
|
77
|
+
erubi (1.9.0)
|
78
|
+
faraday (1.0.1)
|
79
|
+
multipart-post (>= 1.2, < 3)
|
80
|
+
globalid (0.4.2)
|
81
|
+
activesupport (>= 4.2.0)
|
82
|
+
i18n (1.8.5)
|
83
|
+
concurrent-ruby (~> 1.0)
|
84
|
+
jsonpath (1.0.5)
|
85
|
+
multi_json
|
86
|
+
to_regexp (~> 0.2.1)
|
87
|
+
loofah (2.7.0)
|
88
|
+
crass (~> 1.0.2)
|
89
|
+
nokogiri (>= 1.5.9)
|
90
|
+
mail (2.7.1)
|
91
|
+
mini_mime (>= 0.1.1)
|
92
|
+
marcel (0.3.3)
|
93
|
+
mimemagic (~> 0.3.2)
|
94
|
+
method_source (1.0.0)
|
95
|
+
mimemagic (0.3.5)
|
96
|
+
mini_mime (1.0.2)
|
97
|
+
mini_portile2 (2.4.0)
|
98
|
+
minitest (5.14.2)
|
99
|
+
msgpack (1.3.3)
|
100
|
+
multi_json (1.15.0)
|
101
|
+
multipart-post (2.1.1)
|
102
|
+
nio4r (2.5.4)
|
103
|
+
nokogiri (1.10.10)
|
104
|
+
mini_portile2 (~> 2.4.0)
|
105
|
+
public_suffix (4.0.6)
|
106
|
+
rack (2.2.3)
|
107
|
+
rack-test (1.1.0)
|
108
|
+
rack (>= 1.0, < 3)
|
109
|
+
rails (6.0.3.3)
|
110
|
+
actioncable (= 6.0.3.3)
|
111
|
+
actionmailbox (= 6.0.3.3)
|
112
|
+
actionmailer (= 6.0.3.3)
|
113
|
+
actionpack (= 6.0.3.3)
|
114
|
+
actiontext (= 6.0.3.3)
|
115
|
+
actionview (= 6.0.3.3)
|
116
|
+
activejob (= 6.0.3.3)
|
117
|
+
activemodel (= 6.0.3.3)
|
118
|
+
activerecord (= 6.0.3.3)
|
119
|
+
activestorage (= 6.0.3.3)
|
120
|
+
activesupport (= 6.0.3.3)
|
121
|
+
bundler (>= 1.3.0)
|
122
|
+
railties (= 6.0.3.3)
|
123
|
+
sprockets-rails (>= 2.0.0)
|
124
|
+
rails-dom-testing (2.0.3)
|
125
|
+
activesupport (>= 4.2.0)
|
126
|
+
nokogiri (>= 1.6)
|
127
|
+
rails-html-sanitizer (1.3.0)
|
128
|
+
loofah (~> 2.3)
|
129
|
+
railties (6.0.3.3)
|
130
|
+
actionpack (= 6.0.3.3)
|
131
|
+
activesupport (= 6.0.3.3)
|
132
|
+
method_source
|
133
|
+
rake (>= 0.8.7)
|
134
|
+
thor (>= 0.20.3, < 2.0)
|
135
|
+
rake (13.0.1)
|
136
|
+
rspec-core (3.9.2)
|
137
|
+
rspec-support (~> 3.9.3)
|
138
|
+
rspec-expectations (3.9.2)
|
139
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
140
|
+
rspec-support (~> 3.9.0)
|
141
|
+
rspec-mocks (3.9.1)
|
142
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
143
|
+
rspec-support (~> 3.9.0)
|
144
|
+
rspec-rails (4.0.1)
|
145
|
+
actionpack (>= 4.2)
|
146
|
+
activesupport (>= 4.2)
|
147
|
+
railties (>= 4.2)
|
148
|
+
rspec-core (~> 3.9)
|
149
|
+
rspec-expectations (~> 3.9)
|
150
|
+
rspec-mocks (~> 3.9)
|
151
|
+
rspec-support (~> 3.9)
|
152
|
+
rspec-support (3.9.3)
|
153
|
+
sawyer (0.8.2)
|
154
|
+
addressable (>= 2.3.5)
|
155
|
+
faraday (> 0.8, < 2.0)
|
156
|
+
spring (2.1.1)
|
157
|
+
sprockets (4.0.2)
|
158
|
+
concurrent-ruby (~> 1.0)
|
159
|
+
rack (> 1, < 3)
|
160
|
+
sprockets-rails (3.2.2)
|
161
|
+
actionpack (>= 4.0)
|
162
|
+
activesupport (>= 4.0)
|
163
|
+
sprockets (>= 3.0.0)
|
164
|
+
thor (1.0.1)
|
165
|
+
thread_safe (0.3.6)
|
166
|
+
to_regexp (0.2.1)
|
167
|
+
tzinfo (1.2.7)
|
168
|
+
thread_safe (~> 0.1)
|
169
|
+
websocket-driver (0.7.3)
|
170
|
+
websocket-extensions (>= 0.1.0)
|
171
|
+
websocket-extensions (0.1.5)
|
172
|
+
zeitwerk (2.4.0)
|
173
|
+
|
174
|
+
PLATFORMS
|
175
|
+
ruby
|
176
|
+
|
177
|
+
DEPENDENCIES
|
178
|
+
bootsnap (>= 1.4.2)
|
179
|
+
byebug
|
180
|
+
my_api_client!
|
181
|
+
rails (~> 6.0.3)
|
182
|
+
rspec-rails
|
183
|
+
spring
|
184
|
+
|
185
|
+
BUNDLED WITH
|
186
|
+
2.1.4
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# README
|
2
|
+
|
3
|
+
This README would normally document whatever steps are necessary to get the
|
4
|
+
application up and running.
|
5
|
+
|
6
|
+
Things you may want to cover:
|
7
|
+
|
8
|
+
* Ruby version
|
9
|
+
|
10
|
+
* System dependencies
|
11
|
+
|
12
|
+
* Configuration
|
13
|
+
|
14
|
+
* Database creation
|
15
|
+
|
16
|
+
* Database initialization
|
17
|
+
|
18
|
+
* How to run the test suite
|
19
|
+
|
20
|
+
* Services (job queues, cache servers, search engines, etc.)
|
21
|
+
|
22
|
+
* Deployment instructions
|
23
|
+
|
24
|
+
* ...
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
4
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
5
|
+
|
6
|
+
require_relative 'config/application'
|
7
|
+
|
8
|
+
Rails.application.load_tasks
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class ApplicationJob < ActiveJob::Base
|
4
|
+
# Automatically retry jobs that encountered a deadlock
|
5
|
+
# retry_on ActiveRecord::Deadlocked
|
6
|
+
|
7
|
+
# Most jobs are safe to ignore if the underlying records are no longer available
|
8
|
+
# discard_on ActiveJob::DeserializationError
|
9
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
|
6
|
+
# path to your application root.
|
7
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
8
|
+
|
9
|
+
def system!(*args)
|
10
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
11
|
+
end
|
12
|
+
|
13
|
+
FileUtils.chdir APP_ROOT do
|
14
|
+
# This script is a way to setup or update your development environment automatically.
|
15
|
+
# This script is idempotent, so that you can run it at anytime and get an expectable outcome.
|
16
|
+
# Add necessary setup steps to this file.
|
17
|
+
|
18
|
+
puts '== Installing dependencies =='
|
19
|
+
system! 'gem install bundler --conservative'
|
20
|
+
system('bundle check') || system!('bundle install')
|
21
|
+
|
22
|
+
puts "\n== Removing old logs and tempfiles =="
|
23
|
+
system! 'bin/rails log:clear tmp:clear'
|
24
|
+
|
25
|
+
puts "\n== Restarting application server =="
|
26
|
+
system! 'bin/rails restart'
|
27
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'boot'
|
4
|
+
|
5
|
+
require 'rails'
|
6
|
+
# Pick the frameworks you want:
|
7
|
+
require 'active_model/railtie'
|
8
|
+
require 'active_job/railtie'
|
9
|
+
# require "active_record/railtie"
|
10
|
+
# require "active_storage/engine"
|
11
|
+
require 'action_controller/railtie'
|
12
|
+
# require "action_mailer/railtie"
|
13
|
+
# require "action_mailbox/engine"
|
14
|
+
# require "action_text/engine"
|
15
|
+
require 'action_view/railtie'
|
16
|
+
# require "action_cable/engine"
|
17
|
+
# require "sprockets/railtie"
|
18
|
+
# require "rails/test_unit/railtie"
|
19
|
+
|
20
|
+
# Require the gems listed in Gemfile, including any gems
|
21
|
+
# you've limited to :test, :development, or :production.
|
22
|
+
Bundler.require(*Rails.groups)
|
23
|
+
|
24
|
+
module Rails60
|
25
|
+
class Application < Rails::Application
|
26
|
+
# Initialize configuration defaults for originally generated Rails version.
|
27
|
+
config.load_defaults 6.0
|
28
|
+
|
29
|
+
# Settings in config/environments/* take precedence over those specified here.
|
30
|
+
# Application configuration can go into files in config/initializers
|
31
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
32
|
+
# the framework and any gems in your application.
|
33
|
+
|
34
|
+
# Only loads a smaller set of middleware suitable for API only apps.
|
35
|
+
# Middleware like session, flash, cookies can be added back manually.
|
36
|
+
# Skip views, helpers and assets when generating a new resource.
|
37
|
+
config.api_only = true
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
CJoUu0GJghScfMh+62M1uFPVRisc5CXZnBkxDoQKWhZ8/MI6wnaEYO38GTneAdi77xgrjVMgwFD0w+o26d+OJxxkJ2MJY/0t1ioPY7uP2ccWW+WdHyM8O6q3zVh5ddyQnNdWWf2EeXQHiXoJjfvaFA7fqx2IWP4JVE5x2vI5z5boJnkfyKP02sFtuKldFthfhE+E1p7MgQ8svVp8J/XmzKzLP3vpWSkmZN3mFwQQ6aTBfcMez/AXBWa060CS6pDq6+Uh6waS+aN2X57fyJzwA4XtLAZpZ/rJAohuLs7DWgFcV3GisdZm54usjuXCJo15RpYdArBOCE7XanLMJE1jzVZy/PpaPFHW8N+oIMDVjufBBjRgT8+lkby1sFBZS70sfmSCzT8p9/0lFqlh1y6Y3lR5Ebf8vlZ6xddB--Wtg3m3b98OBj532l--PsJcDHPLD9pQa1QmIN9LSw==
|
@@ -0,0 +1,39 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Rails.application.configure do
|
4
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
5
|
+
|
6
|
+
# In the development environment your application's code is reloaded on
|
7
|
+
# every request. This slows down response time but is perfect for development
|
8
|
+
# since you don't have to restart the web server when you make code changes.
|
9
|
+
config.cache_classes = false
|
10
|
+
|
11
|
+
# Do not eager load code on boot.
|
12
|
+
config.eager_load = false
|
13
|
+
|
14
|
+
# Show full error reports.
|
15
|
+
config.consider_all_requests_local = true
|
16
|
+
|
17
|
+
# Enable/disable caching. By default caching is disabled.
|
18
|
+
# Run rails dev:cache to toggle caching.
|
19
|
+
if Rails.root.join('tmp', 'caching-dev.txt').exist?
|
20
|
+
config.cache_store = :memory_store
|
21
|
+
config.public_file_server.headers = {
|
22
|
+
'Cache-Control' => "public, max-age=#{2.days.to_i}",
|
23
|
+
}
|
24
|
+
else
|
25
|
+
config.action_controller.perform_caching = false
|
26
|
+
|
27
|
+
config.cache_store = :null_store
|
28
|
+
end
|
29
|
+
|
30
|
+
# Print deprecation notices to the Rails logger.
|
31
|
+
config.active_support.deprecation = :log
|
32
|
+
|
33
|
+
# Raises error for missing translations.
|
34
|
+
# config.action_view.raise_on_missing_translations = true
|
35
|
+
|
36
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
37
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
38
|
+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
39
|
+
end
|