slack-ruby-client 2.5.0 → 2.5.1

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: f433d0a8172888831bf4115f08a954719a90723fb5b2c3ae232a343b43e8fff3
4
- data.tar.gz: d5689f3951b2b70f6e80143d57ec538c88b6df46445e6f85c4e26f357ce7ce59
3
+ metadata.gz: 26da07098b43509aec00e5ce7e280ff83b055cae435c2f13b7e7528200356191
4
+ data.tar.gz: 9982a63021be02cd1caf07d6ee44d4fc5f8be64c10b6bfbadae153ed4201db59
5
5
  SHA512:
6
- metadata.gz: 21c7eb94417fa3071e6e95dcc588ca4affad4c4faa22bc878e175b1851e10090bbd304fbe6b27a7ff20650bd14b95ca4e92ed00de7ad5abf8f2e97a5d6375e57
7
- data.tar.gz: 95e0922c4d5ef759d4a4cbea728aa27486ccb9a52167b28c24d2aeb2b178a11b121697d0a431e5ac9f6c800101f3f99a3a3b160a4f7d6b326d7db1f5cf2011bc
6
+ metadata.gz: bf976826d6f95ed2da12a61c42fd1f18c73b8f8065dc4471723ae85c11a89b764cf0a2bd0f422c634a1206ac24e8d9c1fdb68b25a5eeb93fd0957ee1094bd470
7
+ data.tar.gz: 9ac701bc529f369b2051d70afeedcbc05305740199fd03dd572749ff28d9df8d73c7e583e26fafc7c757b74d631c4bca3d3f73970e2571dc52c7fa925d4a1a3c
@@ -12,6 +12,7 @@ jobs:
12
12
  - { ruby: "3.1" }
13
13
  - { ruby: "3.2" }
14
14
  - { ruby: "3.3" }
15
+ - { ruby: "3.4" }
15
16
  - { ruby: ruby-head, ignore: true }
16
17
  - { ruby: jruby-head, ignore: true }
17
18
  name: test (ruby=${{ matrix.entry.ruby }}${{ matrix.entry.concurrency && ', concurrency=' }}${{ matrix.entry.concurrency }})
@@ -66,7 +66,7 @@ jobs:
66
66
  with:
67
67
  include: CHANGELOG.md
68
68
  find: "\\* Your contribution here."
69
- replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby-client/pulls/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here."
69
+ replace: "* [#${{steps.cpr.outputs.pull-request-number}}](https://github.com/slack-ruby/slack-ruby-client/pull/${{steps.cpr.outputs.pull-request-number}}): Update API from [slack-api-ref@${{ steps.api-ref.outputs.api-ref }}](https://github.com/slack-ruby/slack-api-ref/commit/${{ steps.api-ref.outputs.api-ref }}) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).\n* Your contribution here."
70
70
  - name: Commit and Push
71
71
  if: ${{ steps.cpr.outputs.pull-request-number != '' }}
72
72
  run: |
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2025-02-08 15:52:13 UTC using RuboCop version 1.26.1.
3
+ # on 2025-02-11 15:48:56 UTC using RuboCop version 1.26.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
@@ -73,7 +73,7 @@ Metrics/PerceivedComplexity:
73
73
  # Configuration parameters: MinSize.
74
74
  Performance/CollectionLiteralInLoop:
75
75
  Exclude:
76
- - 'spec/slack/web/api/endpoints/custom_specs/files_spec.rb'
76
+ - 'spec/slack/web/api/endpoints/custom/files_spec.rb'
77
77
 
78
78
  # Offense count: 1
79
79
  # This cop supports safe auto-correction (--auto-correct).
@@ -100,13 +100,13 @@ RSpec/ContextMethod:
100
100
  - 'spec/slack/messages/formatting_spec.rb'
101
101
  - 'spec/slack/web/api/mixins/users_spec.rb'
102
102
 
103
- # Offense count: 83
103
+ # Offense count: 84
104
104
  # Configuration parameters: Prefixes.
105
105
  # Prefixes: when, with, without
