my_api_client 0.14.0.pre → 0.17.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 +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,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
ENV['JETS_TEST'] = '1'
|
4
|
+
ENV['JETS_ENV'] ||= 'test'
|
5
|
+
ENV['JETS_STAGE'] ||= 'test'
|
6
|
+
# Ensures aws api never called. Fixture home folder does not contain ~/.aws/credentails
|
7
|
+
ENV['HOME'] = 'spec/fixtures/home'
|
8
|
+
|
9
|
+
require 'byebug'
|
10
|
+
require 'fileutils'
|
11
|
+
require 'jets'
|
12
|
+
|
13
|
+
abort('The Jets environment is running in production mode!') if Jets.env == 'production'
|
14
|
+
Jets.boot
|
15
|
+
|
16
|
+
require 'jets/spec_helpers'
|
17
|
+
|
18
|
+
# Rspec helper module
|
19
|
+
module Helpers
|
20
|
+
def payload(name)
|
21
|
+
JSON.parse(IO.read("spec/fixtures/payloads/#{name}.json"))
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
RSpec.configure do |c|
|
26
|
+
c.include Helpers
|
27
|
+
end
|
28
|
+
|
29
|
+
Jets.application.configure do
|
30
|
+
config.helpers.host = 'https://example.com'
|
31
|
+
end
|
@@ -0,0 +1,18 @@
|
|
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.1.0', require: false
|
7
|
+
gem 'my_api_client', path: '../..'
|
8
|
+
gem 'rails', '~> 5.2.4'
|
9
|
+
gem 'sprockets', '~> 3.0' # for ruby 2.4
|
10
|
+
|
11
|
+
group :development, :test do
|
12
|
+
gem 'byebug', platforms: %i[mri mingw x64_mingw]
|
13
|
+
gem 'rspec-rails'
|
14
|
+
end
|
15
|
+
|
16
|
+
group :development do
|
17
|
+
gem 'spring'
|
18
|
+
end
|
@@ -0,0 +1,171 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../..
|
3
|
+
specs:
|
4
|
+
my_api_client (0.17.0)
|
5
|
+
activesupport (>= 4.2.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 (5.2.4.4)
|
14
|
+
actionpack (= 5.2.4.4)
|
15
|
+
nio4r (~> 2.0)
|
16
|
+
websocket-driver (>= 0.6.1)
|
17
|
+
actionmailer (5.2.4.4)
|
18
|
+
actionpack (= 5.2.4.4)
|
19
|
+
actionview (= 5.2.4.4)
|
20
|
+
activejob (= 5.2.4.4)
|
21
|
+
mail (~> 2.5, >= 2.5.4)
|
22
|
+
rails-dom-testing (~> 2.0)
|
23
|
+
actionpack (5.2.4.4)
|
24
|
+
actionview (= 5.2.4.4)
|
25
|
+
activesupport (= 5.2.4.4)
|
26
|
+
rack (~> 2.0, >= 2.0.8)
|
27
|
+
rack-test (>= 0.6.3)
|
28
|
+
rails-dom-testing (~> 2.0)
|
29
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
30
|
+
actionview (5.2.4.4)
|
31
|
+
activesupport (= 5.2.4.4)
|
32
|
+
builder (~> 3.1)
|
33
|
+
erubi (~> 1.4)
|
34
|
+
rails-dom-testing (~> 2.0)
|
35
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
|
36
|
+
activejob (5.2.4.4)
|
37
|
+
activesupport (= 5.2.4.4)
|
38
|
+
globalid (>= 0.3.6)
|
39
|
+
activemodel (5.2.4.4)
|
40
|
+
activesupport (= 5.2.4.4)
|
41
|
+
activerecord (5.2.4.4)
|
42
|
+
activemodel (= 5.2.4.4)
|
43
|
+
activesupport (= 5.2.4.4)
|
44
|
+
arel (>= 9.0)
|
45
|
+
activestorage (5.2.4.4)
|
46
|
+
actionpack (= 5.2.4.4)
|
47
|
+
activerecord (= 5.2.4.4)
|
48
|
+
marcel (~> 0.3.1)
|
49
|
+
activesupport (5.2.4.4)
|
50
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
51
|
+
i18n (>= 0.7, < 2)
|
52
|
+
minitest (~> 5.1)
|
53
|
+
tzinfo (~> 1.1)
|
54
|
+
addressable (2.7.0)
|
55
|
+
public_suffix (>= 2.0.2, < 5.0)
|
56
|
+
arel (9.0.0)
|
57
|
+
bootsnap (1.4.8)
|
58
|
+
msgpack (~> 1.0)
|
59
|
+
builder (3.2.4)
|
60
|
+
byebug (11.1.3)
|
61
|
+
concurrent-ruby (1.1.7)
|
62
|
+
crass (1.0.6)
|
63
|
+
diff-lcs (1.4.4)
|
64
|
+
erubi (1.9.0)
|
65
|
+
faraday (1.0.1)
|
66
|
+
multipart-post (>= 1.2, < 3)
|
67
|
+
globalid (0.4.2)
|
68
|
+
activesupport (>= 4.2.0)
|
69
|
+
i18n (1.8.5)
|
70
|
+
concurrent-ruby (~> 1.0)
|
71
|
+
jsonpath (1.0.5)
|
72
|
+
multi_json
|
73
|
+
to_regexp (~> 0.2.1)
|
74
|
+
loofah (2.7.0)
|
75
|
+
crass (~> 1.0.2)
|
76
|
+
nokogiri (>= 1.5.9)
|
77
|
+
mail (2.7.1)
|
78
|
+
mini_mime (>= 0.1.1)
|
79
|
+
marcel (0.3.3)
|
80
|
+
mimemagic (~> 0.3.2)
|
81
|
+
method_source (1.0.0)
|
82
|
+
mimemagic (0.3.5)
|
83
|
+
mini_mime (1.0.2)
|
84
|
+
mini_portile2 (2.4.0)
|
85
|
+
minitest (5.14.2)
|
86
|
+
msgpack (1.3.3)
|
87
|
+
multi_json (1.15.0)
|
88
|
+
multipart-post (2.1.1)
|
89
|
+
nio4r (2.5.4)
|
90
|
+
nokogiri (1.10.10)
|
91
|
+
mini_portile2 (~> 2.4.0)
|
92
|
+
public_suffix (4.0.6)
|
93
|
+
rack (2.2.3)
|
94
|
+
rack-test (1.1.0)
|
95
|
+
rack (>= 1.0, < 3)
|
96
|
+
rails (5.2.4.4)
|
97
|
+
actioncable (= 5.2.4.4)
|
98
|
+
actionmailer (= 5.2.4.4)
|
99
|
+
actionpack (= 5.2.4.4)
|
100
|
+
actionview (= 5.2.4.4)
|
101
|
+
activejob (= 5.2.4.4)
|
102
|
+
activemodel (= 5.2.4.4)
|
103
|
+
activerecord (= 5.2.4.4)
|
104
|
+
activestorage (= 5.2.4.4)
|
105
|
+
activesupport (= 5.2.4.4)
|
106
|
+
bundler (>= 1.3.0)
|
107
|
+
railties (= 5.2.4.4)
|
108
|
+
sprockets-rails (>= 2.0.0)
|
109
|
+
rails-dom-testing (2.0.3)
|
110
|
+
activesupport (>= 4.2.0)
|
111
|
+
nokogiri (>= 1.6)
|
112
|
+
rails-html-sanitizer (1.3.0)
|
113
|
+
loofah (~> 2.3)
|
114
|
+
railties (5.2.4.4)
|
115
|
+
actionpack (= 5.2.4.4)
|
116
|
+
activesupport (= 5.2.4.4)
|
117
|
+
method_source
|
118
|
+
rake (>= 0.8.7)
|
119
|
+
thor (>= 0.19.0, < 2.0)
|
120
|
+
rake (13.0.1)
|
121
|
+
rspec-core (3.9.2)
|
122
|
+
rspec-support (~> 3.9.3)
|
123
|
+
rspec-expectations (3.9.2)
|
124
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
125
|
+
rspec-support (~> 3.9.0)
|
126
|
+
rspec-mocks (3.9.1)
|
127
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
128
|
+
rspec-support (~> 3.9.0)
|
129
|
+
rspec-rails (4.0.1)
|
130
|
+
actionpack (>= 4.2)
|
131
|
+
activesupport (>= 4.2)
|
132
|
+
railties (>= 4.2)
|
133
|
+
rspec-core (~> 3.9)
|
134
|
+
rspec-expectations (~> 3.9)
|
135
|
+
rspec-mocks (~> 3.9)
|
136
|
+
rspec-support (~> 3.9)
|
137
|
+
rspec-support (3.9.3)
|
138
|
+
sawyer (0.8.2)
|
139
|
+
addressable (>= 2.3.5)
|
140
|
+
faraday (> 0.8, < 2.0)
|
141
|
+
spring (2.1.1)
|
142
|
+
sprockets (3.7.2)
|
143
|
+
concurrent-ruby (~> 1.0)
|
144
|
+
rack (> 1, < 3)
|
145
|
+
sprockets-rails (3.2.2)
|
146
|
+
actionpack (>= 4.0)
|
147
|
+
activesupport (>= 4.0)
|
148
|
+
sprockets (>= 3.0.0)
|
149
|
+
thor (1.0.1)
|
150
|
+
thread_safe (0.3.6)
|
151
|
+
to_regexp (0.2.1)
|
152
|
+
tzinfo (1.2.7)
|
153
|
+
thread_safe (~> 0.1)
|
154
|
+
websocket-driver (0.7.3)
|
155
|
+
websocket-extensions (>= 0.1.0)
|
156
|
+
websocket-extensions (0.1.5)
|
157
|
+
|
158
|
+
PLATFORMS
|
159
|
+
ruby
|
160
|
+
|
161
|
+
DEPENDENCIES
|
162
|
+
bootsnap (>= 1.1.0)
|
163
|
+
byebug
|
164
|
+
my_api_client!
|
165
|
+
rails (~> 5.2.4)
|
166
|
+
rspec-rails
|
167
|
+
spring
|
168
|
+
sprockets (~> 3.0)
|
169
|
+
|
170
|
+
BUNDLED WITH
|
171
|
+
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,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
include FileUtils
|
6
|
+
|
7
|
+
# path to your application root.
|
8
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
9
|
+
|
10
|
+
def system!(*args)
|
11
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
12
|
+
end
|
13
|
+
|
14
|
+
chdir APP_ROOT do
|
15
|
+
# This script is a starting point to setup your application.
|
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,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require 'fileutils'
|
5
|
+
include FileUtils
|
6
|
+
|
7
|
+
# path to your application root.
|
8
|
+
APP_ROOT = File.expand_path('..', __dir__)
|
9
|
+
|
10
|
+
def system!(*args)
|
11
|
+
system(*args) || abort("\n== Command #{args} failed ==")
|
12
|
+
end
|
13
|
+
|
14
|
+
chdir APP_ROOT do
|
15
|
+
# This script is a way to update your development environment automatically.
|
16
|
+
# Add necessary update 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,37 @@
|
|
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_view/railtie'
|
14
|
+
# require "action_cable/engine"
|
15
|
+
# require "sprockets/railtie"
|
16
|
+
# require "rails/test_unit/railtie"
|
17
|
+
|
18
|
+
# Require the gems listed in Gemfile, including any gems
|
19
|
+
# you've limited to :test, :development, or :production.
|
20
|
+
Bundler.require(*Rails.groups)
|
21
|
+
|
22
|
+
module Rails52
|
23
|
+
class Application < Rails::Application
|
24
|
+
# Initialize configuration defaults for originally generated Rails version.
|
25
|
+
config.load_defaults 5.2
|
26
|
+
|
27
|
+
# Settings in config/environments/* take precedence over those specified here.
|
28
|
+
# Application configuration can go into files in config/initializers
|
29
|
+
# -- all .rb files in that directory are automatically loaded after loading
|
30
|
+
# the framework and any gems in your application.
|
31
|
+
|
32
|
+
# Only loads a smaller set of middleware suitable for API only apps.
|
33
|
+
# Middleware like session, flash, cookies can be added back manually.
|
34
|
+
# Skip views, helpers and assets when generating a new resource.
|
35
|
+
config.api_only = true
|
36
|
+
end
|
37
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
CoqnHttXAM5P+hqAS+0x/tIF4f6uh4/KQcj8FWFp+43NpgsJJwOtSewgf5cqJk0xZAWpVrlWK/OAA5m2yVqf24wU6ynKaUFlNkNnYXU4Yd1ieQ//kzXX+486aQyuJA0eLdBANvM0DnB7VORl2fyLTj/SpO7koN1fj/GWVQStTGSXZmZpsTgcJi2QD6QAI37SjWMHoDJIg/T/XraZjezjkrACPvlMm3BAO5sPixuZ71PX4pNetEUHwMFmOwkPHaeZt5pNnXTaZSwtyyQuPsxkPerwL3QTxrIJg6z31qRdTLuRIU0o3t80GZOiWkk3p2Lke4wv80owEXzoZqrosOj4HaE9L0wm7gbf9IkGqk3cv7cCKeGIFegjHOIqO/6Pbq7SjFWVBJdBSCgBSZ6NtJgZGjr2zIQ9kV+emnNT--eqdV0aiTwnuTbD85--hOzvwTdx5HfukVZuBwy13w==
|
@@ -0,0 +1,41 @@
|
|
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.action_controller.perform_caching = true
|
21
|
+
|
22
|
+
config.cache_store = :memory_store
|
23
|
+
config.public_file_server.headers = {
|
24
|
+
'Cache-Control' => "public, max-age=#{2.days.to_i}",
|
25
|
+
}
|
26
|
+
else
|
27
|
+
config.action_controller.perform_caching = false
|
28
|
+
|
29
|
+
config.cache_store = :null_store
|
30
|
+
end
|
31
|
+
|
32
|
+
# Print deprecation notices to the Rails logger.
|
33
|
+
config.active_support.deprecation = :log
|
34
|
+
|
35
|
+
# Raises error for missing translations
|
36
|
+
# config.action_view.raise_on_missing_translations = true
|
37
|
+
|
38
|
+
# Use an evented file watcher to asynchronously detect changes in source code,
|
39
|
+
# routes, locales, etc. This feature depends on the listen gem.
|
40
|
+
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
41
|
+
end
|