slack-ruby-bot-server-events 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/danger-comment.yml +16 -0
- data/.github/workflows/danger.yml +11 -20
- data/.github/workflows/lint.yml +29 -0
- data/.github/workflows/release.yml +28 -0
- data/.github/workflows/test.yml +84 -0
- data/.gitignore +1 -0
- data/.rubocop.yml +91 -5
- data/.rubocop_todo.yml +15 -21
- data/.spellcheck.txt +43 -0
- data/CHANGELOG.md +14 -0
- data/CONTRIBUTING.md +16 -20
- data/Dangerfile +4 -1
- data/Gemfile +23 -4
- data/README.md +102 -28
- data/RELEASING.md +20 -42
- data/Rakefile +22 -3
- data/lib/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint.rb +44 -2
- data/lib/slack-ruby-bot-server-events/config.rb +25 -8
- data/lib/slack-ruby-bot-server-events/version.rb +1 -1
- data/script/release.rb +15 -0
- data/slack-ruby-bot-server-events.gemspec +1 -3
- metadata +13 -7
- data/.github/workflows/rubocop.yml +0 -16
- data/.github/workflows/test-mongodb.yml +0 -32
- data/.github/workflows/test-postgresql.yml +0 -39
- data/Gemfile.danger +0 -6
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 60ed73e42813146189fa14a45d35d36217b803c35d206b2d652cf03cc050d14f
|
|
4
|
+
data.tar.gz: d855feebc8f762b78302beecde48f11827a2bb86c22e1fbbfa5640e4ef8a0ec1
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 651de671026dd77dbadeb5033a8c1cd3096ca67cbc8f5d860c8e95597fac456ce30a0fa9a7c14166b01ebf954900751c9c7231fdf139380c37e8c3b2b7ec6a4f
|
|
7
|
+
data.tar.gz: d92f53d7ba27160451e773c247b442cf15fe20aebc3927a5637651bc5dc5d210fa1c630303fc61526e1b42bca91e9305aed4bf9d44ce9267aae107196e2731ff
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
name: Danger Comment
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_run:
|
|
5
|
+
workflows: [Danger]
|
|
6
|
+
types: [completed]
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
actions: read
|
|
10
|
+
issues: write
|
|
11
|
+
pull-requests: write
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
comment:
|
|
15
|
+
uses: danger/danger-pr-comment/.github/workflows/danger-comment.yml@v0.3.0
|
|
16
|
+
secrets: inherit
|
|
@@ -1,22 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
on:
|
|
1
|
+
name: Danger
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, reopened, edited, synchronize]
|
|
6
|
+
|
|
4
7
|
jobs:
|
|
5
8
|
danger:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
with:
|
|
12
|
-
fetch-depth: 0
|
|
13
|
-
- name: Set up Ruby
|
|
14
|
-
uses: ruby/setup-ruby@v1
|
|
15
|
-
with:
|
|
16
|
-
ruby-version: 2.7
|
|
17
|
-
bundler-cache: true
|
|
18
|
-
- name: Run Danger
|
|
19
|
-
run: |
|
|
20
|
-
# the personal token is public, this is ok, base64 encode to avoid tripping Github
|
|
21
|
-
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
|
|
22
|
-
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
|
9
|
+
uses: danger/danger-pr-comment/.github/workflows/danger-run.yml@v0.3.0
|
|
10
|
+
secrets: inherit
|
|
11
|
+
with:
|
|
12
|
+
ruby-version: '4.0'
|
|
13
|
+
bundler-cache: true
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
name: Lint
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
name: Lint Code and Documentation
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 10
|
|
20
|
+
steps:
|
|
21
|
+
- name: Check Out Code
|
|
22
|
+
uses: actions/checkout@v7
|
|
23
|
+
- name: Set Up Ruby
|
|
24
|
+
uses: ruby/setup-ruby@v1
|
|
25
|
+
with:
|
|
26
|
+
ruby-version: '4.0'
|
|
27
|
+
bundler-cache: true
|
|
28
|
+
- name: Run Lint
|
|
29
|
+
run: bundle exec rake lint
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
version:
|
|
7
|
+
description: Optional release version overriding the checked-in version.
|
|
8
|
+
type: string
|
|
9
|
+
required: false
|
|
10
|
+
dry-run:
|
|
11
|
+
description: Check release prerequisites, such as RubyGems Trusted Publishing, without releasing.
|
|
12
|
+
type: boolean
|
|
13
|
+
default: false
|
|
14
|
+
|
|
15
|
+
permissions:
|
|
16
|
+
contents: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
release:
|
|
21
|
+
if: github.repository == 'slack-ruby/slack-ruby-bot-server-events' && github.ref == 'refs/heads/master'
|
|
22
|
+
uses: dblock/ruby-gem-release/.github/workflows/release.yml@v0.9.0
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: '3.3'
|
|
25
|
+
version: ${{ inputs.version }}
|
|
26
|
+
dry-run: ${{ inputs.dry-run }}
|
|
27
|
+
# The reusable workflow cannot start MongoDB or PostgreSQL, so database specs run in the Test workflow.
|
|
28
|
+
test: bundle exec rake lint && bundle exec rspec spec/release
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
name: Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [master]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
concurrency:
|
|
9
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
10
|
+
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
11
|
+
|
|
12
|
+
permissions:
|
|
13
|
+
contents: read
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
mongodb:
|
|
17
|
+
name: Test (Ruby ${{ matrix.entry.ruby }}, Mongoid ${{ matrix.entry.mongoid }}, MongoDB ${{ matrix.entry.mongodb }})
|
|
18
|
+
runs-on: ubuntu-latest
|
|
19
|
+
timeout-minutes: 10
|
|
20
|
+
env:
|
|
21
|
+
DATABASE_ADAPTER: mongoid
|
|
22
|
+
DATABASE_URL: mongodb://localhost
|
|
23
|
+
MONGOID_VERSION: ${{ matrix.entry.mongoid }}
|
|
24
|
+
strategy:
|
|
25
|
+
fail-fast: false
|
|
26
|
+
matrix:
|
|
27
|
+
entry:
|
|
28
|
+
- { ruby: '3.1', mongoid: '6.4.8', mongodb: '4.4' }
|
|
29
|
+
- { ruby: '3.1', mongoid: '7.3.5', mongodb: '5.0' }
|
|
30
|
+
- { ruby: '3.2', mongoid: '8.1.13', mongodb: '6.0' }
|
|
31
|
+
- { ruby: '3.4', mongoid: '9.0.13', mongodb: '7.0' }
|
|
32
|
+
- { ruby: '4.0', mongoid: '9.1.2', mongodb: '8.3' }
|
|
33
|
+
steps:
|
|
34
|
+
- name: Check Out Code
|
|
35
|
+
uses: actions/checkout@v7
|
|
36
|
+
- name: Set Up Ruby
|
|
37
|
+
uses: ruby/setup-ruby@v1
|
|
38
|
+
with:
|
|
39
|
+
ruby-version: ${{ matrix.entry.ruby }}
|
|
40
|
+
bundler-cache: true
|
|
41
|
+
- name: Start MongoDB
|
|
42
|
+
uses: supercharge/mongodb-github-action@1.12.1
|
|
43
|
+
with:
|
|
44
|
+
mongodb-version: ${{ matrix.entry.mongodb }}
|
|
45
|
+
- name: Run Tests
|
|
46
|
+
run: bundle exec rake spec
|
|
47
|
+
postgresql:
|
|
48
|
+
name: Test (Ruby ${{ matrix.entry.ruby }}, PostgreSQL ${{ matrix.entry.postgresql }})
|
|
49
|
+
runs-on: ubuntu-latest
|
|
50
|
+
timeout-minutes: 10
|
|
51
|
+
env:
|
|
52
|
+
DATABASE_ADAPTER: activerecord
|
|
53
|
+
DATABASE_URL: postgres://test:password@localhost/slack_ruby_bot_server_events_test
|
|
54
|
+
strategy:
|
|
55
|
+
fail-fast: false
|
|
56
|
+
matrix:
|
|
57
|
+
entry:
|
|
58
|
+
- { ruby: '3.1', postgresql: '11' }
|
|
59
|
+
- { ruby: '3.2', postgresql: '14' }
|
|
60
|
+
- { ruby: '3.3', postgresql: '16' }
|
|
61
|
+
- { ruby: '3.4', postgresql: '17' }
|
|
62
|
+
- { ruby: '4.0', postgresql: '18' }
|
|
63
|
+
- { ruby: '4.0', postgresql: '19' }
|
|
64
|
+
services:
|
|
65
|
+
postgres:
|
|
66
|
+
image: postgres:${{ matrix.entry.postgresql }}
|
|
67
|
+
env:
|
|
68
|
+
POSTGRES_USER: test
|
|
69
|
+
POSTGRES_PASSWORD: password
|
|
70
|
+
POSTGRES_DB: slack_ruby_bot_server_events_test
|
|
71
|
+
ports:
|
|
72
|
+
- 5432:5432
|
|
73
|
+
# the postgres container does not provide a health check
|
|
74
|
+
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
|
75
|
+
steps:
|
|
76
|
+
- name: Check Out Code
|
|
77
|
+
uses: actions/checkout@v7
|
|
78
|
+
- name: Set Up Ruby
|
|
79
|
+
uses: ruby/setup-ruby@v1
|
|
80
|
+
with:
|
|
81
|
+
ruby-version: ${{ matrix.entry.ruby }}
|
|
82
|
+
bundler-cache: true
|
|
83
|
+
- name: Run Tests
|
|
84
|
+
run: bundle exec rake spec
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
|
@@ -1,11 +1,31 @@
|
|
|
1
|
+
plugins:
|
|
2
|
+
- rubocop-md
|
|
3
|
+
- rubocop-prose
|
|
4
|
+
- rubocop-rake
|
|
5
|
+
- rubocop-rspec
|
|
6
|
+
- rubocop-spellcheck
|
|
7
|
+
- rubocop-yaml
|
|
8
|
+
|
|
9
|
+
inherit_from: ".rubocop_todo.yml"
|
|
10
|
+
|
|
1
11
|
AllCops:
|
|
2
12
|
NewCops: enable
|
|
13
|
+
SuggestExtensions: false
|
|
14
|
+
inherit_mode:
|
|
15
|
+
merge:
|
|
16
|
+
- Include
|
|
17
|
+
Include:
|
|
18
|
+
- ".github/**/*.yml"
|
|
19
|
+
- ".rubocop.yml"
|
|
20
|
+
Exclude:
|
|
21
|
+
- coverage/**/*
|
|
22
|
+
- pkg/**/*
|
|
23
|
+
- vendor/**/*
|
|
3
24
|
|
|
4
25
|
Metrics:
|
|
5
26
|
Enabled: false
|
|
6
27
|
|
|
7
28
|
Layout/LineLength:
|
|
8
|
-
Max: 500
|
|
9
29
|
Enabled: false
|
|
10
30
|
|
|
11
31
|
Style/Documentation:
|
|
@@ -14,9 +34,75 @@ Style/Documentation:
|
|
|
14
34
|
Style/ModuleFunction:
|
|
15
35
|
EnforcedStyle: extend_self
|
|
16
36
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
-
|
|
37
|
+
YAML/Lint/InvalidSyntax:
|
|
38
|
+
Include:
|
|
39
|
+
- "**/*.yml"
|
|
40
|
+
- "**/*.yaml"
|
|
41
|
+
|
|
42
|
+
YAML/Lint/DuplicateKey:
|
|
43
|
+
Include:
|
|
44
|
+
- "**/*.yml"
|
|
45
|
+
- "**/*.yaml"
|
|
46
|
+
|
|
47
|
+
Naming/FileName:
|
|
48
|
+
inherit_mode:
|
|
49
|
+
merge:
|
|
50
|
+
- Exclude
|
|
51
|
+
Exclude:
|
|
52
|
+
- "**/*.md"
|
|
53
|
+
- ".github/workflows/*.yml"
|
|
54
|
+
|
|
55
|
+
Markdown/HeadingCapitalization:
|
|
56
|
+
inherit_mode:
|
|
57
|
+
merge:
|
|
58
|
+
- Exclude
|
|
59
|
+
Enabled: true
|
|
60
|
+
Style: title_case
|
|
61
|
+
Exclude:
|
|
62
|
+
- CHANGELOG.md
|
|
63
|
+
|
|
64
|
+
Prose/MaxLength:
|
|
65
|
+
inherit_mode:
|
|
66
|
+
merge:
|
|
67
|
+
- Exclude
|
|
68
|
+
Max: false
|
|
69
|
+
Exclude:
|
|
70
|
+
- CHANGELOG.md
|
|
71
|
+
|
|
72
|
+
Spellcheck:
|
|
73
|
+
DictionaryFiles:
|
|
74
|
+
en:
|
|
75
|
+
- gem:rubocop-spellcheck/data/en/en.dic
|
|
76
|
+
- ".spellcheck.txt"
|
|
77
|
+
|
|
78
|
+
Spellcheck/Spelling:
|
|
79
|
+
Exclude: []
|
|
80
|
+
|
|
81
|
+
Markdown/CompactLists:
|
|
82
|
+
inherit_mode:
|
|
83
|
+
merge:
|
|
84
|
+
- Exclude
|
|
85
|
+
Exclude:
|
|
86
|
+
- CHANGELOG.md
|
|
87
|
+
|
|
88
|
+
Markdown/FenceLanguage:
|
|
89
|
+
inherit_mode:
|
|
90
|
+
merge:
|
|
91
|
+
- Exclude
|
|
92
|
+
Exclude:
|
|
93
|
+
- CHANGELOG.md
|
|
20
94
|
|
|
21
|
-
|
|
95
|
+
# Release examples run a release in a fixture and verify the tag, the next development commit, and their files together.
|
|
96
|
+
RSpec/ExampleLength:
|
|
97
|
+
inherit_mode:
|
|
98
|
+
merge:
|
|
99
|
+
- Exclude
|
|
100
|
+
Exclude:
|
|
101
|
+
- spec/release/release_spec.rb
|
|
22
102
|
|
|
103
|
+
RSpec/MultipleExpectations:
|
|
104
|
+
inherit_mode:
|
|
105
|
+
merge:
|
|
106
|
+
- Exclude
|
|
107
|
+
Exclude:
|
|
108
|
+
- spec/release/release_spec.rb
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,72 +1,66 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
|
-
# `rubocop --auto-gen-config`
|
|
3
|
-
#
|
|
2
|
+
# `rubocop --auto-gen-config --no-exclude-limit --no-offense-counts --no-auto-gen-timestamp`
|
|
3
|
+
# using RuboCop version 1.92.3.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
|
-
# Offense count: 1
|
|
10
|
-
# Configuration parameters: Severity.
|
|
11
9
|
Gemspec/RequiredRubyVersion:
|
|
12
10
|
Exclude:
|
|
13
11
|
- 'slack-ruby-bot-server-events.gemspec'
|
|
14
12
|
|
|
15
|
-
# Offense count: 1
|
|
16
13
|
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
|
17
14
|
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
|
|
18
15
|
# 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
|
|
19
16
|
Naming/FileName:
|
|
20
17
|
Exclude:
|
|
21
|
-
- 'Rakefile.rb'
|
|
22
18
|
- 'lib/slack-ruby-bot-server-events.rb'
|
|
23
19
|
|
|
24
|
-
# Offense count: 7
|
|
25
20
|
RSpec/AnyInstance:
|
|
26
21
|
Exclude:
|
|
27
22
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
|
|
28
23
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/commands_endpoint_spec.rb'
|
|
29
24
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
|
|
30
25
|
|
|
31
|
-
# Offense count: 2
|
|
32
26
|
# Configuration parameters: Prefixes, AllowedPatterns.
|
|
33
27
|
# Prefixes: when, with, without
|
|
34
28
|
RSpec/ContextWording:
|
|
35
29
|
Exclude:
|
|
36
30
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
|
|
37
31
|
|
|
38
|
-
#
|
|
39
|
-
# Configuration parameters: CountAsOne.
|
|
32
|
+
# Configuration parameters: Max, CountAsOne.
|
|
40
33
|
RSpec/ExampleLength:
|
|
41
|
-
|
|
34
|
+
Exclude:
|
|
35
|
+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
|
|
42
36
|
|
|
43
|
-
#
|
|
37
|
+
# Configuration parameters: Max.
|
|
44
38
|
RSpec/MultipleExpectations:
|
|
45
|
-
|
|
39
|
+
Exclude:
|
|
40
|
+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
|
|
41
|
+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/commands_endpoint_spec.rb'
|
|
42
|
+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
|
|
46
43
|
|
|
47
|
-
#
|
|
48
|
-
# Configuration parameters: AllowedGroups.
|
|
44
|
+
# Configuration parameters: Max, AllowedGroups.
|
|
49
45
|
RSpec/NestedGroups:
|
|
50
|
-
|
|
46
|
+
Exclude:
|
|
47
|
+
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
|
|
51
48
|
|
|
52
|
-
#
|
|
53
|
-
#
|
|
49
|
+
# Configuration parameters: CustomTransform, IgnoreMethods, IgnoreMetadata, InflectorPath, EnforcedInflector.
|
|
50
|
+
# SupportedInflectors: default, active_support
|
|
54
51
|
RSpec/SpecFilePathFormat:
|
|
55
52
|
Exclude:
|
|
56
|
-
- '**/spec/routing/**/*'
|
|
57
53
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/actions_endpoint_spec.rb'
|
|
58
54
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/commands_endpoint_spec.rb'
|
|
59
55
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
|
|
60
56
|
- 'spec/slack-ruby-bot-server-events/config_spec.rb'
|
|
61
57
|
- 'spec/slack-ruby-bot-server-events/version_spec.rb'
|
|
62
58
|
|
|
63
|
-
# Offense count: 1
|
|
64
59
|
# This cop supports unsafe autocorrection (--autocorrect-all).
|
|
65
60
|
Style/GlobalStdStream:
|
|
66
61
|
Exclude:
|
|
67
62
|
- 'spec/database_adapters/activerecord/activerecord.rb'
|
|
68
63
|
|
|
69
|
-
# Offense count: 1
|
|
70
64
|
# This cop supports safe autocorrection (--autocorrect).
|
|
71
65
|
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
|
72
66
|
Style/GuardClause:
|
data/.spellcheck.txt
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
activerecord
|
|
2
|
+
ActiveSupport
|
|
3
|
+
api
|
|
4
|
+
Bundler
|
|
5
|
+
CHANGELOG
|
|
6
|
+
Changelog
|
|
7
|
+
CrazyOptimist
|
|
8
|
+
dblock
|
|
9
|
+
dedman
|
|
10
|
+
Doubrovkine
|
|
11
|
+
dropdowns
|
|
12
|
+
duffn
|
|
13
|
+
ENV
|
|
14
|
+
EvFGTNRKLG
|
|
15
|
+
Gemfile
|
|
16
|
+
gemspec
|
|
17
|
+
Github
|
|
18
|
+
hal
|
|
19
|
+
JRuby
|
|
20
|
+
json
|
|
21
|
+
md
|
|
22
|
+
mongoid
|
|
23
|
+
nijave
|
|
24
|
+
nitpicky
|
|
25
|
+
OAuth
|
|
26
|
+
ostruct
|
|
27
|
+
postgresql
|
|
28
|
+
Rakefile
|
|
29
|
+
rb
|
|
30
|
+
README
|
|
31
|
+
Rebase
|
|
32
|
+
rebase
|
|
33
|
+
RSpec
|
|
34
|
+
RuboCop
|
|
35
|
+
rubocop
|
|
36
|
+
RubyGems
|
|
37
|
+
SlackRubyBotServer
|
|
38
|
+
SlackRubyBotServerEventsRelease
|
|
39
|
+
subclasses
|
|
40
|
+
url
|
|
41
|
+
webhook
|
|
42
|
+
YAML
|
|
43
|
+
yml
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
### Changelog
|
|
2
2
|
|
|
3
|
+
#### 0.5.0 (2026/11/25)
|
|
4
|
+
|
|
5
|
+
* [#27](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/27): Migrate Danger to danger-pr-comment workflow - [@dblock](https://github.com/dblock).
|
|
6
|
+
* [#28](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/28): Consolidate test workflows into test.yml, add Ruby 4.0, MongoDB 8.0, and PostgreSQL 18, update actions, and add the ostruct development dependency needed on Ruby 4.0 - [@dblock](https://github.com/dblock).
|
|
7
|
+
* [#29](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/29): Lint Markdown, YAML, and spelling with rubocop-md, rubocop-prose, rubocop-spellcheck, and rubocop-yaml in a separate Lint workflow, and clean up documentation - [@dblock](https://github.com/dblock).
|
|
8
|
+
* [#30](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/30): Run CI pushes only on the default branch, cancel superseded pull request runs, cache gems, and bound job times - [@dblock](https://github.com/dblock).
|
|
9
|
+
* [#31](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/31): Use the danger/danger-pr-comment v0.3.0 reusable workflows - [@dblock](https://github.com/dblock).
|
|
10
|
+
* [#35](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/35): Release with ruby-gem-release through a manually dispatched GitHub Actions workflow and RubyGems Trusted Publishing - [@dblock](https://github.com/dblock).
|
|
11
|
+
* [#36](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/36), [#41](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/41): Fix [#21](https://github.com/slack-ruby/slack-ruby-bot-server-events/issues/21), match `view_submission` and `view_closed` callbacks by `view.callback_id` - [@dblock](https://github.com/dblock).
|
|
12
|
+
* [#37](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/37): Fix [#7](https://github.com/slack-ruby/slack-ruby-bot-server-events/issues/7), log the key and definition location of a callback that raises an error - [@dblock](https://github.com/dblock).
|
|
13
|
+
* [#38](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/38): Fix [#16](https://github.com/slack-ruby/slack-ruby-bot-server-events/issues/16), handle several events, actions, or commands with one callback, e.g. `config.on :event, 'event_callback', %w[pin_added pin_removed]` - [@dblock](https://github.com/dblock).
|
|
14
|
+
* [#39](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/39): Document testing callbacks with RSpec - [@dblock](https://github.com/dblock).
|
|
15
|
+
* [#42](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/42): Match `block_suggestion` callbacks by `action_id`, for external select menus - [@dedman](https://github.com/dedman), [@dblock](https://github.com/dblock).
|
|
16
|
+
|
|
3
17
|
#### 0.4.0 (2025/09/22)
|
|
4
18
|
|
|
5
19
|
* [#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).
|
data/CONTRIBUTING.md
CHANGED
|
@@ -4,13 +4,13 @@ This project is work of [many contributors](https://github.com/slack-ruby/slack-
|
|
|
4
4
|
|
|
5
5
|
You're encouraged to submit [pull requests](https://github.com/slack-ruby/slack-ruby-bot-server-events/pulls), [propose features and discuss issues](https://github.com/slack-ruby/slack-ruby-bot-server-events/issues).
|
|
6
6
|
|
|
7
|
-
In the examples below, substitute your
|
|
7
|
+
In the examples below, substitute your GitHub username for `contributor` in URLs.
|
|
8
8
|
|
|
9
9
|
## Fork the Project
|
|
10
10
|
|
|
11
|
-
Fork the [project on
|
|
11
|
+
Fork the [project on GitHub](https://github.com/slack-ruby/slack-ruby-bot-server-events) and check out your copy.
|
|
12
12
|
|
|
13
|
-
```
|
|
13
|
+
```sh
|
|
14
14
|
git clone https://github.com/contributor/slack-ruby-bot-server-events.git
|
|
15
15
|
cd slack-ruby-bot-server-events
|
|
16
16
|
git remote add upstream https://github.com/slack-ruby/slack-ruby-bot-server-events.git
|
|
@@ -20,7 +20,7 @@ git remote add upstream https://github.com/slack-ruby/slack-ruby-bot-server-even
|
|
|
20
20
|
|
|
21
21
|
Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.
|
|
22
22
|
|
|
23
|
-
```
|
|
23
|
+
```sh
|
|
24
24
|
git checkout master
|
|
25
25
|
git pull upstream master
|
|
26
26
|
git checkout -b my-feature-branch
|
|
@@ -30,15 +30,14 @@ git checkout -b my-feature-branch
|
|
|
30
30
|
|
|
31
31
|
Ensure that you can build the project and run tests.
|
|
32
32
|
|
|
33
|
-
```
|
|
33
|
+
```sh
|
|
34
34
|
bundle install
|
|
35
35
|
bundle exec rake
|
|
36
36
|
```
|
|
37
37
|
|
|
38
38
|
## Write Tests
|
|
39
39
|
|
|
40
|
-
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build.
|
|
41
|
-
Add to [spec](spec).
|
|
40
|
+
Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [spec](spec).
|
|
42
41
|
|
|
43
42
|
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
|
44
43
|
|
|
@@ -46,8 +45,7 @@ We definitely appreciate pull requests that highlight or reproduce a problem, ev
|
|
|
46
45
|
|
|
47
46
|
Implement your feature or bug fix.
|
|
48
47
|
|
|
49
|
-
Ruby style is enforced with [
|
|
50
|
-
Run `bundle exec rubocop` and fix any style issues highlighted.
|
|
48
|
+
Ruby style is enforced with [RuboCop](https://github.com/bbatsov/rubocop). Run `bundle exec rake lint` to check Ruby, Markdown, YAML, and spelling, and fix any issues highlighted. Lint runs on MRI Ruby 3.3 or newer; add reviewed project vocabulary to [`.spellcheck.txt`](.spellcheck.txt).
|
|
51
49
|
|
|
52
50
|
Make sure that `bundle exec rake` completes without errors.
|
|
53
51
|
|
|
@@ -57,41 +55,39 @@ Document any external behavior in the [README](README.md).
|
|
|
57
55
|
|
|
58
56
|
## Update Changelog
|
|
59
57
|
|
|
60
|
-
Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*.
|
|
61
|
-
Make it look like every other line, including your name and link to your Github account.
|
|
58
|
+
Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Make it look like every other line, including your name and link to your GitHub account.
|
|
62
59
|
|
|
63
60
|
## Commit Changes
|
|
64
61
|
|
|
65
62
|
Make sure git knows your name and email address:
|
|
66
63
|
|
|
67
|
-
```
|
|
64
|
+
```sh
|
|
68
65
|
git config --global user.name "Your Name"
|
|
69
66
|
git config --global user.email "contributor@example.com"
|
|
70
67
|
```
|
|
71
68
|
|
|
72
69
|
Writing good commit logs is important. A commit log should describe what changed and why.
|
|
73
70
|
|
|
74
|
-
```
|
|
71
|
+
```sh
|
|
75
72
|
git add ...
|
|
76
73
|
git commit
|
|
77
74
|
```
|
|
78
75
|
|
|
79
76
|
## Push
|
|
80
77
|
|
|
81
|
-
```
|
|
78
|
+
```sh
|
|
82
79
|
git push origin my-feature-branch
|
|
83
80
|
```
|
|
84
81
|
|
|
85
82
|
## Make a Pull Request
|
|
86
83
|
|
|
87
|
-
Go to https://github.com/contributor/slack-ruby-bot-server-events and select your feature branch.
|
|
88
|
-
Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
|
84
|
+
Go to https://github.com/contributor/slack-ruby-bot-server-events and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.
|
|
89
85
|
|
|
90
86
|
## Rebase
|
|
91
87
|
|
|
92
88
|
If you've been working on a change for a while, rebase with upstream/master.
|
|
93
89
|
|
|
94
|
-
```
|
|
90
|
+
```sh
|
|
95
91
|
git fetch upstream
|
|
96
92
|
git rebase upstream/master
|
|
97
93
|
git push origin my-feature-branch -f
|
|
@@ -101,20 +97,20 @@ git push origin my-feature-branch -f
|
|
|
101
97
|
|
|
102
98
|
Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.
|
|
103
99
|
|
|
104
|
-
```
|
|
100
|
+
```markdown
|
|
105
101
|
* [#123](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/123): Reticulated splines - [@contributor](https://github.com/contributor).
|
|
106
102
|
```
|
|
107
103
|
|
|
108
104
|
Amend your previous commit and force push the changes.
|
|
109
105
|
|
|
110
|
-
```
|
|
106
|
+
```sh
|
|
111
107
|
git commit --amend
|
|
112
108
|
git push origin my-feature-branch -f
|
|
113
109
|
```
|
|
114
110
|
|
|
115
111
|
## Check on Your Pull Request
|
|
116
112
|
|
|
117
|
-
Go back to your pull request after a few minutes and see whether it passed muster with
|
|
113
|
+
Go back to your pull request after a few minutes and see whether it passed muster with GitHub Actions. Everything should look green, otherwise fix issues and amend your commit as described above.
|
|
118
114
|
|
|
119
115
|
## Be Patient
|
|
120
116
|
|
data/Dangerfile
CHANGED
data/Gemfile
CHANGED
|
@@ -4,8 +4,10 @@ source 'https://rubygems.org'
|
|
|
4
4
|
|
|
5
5
|
case ENV.fetch('DATABASE_ADAPTER', nil)
|
|
6
6
|
when 'mongoid'
|
|
7
|
+
# ActiveSupport before 8.1, which older Mongoid versions resolve to, is incompatible with json 3.
|
|
8
|
+
gem 'json', '< 3'
|
|
7
9
|
gem 'kaminari-mongoid'
|
|
8
|
-
gem 'mongoid', ENV['MONGOID_VERSION'] || '~> 7.
|
|
10
|
+
gem 'mongoid', ENV['MONGOID_VERSION'] || '~> 7.6.0'
|
|
9
11
|
gem 'mongoid-scroll'
|
|
10
12
|
gem 'mutex_m'
|
|
11
13
|
when 'activerecord'
|
|
@@ -24,16 +26,33 @@ gemspec
|
|
|
24
26
|
|
|
25
27
|
group :development, :test do
|
|
26
28
|
gem 'bundler'
|
|
29
|
+
gem 'danger-changelog', require: false
|
|
30
|
+
gem 'danger-pr-comment', require: false
|
|
31
|
+
gem 'danger-toc', require: false
|
|
27
32
|
gem 'database_cleaner'
|
|
28
33
|
gem 'fabrication'
|
|
29
34
|
gem 'faker'
|
|
30
35
|
gem 'hyperclient'
|
|
36
|
+
gem 'ostruct'
|
|
31
37
|
gem 'rack-test'
|
|
32
38
|
gem 'rake'
|
|
33
39
|
gem 'rspec'
|
|
34
|
-
gem 'rubocop', '1.80.2'
|
|
35
|
-
gem 'rubocop-rake'
|
|
36
|
-
gem 'rubocop-rspec'
|
|
37
40
|
gem 'vcr'
|
|
38
41
|
gem 'webmock'
|
|
42
|
+
if RUBY_ENGINE == 'ruby' && Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3')
|
|
43
|
+
gem 'rubocop', '~> 1.92'
|
|
44
|
+
gem 'rubocop-md', '~> 3.0', require: false
|
|
45
|
+
gem 'rubocop-prose', '~> 0.2', require: false
|
|
46
|
+
gem 'rubocop-rake', '~> 0.7', require: false
|
|
47
|
+
gem 'rubocop-rspec', '~> 3.10', require: false
|
|
48
|
+
gem 'rubocop-spellcheck', '~> 0.2', require: false
|
|
49
|
+
gem 'rubocop-yaml', '~> 0.1.0', require: false
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
if RUBY_ENGINE == 'ruby' && Gem::Version.new(RUBY_VERSION) >= Gem::Version.new('3.3')
|
|
54
|
+
group :development do
|
|
55
|
+
gem 'commonmarker', '~> 2.10', require: false
|
|
56
|
+
gem 'ruby-gem-release', '0.9.0', require: false
|
|
57
|
+
end
|
|
39
58
|
end
|