|
25 | 25 | apply "variants/backend-base/config/environments/test.rb"
|
26 | 26 | template "variants/backend-base/config/environments/staging.rb.tt", "config/environments/staging.rb"
|
27 | 27 |
|
28 |
| -route <<~HEALTH_CHECK_ROUTES |
29 |
| - mount OkComputer::Engine, at: "/healthchecks" |
30 |
| -HEALTH_CHECK_ROUTES |
31 |
| - |
32 |
| -route <<-EO_ROUTES |
33 |
| - ## |
34 |
| - # Workaround a "bug" in lighthouse CLI |
35 |
| - # |
36 |
| - # Lighthouse CLI (versions 5.4 - 5.6 tested) issues a `GET /asset-manifest.json` |
37 |
| - # request during its run - the URL seems to be hard-coded. This file does not |
38 |
| - # exist so, during tests, your test will fail because rails will die with a 404. |
39 |
| - # |
40 |
| - # Lighthouse run from Chrome Dev-tools does not have the same behaviour. |
41 |
| - # |
42 |
| - # This hack works around this. This behaviour might be fixed by the time you |
43 |
| - # read this. You can check by commenting out this block and running the |
44 |
| - # accessibility and performance tests. You are encouraged to remove this hack |
45 |
| - # as soon as it is no longer needed. |
46 |
| - # |
47 |
| - if defined?(Shakapacker) && Rails.env.test? |
48 |
| - # manifest paths depend on your shakapacker config so we inspect it |
49 |
| - manifest_path = Shakapacker::Configuration |
50 |
| - .new(root_path: Rails.root, config_path: Rails.root.join("config/shakapacker.yml"), env: Rails.env) |
51 |
| - .public_manifest_path |
52 |
| - .relative_path_from(Rails.public_path) |
53 |
| - .to_s |
54 |
| - get "/asset-manifest.json", to: redirect(manifest_path) |
55 |
| - end |
56 |
| -
|
57 |
| - root "home#index" |
58 |
| -EO_ROUTES |
| 28 | +copy_file "variants/backend-base/config/routes.rb", "config/routes.rb", force: true |
59 | 29 |
|
60 | 30 | if File.exist? "config/storage.yml"
|
61 | 31 | gsub_file! "config/storage.yml", /# service: S3/ do
|
|
0 commit comments