106
106
  RSpec/ContextWording:
107
107
  Enabled: false
108
108
 
109
- # Offense count: 70
109
+ # Offense count: 72
110
110
  # Configuration parameters: CountAsOne.
111
111
  RSpec/ExampleLength:
112
112
  Max: 18
@@ -117,13 +117,13 @@ RSpec/ExampleLength:
117
117
  RSpec/FilePath:
118
118
  Enabled: false
119
119
 
120
- # Offense count: 70
120
+ # Offense count: 74
121
121
  # Configuration parameters: .
122
122
  # SupportedStyles: have_received, receive
123
123
  RSpec/MessageSpies:
124
124
  EnforcedStyle: receive
125
125
 
126
- # Offense count: 95
126
+ # Offense count: 97
127
127
  RSpec/MultipleExpectations:
128
128
  Max: 5
129
129
 
@@ -142,11 +142,12 @@ RSpec/NamedSubject:
142
142
  RSpec/NestedGroups:
143
143
  Max: 6
144
144
 
145
- # Offense count: 5
145
+ # Offense count: 6
146
146
  RSpec/StubbedMock:
147
147
  Exclude:
148
148
  - 'spec/slack/real_time/client_spec.rb'
149
149
  - 'spec/slack/real_time/event_handlers/event_handlers_spec.rb'
150
+ - 'spec/slack/web/api/endpoints/custom/conversations_spec.rb'
150
151
  - 'spec/slack/web/api/pagination/cursor_spec.rb'
151
152
  - 'spec/slack/web/client_spec.rb'
152
153
 
@@ -204,7 +205,7 @@ Style/GlobalStdStream:
204
205
  # This cop supports unsafe auto-correction (--auto-correct-all).
205
206
  Style/MapToHash:
206
207
  Exclude:
207
- - 'spec/slack/web/api/endpoints/custom_specs/files_spec.rb'
208
+ - 'spec/slack/web/api/endpoints/custom/files_spec.rb'
208
209
 
209
210
  # Offense count: 1
210
211
  Style/MultilineBlockChain:
@@ -220,7 +221,7 @@ Style/MultilineTernaryOperator:
220
221
  # Offense count: 3
221
222
  Style/OpenStructUse:
222
223
  Exclude:
223
- - 'spec/slack/web/api/endpoints/custom_specs/chat_spec.rb'
224
+ - 'spec/slack/web/api/endpoints/custom/chat_spec.rb'
224
225
  - 'spec/slack/web/api/pagination/cursor_spec.rb'
225
226
  - 'spec/slack/web/faraday/response/raise_error_spec.rb'
