Skip to content

Commit 2ef842e

Browse files
committed
Upgraded to Ruby 3.3.5.
1 parent b81ecaf commit 2ef842e

31 files changed

+477
-290
lines changed

.github/workflows/rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
- name: Set up Ruby
1212
uses: ruby/setup-ruby@v1
1313
with:
14-
ruby-version: "2.7.7"
14+
ruby-version: "3.3.5"
1515
bundler-cache: true
1616
- name: Run RuboCop
1717
run: bundle exec rubocop

.github/workflows/test.yml

Lines changed: 15 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,25 @@
1-
name: test
2-
1+
name: Tests
32
on: [push, pull_request]
4-
53
jobs:
64
test:
75
runs-on: ubuntu-latest
86
steps:
9-
- name: Checkout
10-
uses: actions/checkout@v3
11-
- name: Setup Firefox
12-
uses: browser-actions/setup-firefox@latest
7+
- uses: actions/checkout@v2
8+
- uses: ruby/setup-ruby@v1
139
with:
14-
firefox-version: "54.0"
15-
- name: Download geckodriver
16-
uses: browser-actions/setup-geckodriver@latest
10+
ruby-version: "3.3.5"
11+
- uses: supercharge/[email protected]
1712
with:
18-
geckodriver-version: "0.18.0"
19-
- name: Set up Ruby
20-
uses: ruby/setup-ruby@v1
13+
mongodb-version: "7.0"
14+
- uses: browser-actions/setup-geckodriver@latest
2115
with:
22-
ruby-version: "2.7.7"
23-
bundler-cache: true
24-
- name: Start MongoDB
25-
uses: supercharge/[email protected]
16+
geckodriver-version: "0.34.0"
17+
- uses: browser-actions/setup-firefox@v1
2618
with:
27-
mongodb-version: "5"
28-
mongodb-db: shellbot_test
29-
- name: Run tests
30-
uses: GabrielBB/xvfb-action@v1
19+
firefox-version: "129.0.2"
20+
- run: |
21+
bundle install
22+
- uses: GabrielBB/xvfb-action@v1
3123
with:
32-
run: bundle exec rake
24+
run: |
25+
bundle exec rake spec

.rubocop.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
AllCops:
22
NewCops: enable
3+
TargetRubyVersion: 3.3
34
Exclude:
45
- vendor/**/*
56
- bin/**/*
@@ -11,3 +12,8 @@ Metrics:
1112
Enabled: false
1213

1314
inherit_from: .rubocop_todo.yml
15+
16+
require:
17+
- rubocop-capybara
18+
- rubocop-rake
19+
- rubocop-rspec

.rubocop_todo.yml

Lines changed: 90 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,13 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2020-11-28 01:32:55 UTC using RuboCop version 1.4.2.
3+
# on 2024-10-20 13:03:27 UTC using RuboCop version 1.67.0.
44
# The point is for the user to remove these configuration records
55
# one by one as the offenses are removed from the code base.
66
# Note that changes in the inspected code, or installation of new
77
# versions of RuboCop, may require this file to be generated again.
88

9-
# Offense count: 2
10-
# Cop supports --auto-correct.
11-
# Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12-
# Include: **/*.gemfile, **/Gemfile, **/gems.rb
13-
Bundler/OrderedGems:
14-
Exclude:
15-
- 'Gemfile'
16-
179
# Offense count: 1
10+
# Configuration parameters: AllowedParentClasses.
1811
Lint/MissingSuper:
1912
Exclude:
2013
- 'lib/commands/base.rb'
@@ -31,30 +24,105 @@ Lint/MixedRegexpCaptureTypes:
3124
- 'lib/commands/touch.rb'
3225
- 'lib/commands/vi.rb'
3326

34-
# Offense count: 2
35-
# Cop supports --auto-correct.
36-
Lint/NonDeterministicRequireOrder:
37-
Exclude:
38-
- 'app.rb'
39-
- 'spec/spec_helper.rb'
40-
4127
# Offense count: 1
42-
# Configuration parameters: AllowComments.
28+
# Configuration parameters: AllowComments, AllowNil.
4329
Lint/SuppressedException:
4430
Exclude:
4531
- 'lib/models/vi_program.rb'
4632

4733
# Offense count: 2
4834
# Configuration parameters: ForbiddenDelimiters.
49-
# ForbiddenDelimiters: (?-mix:(^|\s)(EO[A-Z]{1}|END)(\s|$))
35+
# ForbiddenDelimiters: (?i-mx:(^|\s)(EO[A-Z]{1}|END)(\s|$))
5036
Naming/HeredocDelimiterNaming:
5137
Exclude:
5238
- 'lib/commands/man.rb'
5339
- 'lib/info.rb'
5440

