slack-ruby-bot-server-events 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d0e403f4b2548d945763435c50d45563cc9ec4f787afcae0520e556b5f6413f
4
- data.tar.gz: 9b558f4fb785cf277e335cf9b8aa6b8a2ce39d01caec646729ee9d0b894c33ea
3
+ metadata.gz: 6c97cea49ad88b67c93b7d7bd75b7bae4cb873abad8f3afb0760623124679deb
4
+ data.tar.gz: d49cecc2fefaef91fff2c7b0da99ea665e956a55d3d806bc9a26bd97e89ff491
5
5
  SHA512:
6
- metadata.gz: c2086aa75a40d2db9ba4aa4c602d07494bd186771ab73b6403198afa5c03e39fa4085a16305e15a739ff56f6c88862f9f2fe67a2cca7f535a806c364c8294912
7
- data.tar.gz: b411e00809301b63d27b0afd430b39756d0bfd6ddbeaa6e0195e6d39dff2b4f534ec6201edc13dcf4026f9afd61a2461eef6ba2cee1258e95bbe2b0e42604ab1
6
+ metadata.gz: 2ab1888588e34c0920955e5975fe8f3ece436e036271ef78556cfd9c2ba655b42ef886ee3a8ea481c43cd0c6356e871fb85b8a97fcaef4489202cebbd0e57038
7
+ data.tar.gz: 3d1e7ae990f0e91e73a07a3305d2a4b7b993316c987f50e4e27d171131c22ad0a60e4f449ac1a3b5ed8321b4af6bd8271b67d5bf972e78951cf5ce88d2c44a1b
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: danger
3
+ on: [pull_request]
4
+ jobs:
5
+ danger:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v2
9
+ with:
10
+ fetch-depth: 0
11
+ - name: Set up Ruby
12
+ uses: ruby/setup-ruby@v1
13
+ with:
14
+ ruby-version: 2.6
15
+ bundler-cache: true
16
+ - name: Run Danger
17
+ env:
18
+ BUNDLE_GEMFILE: Gemfile.danger
19
+ run: |
20
+ bundle install
21
+ # the personal token is public, this is ok, base64 encode to avoid tripping Github
22
+ TOKEN=$(echo -n NWY1ZmM5MzEyMzNlYWY4OTZiOGU3MmI3MWQ3Mzk0MzgxMWE4OGVmYwo= | base64 --decode)
23
+ DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
@@ -0,0 +1,16 @@
1
+ ---
2
+ name: lint
3
+ on: [push, pull_request]
4
+ jobs:
5
+ lint:
6
+ name: RuboCop
7
+ runs-on: ubuntu-latest
8
+ steps:
9
+ - uses: actions/checkout@v2
10
+ - name: Set up Ruby
11
+ uses: ruby/setup-ruby@v1
12
+ with:
13
+ ruby-version: 2.7
14
+ bundler-cache: true
15
+ - name: Run RuboCop
16
+ run: bundle exec rubocop
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: test with mongodb
3
+ on: [push, pull_request]
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ strategy:
8
+ matrix:
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 }
13
+ name: test (ruby=${{ matrix.entry.ruby }}, mongoid=${{ matrix.entry.mongoid }}, mongodb=${{ matrix.entry.mongodb }})
14
+ steps:
15
+ - uses: actions/checkout@v2
16
+ - uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: ${{ matrix.entry.ruby }}
19
+ - uses: supercharge/mongodb-github-action@1.7.0
20
+ with:
21
+ mongodb-version: ${{ matrix.entry.mongodb }}
22
+ - name: Test
23
+ run: |
24
+ bundle install
25
+ bundle exec rake spec
26
+ env:
27
+ DATABASE_ADAPTER: mongoid
28
+ DATABASE_URL: "mongodb://localhost"
29
+ MONGOID_VERSION: ${{ matrix.entry.mongoid }}
@@ -0,0 +1,36 @@
1
+ ---
2
+ name: test with postgresql
3
+ on: [push, pull_request]
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ strategy:
8
+ matrix:
9
+ entry:
10
+ - { ruby: 2.6.2, postgresql: 11 }
11
+ - { ruby: 2.7.2, postgresql: 14 }
12
+ - { ruby: 3.1.1, postgresql: 14 }
13
+ name: test (ruby=${{ matrix.entry.ruby }}, postgresql=${{ matrix.entry.postgresql }})
14
+ services:
15
+ postgres:
16
+ image: postgres:${{ matrix.entry.postgresql }}
17
+ env:
18
+ POSTGRES_USER: test
19
+ POSTGRES_PASSWORD: password
20
+ POSTGRES_DB: slack_ruby_bot_server_events_test
21
+ ports:
22
+ - 5432:5432
23
+ # needed because the postgres container does not provide a healthcheck
24
+ options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
25
+ steps:
26
+ - uses: actions/checkout@v2
27
+ - uses: ruby/setup-ruby@v1
28
+ with:
29
+ ruby-version: ${{ matrix.entry.ruby }}
30
+ - name: Test
31
+ run: |
32
+ bundle install
33
+ bundle exec rake spec
34
+ env:
35
+ DATABASE_ADAPTER: activerecord
36
+ DATABASE_URL: postgres://test:password@localhost/slack_ruby_bot_server_events_test
data/CHANGELOG.md CHANGED
@@ -1,17 +1,23 @@
1
1
  ### Changelog