226
227
 
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ### 2.5.1 (2025/02/11)
2
+
3
+ * [#542](https://github.com/slack-ruby/slack-ruby-client/pull/542): Add support for ruby 3.4 - [@dblock](https://github.com/dblock).
4
+ * [#544](https://github.com/slack-ruby/slack-ruby-client/pull/544): Fix: do not resolve channel name for `chat_postMessage` - [@dblock](https://github.com/dblock).
5
+
1
6
  ### 2.5.0 (2025/02/09)
2
7
 
3
8
  * [#525](https://github.com/slack-ruby/slack-ruby-client/pull/525): Exclude spec files from gem package - [@amatsuda](https://github.com/amatsuda).
@@ -8,21 +13,21 @@
8
13
  * [#538](https://github.com/slack-ruby/slack-ruby-client/pull/538): Translate channel names and support an array of channels in `files_upload_v2` - [@dblock](https://github.com/dblock).
9
14
  * [#540](https://github.com/slack-ruby/slack-ruby-client/pull/540): Added support for `channel` and `channel_id`, do not require channel in `files_upload_v2` - [@dblock](https://github.com/dblock).
10
15
  * [#541](https://github.com/slack-ruby/slack-ruby-client/pull/541): Added samples for `oauth_v2` and `files_upload_v2` - [@dblock](https://github.com/dblock).
11
- * [#524](https://github.com/slack-ruby-client/pulls/524): Update API from [slack-api-ref@3ec3c10](https://github.com/slack-ruby/slack-api-ref/commit/3ec3c10) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
16
+ * [#524](https://github.com/slack-ruby/slack-ruby-client/pull/524): Update API from [slack-api-ref@3ec3c10](https://github.com/slack-ruby/slack-api-ref/commit/3ec3c10) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
12
17
 
13
18
  ### 2.4.0 (2024/07/14)
14
19
 
15
20
  * [#516](https://github.com/slack-ruby/slack-ruby-client/pull/516): Add support for Ruby 3.3 - [@olleolleolle](https://github.com/olleolleolle).
16
21
  * [#520](https://github.com/slack-ruby/slack-ruby-client/pull/520): Add support for basic markdown formatting - [@nbgoodall](https://github.com/nbgoodall).
17
22
  * [#523](https://github.com/slack-ruby/slack-ruby-client/pull/523): Fix coveralls handling parallel jobs - [@dblock](https://github.com/dblock).
18
- * [#522](https://github.com/slack-ruby-client/pulls/522): Update API from [slack-api-ref@8a22e57](https://github.com/slack-ruby/slack-api-ref/commit/8a22e57) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
23
+ * [#522](https://github.com/slack-ruby/slack-ruby-client/pull/522): Update API from [slack-api-ref@8a22e57](https://github.com/slack-ruby/slack-api-ref/commit/8a22e57) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
19
24
 
20
25
  ### 2.3.0 (2024/01/31)
21
26
 
22
27
  * [#494](https://github.com/slack-ruby/slack-ruby-client/pull/494): Configure Dependabot to update GitHub Actions - [@olleolleolle](https://github.com/olleolleolle).
23
28
  * [#508](https://github.com/slack-ruby/slack-ruby-client/pull/508): Fix `Slack::Events::Request#verify!` compatibility with Rack 3.x - [@dblock](https://github.com/dblock).
24
29
  * [#503](https://github.com/slack-ruby/slack-ruby-client/pull/503): Update Slack API Update API from [slack-api-ref@bc545649](https://github.com/slack-ruby/slack-api-ref/commit/bc545649) - [@dblock](https://github.com/dblock).
25
- * [#504](https://github.com/slack-ruby-client/pulls/504): Update API from [slack-api-ref@bc54564](https://github.com/slack-ruby/slack-api-ref/commit/bc54564) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
30
+ * [#504](https://github.com/slack-ruby/slack-ruby-client/pull/504): Update API from [slack-api-ref@bc54564](https://github.com/slack-ruby/slack-api-ref/commit/bc54564) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
26
31
 
27
32
  ### 2.2.0 (2023/09/17)
28
33
 
@@ -31,20 +36,20 @@
31
36
  * [#454](https://github.com/slack-ruby/slack-ruby-client/pull/454): Added `Slack::Messages::Formatting#escape` - [@marfoldi](https://github.com/marfoldi).
32
37
  * [#452](https://github.com/slack-ruby/slack-ruby-client/pull/452): Automatically generate Web API multi-argument requirements from docs - [@jmanian](https://github.com/jmanian).
33
38
  * [#448](https://github.com/slack-ruby/slack-ruby-client/pull/448), [#453](https://github.com/slack-ruby/slack-ruby-client/pull/453): Automatically convert more Web API arguments to JSON-encoded strings - [@jmanian](https://github.com/jmanian).
34
- * [#465](https://github.com/slack-ruby-client/pulls/465): Update API from [slack-api-ref@878be8f](https://github.com/slack-ruby/slack-api-ref/commit/878be8f) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
35
- * [#473](https://github.com/slack-ruby-client/pulls/473): Update API from [slack-api-ref@a29b520](https://github.com/slack-ruby/slack-api-ref/commit/a29b520) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
36
- * [#474](https://github.com/slack-ruby-client/pulls/474): Update API from [slack-api-ref@629967e](https://github.com/slack-ruby/slack-api-ref/commit/629967e) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
37
- * [#475](https://github.com/slack-ruby-client/pulls/475): Update API from [slack-api-ref@977dad5](https://github.com/slack-ruby/slack-api-ref/commit/977dad5) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
38
- * [#476](https://github.com/slack-ruby-client/pulls/476): Update API from [slack-api-ref@d0b2989](https://github.com/slack-ruby/slack-api-ref/commit/d0b2989) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
39
- * [#478](https://github.com/slack-ruby-client/pulls/478): Update API from [slack-api-ref@d797055](https://github.com/slack-ruby/slack-api-ref/commit/d797055) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
40
- * [#480](https://github.com/slack-ruby-client/pulls/480): Add common message formatting utilities - [@chrisbloom7](https://github.com/chrisbloom7).
41
- * [#481](https://github.com/slack-ruby-client/pulls/481): Update API from [slack-api-ref@7c22d0b](https://github.com/slack-ruby/slack-api-ref/commit/7c22d0b) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
42
- * [#488](https://github.com/slack-ruby-client/pulls/488): Update API from [slack-api-ref@a45def2](https://github.com/slack-ruby/slack-api-ref/commit/a45def2) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
39
+ * [#465](https://github.com/slack-ruby/slack-ruby-client/pull/465): Update API from [slack-api-ref@878be8f](https://github.com/slack-ruby/slack-api-ref/commit/878be8f) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
40
+ * [#473](https://github.com/slack-ruby/slack-ruby-client/pull/473): Update API from [slack-api-ref@a29b520](https://github.com/slack-ruby/slack-api-ref/commit/a29b520) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
41
+ * [#474](https://github.com/slack-ruby/slack-ruby-client/pull/474): Update API from [slack-api-ref@629967e](https://github.com/slack-ruby/slack-api-ref/commit/629967e) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
42
+ * [#475](https://github.com/slack-ruby/slack-ruby-client/pull/475): Update API from [slack-api-ref@977dad5](https://github.com/slack-ruby/slack-api-ref/commit/977dad5) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
43
+ * [#476](https://github.com/slack-ruby/slack-ruby-client/pull/476): Update API from [slack-api-ref@d0b2989](https://github.com/slack-ruby/slack-api-ref/commit/d0b2989) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
44
+ * [#478](https://github.com/slack-ruby/slack-ruby-client/pull/478): Update API from [slack-api-ref@d797055](https://github.com/slack-ruby/slack-api-ref/commit/d797055) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
45
+ * [#480](https://github.com/slack-ruby/slack-ruby-client/pull/480): Add common message formatting utilities - [@chrisbloom7](https://github.com/chrisbloom7).
46
+ * [#481](https://github.com/slack-ruby/slack-ruby-client/pull/481): Update API from [slack-api-ref@7c22d0b](https://github.com/slack-ruby/slack-api-ref/commit/7c22d0b) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
47
+ * [#488](https://github.com/slack-ruby/slack-ruby-client/pull/488): Update API from [slack-api-ref@a45def2](https://github.com/slack-ruby/slack-api-ref/commit/a45def2) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
43
48
  * [#490](https://github.com/slack-ruby/slack-ruby-client/pull/490): Add changelog uri to gemspec - [@MatheusRich](https://github.com/MatheusRich).
44
49
  * [#491](https://github.com/slack-ruby/slack-ruby-client/pull/491): Added code coverage - [@dblock](https://github.com/dblock).
45
50
  * [#486](https://github.com/slack-ruby/slack-ruby-client/pull/486): Async handler support for Slack::RealTime::Config and Client - [@milestruecar](https://github.com/milestruecar).
46
- * [#489](https://github.com/slack-ruby-client/pulls/489): Update API from [slack-api-ref@0d3f0b6](https://github.com/slack-ruby/slack-api-ref/commit/0d3f0b6) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
47
- * [#493](https://github.com/slack-ruby-client/pulls/493): Update API from [slack-api-ref@f2e768a](https://github.com/slack-ruby/slack-api-ref/commit/f2e768a) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
51
+ * [#489](https://github.com/slack-ruby/slack-ruby-client/pull/489): Update API from [slack-api-ref@0d3f0b6](https://github.com/slack-ruby/slack-api-ref/commit/0d3f0b6) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
52
+ * [#493](https://github.com/slack-ruby/slack-ruby-client/pull/493): Update API from [slack-api-ref@f2e768a](https://github.com/slack-ruby/slack-api-ref/commit/f2e768a) - [@slack-ruby-ci-bot](https://github.com/apps/slack-ruby-ci-bot).
48
53
 
49
54
  ### 2.1.0 (2023/03/17)
50
55
 
data/README.md CHANGED
@@ -81,7 +81,7 @@ A Ruby client for the Slack [Web](https://api.slack.com/web), [RealTime Messagin
81
81
 
82
82
  ## Stable Release
83
83
 
84
- You're reading the documentation for the **stable** release of slack-ruby-client 2.5.0. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
84
+ You're reading the documentation for the **stable** release of slack-ruby-client, v2.5.1. See [UPGRADING](UPGRADING.md) when upgrading from an older version.
85
85
 
86
86
  ## Installation
87
87
 
@@ -614,15 +614,15 @@ The `verify!` call may raise `Slack::Events::Request::MissingSigningSecret`, `Sl
614
614
 
615
615
  ### Message Handling
616
616
 
617
- All text in Slack uses the same [system of Formatting and escaping](https://api.slack.com/docs/formatting): chat messages, direct messages, file comments, etc. [Slack::Messages::Formatting](lib/slack/messages/formatting.rb) provides convenience methods to format and parse messages.
617
+ All text in Slack uses the same [system of formatting and escaping](https://api.slack.com/docs/formatting): chat messages, direct messages, file comments, etc. [Slack::Messages::Formatting](lib/slack/messages/formatting.rb) provides convenience methods to format and parse messages.
618
618
 
619
619
  #### Formatting Messages
620
620
 
621
- `Slack::Messages::Formatting` provides a number of methods for Formatting objects that you can then embed in outgoing messages.
621
+ `Slack::Messages::Formatting` provides a number of methods for formatting objects that you can then embed in outgoing messages.
622
622
 
623
623
  ##### Date and Time Formatting
624
624
 
625
- You can embed a pre-formatted date in a message as a string like any other text, but using Slack's date Formatting allows you to display dates based on user preferences for dates and times, incorporating users' local time zones, and optionally using relative values like "yesterday", "today", or "tomorrow" when appropriate.
625
+ You can embed a pre-formatted date in a message as a string like any other text, but using Slack's date formatting allows you to display dates based on user preferences for dates and times, incorporating users' local time zones, and optionally using relative values like "yesterday", "today", or "tomorrow" when appropriate.
626
626
 
627
627
  ```ruby
628
628
  date = Time.now
@@ -667,7 +667,7 @@ Slack::Messages::Formatting.user_link(user_id)
667
667
 
668
668
  ##### URL Formatting
669
669
 
670
- Slack will automatically parse fully qualified URLs in messages, but you need special Formatting to embed a link with different text.
670
+ Slack will automatically parse fully qualified URLs in messages, but you need special formatting to embed a link with different text.
671
671
 
672
672
  ```ruby
673
673
  text = 'party time'
@@ -678,7 +678,7 @@ Slack::Messages::Formatting.url_link(text, url)
678
678
 
679
679
  ##### Markdown Formatting
680
680
 
681
- Slack uses a mishmash of regular markdown Formatting with its own syntax. Some features like headings aren't supported and will be left as-is, but others like bold, strikethrough, and links are converted.
681
+ Slack uses a mishmash of regular markdown formatting with its own syntax. Some features like headings aren't supported and will be left as-is, but others like bold, strikethrough, and links are converted.
682
682
 
683
683
  ```ruby
684
684
  text = """
data/lib/slack/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Slack
3
- VERSION = '2.5.0'
3
+ VERSION = '2.5.1'
4
4
  end
@@ -173,7 +173,6 @@ module Slack
173
173
  def chat_postMessage(options = {})
174
174
  raise ArgumentError, 'Required arguments :channel missing' if options[:channel].nil?
175
175
  raise ArgumentError, 'At least one of :attachments, :blocks, :text is required' if options[:attachments].nil? && options[:blocks].nil? && options[:text].nil?
176
- options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
177
176
  options = encode_options_as_json(options, %i[attachments blocks metadata])
178
177
  post('chat.postMessage', options)
179
178
  end
@@ -48,7 +48,7 @@ module Slack
48
48
  <% end %>
49
49
  <% if data['group'] == 'groups' && data['args']['channel'] && !data['args']['channel']['desc'].include?('Can be an encoded ID, or a name.') %>
50
50
  options = options.merge(channel: groups_id(options)['group']['id']) if options[:channel]
51
- <% elsif data['args']['channel'] && !data['args']['channel']['desc'].include?('Can be an encoded ID, or a name.') %>
51
+ <% elsif data['args']['channel'] && ['Can be an encoded ID, or a name.', 'encoded ID or channel name'].none? { |desc| data['args']['channel']['desc'].include?(desc) } %>
52
52
  options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
53
53
  <% end %>
54
54
  <% if data['args']['user'] %>
@@ -11,18 +11,16 @@ RSpec.describe Slack::Web::Api::Endpoints::<%= group.gsub(".", "_").camelize %>
11
11
  <% required_params = data['args'].select{ |k, v| v['required'] } %>
12
12
  <% all_required_params = data['args'].select{ |k, v| v['required'] || group_required_params.include?(k) } %>
13
13
  <% json_params = data['args'].map { |arg_name, arg_v| arg_name if arg_v['format'] == 'json' }.compact %>
14
- <% next if (all_required_params.none? || custom_spec_exists) && json_params.none? && data['arg_groups'].nil? %>
14
+ <% next if all_required_params.none? && json_params.none? && data['arg_groups'].nil? %>
15
15
  <% method_name = [group.gsub(".", "_"), name].join('_') %>
16
16
  <% example_params = all_required_params.to_h { |var, opts| [var, opts['example']] } %>
17
17
  context '<%= group %>_<%= name %>' do
18
- <% unless custom_spec_exists %>
19
18
  <% required_params.each do |arg_name, arg_v| %>
20
19
  it 'requires <%= arg_name %>' do
21
20
  <% params_except_required = example_params.reject { |name, _| name == arg_name }.map { |name, val| "#{name}: %q[#{val}]" }.join(', ') %>
22
21
  expect { client.<%= method_name %><%= params_except_required.empty? ? '' : "(#{params_except_required})" %> }.to raise_error ArgumentError, /Required arguments :<%= arg_name %> missing/
23
22
  end
24
23
  <% end %>
25
- <% end %>
26
24
  <% data['arg_groups']&.each do |arg_group| %>
27
25
  <% next if arg_group['args'].size <= 1 %>
28
26
  it 'requires one of <%= arg_group['args'].join(', ') %>' do
data/lib/tasks/web.rake CHANGED
@@ -56,9 +56,7 @@ namespace :slack do
56
56
  snaked_group = group.tr('.', '_')
57
57
  rendered_method = method_template.result(group: group, names: names)
58
58
  File.write "lib/slack/web/api/endpoints/#{snaked_group}.rb", rendered_method
59
- custom_spec_exists =
60
- File.exist?("spec/slack/web/api/endpoints/custom_specs/#{group}_spec.rb")
61
- rendered_method_spec = method_spec_template.result(group: group, names: names, custom_spec_exists: custom_spec_exists)
59
+ rendered_method_spec = method_spec_template.result(group: group, names: names)
62
60
  File.write "spec/slack/web/api/endpoints/#{snaked_group}_spec.rb", rendered_method_spec
63
61
 
64
62
  unless ENV.key?('SKIP_PATCH')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slack-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.0
4
+ version: 2.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-09 00:00:00.000000000 Z
11
+ date: 2025-02-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday