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 20, 2024
1 parent 0ec6e8b commit 87914da
Show file tree
Hide file tree
Showing 24 changed files with 450 additions and 252 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
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: browser-actions/setup-firefox@latest
with:
firefox-version: "108.0"
- uses: browser-actions/setup-geckodriver@latest
with:
geckodriver-version: "0.32.0"
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7.7"
bundler-cache: true
ruby-version: "3.3.5"
- uses: supercharge/[email protected]
with:
mongodb-version: "5"
mongodb-db: slack_api_explorer_test
- name: Run tests
uses: GabrielBB/xvfb-action@v1
mongodb-version: "7.0"
- uses: browser-actions/setup-geckodriver@latest
with:
geckodriver-version: "0.34.0"
- uses: browser-actions/setup-firefox@v1
with:
firefox-version: "129.0.2"
- run: |
bundle install
- uses: GabrielBB/xvfb-action@v1
with:
run: bundle exec rake
run: |
bundle exec rake spec
7 changes: 7 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
AllCops:
NewCops: enable
TargetRubyVersion: 3.3
Exclude:
- vendor/**/*
- bin/**/*
Expand All @@ -10,3 +12,8 @@ Metrics:
Enabled: false

inherit_from: .rubocop_todo.yml

require:
- rubocop-capybara
- rubocop-rake
- rubocop-rspec
113 changes: 109 additions & 4 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,127 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2019-04-16 08:56:55 -0400 using RuboCop version 0.67.2.
# on 2024-10-20 13:24:03 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: 1
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
# 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:
- 'Rakefile.rb'
- 'slack-api-explorer.rb'

# Offense count: 2
# Configuration parameters: Blacklist.
# Blacklist: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
# Configuration parameters: ForbiddenDelimiters.
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
Naming/HeredocDelimiterNaming:
Exclude:
- 'slack-api-explorer/commands/help.rb'
- 'slack-api-explorer/info.rb'

# Offense count: 6
RSpec/AnyInstance:
Exclude:
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/integration/teams_spec.rb'

# Offense count: 17
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/api/404_spec.rb'
- 'spec/api/cors_spec.rb'
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'
- 'spec/api/swagger_documentation_spec.rb'
- 'spec/integration/teams_spec.rb'
- 'spec/slack-api-explorer/commands/slack_spec.rb'
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'

# Offense count: 10
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 27

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

# Offense count: 5
RSpec/LetSetup:
Exclude:
- 'spec/api/endpoints/status_endpoint_spec.rb'
- 'spec/api/endpoints/teams_endpoint_spec.rb'

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

# Offense count: 28
RSpec/MultipleExpectations:
Max: 7

# Offense count: 2
# Configuration parameters: EnforcedStyle, IgnoreSharedExamples.
# SupportedStyles: always, named_only
RSpec/NamedSubject:
Exclude:
- 'spec/api/swagger_documentation_spec.rb'

# Offense count: 1
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 4

# Offense count: 2
RSpec/RepeatedExampleGroupDescription:
Exclude:
- 'spec/api/endpoints/teams_endpoint_spec.rb'

# Offense count: 8
# 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/robots_spec.rb'
- 'spec/api/swagger_documentation_spec.rb'
- 'spec/slack-api-explorer/commands/default_spec.rb'
- 'spec/slack-api-explorer/commands/slack_spec.rb'
- 'spec/slack-api-explorer/commands/unknown_spec.rb'
- 'spec/slack-api-explorer/version_spec.rb'

# Offense count: 1
RSpec/StubbedMock:
Exclude:
- 'spec/api/endpoints/teams_endpoint_spec.rb'

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

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

# Offense count: 15
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 175
19 changes: 11 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
source 'http://rubygems.org'

ruby '2.7.7'
ruby '3.3.5'

gem 'giphy'
gem 'irb'
gem 'jsonpath', '0.9.0'
gem 'kaminari-grape'
gem 'mongoid'
gem 'mongoid-scroll'
gem 'newrelic-slack-ruby-bot'
gem 'newrelic_rpm'
gem 'rack', '~> 2.2'
gem 'newrelic-slack-ruby-bot'
gem 'rack'
gem 'rack-robotz'
gem 'rack-server-pages'
gem 'slack-ruby-bot-server'
gem 'slack-ruby-bot-server-mailchimp'
gem 'slack-ruby-bot-server-rtm'
gem 'unicorn'

group :development, :test do
gem 'foreman'
gem 'rake'
gem 'rubocop', '0.76.0'
gem 'rubocop'
gem 'rubocop-capybara'
gem 'rubocop-rake'
gem 'rubocop-rspec'
end

group :development do
Expand All @@ -30,11 +31,13 @@ end

group :test do
gem 'capybara'
gem 'database_cleaner', '~> 1.8.4'
gem 'database_cleaner-mongoid'
gem 'fabrication'
gem 'faker'
gem 'hyperclient', '~> 0.9'
gem 'faraday-rack'
gem 'hyperclient'
gem 'rack-test'
gem 'rackup'
gem 'rspec'
gem 'selenium-webdriver'
gem 'vcr'
Expand Down
Loading

0 comments on commit 87914da

Please sign in to comment.