slack-ruby-block-kit 0.24.0 → 0.26.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/ci.yml +1 -8
- data/CHANGELOG.md +15 -2
- data/Gemfile +1 -1
- data/Gemfile.lock +9 -7
- data/lib/slack/block_kit/composition/option_group.rb +2 -2
- data/lib/slack/block_kit/element/multi_static_select.rb +2 -1
- data/lib/slack/block_kit/element/radio_buttons.rb +2 -1
- data/lib/slack/block_kit/element/static_select.rb +2 -1
- data/lib/slack/block_kit/element/timepicker.rb +1 -1
- data/lib/slack/block_kit/layout/input.rb +22 -0
- data/lib/slack/block_kit/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bff614ab4eb7e814b32e1eeac46e89f8383b4ab7c97e26dd7cc4e38f929ab444
|
4
|
+
data.tar.gz: dad0918655dd75ed41246ad89f9af4ea4ef8164be47394c3bbbd3a65e5ca8d46
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fff0e229bbcdcc1a3d145a92b86fe019f3b87e63d37c2ae64cec1912676a329d83f24dc599ddb53727b17462aefa0445211cc5e6afde9ef3f36af8e148bb049c
|
7
|
+
data.tar.gz: 3c1c1da220ea96f8c04e38ef86d3fac3ad4c408470b997bf077f04ebea5289eb4bb377571a1032eb04281bd7f868ed24a0d23d0ddf93b992f97a2e3b54fd2b99
|
data/.github/workflows/ci.yml
CHANGED
@@ -8,16 +8,12 @@ on:
|
|
8
8
|
|
9
9
|
jobs:
|
10
10
|
build:
|
11
|
-
permissions:
|
12
|
-
contents: write
|
13
|
-
id-token: write
|
14
|
-
|
15
11
|
runs-on: ubuntu-latest
|
16
12
|
continue-on-error: ${{ matrix.experimental }}
|
17
13
|
strategy:
|
18
14
|
fail-fast: false
|
19
15
|
matrix:
|
20
|
-
ruby: [ '
|
16
|
+
ruby: [ '3.1', '3.2', '3.3' ]
|
21
17
|
experimental: [ false ]
|
22
18
|
name: Ruby ${{ matrix.ruby }}
|
23
19
|
steps:
|
@@ -26,8 +22,5 @@ jobs:
|
|
26
22
|
with:
|
27
23
|
ruby-version: ${{ matrix.ruby }}
|
28
24
|
bundler-cache: true
|
29
|
-
- uses: codecov/codecov-action@v4
|
30
|
-
with:
|
31
|
-
use_oidc: true
|
32
25
|
- run: bundle exec rspec --format progress
|
33
26
|
- run: bundle exec rubocop
|
data/CHANGELOG.md
CHANGED
@@ -25,6 +25,17 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
25
25
|
### Security
|
26
26
|
- N/A
|
27
27
|
|
28
|
+
## [0.26.0] - 2025-02-24
|
29
|
+
|
30
|
+
### Added
|
31
|
+
|
32
|
+
- Add Slack::BlockKit::Layout::Input#number_input (#197 by @070bex424pankaj)
|
33
|
+
|
34
|
+
## [0.25.0] - 2024-11-22
|
35
|
+
|
36
|
+
### Added
|
37
|
+
- Allow setting `description:` to `StaticSelect`, `MultiStaticSelect`, `RadioButtons`, & any `OptionGroup`s. (#195 by @resputin)
|
38
|
+
|
28
39
|
|
29
40
|
## [0.24.0] - 2024-04-07
|
30
41
|
|
@@ -192,8 +203,10 @@ This release contains a breaking change on the `Layout::Actions` interface.
|
|
192
203
|
- Fixed initial options in multi select blocks (#46 by @caalberts)
|
193
204
|
|
194
205
|
|
195
|
-
[Unreleased]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.
|
196
|
-
[0.
|
206
|
+
[Unreleased]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.26.0...HEAD
|
207
|
+
[0.26.0]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.25.0...v0.26.0
|
208
|
+
[0.25.0]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.24.0...v0.25.0
|
209
|
+
[0.24.0]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.23.0...v0.24.0
|
197
210
|
[0.23.0]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.22.0...v0.23.0
|
198
211
|
[0.22.0]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.21.0...v0.22.0
|
199
212
|
[0.21.0]: https://github.com/CGA1123/slack-ruby-block-kit/compare/v0.20.0...v0.21.0
|
data/Gemfile
CHANGED
@@ -17,5 +17,5 @@ gem 'retest', '~> 1.13', require: false
|
|
17
17
|
gem 'rubocop', '~> 1', require: false
|
18
18
|
gem 'rubocop-rake', '~> 0.6', require: false
|
19
19
|
gem 'rubocop-rspec', '~> 2', require: false
|
20
|
-
gem 'simplecov', '~> 0.
|
20
|
+
gem 'simplecov', '~> 0.22', require: false
|
21
21
|
gem 'simplecov-cobertura', require: false
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
slack-ruby-block-kit (0.
|
4
|
+
slack-ruby-block-kit (0.26.0)
|
5
5
|
zeitwerk (~> 2.6)
|
6
6
|
|
7
7
|
GEM
|
@@ -57,9 +57,9 @@ GEM
|
|
57
57
|
method_source (~> 1.0)
|
58
58
|
psych (5.1.2)
|
59
59
|
stringio
|
60
|
-
racc (1.
|
60
|
+
racc (1.8.0)
|
61
61
|
rainbow (3.1.1)
|
62
|
-
rake (13.2.
|
62
|
+
rake (13.2.1)
|
63
63
|
rb-fsevent (0.11.2)
|
64
64
|
rb-inotify (0.10.1)
|
65
65
|
ffi (~> 1.0)
|
@@ -73,7 +73,8 @@ GEM
|
|
73
73
|
observer (~> 0.1)
|
74
74
|
string-similarity (~> 2.1)
|
75
75
|
tty-option (~> 0.1)
|
76
|
-
rexml (3.2.
|
76
|
+
rexml (3.2.8)
|
77
|
+
strscan (>= 3.0.9)
|
77
78
|
rspec (3.13.0)
|
78
79
|
rspec-core (~> 3.13.0)
|
79
80
|
rspec-expectations (~> 3.13.0)
|
@@ -106,7 +107,7 @@ GEM
|
|
106
107
|
rubocop (~> 1.19)
|
107
108
|
ruby-progressbar (1.11.0)
|
108
109
|
ruby2_keywords (0.0.5)
|
109
|
-
simplecov (0.
|
110
|
+
simplecov (0.22.0)
|
110
111
|
docile (~> 1.1)
|
111
112
|
simplecov-html (~> 0.11)
|
112
113
|
simplecov_json_formatter (~> 0.1)
|
@@ -117,9 +118,10 @@ GEM
|
|
117
118
|
simplecov_json_formatter (0.1.4)
|
118
119
|
string-similarity (2.1.0)
|
119
120
|
stringio (3.1.0)
|
121
|
+
strscan (3.1.0)
|
120
122
|
tty-option (0.3.0)
|
121
123
|
unicode-display_width (2.1.0)
|
122
|
-
zeitwerk (2.6.
|
124
|
+
zeitwerk (2.6.18)
|
123
125
|
|
124
126
|
PLATFORMS
|
125
127
|
ruby
|
@@ -140,7 +142,7 @@ DEPENDENCIES
|
|
140
142
|
rubocop (~> 1)
|
141
143
|
rubocop-rake (~> 0.6)
|
142
144
|
rubocop-rspec (~> 2)
|
143
|
-
simplecov (~> 0.
|
145
|
+
simplecov (~> 0.22)
|
144
146
|
simplecov-cobertura
|
145
147
|
slack-ruby-block-kit!
|
146
148
|
|
@@ -17,8 +17,8 @@ module Slack
|
|
17
17
|
yield(self) if block_given?
|
18
18
|
end
|
19
19
|
|
20
|
-
def option(text:, value:, emoji: nil, initial: false)
|
21
|
-
@options << Option.new(text: text, value: value, emoji: emoji, initial: initial)
|
20
|
+
def option(text:, value:, description: nil, emoji: nil, initial: false)
|
21
|
+
@options << Option.new(text: text, value: value, description: description, emoji: emoji, initial: initial)
|
22
22
|
|
23
23
|
self
|
24
24
|
end
|
@@ -37,11 +37,12 @@ module Slack
|
|
37
37
|
yield(self) if block_given?
|
38
38
|
end
|
39
39
|
|
40
|
-
def option(value:, text:, initial: false, emoji: nil)
|
40
|
+
def option(value:, text:, description: nil, initial: false, emoji: nil)
|
41
41
|
@options ||= []
|
42
42
|
@options << Composition::Option.new(
|
43
43
|
value: value,
|
44
44
|
text: text,
|
45
|
+
description: description,
|
45
46
|
emoji: emoji,
|
46
47
|
initial: initial
|
47
48
|
)
|
@@ -21,10 +21,11 @@ module Slack
|
|
21
21
|
yield(self) if block_given?
|
22
22
|
end
|
23
23
|
|
24
|
-
def option(value:, text:, initial: false, emoji: nil)
|
24
|
+
def option(value:, text:, description: nil, initial: false, emoji: nil)
|
25
25
|
option = Composition::Option.new(
|
26
26
|
value: value,
|
27
27
|
text: text,
|
28
|
+
description: description,
|
28
29
|
initial: initial,
|
29
30
|
emoji: emoji
|
30
31
|
)
|
@@ -27,11 +27,12 @@ module Slack
|
|
27
27
|
yield(self) if block_given?
|
28
28
|
end
|
29
29
|
|
30
|
-
def option(value:, text:, initial: false, emoji: nil)
|
30
|
+
def option(value:, text:, description: nil, initial: false, emoji: nil)
|
31
31
|
@options ||= []
|
32
32
|
@options << Composition::Option.new(
|
33
33
|
value: value,
|
34
34
|
text: text,
|
35
|
+
description: description,
|
35
36
|
emoji: emoji,
|
36
37
|
initial: initial
|
37
38
|
)
|
@@ -16,7 +16,7 @@ module Slack
|
|
16
16
|
TYPE = 'timepicker'
|
17
17
|
|
18
18
|
def initialize(action_id:, placeholder: nil, initial: nil, emoji: nil, focus_on_load: nil)
|
19
|
-
@placeholder = placeholder_text(placeholder, emoji)
|
19
|
+
@placeholder = placeholder_text(placeholder, emoji)
|
20
20
|
@initial_time = initial
|
21
21
|
@action_id = action_id
|
22
22
|
@focus_on_load = focus_on_load
|
@@ -216,6 +216,28 @@ module Slack
|
|
216
216
|
self
|
217
217
|
end
|
218
218
|
|
219
|
+
def number_input(
|
220
|
+
action_id:,
|
221
|
+
is_decimal_allowed:,
|
222
|
+
placeholder: nil,
|
223
|
+
initial_value: nil,
|
224
|
+
min_value: nil,
|
225
|
+
max_value: nil,
|
226
|
+
focus_on_load: nil
|
227
|
+
)
|
228
|
+
@element = Element::NumberInput.new(
|
229
|
+
action_id: action_id,
|
230
|
+
is_decimal_allowed: is_decimal_allowed,
|
231
|
+
placeholder: placeholder,
|
232
|
+
initial_value: initial_value,
|
233
|
+
min_value: min_value,
|
234
|
+
max_value: max_value,
|
235
|
+
focus_on_load: focus_on_load
|
236
|
+
)
|
237
|
+
|
238
|
+
self
|
239
|
+
end
|
240
|
+
|
219
241
|
def url_text_input(
|
220
242
|
action_id:,
|
221
243
|
placeholder: nil,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slack-ruby-block-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.26.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Gregg
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: zeitwerk
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.6'
|
27
|
-
description:
|
27
|
+
description:
|
28
28
|
email:
|
29
29
|
- c_arlt@hotmail.com
|
30
30
|
executables: []
|
@@ -120,7 +120,7 @@ licenses:
|
|
120
120
|
- MIT
|
121
121
|
metadata:
|
122
122
|
rubygems_mfa_required: 'true'
|
123
|
-
post_install_message:
|
123
|
+
post_install_message:
|
124
124
|
rdoc_options: []
|
125
125
|
require_paths:
|
126
126
|
- lib
|
@@ -135,8 +135,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0'
|
137
137
|
requirements: []
|
138
|
-
rubygems_version: 3.5.
|
139
|
-
signing_key:
|
138
|
+
rubygems_version: 3.5.22
|
139
|
+
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: A ruby wrapper for Slack's Block Kit
|
142
142
|
test_files: []
|