Skip to content

Commit bb831df

Browse files
committed
Use Puma, update RuboCop, CI.
1 parent 27444b5 commit bb831df

15 files changed

Lines changed: 227 additions & 195 deletions

File tree

.github/workflows/lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: lint
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
RuboCop:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v2
10+
- uses: ruby/setup-ruby@v1
11+
with:
12+
ruby-version: "3.4.6"
13+
bundler-cache: true
14+
- run: bundle exec rubocop

.github/workflows/rubocop.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
1-
name: Tests
1+
name: test
2+
23
on: [push, pull_request]
4+
35
jobs:
4-
test:
6+
RSpec:
57
runs-on: ubuntu-latest
68
steps:
7-
- uses: actions/checkout@v2
8-
- uses: ruby/setup-ruby@v1
9-
with:
10-
ruby-version: '3.3.5'
11-
- uses: supercharge/mongodb-github-action@1.12.0
9+
- uses: actions/checkout@v3
10+
- uses: browser-actions/setup-firefox@latest
1211
with:
13-
mongodb-version: '7.0'
12+
firefox-version: '143.0.3'
1413
- uses: browser-actions/setup-geckodriver@latest
1514
with:
16-
geckodriver-version: '0.35.0'
17-
- uses: browser-actions/setup-firefox@v1.5.2
15+
geckodriver-version: "0.36.0"
16+
- uses: supercharge/mongodb-github-action@1.7.0
1817
with:
19-
firefox-version: '134.0.1'
20-
- run: |
21-
bundle install
18+
mongodb-version: "8.0"
19+
- uses: ruby/setup-ruby@v1
20+
with:
21+
ruby-version: "3.4.6"
22+
bundler-cache: true
2223
- uses: GabrielBB/xvfb-action@v1
23-
with:
24+
with:
2425
run: |
25-
bundle exec rake spec
26+
bundle exec rake spec

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Style/HashTransformValues:
3131

3232
inherit_from: .rubocop_todo.yml
3333

34-
require:
34+
plugins:
3535
- rubocop-rake
3636
- rubocop-capybara
3737
- rubocop-rspec

.rubocop_todo.yml

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,11 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2025-05-04 16:11:52 UTC using RuboCop version 1.66.1.
3+
# on 2025-10-02 12:37:09 UTC using RuboCop version 1.81.1.
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-
# Configuration parameters: EnforcedStyle.
11-
# SupportedStyles: link_or_button, strict
12-
Capybara/ClickLinkOrButtonStyle:
13-
Exclude:
14-
- 'spec/integration/update_cc_spec.rb'
15-
169
# Offense count: 3
1710
Capybara/SpecificActions:
1811
Exclude:
@@ -34,12 +27,18 @@ Lint/NonLocalExitFromIterator:
3427

3528
# Offense count: 1
3629
# This cop supports unsafe autocorrection (--autocorrect-all).
37-
# Configuration parameters: AllowedMethods.
30+
# Configuration parameters: AllowedMethods, InferNonNilReceiver, AdditionalNilMethods.
3831
# AllowedMethods: instance_of?, kind_of?, is_a?, eql?, respond_to?, equal?
32+
# AdditionalNilMethods: present?, blank?, try, try!
3933
Lint/RedundantSafeNavigation:
4034
Exclude:
4135
- 'slack-sup/models/user.rb'
4236

37+
# Offense count: 2
38+
Lint/UselessConstantScoping:
39+
Exclude:
40+
- 'slack-sup/models/team.rb'
41+
4342
# Offense count: 1
4443
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
4544
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
@@ -80,7 +79,7 @@ Naming/MethodParameterName:
8079
# Offense count: 6
8180
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
8281
# SupportedStyles: snake_case, normalcase, non_integer
83-
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
82+
# AllowedIdentifiers: TLS1_1, TLS1_2, capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
8483
Naming/VariableNumber:
8584
Exclude:
8685
- 'spec/api/endpoints/rounds_endpoint_spec.rb'
@@ -125,7 +124,7 @@ RSpec/ExpectInHook:
125124
- 'spec/slack-sup/commands/subscription_spec.rb'
126125
- 'spec/slack-sup/commands/unsubscribe_spec.rb'
127126

