slack-ruby-block-kit 0.13.0 → 0.14.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f8259eb752347ee6abf3210ab4b0f0c44ee962d238e3034185735c4762a8063
4
- data.tar.gz: 7649061472dff64eddb8704311ee17afbd0c29d07ac6d101982725fbf55fbd35
3
+ metadata.gz: a72d92b839ba2ef4885e63bed1564e1a6a0f65ca4a7dcf715d6dd3d8c484aafa
4
+ data.tar.gz: 229c80dd332e7719fc2508a4df85a495ef1d3105fad5b7af973cf613b64b204e
5
5
  SHA512:
6
- metadata.gz: d9ab666ea3cca8ca7ade809cb1fc3881e534d5a9ffb1651f2de2d1ddc30266e6d44ac1a89947b1cba62d35ba59e292479ec33e0098fe50d1b6d7a1d1e77a0184
7
- data.tar.gz: 709140300213ec4afef7c43665e56dd9ccfe673118284d2cb5efbe5a03c87ee9d42fed94e6c8277cc49ffec74d5232108d1b0555c53dcc7e23cc77f6cc70413d
6
+ metadata.gz: 9283d529957e8ed30de73467458a86dd63e7fd8a27b116b232315fa4988303e816392e551ad984fef2115e39b97cdc7a43e6c8dcc78ac84571b0e637cdb5ef71
7
+ data.tar.gz: fbf99dc606a305237c2e2dc53b9c1bff7c5f79c81e5e988290e4fe35390dce372f93d4611c463760b11e6a397353d3b94a6e91a352bfb6bcd9d94614c0a9b2ed
data/.gitignore CHANGED
@@ -8,8 +8,6 @@
8
8
  /spec/examples.txt
9
9
  /tmp/
10
10
 
11
- Gemfile.lock
12
-
13
11
  # rspec failure tracking
14
12
  .rspec_status
15
13
  *.gem
data/.rubocop.yml CHANGED
@@ -2,8 +2,6 @@ require:
2
2
  - rubocop-rake
3
3
  - rubocop-rspec
4
4
 
5
- inherit_from: .rubocop_todo.yml
6
-
7
5
  AllCops:
8
6
  TargetRubyVersion: 2.5.3
9
7
  NewCops: enable
@@ -75,3 +73,15 @@ RSpec/MultipleMemoizedHelpers:
75
73
 
76
74
  RSpec/NestedGroups:
77
75
  Max: 4
76
+
77
+ Style/Documentation:
78
+ Enabled: false
79
+
80
+ Metrics/ClassLength:
81
+ Max: 200
82
+
83
+ Metrics/CyclomaticComplexity:
84
+ Max: 8
85
+
86
+ RSpec/ExampleLength:
87
+ Max: 6
data/CHANGELOG.md CHANGED
@@ -27,6 +27,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
27
27
 
28
28
  ---
29
29
 
