slack_block_kit 0.3.0 → 0.3.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: 870caee1a680b9e6d4f9e5d148047efffb2bf713154f68d4bbfbac5c183cfeef
4
- data.tar.gz: 73bbf31c212bb74c5ba811678fe9a7b539c0619a5421ebd329070bff068b0514
3
+ metadata.gz: 93a5ce991f196689da6234a392358496a2f6be18a8d4aeb76306230c3d2bf057
4
+ data.tar.gz: bc1562e6bc215dff1237b2110ffbdf9189c12af0325f89540c1bb0bbea814016
5
5
  SHA512:
6
- metadata.gz: a1a4bca38961a4f09a2580c2077ab64536241987dc1d909703aae2d32c8f3e9370189676654ad9f1b3f1123829d838ebba04a2f2d4033d9d63a3d1d26903d459
7
- data.tar.gz: 73b7d894d2516cc72fb823a0bc9fd4ee55d8a29bee87cf5f79466fa7a42765558bfbe833a3c672bcbbbc6ec795defd6a490caaa9c8804c8ad5a5ae8a861a4994
6
+ metadata.gz: 2d9077b46e6cddd69e29d3e329823a1f8b8bd6395c990ddacdd7981bfb8e8f06fb528d09c680e01d487e41501f46662e509d70136d95444e5f3d83b0fffbb791
7
+ data.tar.gz: d0e515f20f4f36183531e3fd1b4d5dd1527af8f8e52a7dac86513a25b5b6de6be87b9fe65715723b1f051479946f530d03628c43a939e73af282cc3d52cd2002
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2019-03-05 20:45:28 +0000 using RuboCop version 0.63.1.
2
+ # `rubocop --auto-gen-config --no-auto-gen-timestamp`
3
+ # using RuboCop version 0.63.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -15,7 +15,12 @@ Metrics/BlockLength:
15
15
  # Offense count: 1
16
16
  # Configuration parameters: CountComments.
17
17
  Metrics/ClassLength:
18
- Max: 116
18
+ Max: 117
19
+
20
+ # Offense count: 3
21
+ # Configuration parameters: CountKeywordArgs.
22
+ Metrics/ParameterLists:
23
+ Max: 6
19
24
 
20
25
  # Offense count: 5
21
26
  # Configuration parameters: Max.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- slack_block_kit (0.1.0)
4
+ slack_block_kit (0.3.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -6,7 +6,7 @@ module Slack
6
6
  module Element; end
7
7
  module Layout; end
8
8
 
9
- VERSION = '0.3.0'
9
+ VERSION = '0.3.1'
10
10
 
11
11
  Dir[File.join(__dir__, 'block_kit', 'composition', '*.rb')].each { |file| require file }
12
12
  Dir[File.join(__dir__, 'block_kit', 'element', '*.rb')].each { |file| require file }
@@ -13,10 +13,11 @@ module Slack
13
13
 
14
14
  attr_accessor :confirm
15
15
 
16
- def initialize(text:, action_id:, emoji: nil, url: nil, value: nil)
16
+ def initialize(text:, action_id:, style: nil, emoji: nil, url: nil, value: nil)
17
17
  @text = Composition::PlainText.new(text: text, emoji: emoji)
18
18
  @action_id = action_id
19
19
  @url = url
20
+ @style = style
20
21
  @value = value
21
22
 
22
23
  yield(self) if block_given?
@@ -37,6 +38,7 @@ module Slack
37
38
  action_id: @action_id,
38
39
  url: @url,
39
40
  value: @value,
41
+ style: @style,
40
42
  confirm: @confirm&.as_json
41
43
  }.compact
42
44
  end
@@ -18,10 +18,11 @@ module Slack
18
18
  yield(self) if block_given?
19
19
  end
20
20
 
21
- def button(text:, action_id:, emoji: nil, url: nil, value: nil)
21
+ def button(text:, action_id:, style: nil, emoji: nil, url: nil, value: nil)
22
22
  element = Element::Button.new(
23
23
  text: text,
24
24
  action_id: action_id,
25
+ style: style,
25
26
  emoji: emoji,
26
27
  url: url,
27
28
  value: value
@@ -47,10 +47,11 @@ module Slack
47
47
  self
48
48
  end
49
49
 
50
- def button(text:, action_id:, emoji: nil, url: nil, value: nil)
50
+ def button(text:, action_id:, style:, emoji: nil, url: nil, value: nil)
51
51
  element = Element::Button.new(
52
52
  text: text,
53
53
  action_id: action_id,
54
+ style: style,
54
55
  emoji: emoji,
55
56
  url: url,
56
57
  value: value
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack_block_kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Gregg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-26 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler