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 b81ecaf commit 6242802
Show file tree
Hide file tree
Showing 31 changed files with 459 additions and 264 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: "54.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.18.0"
- name: Set up Ruby
uses: ruby/setup-ruby@v1
mongodb-version: "7.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: shellbot_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
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
Exclude:
- vendor/**/*
- bin/**/*
Expand All @@ -11,3 +12,8 @@ Metrics:
Enabled: false

inherit_from: .rubocop_todo.yml

require:
- rubocop-capybara
- rubocop-rake
- rubocop-rspec
112 changes: 90 additions & 22 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2020-11-28 01:32:55 UTC using RuboCop version 1.4.2.
# on 2024-10-20 13:03:27 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.
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
Bundler/OrderedGems:
Exclude:
- 'Gemfile'

# Offense count: 1
# Configuration parameters: AllowedParentClasses.
Lint/MissingSuper:
Exclude:
- 'lib/commands/base.rb'
Expand All @@ -31,30 +24,105 @@ Lint/MixedRegexpCaptureTypes:
- 'lib/commands/touch.rb'
- 'lib/commands/vi.rb'

# Offense count: 2
# Cop supports --auto-correct.
Lint/NonDeterministicRequireOrder:
Exclude:
- 'app.rb'
- 'spec/spec_helper.rb'

# Offense count: 1
# Configuration parameters: AllowComments.
# Configuration parameters: AllowComments, AllowNil.
Lint/SuppressedException:
Exclude:
- 'lib/models/vi_program.rb'

# Offense count: 2
# 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:
- 'lib/commands/man.rb'
- 'lib/info.rb'

# Offense count: 17
# Cop supports --auto-correct.
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
# Offense count: 2
RSpec/AnyInstance:
Exclude:
- 'spec/integration/add_to_slack_spec.rb'

# Offense count: 22
# Configuration parameters: Prefixes, AllowedPatterns.
# Prefixes: when, with, without
RSpec/ContextWording:
Exclude:
- 'spec/commands/cat_spec.rb'
- 'spec/commands/cd_spec.rb'
- 'spec/commands/echo_spec.rb'
- 'spec/commands/ls_spec.rb'
- 'spec/commands/man_spec.rb'
- 'spec/commands/mkdir_spec.rb'
- 'spec/commands/pwd_spec.rb'
- 'spec/commands/rm_spec.rb'
- 'spec/commands/touch_spec.rb'
- 'spec/commands/uname_spec.rb'
- 'spec/commands/vi_spec.rb'
- 'spec/commands/whoami_spec.rb'
- 'spec/models/file_system_spec.rb'
- 'spec/models/team_spec.rb'
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'

# Offense count: 9
# Configuration parameters: CountAsOne.
RSpec/ExampleLength:
Max: 11

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

# Offense count: 2
RSpec/LetSetup:
Exclude:
- 'spec/commands/rm_spec.rb'

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

# Offense count: 21
RSpec/MultipleExpectations:
Max: 6

# Offense count: 1
# Configuration parameters: AllowSubject.
RSpec/MultipleMemoizedHelpers:
Max: 6

# Offense count: 3
# Configuration parameters: AllowedGroups.
RSpec/NestedGroups:
Max: 5

# Offense count: 13
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
# Include: **/*_spec.rb
RSpec/SpecFilePathFormat:
Exclude:
- '**/spec/routing/**/*'
- 'spec/commands/cat_spec.rb'
- 'spec/commands/cd_spec.rb'
- 'spec/commands/echo_spec.rb'
- 'spec/commands/ls_spec.rb'
- 'spec/commands/man_spec.rb'
- 'spec/commands/mkdir_spec.rb'
- 'spec/commands/pwd_spec.rb'
- 'spec/commands/rm_spec.rb'
- 'spec/commands/touch_spec.rb'
- 'spec/commands/uname_spec.rb'
- 'spec/commands/vi_spec.rb'
- 'spec/commands/whoami_spec.rb'
- 'spec/version_spec.rb'

# Offense count: 9
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 150
Max: 149
14 changes: 9 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
source 'https://rubygems.org'

ruby '2.7.7'
ruby '3.3.5'

gem 'giphy'
gem 'irb'
gem 'kaminari-grape'
gem 'mongoid'
gem 'mongoid-scroll'
gem 'newrelic-slack-ruby-bot'
gem 'newrelic_rpm'
gem 'newrelic-slack-ruby-bot'
gem 'rack-robotz'
gem 'rack-server-pages'
gem 'slack-ruby-bot-server'
gem 'slack-ruby-bot-server-mailchimp'
gem 'slack-ruby-bot-server-events'
gem 'slack-ruby-bot-server-mailchimp'
gem 'unicorn'

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

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

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

0 comments on commit 6242802

Please sign in to comment.