55-
# Offense count: 17
56-
# Cop supports --auto-correct.
57-
# Configuration parameters: AutoCorrect, AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
41+
# Offense count: 2
42+
RSpec/AnyInstance:
43+
Exclude:
44+
- 'spec/integration/add_to_slack_spec.rb'
45+
46+
# Offense count: 22
47+
# Configuration parameters: Prefixes, AllowedPatterns.
48+
# Prefixes: when, with, without
49+
RSpec/ContextWording:
50+
Exclude:
51+
- 'spec/commands/cat_spec.rb'
52+
- 'spec/commands/cd_spec.rb'
53+
- 'spec/commands/echo_spec.rb'
54+
- 'spec/commands/ls_spec.rb'
55+
- 'spec/commands/man_spec.rb'
56+
- 'spec/commands/mkdir_spec.rb'
57+
- 'spec/commands/pwd_spec.rb'
58+
- 'spec/commands/rm_spec.rb'
59+
- 'spec/commands/touch_spec.rb'
60+
- 'spec/commands/uname_spec.rb'
61+
- 'spec/commands/vi_spec.rb'
62+
- 'spec/commands/whoami_spec.rb'
63+
- 'spec/models/file_system_spec.rb'
64+
- 'spec/models/team_spec.rb'
65+
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'
66+
67+
# Offense count: 9
68+
# Configuration parameters: CountAsOne.
69+
RSpec/ExampleLength:
70+
Max: 11
71+
72+
# Offense count: 1
73+
# Configuration parameters: AssignmentOnly.
74+
RSpec/InstanceVariable:
75+
Exclude:
76+
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'
77+
78+
# Offense count: 2
79+
RSpec/LetSetup:
80+
Exclude:
81+
- 'spec/commands/rm_spec.rb'
82+
83+
# Offense count: 27
84+
# Configuration parameters: .
85+
# SupportedStyles: have_received, receive
86+
RSpec/MessageSpies:
87+
EnforcedStyle: receive
88+
89+
# Offense count: 21
90+
RSpec/MultipleExpectations:
91+
Max: 6
92+
93+
# Offense count: 1
94+
# Configuration parameters: AllowSubject.
95+
RSpec/MultipleMemoizedHelpers:
96+
Max: 6
97+
98+
# Offense count: 3
99+
# Configuration parameters: AllowedGroups.
100+
RSpec/NestedGroups:
101+
Max: 5
102+
103+
# Offense count: 13
104+
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
105+
# Include: **/*_spec.rb
106+
RSpec/SpecFilePathFormat:
107+
Exclude:
108+
- '**/spec/routing/**/*'
109+
- 'spec/commands/cat_spec.rb'
110+
- 'spec/commands/cd_spec.rb'
111+
- 'spec/commands/echo_spec.rb'
112+
- 'spec/commands/ls_spec.rb'
113+
- 'spec/commands/man_spec.rb'
114+
- 'spec/commands/mkdir_spec.rb'
115+
- 'spec/commands/pwd_spec.rb'
116+
- 'spec/commands/rm_spec.rb'
117+
- 'spec/commands/touch_spec.rb'
118+
- 'spec/commands/uname_spec.rb'
119+
- 'spec/commands/vi_spec.rb'
120+
- 'spec/commands/whoami_spec.rb'
121+
- 'spec/version_spec.rb'
122+
123+
# Offense count: 9
124+
# This cop supports safe autocorrection (--autocorrect).
125+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
58126
# URISchemes: http, https
59127
Layout/LineLength:
60-
Max: 150
128+
Max: 149

Gemfile

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
source 'https://rubygems.org'
22

3-
ruby '2.7.7'
3+
ruby '3.3.5'
44

5-
gem 'giphy'
65
gem 'irb'
76
gem 'kaminari-grape'
87
gem 'mongoid'
98
gem 'mongoid-scroll'
10-
gem 'newrelic-slack-ruby-bot'
119
gem 'newrelic_rpm'
10+
gem 'newrelic-slack-ruby-bot'
1211
gem 'rack-robotz'
1312
gem 'rack-server-pages'
14-
gem 'slack-ruby-bot-server'
15-
gem 'slack-ruby-bot-server-mailchimp'
1613
gem 'slack-ruby-bot-server-events'
14+
gem 'slack-ruby-bot-server-mailchimp'
1715
gem 'unicorn'
1816

1917
group :development, :test do
2018
gem 'foreman'
2119
gem 'rake'
2220
gem 'rubocop'
21+
gem 'rubocop-capybara'
22+
gem 'rubocop-rake'
23+
gem 'rubocop-rspec'
2324
end
2425

2526
group :development do
@@ -28,11 +29,13 @@ end
2829

2930
group :test do
3031
gem 'capybara'
31-
gem 'database_cleaner'
32+
gem 'database_cleaner-mongoid'
3233
gem 'fabrication'
3334
gem 'faker'
35+
gem 'faraday-rack'
3436
gem 'hyperclient'
3537
gem 'rack-test'
38+
gem 'rackup'
3639
gem 'rspec'
3740
gem 'selenium-webdriver'
3841
gem 'vcr'

0 commit comments

Comments
 (0)