slack-ruby-bot-server-events 0.3.2 → 0.4.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.yml +4 -5
- data/.github/workflows/rubocop.yml +1 -1
- data/.github/workflows/test-mongodb.yml +6 -3
- data/.github/workflows/test-postgresql.yml +6 -3
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +57 -3
- data/CHANGELOG.md +5 -0
- data/Gemfile +11 -8
- data/LICENSE +1 -1
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/slack-ruby-bot-server/api/endpoints.rb +7 -9
- data/lib/slack-ruby-bot-server-events/config.rb +1 -1
- data/lib/slack-ruby-bot-server-events/requests/request.rb +1 -1
- data/lib/slack-ruby-bot-server-events/version.rb +1 -1
- data/slack-ruby-bot-server-events.gemspec +1 -0
- metadata +5 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 88331088d012f16ea303c489f607ca27ed972bab12ce367a00889e864b655fbb
|
4
|
+
data.tar.gz: af784776b59a75328f0c2cf1056ceeb85150ff397668209c0791a54cc2e71dea
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 768ba3c6056ada48abe56e3a263d29bf1f76cb2f641a70df6da5470e16ff71e677d8f55bc6c916e54c5bb1258d95173e2ab67d01ebeed827d80c4373d4989dee
|
7
|
+
data.tar.gz: 02d098982a3bf23198ee7ff8cd20cc1a3c6e29b1e04551a42c2ed2e71f386eec97390096cff97eb29a2645271f89b5bb73118f50b58ca01a642c5b8ec92c5c5f
|
@@ -4,6 +4,8 @@ on: [pull_request]
|
|
4
4
|
jobs:
|
5
5
|
danger:
|
6
6
|
runs-on: ubuntu-latest
|
7
|
+
env:
|
8
|
+
BUNDLE_GEMFILE: Gemfile.danger
|
7
9
|
steps:
|
8
10
|
- uses: actions/checkout@v2
|
9
11
|
with:
|
@@ -11,13 +13,10 @@ jobs:
|
|
11
13
|
- name: Set up Ruby
|
12
14
|
uses: ruby/setup-ruby@v1
|
13
15
|
with:
|
14
|
-
ruby-version: 2.
|
16
|
+
ruby-version: 2.7
|
15
17
|
bundler-cache: true
|
16
18
|
- name: Run Danger
|
17
|
-
env:
|
18
|
-
BUNDLE_GEMFILE: Gemfile.danger
|
19
19
|
run: |
|
20
|
-
bundle install
|
21
20
|
# the personal token is public, this is ok, base64 encode to avoid tripping Github
|
22
|
-
TOKEN=$(echo -n
|
21
|
+
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
|
23
22
|
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
|
@@ -7,9 +7,12 @@ jobs:
|
|
7
7
|
strategy:
|
8
8
|
matrix:
|
9
9
|
entry:
|
10
|
-
- { ruby:
|
11
|
-
- { ruby:
|
12
|
-
- { ruby: 3.1
|
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 }
|
13
16
|
name: test (ruby=${{ matrix.entry.ruby }}, mongoid=${{ matrix.entry.mongoid }}, mongodb=${{ matrix.entry.mongodb }})
|
14
17
|
steps:
|
15
18
|
- uses: actions/checkout@v2
|
@@ -7,9 +7,12 @@ jobs:
|
|
7
7
|
strategy:
|
8
8
|
matrix:
|
9
9
|
entry:
|
10
|
-
- { ruby:
|
11
|
-
- { ruby:
|
12
|
-
- { ruby: 3.1
|
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 }
|
13
16
|
name: test (ruby=${{ matrix.entry.ruby }}, postgresql=${{ matrix.entry.postgresql }})
|
14
17
|
services:
|
15
18
|
postgres:
|
data/.rubocop.yml
CHANGED
data/.rubocop_todo.yml
CHANGED
@@ -1,20 +1,74 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2025-09-22 13:18:33 UTC using RuboCop version 1.80.2.
|
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
9
|
# Offense count: 1
|
10
|
-
# Configuration parameters:
|
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
|
11
18
|
# 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
|
12
19
|
Naming/FileName:
|
13
20
|
Exclude:
|
21
|
+
- 'Rakefile.rb'
|
14
22
|
- 'lib/slack-ruby-bot-server-events.rb'
|
15
23
|
|
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
|
+
|
16
69
|
# Offense count: 1
|
17
|
-
#
|
70
|
+
# This cop supports safe autocorrection (--autocorrect).
|
71
|
+
# Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
|
18
72
|
Style/GuardClause:
|
19
73
|
Exclude:
|
20
74
|
- 'spec/slack-ruby-bot-server-events/api/endpoints/slack/events_endpoint_spec.rb'
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
### Changelog
|
2
2
|
|
3
|
+
#### 0.4.0 (2025/09/22)
|
4
|
+
|
5
|
+
* [#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
|
+
|
3
8
|
#### 0.3.2 (2022/06/09)
|
4
9
|
|
5
10
|
* [#13](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/13): Replace Travis CI with Github Actions - [@CrazyOptimist](https://github.com/CrazyOptimist).
|
data/Gemfile
CHANGED
@@ -2,21 +2,22 @@
|
|
2
2
|
|
3
3
|
source 'https://rubygems.org'
|
4
4
|
|
5
|
-
case ENV
|
6
|
-
when 'mongoid'
|
5
|
+
case ENV.fetch('DATABASE_ADAPTER', nil)
|
6
|
+
when 'mongoid'
|
7
7
|
gem 'kaminari-mongoid'
|
8
|
-
gem 'mongoid'
|
8
|
+
gem 'mongoid', ENV['MONGOID_VERSION'] || '~> 7.3.0'
|
9
9
|
gem 'mongoid-scroll'
|
10
|
-
|
10
|
+
gem 'mutex_m'
|
11
|
+
when 'activerecord'
|
11
12
|
gem 'activerecord'
|
12
13
|
gem 'otr-activerecord'
|
13
|
-
gem '
|
14
|
-
gem 'cursor_pagination', github: 'dblock/cursor_pagination', branch: 'misc' # rubocop:disable Bundler/OrderedGems
|
14
|
+
gem 'pagy_cursor'
|
15
15
|
gem 'pg'
|
16
|
+
gem 'virtus'
|
16
17
|
when nil
|
17
18
|
warn "Missing ENV['DATABASE_ADAPTER']."
|
18
19
|
else
|
19
|
-
warn "Invalid ENV['DATABASE_ADAPTER']: #{ENV
|
20
|
+
warn "Invalid ENV['DATABASE_ADAPTER']: #{ENV.fetch('DATABASE_ADAPTER', nil)}."
|
20
21
|
end
|
21
22
|
|
22
23
|
gemspec
|
@@ -30,7 +31,9 @@ group :development, :test do
|
|
30
31
|
gem 'rack-test'
|
31
32
|
gem 'rake'
|
32
33
|
gem 'rspec'
|
33
|
-
gem 'rubocop', '
|
34
|
+
gem 'rubocop', '1.80.2'
|
35
|
+
gem 'rubocop-rake'
|
36
|
+
gem 'rubocop-rspec'
|
34
37
|
gem 'vcr'
|
35
38
|
gem 'webmock'
|
36
39
|
end
|
data/LICENSE
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2020 Daniel Doubrovkine & Contributors
|
3
|
+
Copyright (c) 2020-2025 Daniel Doubrovkine & Contributors
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
data/Rakefile
CHANGED
@@ -7,7 +7,7 @@ require 'rspec/core'
|
|
7
7
|
require 'rspec/core/rake_task'
|
8
8
|
|
9
9
|
RSpec::Core::RakeTask.new(:spec) do |spec|
|
10
|
-
spec.pattern = FileList['spec/**/*_spec.rb'].exclude(%r{ext
|
10
|
+
spec.pattern = FileList['spec/**/*_spec.rb'].exclude(%r{ext/(?!#{ENV.fetch('DATABASE_ADAPTER', nil)})})
|
11
11
|
end
|
12
12
|
|
13
13
|
require 'rubocop/rake_task'
|
@@ -8,15 +8,13 @@ module SlackRubyBotServer
|
|
8
8
|
format :json
|
9
9
|
|
10
10
|
before do
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
error!('Invalid Signature', 403)
|
19
|
-
end
|
11
|
+
::Slack::Events::Request.new(
|
12
|
+
request,
|
13
|
+
signing_secret: SlackRubyBotServer::Events.config.signing_secret,
|
14
|
+
signature_expires_in: SlackRubyBotServer::Events.config.signature_expires_in
|
15
|
+
).verify!
|
16
|
+
rescue ::Slack::Events::Request::TimestampExpired
|
17
|
+
error!('Invalid Signature', 403)
|
20
18
|
end
|
21
19
|
|
22
20
|
mount SlackRubyBotServer::Events::Api::Endpoints::Slack::CommandsEndpoint
|
@@ -15,7 +15,7 @@ module SlackRubyBotServer
|
|
15
15
|
|
16
16
|
def reset!
|
17
17
|
self.callbacks = Hash.new { |h, k| h[k] = [] }
|
18
|
-
self.signing_secret = ENV
|
18
|
+
self.signing_secret = ENV.fetch('SLACK_SIGNING_SECRET', nil)
|
19
19
|
self.signature_expires_in = 5 * 60
|
20
20
|
|
21
21
|
on :event, 'url_verification' do |event|
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-ruby-bot-server-events
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Doubrovkine
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 2025-09-22 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: slack-ruby-bot-server
|
@@ -24,7 +23,6 @@ dependencies:
|
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
25
|
version: 0.12.0
|
27
|
-
description:
|
28
26
|
email:
|
29
27
|
- dblock@dblock.org
|
30
28
|
executables: []
|
@@ -67,8 +65,8 @@ files:
|
|
67
65
|
- slack-ruby-bot-server-events.gemspec
|
68
66
|
homepage: https://github.com/slack-ruby/slack-ruby-bot-server-events
|
69
67
|
licenses: []
|
70
|
-
metadata:
|
71
|
-
|
68
|
+
metadata:
|
69
|
+
rubygems_mfa_required: 'true'
|
72
70
|
rdoc_options: []
|
73
71
|
require_paths:
|
74
72
|
- lib
|
@@ -83,8 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
83
81
|
- !ruby/object:Gem::Version
|
84
82
|
version: '0'
|
85
83
|
requirements: []
|
86
|
-
rubygems_version: 3.
|
87
|
-
signing_key:
|
84
|
+
rubygems_version: 3.6.2
|
88
85
|
specification_version: 4
|
89
86
|
summary: Slack commands, interactive buttons, and events extension for slack-ruby-bot-server.
|
90
87
|
test_files: []
|