2
2
 
3
- #### 0.3.1 (2/4/2021)
3
+ #### 0.3.2 (2022/06/09)
4
+
5
+ * [#13](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/13): Replace Travis CI with Github Actions - [@CrazyOptimist](https://github.com/CrazyOptimist).
6
+ * [#10](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/10): Fix actions endpoint for block dropdowns - [@maths22](https://github.com/maths22).
7
+ * [#14](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/14): Added support for Ruby 3.1 - [@CrazyOptimist](https://github.com/CrazyOptimist).
8
+
9
+ #### 0.3.1 (2021/02/04)
4
10
 
5
11
  * [#9](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/9): Provide default value when actions are missing in payload - [@nijave](https://github.com/nijave).
6
12
 
7
- #### 0.3.0 (12/30/2020)
13
+ #### 0.3.0 (2020/12/30)
8
14
 
9
15
  * [#6](https://github.com/slack-ruby/slack-ruby-bot-server-events/pull/6): Add support for block_actions interaction type - [@CrazyOptimist](https://github.com/CrazyOptimist).
10
16
 
11
- #### 0.2.0 (07/19/2020)
17
+ #### 0.2.0 (2020/07/19)
12
18
 
13
19
  * Include action type in actions callbacks - [@dblock](https://github.com/dblock).
14
20
 
15
- #### 0.1.0 (07/19/2020)
21
+ #### 0.1.0 (2020/07/19)
16
22
 
17
23
  * Initial public release - [@dblock](https://github.com/dblock).
data/Gemfile CHANGED
@@ -8,10 +8,10 @@ when 'mongoid' then
8
8
  gem 'mongoid'
9
9
  gem 'mongoid-scroll'
10
10
  when 'activerecord' then
11
- gem 'activerecord', '~> 5.0.0'
12
- gem 'otr-activerecord', '~> 1.2.1'
11
+ gem 'activerecord'
12
+ gem 'otr-activerecord'
13
13
  gem 'virtus'
14
- gem 'cursor_pagination' # rubocop:disable Bundler/OrderedGems
14
+ gem 'cursor_pagination', github: 'dblock/cursor_pagination', branch: 'misc' # rubocop:disable Bundler/OrderedGems
15
15
  gem 'pg'
16
16
  when nil
17
17
  warn "Missing ENV['DATABASE_ADAPTER']."
@@ -34,7 +34,3 @@ group :development, :test do
34
34
  gem 'vcr'
35
35
  gem 'webmock'
36
36
  end
37
-
38
- group :test do
39
- gem 'slack-ruby-danger', '~> 0.1.0', require: false
40
- end
data/Gemfile.danger ADDED
@@ -0,0 +1,6 @@
1
+ source 'https://rubygems.org'
2
+
3
+ group :test do
4
+ gem 'danger-toc', '~> 0.2.0', require: false
5
+ gem 'slack-ruby-danger', '~> 0.2.0', require: false
6
+ end
data/README.md CHANGED
@@ -2,10 +2,26 @@ Slack Ruby Bot Server Events Extension
2
2
  ======================================
3
3
 
4
4
  [![Gem Version](https://badge.fury.io/rb/slack-ruby-bot-server-events.svg)](https://badge.fury.io/rb/slack-ruby-bot-server-events)
5
- [![Build Status](https://travis-ci.org/slack-ruby/slack-ruby-bot-server-events.svg?branch=master)](https://travis-ci.org/slack-ruby/slack-ruby-bot-server-events)
5
+ [![lint](https://github.com/slack-ruby/slack-ruby-bot-server-events/actions/workflows/rubocop.yml/badge.svg)](https://github.com/slack-ruby/slack-ruby-bot-server-events/actions/workflows/rubocop.yml)
6
+ [![test with mongodb](https://github.com/slack-ruby/slack-ruby-bot-server-events/actions/workflows/test-mongodb.yml/badge.svg)](https://github.com/slack-ruby/slack-ruby-bot-server-events/actions/workflows/test-mongodb.yml)
7
+ [![test with postgresql](https://github.com/slack-ruby/slack-ruby-bot-server-events/actions/workflows/test-postgresql.yml/badge.svg)](https://github.com/slack-ruby/slack-ruby-bot-server-events/actions/workflows/test-postgresql.yml)
6
8
 
7
9
  An extension to [slack-ruby-bot-server](https://github.com/slack-ruby/slack-ruby-bot-server) that makes it easy to handle Slack slash commands, interactive buttons and events.
8
10
 
11
+ ### Table of Contents
12
+
13
+ - [Sample](#sample)
14
+ - [Usage](#usage)
15
+ - [Gemfile](#gemfile)
16
+ - [Configure](#configure)
17
+ - [OAuth](#oauth)
18
+ - [Events](#events)
19
+ - [Implement Callbacks](#implement-callbacks)
20
+ - [Events](#events-1)
21
+ - [Actions](#actions)
22
+ - [Commands](#commands)
23
+ - [Copyright & License](#copyright--license)
24
+
9
25
  ### Sample
10
26
 
11
27
  See [slack-ruby/slack-ruby-bot-server-events-sample](https://github.com/slack-ruby/slack-ruby-bot-server-events-sample) for a working sample.
@@ -40,7 +40,7 @@ module SlackRubyBotServer
40
40
 
41
41
  given type: ->(val) { val == 'block_actions' } do
42
42
  optional :trigger_id, type: String
43
- requires :response_url, type: String
43
+ optional :response_url, type: String
44
44
  requires :token, type: String
45
45
  requires :user, type: Hash do
46
46
  requires :id, type: String
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SlackRubyBotServer
4
4
  module Events
5
- VERSION = '0.3.1'
5
+ VERSION = '0.3.2'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
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.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-02-04 00:00:00.000000000 Z
11
+ date: 2022-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slack-ruby-bot-server
@@ -24,22 +24,26 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 0.12.0
27
- description:
27
+ description:
28
28
  email:
29
29
  - dblock@dblock.org
30
30
  executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
+ - ".github/workflows/danger.yml"
35
+ - ".github/workflows/rubocop.yml"
36
+ - ".github/workflows/test-mongodb.yml"
37
+ - ".github/workflows/test-postgresql.yml"
34
38
  - ".gitignore"
35
39
  - ".rspec"
36
40
  - ".rubocop.yml"
37
41
  - ".rubocop_todo.yml"
38
- - ".travis.yml"
39
42
  - CHANGELOG.md
40
43
  - CONTRIBUTING.md
41
44
  - Dangerfile
42
45
  - Gemfile
46
+ - Gemfile.danger
43
47
  - LICENSE
44
48
  - README.md
45
49
  - RELEASING.md
@@ -64,7 +68,7 @@ files:
64
68
  homepage: https://github.com/slack-ruby/slack-ruby-bot-server-events
65
69
  licenses: []
66
70
  metadata: {}
67
- post_install_message:
71
+ post_install_message:
68
72
  rdoc_options: []
69
73
  require_paths:
70
74
  - lib
@@ -79,8 +83,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
79
83
  - !ruby/object:Gem::Version
80
84
  version: '0'
81
85
  requirements: []
82
- rubygems_version: 3.1.4
83
- signing_key:
86
+ rubygems_version: 3.0.6
87
+ signing_key:
84
88
  specification_version: 4
85
89
  summary: Slack commands, interactive buttons, and events extension for slack-ruby-bot-server.
86
90
  test_files: []
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- language: ruby
2
-
3
- cache: bundler
4
-
5
- matrix:
6
- include:
7
- - rvm: 2.6.6
8
- script:
9
- - bundle exec danger
10
- - rvm: 2.6.6
11
- env: DATABASE_ADAPTER=activerecord
12
- services:
13
- - postgresql
14
- - rvm: 2.6.6
15
- env: DATABASE_ADAPTER=mongoid
16
- services:
17
- - mongodb