Skip to content

Commit e892582

Browse files
authored
Merge pull request #26 from dblock/misc
Misc
2 parents 0f21bf0 + ab40f19 commit e892582

File tree

21 files changed

+116
-41
lines changed

21 files changed

+116
-41
lines changed

.github/workflows/danger.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,19 @@ on: [pull_request]
44
jobs:
55
danger:
66
runs-on: ubuntu-latest
7+
env:
8+
BUNDLE_GEMFILE: Gemfile.danger
79
steps:
810
- uses: actions/checkout@v2
911
with:
1012
fetch-depth: 0
1113
- name: Set up Ruby
1214
uses: ruby/setup-ruby@v1
1315
with:
14-
ruby-version: 2.6
16+
ruby-version: 2.7
1517
bundler-cache: true
1618
- name: Run Danger
17-
env:
18-
BUNDLE_GEMFILE: Gemfile.danger
1919
run: |
20-
bundle install
2120
# the personal token is public, this is ok, base64 encode to avoid tripping Github
2221
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
2322
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose

.github/workflows/rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
- name: Set up Ruby
1111
uses: ruby/setup-ruby@v1
1212
with:
13-
ruby-version: 2.7
13+
ruby-version: 3.4
1414
bundler-cache: true
1515
- name: Run RuboCop
1616
run: bundle exec rubocop

.github/workflows/test-mongodb.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ jobs:
77
strategy:
88
matrix:
99
entry:
10-
- { ruby: 2.6.2, mongoid: 6.4.8, mongodb: 4.4 }
11-
- { ruby: 2.6.2, mongoid: 7.3.0, mongodb: 5.0 }
12-
- { ruby: 3.1.1, mongoid: 7.3.0, mongodb: 5.0 }
10+
- { ruby: 3.1, mongoid: 6.4.8, mongodb: 4.4 }
11+
- { ruby: 3.1, mongoid: 7.3.0, mongodb: 5.0 }
12+
- { ruby: 3.1, mongoid: 7.3.0, mongodb: 5.0 }
13+
- { ruby: 3.2, mongoid: 8.1.11, mongodb: 6.0 }
14+
- { ruby: 3.4, mongoid: 8.1.11, mongodb: 7.0 }
15+
- { ruby: 3.4, mongoid: 9.0.8, mongodb: 8.0 }
1316
name: test (ruby=${{ matrix.entry.ruby }}, mongoid=${{ matrix.entry.mongoid }}, mongodb=${{ matrix.entry.mongodb }})
1417
steps:
1518
- uses: actions/checkout@v2

.github/workflows/test-postgresql.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,12 @@ jobs:
77
strategy:
88
matrix:
99
entry:
10-
- { ruby: 2.6.2, postgresql: 11 }
11-
- { ruby: 2.6.2, postgresql: 14 }
12-
- { ruby: 3.1.1, postgresql: 14 }
10+
- { ruby: 3.1, postgresql: 11 }
11+
- { ruby: 3.1, postgresql: 14 }
12+
- { ruby: 3.1, postgresql: 14 }
13+
- { ruby: 3.2, postgresql: 15 }
14+
- { ruby: 3.3, postgresql: 16 }
15+
- { ruby: 3.4, postgresql: 17 }
1316
name: test (ruby=${{ matrix.entry.ruby }}, postgresql=${{ matrix.entry.postgresql }})
1417
services:
1518
postgres:

.rubocop.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
AllCops:
2+
NewCops: enable
3+
14
Metrics:
25
Enabled: false
36

@@ -11,5 +14,9 @@ Style/Documentation:
1114
Style/ModuleFunction:
1215
EnforcedStyle: extend_self
1316

17+
plugins:
18+
- rubocop-rake
19+
- rubocop-rspec
20+
1421
inherit_from: .rubocop_todo.yml
1522

.rubocop_todo.yml

Lines changed: 57 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,74 @@
11
# This configuration was generated by
22
# `rubocop --auto-gen-config`
3-
# on 2020-07-19 23:46:20 -0400 using RuboCop version 0.81.0.
3+
# on 2025-09-22 13:18:33 UTC using RuboCop version 1.80.2.
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

99
# Offense count: 1
10-
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
10+
# Configuration parameters: Severity.
11+
Gemspec/RequiredRubyVersion:
12+
Exclude:
13+
- 'slack-ruby-bot-server-events.gemspec'
14+
15+
# Offense count: 1
16+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
17+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
1118
# 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
1219
Naming/FileName:
1320
Exclude:
21+
- 'Rakefile.rb'
1422
- 'lib/slack-ruby-bot-server-events.rb'
1523

