Skip to content

Commit

Permalink
Upgraded to Ruby 3.3.5.
Browse files Browse the repository at this point in the history
  • Loading branch information
dblock committed Oct 19, 2024
1 parent a0bc7d7 commit d5debfb
Show file tree
Hide file tree
Showing 58 changed files with 864 additions and 413 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/rubocop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7.7"
ruby-version: "3.3.5"
bundler-cache: true
- name: Run RuboCop
run: bundle exec rubocop
37 changes: 15 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,25 @@
name: test

name: Tests
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Firefox
uses: browser-actions/setup-firefox@latest
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
firefox-version: "108.0"
- name: Download geckodriver
uses: browser-actions/setup-geckodriver@latest
ruby-version: "3.3.5"
- uses: supercharge/mongodb-github-action@1.7.0
with:
geckodriver-version: "0.32.0"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
mongodb-version: "5.0"
- uses: browser-actions/setup-geckodriver@latest
with:
ruby-version: "2.7.7"
bundler-cache: true
- name: Start MongoDB
uses: supercharge/mongodb-github-action@1.7.0
geckodriver-version: "0.34.0"
- uses: browser-actions/setup-firefox@v1
with:
mongodb-version: "5"
mongodb-db: slack_arena_test
- name: Run tests
uses: GabrielBB/xvfb-action@v1
firefox-version: "129.0.2"
- run: |
bundle install
- uses: GabrielBB/xvfb-action@v1
with:
run: bundle exec rake spec
run: |
bundle exec rake spec
6 changes: 6 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
AllCops:
NewCops: enable
TargetRubyVersion: 3.3

Style/FrozenStringLiteralComment:
Enabled: false
Expand All @@ -20,3 +21,8 @@ Style/BlockDelimiters:
- expect

inherit_from: .rubocop_todo.yml

require:
- rubocop-capybara
- rubocop-rake
- rubocop-rspec
219 changes: 197 additions & 22 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-11-15 14:55:51 UTC using RuboCop version 0.89.1.
# on 2024-10-19 12:51:15 UTC using RuboCop version 1.67.0.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 2
# Cop supports --auto-correct.
Lint/NonDeterministicRequireOrder:
# Offense count: 1
# Configuration parameters: IgnoreLiteralBranches, IgnoreConstantBranches.
Lint/DuplicateBranch:
Exclude:
- 'slack-arena.rb'
- 'spec/spec_helper.rb'
- 'config/initializers/arena.rb'

# Offense count: 3
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# Offense count: 1
# Configuration parameters: AllowComments, AllowEmptyLambdas.
Lint/EmptyBlock:
Exclude:
- 'spec/models/arena/mentioned_spec.rb'

# Offense count: 1
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
Naming/FileName:
Exclude:
- 'repro/issue-39.rb'
- 'repro/issue-40.rb'
- 'Rakefile.rb'
- 'slack-arena.rb'

# Offense count: 4
# Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Exclude:
- 'slack-arena/commands/help.rb'
Expand All @@ -33,56 +38,226 @@ Naming/HeredocDelimiterNaming:

# Offense count: 3
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: at, by, db, id, in, io, ip, of, on, os, pp, to
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'slack-arena/app.rb'
- 'slack-arena/models/team.rb'

# Offense count: 42
RSpec/AnyInstance:
Exclude:
- 'spec/api/endpoints/credit_cards_endpoint_spec.rb'
- 'spec/api/endpoints/slack_endpoint_spec.rb'
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/subscriptions_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/api/endpoints/users_endpoint_spec.rb'
- 'spec/integration/connect_spec.rb'
- 'spec/integration/teams_spec.rb'
- 'spec/models/arena_channel_spec.rb'
- 'spec/models/arena_user_spec.rb'
- 'spec/models/team_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/slack-arena/app_spec.rb'

# Offense count: 69
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Enabled: false

# Offense count: 29
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: SkipBlocks, EnforcedStyle, OnlyStaticConstants.
# SupportedStyles: described_class, explicit
RSpec/DescribedClass:
Exclude:
- 'spec/models/arena/added_spec.rb'
- 'spec/models/arena/collaborating_spec.rb'
- 'spec/models/arena/commented_spec.rb'
- 'spec/models/arena/created_spec.rb'
- 'spec/models/arena/followed_spec.rb'
- 'spec/models/team_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/slack-arena/app_spec.rb'
- 'spec/slack-arena/server_spec.rb'
- 'spec/slack-arena/service_spec.rb'

