Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,22 @@ jobs:
echo "::error file=CHANGELOG.md,line=1,col=1::Please make sure that you add a docs/CHANGELOG.md entry to describe the changes in this pull request."
exit 1
fi
rubyfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Install rubyfmt
run: |
curl --fail --location --output "$RUNNER_TEMP/rubyfmt.tar.gz" \
https://github.com/fables-tales/rubyfmt/releases/download/v0.14.1/rubyfmt-v0.14.1-Linux-x86_64.tar.gz
echo "9590cc3b8b2ed37a250a5f7c22a542ce014f13954f613c93a72230de8a74fbbd $RUNNER_TEMP/rubyfmt.tar.gz" | sha256sum --check
mkdir "$RUNNER_TEMP/rubyfmt"
tar -xzf "$RUNNER_TEMP/rubyfmt.tar.gz" -C "$RUNNER_TEMP/rubyfmt"
echo "$RUNNER_TEMP/rubyfmt/tmp/releases/v0.14.1-Linux" >> "$GITHUB_PATH"
- name: Check Ruby formatting
run: script/format --check
lint:
runs-on: ubuntu-latest
steps:
Expand All @@ -96,7 +112,7 @@ jobs:
with:
path: vendor/bundle
key: gems-build-rails-8-ruby-3.2-${{ hashFiles('**/Gemfile.lock') }}
- name: Lint with Rubocop and ERB Lint
- name: Lint with Standard and ERB Lint
run: |
bundle config path vendor/bundle
bundle update
Expand Down
27 changes: 26 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,31 @@
require:
- standard
plugins:
- standard-performance
- rubocop-md
- rubocop-rubyfmt
inherit_gem:
standard: config/base.yml
standard:
- config/default.yml
- config/ruby-3.2.yml
standard-performance: config/base.yml
rubocop-rubyfmt:
- config/default.yml
- config/full.yml

AllCops:
TargetRubyVersion: 3.2
Exclude:
- 'vendor/**/*'
- 'docs/CHANGELOG.md'

Layout:
Enabled: false

# rubyfmt uses << for multiline string concatenation.
Style/LineEndConcatenation:
Enabled: false

# rubyfmt keeps parentheses when a local variable shadows the method name.
Style/MethodCallWithoutArgsParentheses:
Enabled: false
6 changes: 5 additions & 1 deletion .standard.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
ruby_version: 3.2
ignore:
- 'docs/CHANGELOG.md' # Rubocop doesn't like our indenting of code examples
- 'docs/CHANGELOG.md'
- '**/*':
- Layout
- Style/LineEndConcatenation
- Style/MethodCallWithoutArgsParentheses
18 changes: 9 additions & 9 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
# frozen_string_literal: true

appraise "rails-7.1" do
appraise("rails-7.1") do
ruby "~> 3.2"

gem "rails", "~> 7.1.0"
gem "json", "< 3"

group :development, :test do
remove_gem "audition"
remove_gem("audition")
gem "turbo-rails", "~> 1"
gem "rspec-rails", "~> 7"
end
end

appraise "rails-7.2" do
appraise("rails-7.2") do
ruby "~> 3.3"

gem "rails", "~> 7.2.0"
gem "json", "< 3"

group :development, :test do
remove_gem "audition"
remove_gem("audition")
gem "turbo-rails", "~> 2"
gem "rspec-rails", "~> 7"
end
end

appraise "rails-8.0" do
appraise("rails-8.0") do
ruby "~> 3.4"

gem "rails", "~> 8.0.0"
gem "json", "< 3"

group :development, :test do
remove_gem "audition"
remove_gem("audition")
gem "turbo-rails", "~> 2"
gem "rspec-rails", "~> 8"
end
end

appraise "rails-8.1" do
appraise("rails-8.1") do
ruby "~> 4.0"

gem "rails", "~> 8.1.0"
Expand All @@ -50,7 +50,7 @@ appraise "rails-8.1" do
end
end

appraise "rails-main" do
appraise("rails-main") do
ruby "~> 4.0"

gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd7817e4a8ed684f29b0"
Expand All @@ -62,7 +62,7 @@ appraise "rails-main" do
end
end

appraise "rails-main_head" do
appraise("rails-main_head") do
ruby "4.1.0.dev"

gem "rack", git: "https://github.com/rack/rack", ref: "8a4475a9f416a72e5b02bd7817e4a8ed684f29b0"
Expand Down
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ group :development, :test do
gem "redis", ">= 4", "< 6"
gem "rspec-rails"
gem "rubocop-md", "~> 2"
gem "rubocop-rubyfmt", "~> 0.1"
gem "simplecov-console", "< 1"
gem "simplecov", "< 2"
gem "slim", "~> 5"
Expand Down
5 changes: 5 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,9 @@ GEM
lint_roller (~> 1.1)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.47.1, < 2.0)
rubocop-rubyfmt (0.1.2)
lint_roller (~> 1.1)
rubocop (>= 1.72.2)
ruby-progressbar (1.13.0)
rubydex (0.4.4)
rubydex (0.4.4-aarch64-linux)
Expand Down Expand Up @@ -483,6 +486,7 @@ DEPENDENCIES
redis (>= 4, < 6)
rspec-rails
rubocop-md (~> 2)
rubocop-rubyfmt (~> 0.1)
simplecov (< 2)
simplecov-console (< 1)
slim (~> 5)
Expand Down Expand Up @@ -637,6 +641,7 @@ CHECKSUMS
rubocop-ast (1.54.0) sha256=11f7cadec54e593e905b1bb78f2b28bdd4b8e13b34cb82fe49c876e3dd5008c1
rubocop-md (2.0.4) sha256=0d076b6b5e99dea2ddc928c4bd702497decb9a8400da7808091e02ebcafcfb93
rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
rubocop-rubyfmt (0.1.2) sha256=854c50c9133415b4846d20161bfe896bd56dad3ff8eccf755fac8614b587f1cb
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
rubydex (0.4.4) sha256=f506bcc9f4ef4c55ac1312392410f95392ce919a4c0b0c36a18f243969bdd2ba
rubydex (0.4.4-aarch64-linux) sha256=3638b08b7d683f264eb3215e86974c0f2458c7d63e4aab0c772d625e9e0392ea
Expand Down
Loading
Loading