24+
# Offense count: 7
25+
RSpec/AnyInstance:
26+
Exclude:
27+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
28+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/commands_endpoint_spec.rb'
29+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
30+
31+
# Offense count: 2
32+
# Configuration parameters: Prefixes, AllowedPatterns.
33+
# Prefixes: when, with, without
34+
RSpec/ContextWording:
35+
Exclude:
36+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
37+
38+
# Offense count: 3
39+
# Configuration parameters: CountAsOne.
40+
RSpec/ExampleLength:
41+
Max: 9
42+
43+
# Offense count: 22
44+
RSpec/MultipleExpectations:
45+
Max: 2
46+
47+
# Offense count: 5
48+
# Configuration parameters: AllowedGroups.
49+
RSpec/NestedGroups:
50+
Max: 5
51+
52+
# Offense count: 5
53+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata.
54+
RSpec/SpecFilePathFormat:
55+
Exclude:
56+
- '**/spec/routing/**/*'
57+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
58+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/commands_endpoint_spec.rb'
59+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
60+
- 'spec/slack-ruby-bot-server-events/config_spec.rb'
61+
- 'spec/slack-ruby-bot-server-events/version_spec.rb'
62+
63+
# Offense count: 1
64+
# This cop supports unsafe autocorrection (--autocorrect-all).
65+
Style/GlobalStdStream:
66+
Exclude:
67+
- 'spec/database_adapters/activerecord/activerecord.rb'
68+
1669
# Offense count: 1
17-
# Configuration parameters: MinBodyLength.
70+
# This cop supports safe autocorrection (--autocorrect).
71+
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
1872
Style/GuardClause:
1973
Exclude:
2074
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'

CHANGELOG.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
### Changelog
22

3-
#### 0.3.3 (Next)
3+
#### 0.4.0 (Next)
44

5-
* Your contribution here.
65
* [#18](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/18): Use pagy_cursor in place of cursor_pagination - [@duffn](https://github.com/duffn).
6+
* [#26](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/26): Upgraded RuboCop to 1.80.2 - [@dblock](https://github.com/dblock).
7+
* Your contribution here.
78

89
#### 0.3.2 (2022/06/09)
910

Gemfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,13 @@
22

33
source 'https://rubygems.org'
44

5-
case ENV['DATABASE_ADAPTER']
6-
when 'mongoid' then
5+
case ENV.fetch('DATABASE_ADAPTER', nil)
6+
when 'mongoid'
77
gem 'kaminari-mongoid'
88
gem 'mongoid', ENV['MONGOID_VERSION'] || '~> 7.3.0'
99
gem 'mongoid-scroll'
10-
when 'activerecord' then
10+
gem 'mutex_m'
11+
when 'activerecord'
1112
gem 'activerecord'
1213
gem 'otr-activerecord'
1314
gem 'pagy_cursor'
@@ -16,7 +17,7 @@ when 'activerecord' then
1617
when nil
1718
warn "Missing ENV['DATABASE_ADAPTER']."
1819
else
19-
warn "Invalid ENV['DATABASE_ADAPTER']: #{ENV['DATABASE_ADAPTER']}."
20+
warn "Invalid ENV['DATABASE_ADAPTER']: #{ENV.fetch('DATABASE_ADAPTER', nil)}."
2021
end
2122

2223
gemspec
@@ -30,7 +31,9 @@ group :development, :test do
3031
gem 'rack-test'
3132
gem 'rake'
3233
gem 'rspec'
33-
gem 'rubocop', '0.81.0'
34+
gem 'rubocop', '1.80.2'
35+
gem 'rubocop-rake'
36+
gem 'rubocop-rspec'
3437
gem 'vcr'
3538
gem 'webmock'
3639
end

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 Daniel Doubrovkine & Contributors
3+
Copyright (c) 2020-2025 Daniel Doubrovkine & Contributors
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,6 @@ end
173173

174174
### Copyright & License
175175

176-
Copyright [Daniel Doubrovkine](http://code.dblock.org) and Contributors, 2020
176+
Copyright [Daniel Doubrovkine](http://code.dblock.org) and Contributors, 2020-2025
177177

178178
[MIT License](LICENSE)

0 commit comments

Comments
 (0)