# Offense count: 1
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AutoCorrect.
RSpec/EmptyExampleGroup:
Exclude:
- 'spec/models/arena/mentioned_spec.rb'

# Offense count: 72
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 46

# Offense count: 5
RSpec/ExpectInHook:
Exclude:
- 'spec/api/endpoints/credit_cards_endpoint_spec.rb'
- 'spec/api/endpoints/slack_endpoint_spec.rb'
- 'spec/models/team_spec.rb'

# Offense count: 2
RSpec/IdenticalEqualityAssertion:
Exclude:
- 'spec/models/arena_channel_spec.rb'
- 'spec/models/arena_user_spec.rb'

# Offense count: 2
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
RSpec/IndexedLet:
Exclude:
- 'spec/api/endpoints/teams_endpoint_spec.rb'

# Offense count: 2
# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Exclude:
- 'spec/slack-arena/service_spec.rb'
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'

# Offense count: 13
RSpec/LetSetup:
Exclude:
- 'spec/api/endpoints/slack_endpoint_spec.rb'
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/slack-arena/app_spec.rb'
- 'spec/slack-arena/commands/help_spec.rb'
- 'spec/slack-arena/commands/info_spec.rb'
- 'spec/slack-arena/commands/subscription_spec.rb'

# Offense count: 46
# Configuration parameters: .
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
EnforcedStyle: receive

# Offense count: 87
RSpec/MultipleExpectations:
Max: 10

# Offense count: 25
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Exclude:
- 'spec/api/documentation_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/models/arena/added_spec.rb'
- 'spec/models/arena/collaborating_spec.rb'
- 'spec/models/arena/commented_spec.rb'
- 'spec/models/arena/created_spec.rb'
- 'spec/models/arena/followed_spec.rb'
- 'spec/slack-arena/app_spec.rb'

# Offense count: 22
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 8

# Offense count: 12
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- '**/spec/routing/**/*'
- 'spec/api/404_spec.rb'
- 'spec/api/cors_spec.rb'
- 'spec/api/documentation_spec.rb'
- 'spec/api/robots_spec.rb'
- 'spec/models/arena_user_spec.rb'
- 'spec/slack-arena/app_spec.rb'
- 'spec/slack-arena/commands/help_spec.rb'
- 'spec/slack-arena/commands/info_spec.rb'
- 'spec/slack-arena/commands/subscription_spec.rb'
- 'spec/slack-arena/server_spec.rb'
- 'spec/slack-arena/service_spec.rb'
- 'spec/slack-arena/version_spec.rb'

# Offense count: 15
RSpec/StubbedMock:
Exclude:
- 'spec/api/endpoints/slack_endpoint_spec.rb'
- 'spec/api/endpoints/subscriptions_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/models/arena_channel_spec.rb'
- 'spec/models/arena_user_spec.rb'
- 'spec/models/team_spec.rb'
- 'spec/models/user_spec.rb'
- 'spec/slack-arena/app_spec.rb'
- 'spec/slack-arena/server_spec.rb'

# Offense count: 2
# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Exclude:
- 'spec/api/endpoints/teams_endpoint_spec.rb'

# Offense count: 2
RSpec/VoidExpect:
Exclude:
- 'spec/integration/connect_spec.rb'
- 'spec/integration/teams_spec.rb'

# Offense count: 2
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: AllowSplatArgument.
Style/HashConversion:
Exclude:
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'

# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformKeys:
Exclude:
- 'slack-arena/api/helpers/error_helpers.rb'

# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/HashTransformValues:
Exclude:
- 'slack-arena/api/helpers/error_helpers.rb'

# Offense count: 1
# Cop supports --auto-correct.
# This cop supports safe autocorrection (--autocorrect).
Style/NestedTernaryOperator:
Exclude:
- 'slack-arena/models/team.rb'

# Offense count: 1
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
# SupportedStyles: predicate, comparison
Style/NumericPredicate:
Exclude:
- 'spec/**/*'
- 'slack-arena/app.rb'

# Offense count: 1
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
Style/SlicingWithRange:
Exclude:
- 'slack-arena/api/helpers/sort_helpers.rb'

# Offense count: 3
# Cop supports --auto-correct.
# This cop supports unsafe autocorrection (--autocorrect-all).
# Configuration parameters: Mode.
Style/StringConcatenation:
Exclude:
- 'slack-arena.rb'
- 'slack-arena/api/helpers/error_helpers.rb'
- 'slack-arena/models/team.rb'

# Offense count: 61
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Offense count: 58
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 260
Loading

0 comments on commit d5debfb

Please sign in to comment.