From 18fc0ac59e578ea7c3d361883efd970cf7a60687 Mon Sep 17 00:00:00 2001 From: Xavier MALPARTY Date: Mon, 5 Jun 2023 15:42:30 +0700 Subject: [PATCH] Test to comment the server spec part --- .env | 2 ++ .env.development.example | 2 +- .template/addons/docker/Dockerfile.tt | 4 +--- .template/spec/support/serverspec.rb | 8 -------- .template/variants/web/package.json.rb | 2 +- .template/variants/web/template.rb | 2 +- 6 files changed, 6 insertions(+), 14 deletions(-) diff --git a/.env b/.env index 4f03e15b..62e1ed87 100644 --- a/.env +++ b/.env @@ -16,3 +16,5 @@ MAILER_SENDER=Test AVAILABLE_LOCALES=en DEFAULT_LOCALE=en FALLBACK_LOCALES=en + +SECRET_KEY_BASE=replace_with_lengthy_secure_hex diff --git a/.env.development.example b/.env.development.example index f73db68f..6ab4e54b 100644 --- a/.env.development.example +++ b/.env.development.example @@ -1,4 +1,4 @@ -# DO NOT COMMIT THIS FILE. +# DO NOT COMMIT THIS FILE (`.env.development`) # Rename it to `.env.development` and use it for local secrets only. # Used to verify the integrity of signed cookies. so ensure a secure value is set diff --git a/.template/addons/docker/Dockerfile.tt b/.template/addons/docker/Dockerfile.tt index a9e1293a..8492d744 100644 --- a/.template/addons/docker/Dockerfile.tt +++ b/.template/addons/docker/Dockerfile.tt @@ -102,9 +102,7 @@ RUN rm -rf tmp/docker # Compile assets RUN bin/rails i18n:js:export RUN bin/rails assets:precompile -RUN bundle exec rake i18n:js:export -RUN yarn build -RUN yarn build:css +RUN yarn postcss <%- end -%> EXPOSE $PORT diff --git a/.template/spec/support/serverspec.rb b/.template/spec/support/serverspec.rb index 3f08a971..03527d6e 100644 --- a/.template/spec/support/serverspec.rb +++ b/.template/spec/support/serverspec.rb @@ -7,13 +7,7 @@ module ServerSpecHelpers # Prebuild and run docker image before running the test # Because the docker api does not support docker compose def self.test_container - puts 'HERERERERERE' - puts 'HERERERERERE' - puts ENV.fetch('APP_NAME') - puts `docker ps` container_id = `docker ps -qf "name=#{ENV.fetch('APP_NAME')}_test"` - puts 'Container ID:' - puts container_id Docker::Container.get(container_id.strip) end @@ -21,7 +15,6 @@ def self.test_container RSpec.configure do |config| config.before(:suite) do - puts 'BEFORE SUITE' container = ServerSpecHelpers.test_container set :os, family: :debian @@ -30,7 +23,6 @@ def self.test_container end config.after(:suite) do - puts 'AFTER SUITE' container = ServerSpecHelpers.test_container container.stop diff --git a/.template/variants/web/package.json.rb b/.template/variants/web/package.json.rb index d3d0fd6e..c0f2b80d 100644 --- a/.template/variants/web/package.json.rb +++ b/.template/variants/web/package.json.rb @@ -29,7 +29,7 @@ run 'yarn add postcss postcss-cli autoprefixer' run 'yarn add --dev @nimblehq/eslint-config-nimble@2.2.1' -run 'yarn add --dev stylelint' +run 'yarn add --dev stylelint@14' run 'yarn add --dev @nimblehq/stylelint-config-nimble' # Setup scripts diff --git a/.template/variants/web/template.rb b/.template/variants/web/template.rb index 83660a38..52d58d03 100644 --- a/.template/variants/web/template.rb +++ b/.template/variants/web/template.rb @@ -30,7 +30,7 @@ def apply_web_variant! use_source_path __dir__ # Generate translation file - run 'bin/rake i18n:js:export' + run 'bundle exec rake i18n:js:export' # Fix the default Rails template that does not put trailing commas run 'yarn run codebase:fix'