diff --git a/.rubocop.yml b/.rubocop.yml index af68045..5ba5f12 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,2 +1,9 @@ -inherit_from: - - https://raw.githubusercontent.com/wtag/default-configs/master/rubocop-default-config-ruby3.2.yml +# Omakase Ruby styling for Rails +inherit_gem: + rubocop-rails-omakase: rubocop.yml + +# Overwrite or add rules to create your own house style +# +# # Use `[a, [b, c]]` not `[ a, [ b, c ] ]` +# Layout/SpaceInsideArrayLiteralBrackets: +# Enabled: false diff --git a/.ruby-version b/.ruby-version index be94e6f..7921bd0 100644 --- a/.ruby-version +++ b/.ruby-version @@ -1 +1 @@ -3.2.2 +3.4.8 diff --git a/Dockerfile b/Dockerfile index 4b9cdbf..9a33f13 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,13 +1,21 @@ -FROM ruby:3.2-alpine +FROM ruby:3.4.8-alpine RUN apk --no-cache add jq curl git RUN gem install bundler COPY Gemfile* ./ -RUN apk --no-cache add --virtual build-deps make cmake g++ openssl-dev && \ - bundle install -j $(nproc) && \ - apk del build-deps +RUN apk add --no-cache --virtual build-deps \ + build-base \ + cmake \ + libffi-dev \ + openssl-dev \ + yaml-dev \ + && gem install bundler \ + && bundle config set force_ruby_platform true \ + && bundle install -j $(nproc) \ + && apk del build-deps + COPY entrypoint.sh /entrypoint.sh diff --git a/Gemfile b/Gemfile index 966a002..d4a27e1 100644 --- a/Gemfile +++ b/Gemfile @@ -9,4 +9,4 @@ gem 'pronto-rails_schema', require: false gem 'pronto-reek', require: false gem 'pronto-scss', require: false -gem 'rubocop', '~> 1.50', require: false +gem "rubocop-rails-omakase", require: false diff --git a/Gemfile.lock b/Gemfile.lock index 439d148..928aacd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,28 +1,59 @@ GEM remote: https://rubygems.org/ specs: - activesupport (7.1.2) + activesupport (8.1.2) base64 bigdecimal - concurrent-ruby (~> 1.0, >= 1.0.2) + concurrent-ruby (~> 1.0, >= 1.3.1) connection_pool (>= 2.2.5) drb i18n (>= 1.6, < 2) + json + logger (>= 1.4.2) minitest (>= 5.1) - mutex_m - tzinfo (~> 2.0) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) addressable (2.8.6) public_suffix (>= 2.0.2, < 6.0) ast (2.4.2) - base64 (0.2.0) - bigdecimal (3.1.4) + base64 (0.3.0) + bigdecimal (4.0.1) brakeman (6.1.0) code_analyzer (0.5.5) sexp_processor - concurrent-ruby (1.2.2) - connection_pool (2.4.1) - drb (2.2.0) - ruby2_keywords + concurrent-ruby (1.3.6) + connection_pool (3.0.2) + drb (2.2.3) + dry-configurable (1.3.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-core (1.2.0) + concurrent-ruby (~> 1.0) + logger + zeitwerk (~> 2.6) + dry-inflector (1.3.1) + dry-initializer (3.2.0) + dry-logic (1.6.0) + bigdecimal + concurrent-ruby (~> 1.0) + dry-core (~> 1.1) + zeitwerk (~> 2.6) + dry-schema (1.15.0) + concurrent-ruby (~> 1.0) + dry-configurable (~> 1.0, >= 1.0.1) + dry-core (~> 1.1) + dry-initializer (~> 3.2) + dry-logic (~> 1.6) + dry-types (~> 1.8) + zeitwerk (~> 2.6) + dry-types (1.9.1) + bigdecimal (>= 3.0) + concurrent-ruby (~> 1.0) + dry-core (~> 1.0) + dry-inflector (~> 1.0) + dry-logic (~> 1.4) + zeitwerk (~> 2.6) erubi (1.12.0) erubis (2.7.0) faraday (2.7.12) @@ -42,23 +73,25 @@ GEM httparty (0.21.0) mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (1.14.1) + i18n (1.14.8) concurrent-ruby (~> 1.0) json (2.7.1) - kwalify (0.7.2) - language_server-protocol (3.17.0.3) + language_server-protocol (3.17.0.5) + lint_roller (1.1.0) + logger (1.7.0) mini_mime (1.1.5) - minitest (5.20.0) + minitest (6.0.1) + prism (~> 1.5) multi_xml (0.6.0) - mutex_m (0.2.0) octokit (7.2.0) faraday (>= 1, < 3) sawyer (~> 0.9) - parallel (1.23.0) - parser (3.2.2.4) + parallel (1.27.0) + parser (3.3.10.2) ast (~> 2.4.1) racc path_expander (1.1.1) + prism (1.9.0) pronto (0.11.2) gitlab (>= 4.4.0, < 5.0) httparty (>= 0.13.7, < 1.0) @@ -89,6 +122,7 @@ GEM scss_lint (~> 0.43, >= 0.43.0) public_suffix (5.0.4) racc (1.7.3) + rack (3.2.4) rails_best_practices (1.23.2) activesupport code_analyzer (~> 0.5.5) @@ -101,26 +135,43 @@ GEM rb-fsevent (0.11.2) rb-inotify (0.10.1) ffi (~> 1.0) - reek (6.1.4) - kwalify (~> 0.7.0) - parser (~> 3.2.0) + reek (6.5.0) + dry-schema (~> 1.13) + logger (~> 1.6) + parser (~> 3.3.0) rainbow (>= 2.0, < 4.0) - regexp_parser (2.8.3) + rexml (~> 3.1) + regexp_parser (2.11.3) require_all (3.0.0) rexml (3.2.6) - rubocop (1.59.0) + rubocop (1.84.2) json (~> 2.3) - language_server-protocol (>= 3.17.0) + language_server-protocol (~> 3.17.0.2) + lint_roller (~> 1.1.0) parallel (~> 1.10) - parser (>= 3.2.2.4) + parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.8, < 3.0) - rexml (>= 3.2.5, < 4.0) - rubocop-ast (>= 1.30.0, < 2.0) + regexp_parser (>= 2.9.3, < 3.0) + rubocop-ast (>= 1.49.0, < 2.0) ruby-progressbar (~> 1.7) - unicode-display_width (>= 2.4.0, < 3.0) - rubocop-ast (1.30.0) - parser (>= 3.2.1.0) + unicode-display_width (>= 2.4.0, < 4.0) + rubocop-ast (1.49.0) + parser (>= 3.3.7.2) + prism (~> 1.7) + rubocop-performance (1.26.1) + lint_roller (~> 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.47.1, < 2.0) + rubocop-rails (2.34.3) + activesupport (>= 4.2.0) + lint_roller (~> 1.1) + rack (>= 1.1) + rubocop (>= 1.75.0, < 2.0) + rubocop-ast (>= 1.44.0, < 2.0) + rubocop-rails-omakase (1.1.0) + rubocop (>= 1.72) + rubocop-performance (>= 1.24) + rubocop-rails (>= 2.30) ruby-progressbar (1.13.0) ruby2_keywords (0.0.5) ruby_parser (3.20.3) @@ -136,6 +187,7 @@ GEM faraday (>= 0.17.3, < 3) scss_lint (0.60.0) sass (~> 3.5, >= 3.5.5) + securerandom (0.4.1) sexp_processor (4.17.0) terminal-table (3.0.2) unicode-display_width (>= 1.1.1, < 3) @@ -143,6 +195,8 @@ GEM tzinfo (2.0.6) concurrent-ruby (~> 1.0) unicode-display_width (2.5.0) + uri (1.1.1) + zeitwerk (2.7.5) PLATFORMS aarch64-linux @@ -156,7 +210,7 @@ DEPENDENCIES pronto-reek pronto-rubocop pronto-scss - rubocop (~> 1.50) + rubocop-rails-omakase BUNDLED WITH 2.4.22 diff --git a/action.yml b/action.yml index 3545db3..de4a50b 100644 --- a/action.yml +++ b/action.yml @@ -6,6 +6,6 @@ inputs: required: true runs: using: 'docker' - image: 'docker://welltravel/pronto-action:latest' + image: 'docker://welltravel/pronto-action:v14_ruby_3.4.8' args: - ${{ inputs.github_token }} diff --git a/entrypoint.sh b/entrypoint.sh index 7d2c7e8..0be9f54 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -2,6 +2,8 @@ set -eo pipefail +git config --system --add safe.directory /github/workspace + export PRONTO_GITHUB_ACCESS_TOKEN="${1}" curlGH() {