slack_valid_block_kit 0.2.0 → 0.2.1

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: a8a63ed2dae6658d4937921060031910bdbffbf23182caee0416e06a63e202d3
4
- data.tar.gz: 06041afc62ab5d6383660e16e63fc4b714fb0b376164e2228861caef8b6ab87e
3
+ metadata.gz: b73fd767b1ddfdb2d15df0d423b4df18e7026ed74a51a04373dde6a20cb802e9
4
+ data.tar.gz: 01573ea3241ca0fba726eeb2c1d36f2fafa48f8174ddcebab2b7f26252e6ea57
5
5
  SHA512:
6
- metadata.gz: efa130469a2b3da6f0d8af1c3b6c6e3019adeb87ee94e54bc0cd9e028efab6e070e86031dbea1cbab8d290b85d7a677348c08dc0a421d06c06cd965531b82ca7
7
- data.tar.gz: f766653a8f07483397a47ac6bab6f711be9a22246058d3b784fd7a2b9c2ff0dced5441cf45158be9295ae1f1ed144aba5c61a494c1b390b651170951563e05f1
6
+ metadata.gz: 819ac8c49de7315a112b5c48867fb0d306cf3757066ff8a00e7a8843afbcb382a274511496c915d32922e89222cb7004ba02c7d018933ae1db36d978a35d0e61
7
+ data.tar.gz: f205ff933c309510d69f2f160b7be1e78731fedd072ff154256025d0199ffbfe9f6afa28e06b5597a2a3b725ff06c3c17c3b555ce44c1a6e8a8d93ee2ebe6b87
@@ -44,7 +44,7 @@ module SlackValidBlockKit::Validator
44
44
  validate_for_plain_text(hash[:placeholder], "#{path}.placeholder", false, 150)
45
45
  validate_for(hash[:initial_date], "#{path}.initial_date", String, false)
46
46
 
47
- if hash[:initial_date].is_a?(String) && !hash[:initial_date] =~ /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])$/
47
+ if hash[:initial_date].is_a?(String) && !(hash[:initial_date] =~ /^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2]\d|3[0-1])$/)
48
48
  add_error("#{path}.initial_date", :invalid_format)
49
49
  end
50
50
 
@@ -82,7 +82,7 @@ module SlackValidBlockKit::Validator
82
82
  validate_for(hash[:initial_value], "#{path}.initial_value", String, false)
83
83
  validate_for(hash[:multiline], "#{path}.multiline", :bool, false)
84
84
  validate_for(hash[:min_length], "#{path}.min_length", Integer, false, max: 3000)
85
- validate_for(hash[:max_length], "#{path}.max_length", Integer, false)
85
+ validate_for(hash[:max_length], "#{path}.max_length", Integer, false, max: 3000)
86
86
 
87
87
  validate_for(hash[:dispatch_action_config], "#{path}.dispatch_action_config", Hash, false)
88
88
  validate_dispatch_action_config(hash[:dispatch_action_config], "#{path}.dispatch_action_config") unless hash[:dispatch_action_config].nil?
@@ -110,7 +110,7 @@ module SlackValidBlockKit::Validator
110
110
 
111
111
  validate_for_plain_text(hash[:placeholder], "#{path}.placeholder", false, 150)
112
112
  validate_for(hash[:initial_time], "#{path}.initial_time", String, false)
113
- if hash[:initial_time].is_a?(String) && !hash[:initial_time] =~ /^(0\d|1[0-2])-[0-5]\d$/
113
+ if hash[:initial_time].is_a?(String) && !(hash[:initial_time] =~ /^(0\d|1[0-2])-[0-5]\d$/)
114
114
  add_error("#{path}.initial_time", :invalid_format)
115
115
  end
116
116
 
@@ -1,3 +1,3 @@
1
1
  module SlackValidBlockKit
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_valid_block_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - masayuki-ioki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-17 00:00:00.000000000 Z
11
+ date: 2022-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler