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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c97cea49ad88b67c93b7d7bd75b7bae4cb873abad8f3afb0760623124679deb
4
- data.tar.gz: d49cecc2fefaef91fff2c7b0da99ea665e956a55d3d806bc9a26bd97e89ff491
3
+ metadata.gz: 88331088d012f16ea303c489f607ca27ed972bab12ce367a00889e864b655fbb
4
+ data.tar.gz: af784776b59a75328f0c2cf1056ceeb85150ff397668209c0791a54cc2e71dea
5
5
  SHA512:
6
- metadata.gz: 2ab1888588e34c0920955e5975fe8f3ece436e036271ef78556cfd9c2ba655b42ef886ee3a8ea481c43cd0c6356e871fb85b8a97fcaef4489202cebbd0e57038
7
- data.tar.gz: 3d1e7ae990f0e91e73a07a3305d2a4b7b993316c987f50e4e27d171131c22ad0a60e4f449ac1a3b5ed8321b4af6bd8271b67d5bf972e78951cf5ce88d2c44a1b
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.6
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 NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode)
21
+ TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
23
22
  DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
@@ -10,7 +10,7 @@ jobs:
10
10
  - name: Set up Ruby
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
- ruby-version: 2.7
13
+ ruby-version: 3.4
14
14
  bundler-cache: true
15
15
  - name: Run RuboCop
16
16
  run: bundle exec rubocop
@@ -7,9 +7,12 @@ jobs:
7
7
  strategy:
8
8
  matrix:
9
9
  entry:
10
- - { ruby: 2.6.2, mongoid: 6.4.8, mongodb: 4.4 }
11
- - { ruby: 2.7.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 }
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: 2.6.2, postgresql: 11 }
11
- - { ruby: 2.7.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 }
13
16
  name: test (ruby=${{ matrix.entry.ruby }}, postgresql=${{ matrix.entry.postgresql }})
14
17
  services:
15
18
  postgres:
data/.rubocop.yml CHANGED
@@ -1,3 +1,6 @@
1
+ AllCops:
2
+ NewCops: enable
3
+
1
4
  Metrics:
2
5
  Enabled: false
3
6
 
@@ -11,5 +14,9 @@ Style/Documentation:
11
14
  Style/ModuleFunction:
12
15
  EnforcedStyle: extend_self
13
16
 
17
+ plugins:
18
+ - rubocop-rake
19
+ - rubocop-rspec
20
+
14
21
  inherit_from: .rubocop_todo.yml
15
22
 
data/.rubocop_todo.yml CHANGED
@@ -1,20 +1,74 @@
1
1
  # This configuration was generated by
2
2
  # `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.
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: 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
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
- # Configuration parameters: MinBodyLength.
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['DATABASE_ADAPTER']
6
- when 'mongoid' then
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
- when 'activerecord' then
10
+ gem 'mutex_m'
11
+ when 'activerecord'
11
12
  gem 'activerecord'
12
13
  gem 'otr-activerecord'
13
- gem 'virtus'
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['DATABASE_ADAPTER']}."
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', '0.81.0'
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
@@ -173,6 +173,6 @@ end
173
173
 
174
174
  ### Copyright & License
175
175
 
176
- Copyright [Daniel Doubrovkine](http://code.dblock.org) and Contributors, 2020
176
+ Copyright [Daniel Doubrovkine](http://code.dblock.org) and Contributors, 2020-2025
177
177
 
178
178
  [MIT License](LICENSE)
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\/(?!#{ENV['DATABASE_ADAPTER']})})
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
- begin
12
- ::Slack::Events::Request.new(
13
- request,
14
- signing_secret: SlackRubyBotServer::Events.config.signing_secret,
15
- signature_expires_in: SlackRubyBotServer::Events.config.signature_expires_in
16
- ).verify!
17
- rescue ::Slack::Events::Request::TimestampExpired
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['SLACK_SIGNING_SECRET']
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|
@@ -8,7 +8,7 @@ module SlackRubyBotServer
8
8
 
9
9
  def initialize(params, request)
10
10
  @request = request
11
- super params
11
+ super(params)
12
12
  end
13
13
 
14
14
  def logger
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SlackRubyBotServer
4
4
  module Events
5
- VERSION = '0.3.2'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end
@@ -17,4 +17,5 @@ Gem::Specification.new do |spec|
17
17
  spec.require_paths = ['lib']
18
18
 
19
19
  spec.add_dependency 'slack-ruby-bot-server', '>= 0.12.0'
20
+ spec.metadata['rubygems_mfa_required'] = 'true'
20
21
  end
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.3.2
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: 2022-06-09 00:00:00.000000000 Z
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
- post_install_message:
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.0.6
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: []