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
91 changes: 0 additions & 91 deletions .circleci/config.yml

This file was deleted.

22 changes: 22 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Lint

on:
push:
branches: [master, develop]
pull_request:

jobs:
rubocop:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.4'
bundler-cache: true

- name: Run RuboCop
run: bundle exec rubocop
46 changes: 46 additions & 0 deletions .github/workflows/specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Specs

on:
push:
branches: [master, develop]
pull_request:

jobs:
specs:
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
include:
- ruby: '3.2'
rails: '7.0'
- ruby: '3.2'
rails: '7.1'
- ruby: '3.2'
rails: '7.2'
- ruby: '3.3'
rails: '7.1'
- ruby: '3.3'
rails: '7.2'
- ruby: '3.3'
rails: '8.0'
- ruby: '3.4'
rails: '8.0'
- ruby: '3.4'
rails: '8.1'

env:
BUNDLE_GEMFILE: gemfiles/rails_${{ matrix.rails }}.gemfile

steps:
- uses: actions/checkout@v4

- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run specs
run: bundle exec rspec
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@
/tmp/
tags
/gemfiles/*.lock
gemfiles/vendor
.byebug_history
/doc/
/.yardoc/
gemfiles/vendor
/lint/
/node_modules/
yarn-error.log
.rspec_status
18 changes: 3 additions & 15 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,30 @@
/.bundle
/.bin
/vendor
/coverage
/db
/tmp
/app/assets
/node_modules
/public
/spec/files
/spec/fixtures
/spec/javascripts
/bower_components
/doc
/content
**/*.json
**/*.haml
**/*.html
**/*.yml
**/*.md
**/*.sh
**/.*
tags
Procfile
package-lock.json
yarn.lock
/log
/build
/script
/profile
/.circleci
/.git
/.github
**/*.erb
**/*.tgz
**/*.feature
**/*.sql
**/*.csv
*.lock
/bin
/lint
/.tool-versions
Gemfile
apps/apps/karafka_consumer/Gemfile
gemfiles/*.gemfile
4 changes: 3 additions & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{
"printWidth": 120,
"singleQuote": true
"singleQuote": true,
"rubySingleQuote": true,
"plugins": ["@prettier/plugin-ruby"]
}
104 changes: 55 additions & 49 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
require:
- rubocop-rspec
plugins:
- rubocop-performance
- rubocop-rspec_rails

inherit_gem:
prettier: rubocop.yml
- rubocop-rake
- rubocop-rspec

AllCops:
TargetRubyVersion: 2.7
TargetRubyVersion: 3.2
NewCops: enable
SuggestExtensions: false
DisplayCopNames: true
Exclude:
- bin/**/*
- .*/**/*
Expand All @@ -21,35 +20,21 @@ AllCops:
- lint/**/*
- .gemspec/**/*
- .bundle/**/*
- vendor/**/*

Style/IfUnlessModifier:
Enabled: false

RSpec/MultipleExpectations:
Enabled: true
Max: 3
- gemfiles/**/*
- node_modules/**/*

RSpec/NestedGroups:
Enabled: true
Max: 4

RSpec/ExampleLength:
Enabled: true
Max: 10

RSpec/MultipleMemoizedHelpers:
Enabled: true
Max: 15
Layout/LineLength:
Max: 120

RSpec/EmptyExampleGroup:
Enabled: false
Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver

RSpecRails/InferredSpecType:
Enabled: false
Lint/AmbiguousBlockAssociation:
AllowedMethods: [change]

Layout/LineLength:
Max: 120
Lint/StructNewOverride:
Exclude:
- lib/castle/command.rb # public Struct member name kept for backward compat

Metrics/MethodLength:
Enabled: false
Expand All @@ -69,48 +54,69 @@ Metrics/CyclomaticComplexity:
Naming/FileName:
Exclude:
- '*.gemspec'
- lib/castle-rb.rb # canonical gem-name require shim

Style/NumericLiterals:
Performance/MethodObjectAsBlock:
Exclude:
- lib/castle.rb # historical pattern in the require manifest

Performance/StringInclude:
Enabled: false

Layout/MultilineMethodCallIndentation:
EnforcedStyle: indented_relative_to_receiver
Performance/Sum:
Enabled: false

Style/RedundantFetchBlock:
RSpec/EmptyExampleGroup:
Enabled: false

Style/StringLiterals:
EnforcedStyle: single_quotes
SupportedStyles:
- single_quotes
- double_quotes
RSpec/ExampleLength:
Max: 10

RSpec/MultipleExpectations:
Max: 3

RSpec/MultipleMemoizedHelpers:
Max: 17

RSpec/NestedGroups:
Max: 4

RSpec/PendingWithoutReason:
Enabled: false

RSpec/SpecFilePathFormat:
Enabled: false

Security/YAMLLoad:
Enabled: false

Style/FormatStringToken:
Style/Documentation:
Enabled: false

Style/DoubleNegation:
Enabled: false

Style/RedundantParentheses:
Style/FormatStringToken:
Enabled: false

Style/HashEachMethods:
Enabled: false

Performance/Sum:
Style/IfUnlessModifier:
Enabled: false

Performance/StringInclude:
Style/NumericLiterals:
Enabled: false

RSpecRails/HttpStatus:
Style/OpenStructUse:
Exclude:
- spec/**/* # OpenStruct is fine inside test doubles

Style/RedundantFetchBlock:
Enabled: false

RSpecRails/HaveHttpStatus:
Style/RedundantParentheses:
Enabled: false

Lint/AmbiguousBlockAssociation:
AllowedMethods: [change]
Style/StringLiterals:
EnforcedStyle: single_quotes
1 change: 0 additions & 1 deletion .ruby-gemset

This file was deleted.

2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.4.4
3.4.6
3 changes: 3 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ruby 3.4.6
nodejs 24.14.1
yarn 1.22.22
Loading
Loading