block-kit 1.0.2 → 1.0.3
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/lib/block_kit/composition/option.rb +1 -1
- data/lib/block_kit/composition/overflow_option.rb +1 -1
- data/lib/block_kit/composition/slack_file.rb +2 -2
- data/lib/block_kit/composition/trigger.rb +1 -1
- data/lib/block_kit/elements/number_input.rb +3 -3
- data/lib/block_kit/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 033e781b6f1656644ae2038ad1c4d1575f9fe1e9179da732127edb43895612c7
|
4
|
+
data.tar.gz: dbb788025b21764ec964ccfa6c7b2409f47990e64990e62dde1d96ab11e28dd5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c9fac2d8adf017f7fcdb109ad1c55f011668c5ec3d2e716d895aaaf38e95d46846b8b7c7a78989e7c8cd40f2ec3a05bf3448d9f9332465757bf7ebe512a55caf
|
7
|
+
data.tar.gz: 777df84ebe6aa32be0ff508d52138bda2546fa5ce0ba60a00aa255637ae3274e78f89382a7cb7dbc70cbbbf91dee43fa937477c30e48aa88ead22e7ebe96dce9
|
@@ -23,7 +23,7 @@ module BlockKit
|
|
23
23
|
fixes :value, truncate: {maximum: MAX_VALUE_LENGTH, dangerous: true}
|
24
24
|
|
25
25
|
validates :description, presence: true, length: {maximum: MAX_DESCRIPTION_LENGTH}, allow_nil: true
|
26
|
-
fixes :description, truncate: {maximum: MAX_DESCRIPTION_LENGTH}, null_value: [:blank]
|
26
|
+
fixes :description, truncate: {maximum: MAX_DESCRIPTION_LENGTH}, null_value: {error_types: [:blank]}
|
27
27
|
|
28
28
|
def self.inherited(subclass)
|
29
29
|
subclass.attribute_fixers = attribute_fixers.deep_dup
|
@@ -11,7 +11,7 @@ module BlockKit
|
|
11
11
|
|
12
12
|
attribute :url, :string
|
13
13
|
validates :url, presence: true, format: {with: URI::DEFAULT_PARSER.make_regexp, message: "is not a valid URI", allow_blank: true}, length: {maximum: MAX_URL_LENGTH}, allow_nil: true
|
14
|
-
fixes :url, truncate: {maximum: MAX_URL_LENGTH, dangerous: true, omission: ""}, null_value: [:blank]
|
14
|
+
fixes :url, truncate: {maximum: MAX_URL_LENGTH, dangerous: true, omission: ""}, null_value: {error_types: [:blank]}
|
15
15
|
|
16
16
|
def as_json(*)
|
17
17
|
super.merge(url: url).compact
|
@@ -13,10 +13,10 @@ module BlockKit
|
|
13
13
|
attribute :url, :string
|
14
14
|
|
15
15
|
validates :id, presence: true, format: {with: /\AF[A-Z0-9]{8,}\z/, allow_blank: true}, allow_nil: true
|
16
|
-
fixes :id, null_value: [:blank]
|
16
|
+
fixes :id, null_value: {error_types: [:blank]}
|
17
17
|
|
18
18
|
validates :url, presence: true, length: {maximum: MAX_URL_LENGTH}, format: {with: URI::DEFAULT_PARSER.make_regexp(%w[http https]), message: "is not a valid URI", allow_blank: true}, allow_nil: true
|
19
|
-
fixes :url, null_value: [:blank]
|
19
|
+
fixes :url, null_value: {error_types: [:blank]}
|
20
20
|
|
21
21
|
validate :id_or_url_present
|
22
22
|
|
@@ -14,7 +14,7 @@ module BlockKit
|
|
14
14
|
|
15
15
|
validates :url, presence: true, length: {maximum: MAX_URL_LENGTH}, format: {with: URI::DEFAULT_PARSER.make_regexp(%w[http https]), message: "is not a valid URI", allow_blank: true}
|
16
16
|
validates :customizable_input_parameters, presence: true, "block_kit/validators/associated": true, allow_nil: true
|
17
|
-
fixes :customizable_input_parameters, null_value: [:blank]
|
17
|
+
fixes :customizable_input_parameters, null_value: {error_types: [:blank]}
|
18
18
|
|
19
19
|
dsl_method :customizable_input_parameters, as: :customizable_input_parameter, required_fields: [:name, :value], yields: false
|
20
20
|
|
@@ -42,9 +42,9 @@ module BlockKit
|
|
42
42
|
def as_json(*)
|
43
43
|
super.merge(
|
44
44
|
is_decimal_allowed: is_decimal_allowed,
|
45
|
-
initial_value: initial_value.respond_to?(:to_digits) ? initial_value.to_digits : initial_value&.
|
46
|
-
min_value: min_value.respond_to?(:to_digits) ? min_value.to_digits : min_value&.
|
47
|
-
max_value: max_value.respond_to?(:to_digits) ? max_value.to_digits : max_value&.
|
45
|
+
initial_value: initial_value.respond_to?(:to_digits) ? initial_value.to_digits : initial_value&.to_s,
|
46
|
+
min_value: min_value.respond_to?(:to_digits) ? min_value.to_digits : min_value&.to_s,
|
47
|
+
max_value: max_value.respond_to?(:to_digits) ? max_value.to_digits : max_value&.to_s
|
48
48
|
).compact
|
49
49
|
end
|
50
50
|
end
|
data/lib/block_kit/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: block-kit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Celis
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-04-
|
10
|
+
date: 2025-04-24 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activemodel
|