128-
# Offense count: 60
127+
# Offense count: 61
129128
# Configuration parameters: Max, AllowedIdentifiers, AllowedPatterns.
130129
RSpec/IndexedLet:
131130
Exclude:
@@ -150,7 +149,7 @@ RSpec/InstanceVariable:
150149
- 'spec/support/api/endpoints/it_behaves_like_a_cursor_api.rb'
151150
- 'spec/support/api/endpoints/it_behaves_like_a_team_token_api.rb'
152151

153-
# Offense count: 47
152+
# Offense count: 48
154153
RSpec/LetSetup:
155154
Exclude:
156155
- 'spec/api/endpoints/stats_endpoint_spec.rb'
@@ -205,8 +204,7 @@ RSpec/RepeatedDescription:
205204
- 'spec/slack-sup/commands/set_spec.rb'
206205

207206
# Offense count: 22
208-
# Configuration parameters: Include, CustomTransform, IgnoreMethods, IgnoreMetadata.
209-
# Include: **/*_spec.rb
207+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata.
210208
RSpec/SpecFilePathFormat:
211209
Enabled: false
212210

@@ -237,6 +235,15 @@ RSpec/VoidExpect:
237235
- 'spec/integration/homepage_spec.rb'
238236
- 'spec/models/round_spec.rb'
239237

238+
# Offense count: 5
239+
# This cop supports unsafe autocorrection (--autocorrect-all).
240+
Style/CollectionQuerying:
241+
Exclude:
242+
- 'slack-sup/api/helpers/error_helpers.rb'
243+
- 'slack-sup/api/helpers/sort_helpers.rb'
244+
- 'slack-sup/commands/admins.rb'
245+
- 'slack-sup/models/round.rb'
246+
240247
# Offense count: 2
241248
# This cop supports unsafe autocorrection (--autocorrect-all).
242249
Style/GlobalStdStream:
@@ -289,13 +296,7 @@ Style/MultilineWhenThen:
289296
- 'slack-sup/commands/opt.rb'
290297
- 'slack-sup/commands/set.rb'
291298

292-
# Offense count: 1
293-
# This cop supports safe autocorrection (--autocorrect).
294-
Style/NestedTernaryOperator:
295-
Exclude:
296-
- 'slack-sup/models/team.rb'
297-
298-
# Offense count: 11
299+
# Offense count: 12
299300
# This cop supports unsafe autocorrection (--autocorrect-all).
300301
# Configuration parameters: EnforcedStyle, AllowedMethods, AllowedPatterns.
301302
# SupportedStyles: predicate, comparison

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### Changelog
22

3+
* 2025/10/02: Upgraded to Ruby 3.4.6 - [@dblock](https://github.com/dblock).
34
* 2025/05/04: Visibly handle vacationing users - [@dblock](https://github.com/dblock).
45
* 2025/02/22: Added `data [n|all]` and only export the last round by default - [@dblock](https://github.com/dblock).
56
* 2025/02/04: Added `admins` that shows all admins - [@dblock](https://github.com/dblock).

Gemfile

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

3-
ruby '3.3.5'
3+
ruby '3.4.6'
44

55
gem 'ambit'
66
gem 'bytesize'
@@ -15,16 +15,16 @@ gem 'mongoid'
1515
gem 'mongoid-scroll'
1616
gem 'newrelic_rpm'
1717
gem 'ostruct'
18+
gem 'puma'
1819
gem 'rack', '~> 3.0.16'
1920
gem 'rack-robotz'
2021
gem 'rack-server-pages'
2122
gem 'rubyzip'
2223
gem 'slack-ruby-bot-server'
2324
gem 'slack-ruby-bot-server-mailchimp'
24-
gem 'slack-ruby-bot-server-rtm'
25+
gem 'slack-ruby-bot-server-rtm', '~> 0.3.0'
2526
gem 'slack-ruby-client'
2627
gem 'stripe', '~> 1.58.0'
27-
gem 'unicorn'
2828
gem 'wannabe_bool'
2929

3030
group :development, :test do

0 commit comments

Comments
 (0)