slackblocks 2.5.0 → 2.7.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/CHANGELOG.md +12 -0
- data/README.md +5 -4
- data/lib/slackblocks/validator.rb +4 -3
- data/lib/slackblocks/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 771c3430b7b0b423af4946b75e496d93a6b99d52fd50e6100a40076d649d9842
|
|
4
|
+
data.tar.gz: a582dcfa925cdcaac6a246892cb8991cef07112cbbd5d69d60b67b3f40447c83
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d04618263932d031afb22750d54ef3d061e8dae36b61fda2765f9c596689fbbef9457f5a4d231397d35a9e881868a44146a7572d2dfc40416cf7a545947693e6
|
|
7
|
+
data.tar.gz: 45c2ff718d32d3b38b056b00689667daffdb5b6b8997d9384410879b68dcd551ef7f2fe6850de78b8b830180a3250ff2acf839dfdc4a530b2ac4a1fa53793fa3
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.7.0] — 2026-10-11
|
|
4
|
+
|
|
5
|
+
- Add the PHP implementation to the coordinated release and documentation.
|
|
6
|
+
|
|
7
|
+
## [Unreleased]
|
|
8
|
+
|
|
9
|
+
## [2.6.0] — 2026-10-09
|
|
10
|
+
|
|
11
|
+
- Keep application metadata outside message-wide Block Kit text totals.
|
|
12
|
+
|
|
13
|
+
- Release alongside the new native Rust implementation; supported language versions are unchanged.
|
|
14
|
+
|
|
3
15
|
## [2.5.0] — 2026-09-28
|
|
4
16
|
|
|
5
17
|
- Initial Ruby implementation of the shared Block Kit model.
|
data/README.md
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
# slackblocks for Ruby
|
|
2
2
|
|
|
3
|
+
[](https://rubygems.org/gems/slackblocks)
|
|
4
|
+
[](https://github.com/nicklambourne/slackblocks/actions/workflows/ruby.yml)
|
|
5
|
+
|
|
3
6
|
Build and validate Slack Block Kit payloads with Ruby 3.3 or newer. The gem implements shared spec 1.2.0 and uses only Ruby's JSON default gem at runtime.
|
|
4
7
|
|
|
5
|
-
Install from
|
|
8
|
+
Install from RubyGems:
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
gem build slackblocks.gemspec
|
|
9
|
-
gem install ./slackblocks-2.5.0.gem
|
|
10
|
+
gem install slackblocks
|
|
10
11
|
|
|
11
12
|
Use keyword arguments for every value:
|
|
12
13
|
|
|
@@ -159,7 +159,8 @@ module Slackblocks
|
|
|
159
159
|
def self.message(wire, path)
|
|
160
160
|
surface(wire["blocks"] || [], "message", "#{path}.blocks")
|
|
161
161
|
totals = {"markdown" => 0, "data_table" => 0}
|
|
162
|
-
tally(wire, totals)
|
|
162
|
+
tally(wire["blocks"], totals)
|
|
163
|
+
(wire["attachments"] || []).each { |attachment| tally(attachment["blocks"], totals) }
|
|
163
164
|
if totals["markdown"] > limit("markdown.total_text.max_length")
|
|
164
165
|
fail!("length-exceeded", path, "message markdown total exceeded")
|
|
165
166
|
end
|
|
@@ -175,8 +176,8 @@ module Slackblocks
|
|
|
175
176
|
totals["markdown"] += node.fetch("text").length
|
|
176
177
|
elsif node["type"] == "data_table"
|
|
177
178
|
totals["data_table"] += characters(node.fetch("rows"))
|
|
178
|
-
|
|
179
|
-
|
|
179
|
+
elsif node["type"] == "container"
|
|
180
|
+
tally(node["child_blocks"], totals)
|
|
180
181
|
end
|
|
181
182
|
when Array
|
|
182
183
|
node.each { |child| tally(child, totals) }
|
data/lib/slackblocks/version.rb
CHANGED