30
+ ## [0.14.0] - 2021-02-06
31
+
32
+ ### Added
33
+ - `Slack::BlockKit::Blocks#header` (#74 by @rspeicher)
34
+
30
35
  ## [0.13.0] - 2020-12-29
31
36
 
32
37
  ### Added
data/Gemfile CHANGED
@@ -11,9 +11,8 @@ gem 'rake', '~> 13'
11
11
  gem 'rspec', '~> 3'
12
12
  gem 'rspec_junit_formatter', '~> 0.4'
13
13
 
14
+ gem 'codecov', '~> 0.3', require: false
14
15
  gem 'rubocop', '~> 1', require: false
15
16
  gem 'rubocop-rake', '~> 0.5', require: false
16
17
  gem 'rubocop-rspec', '~> 2', require: false
17
-
18
- gem 'codecov', '~> 0.2', require: false
19
- gem 'simplecov', '~> 0.20', require: false if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('3')
18
+ gem 'simplecov', '~> 0.21', require: false
data/Gemfile.lock ADDED
@@ -0,0 +1,92 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ slack-ruby-block-kit (0.14.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ codecov (0.4.3)
11
+ simplecov (>= 0.15, < 0.22)
12
+ coderay (1.1.3)
13
+ diff-lcs (1.4.4)
14
+ docile (1.3.5)
15
+ dotenv (2.7.6)
16
+ faraday (1.3.0)
17
+ faraday-net_http (~> 1.0)
18
+ multipart-post (>= 1.2, < 3)
19
+ ruby2_keywords
20
+ faraday-net_http (1.0.1)
21
+ method_source (1.0.0)
22
+ multipart-post (2.1.1)
23
+ parallel (1.20.1)
24
+ parser (3.0.0.0)
25
+ ast (~> 2.4.1)
26
+ pry (0.13.1)
27
+ coderay (~> 1.1)
28
+ method_source (~> 1.0)
29
+ rainbow (3.0.0)
30
+ rake (13.0.3)
31
+ regexp_parser (2.0.3)
32
+ rexml (3.2.4)
33
+ rspec (3.10.0)
34
+ rspec-core (~> 3.10.0)
35
+ rspec-expectations (~> 3.10.0)
36
+ rspec-mocks (~> 3.10.0)
37
+ rspec-core (3.10.1)
38
+ rspec-support (~> 3.10.0)
39
+ rspec-expectations (3.10.1)
40
+ diff-lcs (>= 1.2.0, < 2.0)
41
+ rspec-support (~> 3.10.0)
42
+ rspec-mocks (3.10.2)
43
+ diff-lcs (>= 1.2.0, < 2.0)
44
+ rspec-support (~> 3.10.0)
45
+ rspec-support (3.10.2)
46
+ rspec_junit_formatter (0.4.1)
47
+ rspec-core (>= 2, < 4, != 2.12.0)
48
+ rubocop (1.9.1)
49
+ parallel (~> 1.10)
50
+ parser (>= 3.0.0.0)
51
+ rainbow (>= 2.2.2, < 4.0)
52
+ regexp_parser (>= 1.8, < 3.0)
53
+ rexml
54
+ rubocop-ast (>= 1.2.0, < 2.0)
55
+ ruby-progressbar (~> 1.7)
56
+ unicode-display_width (>= 1.4.0, < 3.0)
57
+ rubocop-ast (1.4.1)
58
+ parser (>= 2.7.1.5)
59
+ rubocop-rake (0.5.1)
60
+ rubocop
61
+ rubocop-rspec (2.2.0)
62
+ rubocop (~> 1.0)
63
+ rubocop-ast (>= 1.1.0)
64
+ ruby-progressbar (1.11.0)
65
+ ruby2_keywords (0.0.4)
66
+ simplecov (0.21.2)
67
+ docile (~> 1.1)
68
+ simplecov-html (~> 0.11)
69
+ simplecov_json_formatter (~> 0.1)
70
+ simplecov-html (0.12.3)
71
+ simplecov_json_formatter (0.1.2)
72
+ unicode-display_width (2.0.0)
73
+
74
+ PLATFORMS
75
+ x86_64-darwin-19
76
+
77
+ DEPENDENCIES
78
+ codecov (~> 0.3)
79
+ dotenv (~> 2)
80
+ faraday (~> 1)
81
+ pry (~> 0.13)
82
+ rake (~> 13)
83
+ rspec (~> 3)
84
+ rspec_junit_formatter (~> 0.4)
85
+ rubocop (~> 1)
86
+ rubocop-rake (~> 0.5)
87
+ rubocop-rspec (~> 2)
88
+ simplecov (~> 0.21)
89
+ slack-ruby-block-kit!
90
+
91
+ BUNDLED WITH
92
+ 2.2.3
@@ -37,6 +37,12 @@ module Slack
37
37
  append(block)
38
38
  end
39
39
 
40
+ def header(text:, block_id: nil, emoji: nil)
41
+ block = Layout::Header.new(text: text, block_id: block_id, emoji: emoji)
42
+
43
+ append(block)
44
+ end
45
+
40
46
  def image(url:, alt_text:, title: nil, block_id: nil, emoji: nil)
41
47
  block = Layout::Image.new(
42
48
  url: url,
@@ -8,9 +8,7 @@ module Slack
8
8
  # a select menu element, a multi-select menu element, or a datepicker.
9
9
  #
10
10
  # https://api.slack.com/reference/block-kit/blocks#input
11
- # rubocop:disable Metrics/ClassLength
12
11
  class Input
13
- # rubocop:enable Metrics/ClassLength
14
12
  TYPE = 'input'
15
13
 
16
14
  attr_accessor :label, :element, :block_id, :hint, :optional, :emoji
@@ -10,10 +10,7 @@ module Slack
10
10
  # with any of the available block elements.
11
11
  #
12
12
  # https://api.slack.com/reference/messaging/blocks#section
13
- # rubocop:disable Metrics/ClassLength
14
13
  class Section
15
- # rubocop:enable Metrics/ClassLength
16
-
17
14
  include Section::MultiSelectElements
18
15
  TYPE = 'section'
19
16
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Slack
4
4
  module BlockKit
5
- VERSION = '0.13.0'
5
+ VERSION = '0.14.0'
6
6
  end
7
7
  end
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.13.0
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christian Gregg
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-29 00:00:00.000000000 Z
11
+ date: 2021-02-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description:
14
14
  email:
@@ -23,9 +23,9 @@ files:
23
23
  - ".gitignore"
24
24
  - ".rspec"
25
25
  - ".rubocop.yml"
26
- - ".rubocop_todo.yml"
27
26
  - CHANGELOG.md
28
27
  - Gemfile
28
+ - Gemfile.lock
29
29
  - LICENSE.txt
30
30
  - README.md
31
31
  - Rakefile
data/.rubocop_todo.yml DELETED
@@ -1,43 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config --no-auto-gen-timestamp`
3
- # using RuboCop version 0.63.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 5
10
- # Configuration parameters: CountComments, ExcludedMethods.
11
- # ExcludedMethods: refine
12
- Metrics/BlockLength:
13
- Max: 63
14
-
15
- # Offense count: 1
16
- # Configuration parameters: CountComments.
17
- Metrics/ClassLength:
18
- Max: 117
19
-
20
- # Offense count: 1
21
- # Configuration parameters: IgnoredMethods.
22
- Metrics/CyclomaticComplexity:
23
- Exclude:
24
- - 'lib/slack/block_kit/element/multi_static_select.rb'
25
-
26
- # Offense count: 5
27
- # Configuration parameters: Max.
28
- RSpec/ExampleLength:
29
- Exclude:
30
- - 'spec/lib/slack/block_kit/composition/confirmation_dialog_spec.rb'
31
- - 'spec/lib/slack/block_kit/composition/option_group_spec.rb'
32
- - 'spec/lib/slack/block_kit/composition/option_spec.rb'
33
- - 'spec/lib/slack/block_kit/element/checkboxes_spec.rb'
34
- - 'spec/lib/slack/block_kit/element/radio_buttons_spec.rb'
35
- - 'spec/lib/slack/block_kit/composition/option_spec.rb'
36
- - 'spec/lib/slack/block_kit/element/multi_static_select_spec.rb'
37
-
38
- # Offense count: 4
39
- Style/Documentation:
40
- Exclude:
41
- - 'spec/**/*'
42
- - 'test/**/*'
43
- - 'lib/slack/block_kit.rb'