Skip to content

Commit e7cc228

Browse files
committed
fix: assume that config/storage.yml always exists
1 parent 76001d8 commit e7cc228

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

variants/backend-base/config/template.rb

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -60,23 +60,21 @@
6060
root "home#index"
6161
EO_ROUTES
6262

63-
if File.exist? "config/storage.yml"
64-
gsub_file! "config/storage.yml", /# service: S3/ do
65-
<<~YAML
66-
# service: S3
67-
# upload:
68-
# # TEAM DECISION REQUIRED: The correct caching duration for files
69-
# # stored by Active Storage is project dependent so you should discuss
70-
# # this with you team if you don't feel able to make the decision solo.
71-
# #
72-
# # These options are are not well documented in ActiveStorage. They
73-
# # are passed directly to the S3 SDK. Details:
74-
# # https://github.com/rails/rails/blob/master/activestorage/lib/active_storage/service/s3_service.rb
75-
# #
76-
# # * private: the browser should cache but intermediate proxies (e.g. CDNs) should not
77-
# # * max-age: the number of seconds to cache the file for
78-
# #
79-
# cache_control: 'private, max-age=<%= 365.days.seconds %>'
80-
YAML
81-
end
63+
gsub_file! "config/storage.yml", /# service: S3/ do
64+
<<~YAML
65+
# service: S3
66+
# upload:
67+
# # TEAM DECISION REQUIRED: The correct caching duration for files
68+
# # stored by Active Storage is project dependent so you should discuss
69+
# # this with you team if you don't feel able to make the decision solo.
70+
# #
71+
# # These options are are not well documented in ActiveStorage. They
72+
# # are passed directly to the S3 SDK. Details:
73+
# # https://github.com/rails/rails/blob/master/activestorage/lib/active_storage/service/s3_service.rb
74+
# #
75+
# # * private: the browser should cache but intermediate proxies (e.g. CDNs) should not
76+
# # * max-age: the number of seconds to cache the file for
77+
# #
78+
# cache_control: 'private, max-age=<%= 365.days.seconds %>'
79+
YAML
8280
end

0 commit comments

Comments
 (0)