diff --git a/.github/workflows/test_generated_app.yml b/.github/workflows/test_generated_app.yml index bbee7add..12fd1601 100644 --- a/.github/workflows/test_generated_app.yml +++ b/.github/workflows/test_generated_app.yml @@ -9,7 +9,7 @@ env: DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }} DOCKER_REGISTRY_USERNAME: ${{ github.repository_owner }} DOCKER_REGISTRY_TOKEN: ${{ secrets.DOCKER_REGISTRY_TOKEN }} - RUBY_VERSION: 3.0.1 + RUBY_VERSION: 3.2.2 NODE_VERSION: 16 RAILS_VERSION: 7.0.6 diff --git a/.github/workflows/test_production_build.yml b/.github/workflows/test_production_build.yml index 48790aac..01d4570b 100644 --- a/.github/workflows/test_production_build.yml +++ b/.github/workflows/test_production_build.yml @@ -6,7 +6,7 @@ env: APP_NAME: rails_templates DOCKER_IMAGE: ${{ github.repository }} DOCKER_REGISTRY_HOST: ${{ secrets.DOCKER_REGISTRY_HOST }} - RUBY_VERSION: 3.0.1 + RUBY_VERSION: 3.2.2 NODE_VERSION: 16 RAILS_VERSION: 7.0.6 diff --git a/.github/workflows/test_template.yml b/.github/workflows/test_template.yml index e54f01bc..37ceb327 100644 --- a/.github/workflows/test_template.yml +++ b/.github/workflows/test_template.yml @@ -3,7 +3,7 @@ name: Test the codebase of the template on: push env: - RUBY_VERSION: 3.0.1 + RUBY_VERSION: 3.2.2 concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.template/Gemfile.lock b/.template/Gemfile.lock index 0b460254..6b2e96cb 100644 --- a/.template/Gemfile.lock +++ b/.template/Gemfile.lock @@ -2,64 +2,70 @@ GEM remote: https://rubygems.org/ specs: ast (2.4.2) - diff-lcs (1.4.4) + diff-lcs (1.5.0) docker-api (2.2.0) excon (>= 0.47.0) multi_json - excon (0.90.0) + excon (0.100.0) + json (2.6.3) + language_server-protocol (3.17.0.3) multi_json (1.15.0) - net-scp (3.0.0) - net-ssh (>= 2.6.5, < 7.0.0) - net-ssh (6.1.0) + net-scp (4.0.0) + net-ssh (>= 2.6.5, < 8.0.0) + net-ssh (7.1.0) net-telnet (0.1.1) - parallel (1.21.0) - parser (3.1.0.0) + parallel (1.23.0) + parser (3.2.2.3) ast (~> 2.4.1) + racc + racc (1.7.1) rainbow (3.1.1) - regexp_parser (2.2.0) + regexp_parser (2.8.1) rexml (3.2.5) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) + rspec-support (~> 3.12.0) rspec-its (1.3.0) rspec-core (>= 3.0.0) rspec-expectations (>= 3.0.0) - rspec-mocks (3.9.1) + rspec-mocks (3.12.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) + rspec-support (~> 3.12.0) + rspec-support (3.12.1) rspec-wait (0.0.9) rspec (>= 3, < 4) - rubocop (1.25.0) + rubocop (1.54.0) + json (~> 2.3) + language_server-protocol (>= 3.17.0) parallel (~> 1.10) - parser (>= 3.1.0.0) + parser (>= 3.2.2.3) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 1.8, < 3.0) - rexml - rubocop-ast (>= 1.15.1, < 2.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 1.4.0, < 3.0) - rubocop-ast (1.15.1) - parser (>= 3.0.1.1) - ruby-progressbar (1.11.0) - serverspec (2.41.5) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.29.0) + parser (>= 3.2.1.0) + ruby-progressbar (1.13.0) + serverspec (2.42.2) multi_json rspec (~> 3.0) rspec-its specinfra (~> 2.72) sfl (2.3) - specinfra (2.82.18) + specinfra (2.86.0) net-scp net-ssh (>= 2.7) net-telnet (= 0.1.1) sfl - unicode-display_width (2.1.0) + unicode-display_width (2.4.2) PLATFORMS ruby diff --git a/.template/addons/docker/Dockerfile.tt b/.template/addons/docker/Dockerfile.tt index 22bb1f9e..cee943e9 100644 --- a/.template/addons/docker/Dockerfile.tt +++ b/.template/addons/docker/Dockerfile.tt @@ -38,7 +38,8 @@ RUN apt-get update -qq && \ ADD https://dl.yarnpkg.com/debian/pubkey.gpg /tmp/yarn-pubkey.gpg RUN apt-key add /tmp/yarn-pubkey.gpg && rm /tmp/yarn-pubkey.gpg && \ echo "deb http://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list && \ - curl -sL https://deb.nodesource.com/setup_"$NODE_SOURCE_VERSION".x | bash - && \ + echo 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 600' > /etc/apt/preferences.d/nodesource && \ + curl -fsSL https://deb.nodesource.com/setup_"$NODE_SOURCE_VERSION".x | bash - && \ apt-get update -qq && \ apt-get install -y --no-install-recommends nodejs yarn && \ apt-get clean && \ diff --git a/.template/addons/phrase/spec/codebase/codebase_spec.rb b/.template/addons/phrase/spec/codebase/codebase_spec.rb index 64378d71..251349a8 100644 --- a/.template/addons/phrase/spec/codebase/codebase_spec.rb +++ b/.template/addons/phrase/spec/codebase/codebase_spec.rb @@ -16,7 +16,7 @@ # replace en with root as `en` is not a tag locale_tags[locale_tags.index('en')] = 'root' - phrase_pull_tags = YAML.load_file(Rails.root.join('.phrase.yml')) + phrase_pull_tags = YAML.load_file(Rails.root.join('.phrase.yml'), aliases: true) .dig('phrase', 'pull', 'targets') .map { |target| target.dig('params', 'tags') } .sort diff --git a/.template/variants/web/package.json.rb b/.template/variants/web/package.json.rb index 0b1a4a7c..34b2e414 100644 --- a/.template/variants/web/package.json.rb +++ b/.template/variants/web/package.json.rb @@ -52,7 +52,7 @@ run %(npm set-script build "node app/javascript/build.js") run %( npm set-script build:css-production \ - "sass #{source_stylesheet} #{bundled_stylesheet} #{(production_bundled_stylesheet_options).join(' ')}" + "sass #{source_stylesheet} #{bundled_stylesheet} #{production_bundled_stylesheet_options.join(' ')}" ) run %( npm set-script build:css \ diff --git a/.tool-versions b/.tool-versions index 7fcd1b3f..97b2cd18 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,2 +1,2 @@ nodejs 16.13.2 -ruby 3.0.1 +ruby 3.2.2 diff --git a/Gemfile.tt b/Gemfile.tt index 8e8ec02e..bc65a6e0 100644 --- a/Gemfile.tt +++ b/Gemfile.tt @@ -41,7 +41,7 @@ group :development, :test do # gem 'debug', platforms: %i[ mri mingw x64_mingw ] # Official debug # Utilities - gem 'figaro' # Simple Rails app configuration + gem 'figjam' # ENV configuration for ruby using yaml files gem 'listen' # Listens to file modifications gem 'letter_opener' # Preview mail in the browser instead of sending gem 'ffaker' # A library for generating fake data such as names, addresses, and phone numbers diff --git a/README.md b/README.md index 4bb5e9fa..54a95428 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ with building complex applications over the years. ### Requirements -- Install ruby and set your local ruby version to `3.0.1` +- Install ruby and set your local ruby version to `3.2.2` - Install rails `7.0.6` - Install node `16.13.2` (For creating web application) diff --git a/bin/docker-assets-precompile b/bin/docker-assets-precompile index a5b95c27..30e844da 100755 --- a/bin/docker-assets-precompile +++ b/bin/docker-assets-precompile @@ -15,7 +15,7 @@ require 'yaml' rails_env = ENV.fetch('RAILS_ENV', 'production') if rails_env == 'production' - docker_build_envs = YAML.load_file('config/application.yml')['docker_build'] + docker_build_envs = YAML.load_file('config/application.yml', aliases: true)['docker_build'] docker_build_envs.each { |name, value| ENV[name] = value } ENV['DATABASE_URL'] = 'postgres://postgres:postgres@postgres:5432/postgres' diff --git a/template.rb b/template.rb index 73550b18..7c0a67e4 100644 --- a/template.rb +++ b/template.rb @@ -8,7 +8,7 @@ APP_NAME_HUMANIZED = app_name.split(/[-_]/).map(&:capitalize).join(' ').gsub(/ Web$/, '') DOCKER_REGISTRY_HOST = 'docker.io' DOCKER_IMAGE = "nimblehq/#{APP_NAME}".freeze -RUBY_VERSION = '3.0.1' +RUBY_VERSION = '3.2.2' POSTGRES_VERSION = '15.2' REDIS_VERSION = '6.2.7' # Variants