discorb 0.17.0 → 0.17.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: 4a56213c17efa8d538ddacbbe14f5d4d32b787384e02d21cf925aa0855db59e3
4
- data.tar.gz: a3fce194d0f243b931d3918553880656e0bac5b0228d2ccd7147cae1068e1c9b
3
+ metadata.gz: c4cee4be461c639c494c2981f65ba496a17e4336fcb440218c2a4852d375b277
4
+ data.tar.gz: 4e743b61201c82a387f580cc75e0fa448dd357c5b02af5339df9b950898c0c38
5
5
  SHA512:
6
- metadata.gz: aaced769a9309ab29050fdd89aed3164d7dbfe67e31dba2dd6caf91c83e5b6a16b00a941edc591a529619b13fdc0ec498e0cdfdda07c21849feece7c46a63a06
7
- data.tar.gz: 205d12c8f88eabd03de31bf9a184e84653727ebb0acc8d05daabe8f3b0e41273665855ecdf8a8456e40cdcefc64c537b756efbaf48c6dbe413ea6a1b10cd7375
6
+ metadata.gz: b440b0e1f9e19161b666df325e01120905c3cf7f38e45cb4c89db4c9c7273b9626a5bed8825706317a84605417ac8b0f688450378622ee188cd3307d1905e7c0
7
+ data.tar.gz: b6bfc1d6c2e64918d0b0a73529029c01b50b33ac399a83bf18e30ef5bc6e7eb1c458f1aec7ce607349c36c2ba1585ded988c33d0607ece6048f0da9571af334d
@@ -13,7 +13,10 @@ jobs:
13
13
  ruby-version:
14
14
  - "3.0"
15
15
  - "3.1"
16
- runs-on: ubuntu-latest
16
+ os:
17
+ - "ubuntu-latest"
18
+ - "windows-latest"
19
+ runs-on: ${{ matrix.os }}
17
20
  steps:
18
21
  - name: Set up Ruby
19
22
  uses: ruby/setup-ruby@v1
data/.gitignore CHANGED
@@ -61,3 +61,5 @@ tmp-doc
61
61
  doc
62
62
  *.zip
63
63
  **/*.po
64
+
65
+ .gem_rbs_collection
data/Changelog.md CHANGED
@@ -6,6 +6,12 @@
6
6
 
7
7
  ## v0.17
8
8
 
9
+ ### v0.17.1
10
+
11
+ - Add: Add valid rbs file.
12
+ - Change: Message content intent warning will show only once.
13
+ - Update: Update audit log events.
14
+
9
15
  ### v0.17.0
10
16
 
11
17
  - Change!: Delete `Interaction#target` and `Interaction#fired_by`.
data/Rakefile CHANGED
@@ -250,70 +250,70 @@ task :rbs do
250
250
  sh "sord gen sig/discorb.rbs --keep-original-comments --no-sord-comments" +
251
251
  (regenerate ? " --regenerate" : " --no-regenerate")
252
252
  base = File.read("sig/discorb.rbs")
253
- base.gsub!(/\n +def _set_data: \(.+\) -> untyped\n\n/, "")
254
- base.gsub!(/( )?( *)# @private.+?(?:\n\n(?=\1\2#)|(?=\n\2end))/sm, "")
253
+ base.gsub!(/\n +def _set_data: \(.+\) -> untyped\n\n/, "\n")
254
+ # base.gsub!(/( )?( *)# @private.+?(?:\n\n(?=\1\2#)|(?=\n\2end))/sm, "")
255
255
  base.gsub!(/untyped ([a-z_]*id)/, "_ToS \\1")
256
256
  # #region rbs dictionary
257
257
  base.gsub!(/ class Dictionary.+?end\n/ms, <<-RBS)
258
258
  class Dictionary[K, V]
259
- ##{" "}
259
+ #
260
260
  # Initialize a new Dictionary.
261
- ##{" "}
261
+ #
262
262
  # @param [Hash] hash A hash of items to add to the dictionary.
263
263
  # @param [Integer] limit The maximum number of items in the dictionary.
264
264
  # @param [false, Proc] sort Whether to sort the items in the dictionary.
265
265
  def initialize: (?::Hash[untyped, untyped] hash, ?limit: Integer?, ?sort: (bool | Proc)) -> void
266
266
 
267
- ##{" "}
267
+ #
268
268
  # Registers a new item in the dictionary.
269
- ##{" "}
269
+ #
270
270
  # @param [#to_s] id The ID of the item.
271
271
  # @param [Object] body The item to register.
272
- ##{" "}
272
+ #
273
273
  # @return [self] The dictionary.
274
274
  def register: (_ToS id, Object body) -> self
275
275
 
276
- ##{" "}
276
+ #
277
277
  # Merges another dictionary into this one.
278
- ##{" "}
278
+ #
279
279
  # @param [Discorb::Dictionary] other The dictionary to merge.
280
280
  def merge: (Discorb::Dictionary other) -> untyped
281
281
 
282
- ##{" "}
282
+ #
283
283
  # Removes an item from the dictionary.
284
- ##{" "}
284
+ #
285
285
  # @param [#to_s] id The ID of the item to remove.
286
286
  def remove: (_ToS id) -> untyped
287
287
 
288
- ##{" "}
288
+ #
289
289
  # Get an item from the dictionary.
290
- ##{" "}
290
+ #
291
291
  # @param [#to_s] id The ID of the item.
292
292
  # @return [Object] The item.
293
293
  # @return [nil] if the item was not found.
294
- ##{" "}
294
+ #
295
295
  # @overload get(index)
296
296
  # @param [Integer] index The index of the item.
297
- ##{" "}
297
+ #
298
298
  # @return [Object] The item.
299
299
  # @return [nil] if the item is not found.
300
300
  def get: (K id) -> V?
301
301
 
302
- ##{" "}
302
+ #
303
303
  # Returns the values of the dictionary.
304
- ##{" "}
304
+ #
305
305
  # @return [Array] The values of the dictionary.
306
306
  def values: () -> ::Array[V]
307
307
 
308
- ##{" "}
308
+ #
309
309
  # Checks if the dictionary has an ID.
310
- ##{" "}
310
+ #
311
311
  # @param [#to_s] id The ID to check.
312
- ##{" "}
312
+ #
313
313
  # @return [Boolean] `true` if the dictionary has the ID, `false` otherwise.
314
314
  def has?: (_ToS id) -> bool
315
315
 
316
- ##{" "}
316
+ #
317
317
  # Send a message to the array of values.
318
318
  def method_missing: (untyped name) -> untyped
319
319
 
@@ -330,6 +330,7 @@ task :rbs do
330
330
  base.gsub!(error, type)
331
331
  end
332
332
  base.gsub!("end\n\n\nend", "end\n")
333
+ base.gsub!(/ +$/m, "")
333
334
  File.write("sig/discorb.rbs", base)
334
335
  end
335
336
 
@@ -54,11 +54,14 @@ client.run(ENV["DISCORD_BOT_TOKEN"])
54
54
 
55
55
  Block will be called with a {Discorb::Interaction} object and specified options.
56
56
 
57
+ #### Register options
58
+
59
+ You can set hash to `options` argument.
57
60
  In `options`, hash should be like this:
58
61
 
59
62
  ```ruby
60
63
  {
61
- "Name" => {
64
+ "name" => {
62
65
  type: :string,
63
66
  required: true,
64
67
  description: "The description of the command."
@@ -67,10 +70,11 @@ In `options`, hash should be like this:
67
70
  ```
68
71
 
69
72
  | Key | Type | Description |
70
- | ------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
73
+ | ------------------------ | ---------------------------------------- | ------------------------------------------------------------------------------------- |
74
+ | `:name_localizations` | `Hash{Symbol => String}` | Localizations of option name. |
71
75
  | `:description` | `String` | Description of the option. |
72
- | `:required` | Boolean(true | false) | Whether the argument is required. `optional` will be used if not specified. |
73
- | `:optional` | Boolean(true | false) | Whether the argument is optional. `required` will be used if not specified. |
76
+ | `:required` | `Boolean(true\|false)` | Whether the argument is required. `optional` will be used if not specified. |
77
+ | `:optional` | `Boolean(true\|false)` | Whether the argument is optional. `required` will be used if not specified. |
74
78
  | `:type` | `Object` | Type of the option. |
75
79
  | `:choices` | `Hash{String => String, Integer, Float}` | Choice of the option. |
76
80
  | `:choices_localizations` | `Hash{String => Hash{Symbol => String}}` | Localization of the choice. Key must be the name of a choice. (See below for example) |
@@ -116,6 +120,19 @@ In `type`, You must use one of the following:
116
120
  | `:channel` | Channel argument. | None |
117
121
  | `:role` | Role argument. | None |
118
122
 
123
+ The block will receive the options as arguments.
124
+
125
+ ```ruby
126
+ client.slash("hello", "Bot greets", {
127
+ "name" => {
128
+ type: :string,
129
+ description: "Name"
130
+ }
131
+ }) do |interaction, name|
132
+ interaction.post("Hello, #{name}!", ephemeral: true)
133
+ end
134
+ ```
135
+
119
136
  #### Group Slash Commands
120
137
 
121
138
  To register a group of slash commands, use {Discorb::ApplicationCommand::Handler#slash_group}.
@@ -213,10 +213,7 @@ module Discorb
213
213
  # Represents the command with subcommands.
214
214
  #
215
215
  class GroupCommand < Command
216
- # @return [Array<
217
- # Discorb::ApplicationCommand::Command::ChatInputCommand,
218
- # Discorb::ApplicationCommand::Command::SubcommandGroup
219
- # >] The subcommands of the command.
216
+ # @return [Array<Discorb::ApplicationCommand::Command>] The subcommands of the command.
220
217
  attr_reader :commands
221
218
  # @return [String] The description of the command.
222
219
  attr_reader :description
@@ -21,6 +21,7 @@ module Discorb
21
21
  #
22
22
  # | Key | Type | Description |
23
23
  # | --- | --- | --- |
24
+ # | `:name_localizations` | Hash{Symbol => String} | Localizations of option name. |
24
25
  # | `:description` | `String` \| `Hash{Symbol => String}` |
25
26
  # Description of the option. If hash is passed, it must be a pair of Language code and description,
26
27
  # and `:default` key is required. You can use `_` instead of `-` in language code. |
@@ -105,6 +105,7 @@ module Discorb
105
105
  # * `:thread_create`
106
106
  # * `:thread_update`
107
107
  # * `:thread_delete`
108
+ # * `:application_command_permission_update``
108
109
  attr_reader :type
109
110
  # @return [Discorb::AuditLog::Entry::Changes] The changes in this entry.
110
111
  attr_reader :changes
@@ -170,6 +171,7 @@ module Discorb
170
171
  110 => :thread_create,
171
172
  111 => :thread_update,
172
173
  112 => :thread_delete,
174
+ 121 => :application_command_permission_update,
173
175
  }.freeze
174
176
 
175
177
  #
@@ -202,7 +204,7 @@ module Discorb
202
204
  @reason = data[:reason]
203
205
  data[:options]&.each do |option, value|
204
206
  define_singleton_method(option) { value }
205
- if option.end_with?("_id")
207
+ if option.end_with?("_id") && CONVERTERS.key?(option.to_s.split("_")[0].to_sym)
206
208
  define_singleton_method(option.to_s.sub("_id", "")) do
207
209
  CONVERTERS[option.to_s.split("_")[0].to_sym]&.call(client, value, @guild_id)
208
210
  end
@@ -4,7 +4,7 @@ module Discorb
4
4
  # @return [String] The API base URL.
5
5
  API_BASE_URL = "https://discord.com/api/v10"
6
6
  # @return [String] The version of discorb.
7
- VERSION = "0.17.0"
7
+ VERSION = "0.17.1"
8
8
  # @return [Array<Integer>] The version array of discorb.
9
9
  VERSION_ARRAY = VERSION.split(".").map(&:to_i).freeze
10
10
  # @return [String] The user agent for the bot.
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # rubocop:disable Layout/LineLength
4
-
5
3
  module Discorb
6
4
  #
7
5
  # A table of emoji names and their unicode values.
8
6
  #
9
7
  module EmojiTable
8
+ # rubocop:disable Layout/LineLength
9
+
10
10
  # A hash of Discord's emoji names to their unicode characters.
11
11
  DISCORD_TO_UNICODE = {
12
12
  "grinning" => "\xf0\x9f\x98\x80",
@@ -8851,7 +8851,7 @@ module Discorb
8851
8851
  "\xf0\x9f\x8f\xbe",
8852
8852
  "\xf0\x9f\x8f\xbf",
8853
8853
  ].freeze
8854
+
8855
+ # rubocop:enable Layout/LineLength
8854
8856
  end
8855
8857
  end
8856
-
8857
- # rubocop:enable Layout/LineLength
@@ -604,8 +604,11 @@ module Discorb
604
604
  _, gateway_response = @http.request(Route.new("/gateway", "//gateway", :get)).wait
605
605
  gateway_url = gateway_response[:url]
606
606
  gateway_version = if @intents.to_h[:message_content].nil?
607
- warn "message_content intent not set, using gateway version 9. " \
608
- "You should specify `message_content` intent for preventing unexpected changes in the future."
607
+ unless @message_content_intent_warned
608
+ warn "message_content intent not set, using gateway version 9. " \
609
+ "You should specify `message_content` intent for preventing unexpected changes in the future."
610
+ @message_content_intent_warned = true
611
+ end
609
612
  9
610
613
  else
611
614
  10
data/lib/discorb/http.rb CHANGED
@@ -57,7 +57,7 @@ module Discorb
57
57
  #
58
58
  # @param [Discorb::Route] path The path to the resource.
59
59
  # @param [String, Hash] body The body of the request.
60
- # @param [Array<Discorb::File>] files The files to upload.
60
+ # @param [Array<Discorb::Attachment>] files The files to upload.
61
61
  # @param [Hash] headers The headers to send with the request.
62
62
  # @param [String] audit_log_reason The audit log reason to send with the request.
63
63
  # @param [Hash] kwargs The keyword arguments.
@@ -124,8 +124,8 @@ module Discorb
124
124
  # @param [Discorb::Embed] embed The new embed of the message.
125
125
  # @param [Array<Discorb::Embed>] embeds The new embeds of the message.
126
126
  # @param [Array<Discorb::Attachment>] attachments The attachments to remain.
127
- # @param [Discorb::File] file The file to send.
128
- # @param [Array<Discorb::File>] files The files to send.
127
+ # @param [Discorb::Attachment] file The file to send.
128
+ # @param [Array<Discorb::Attachment>] files The files to send.
129
129
  #
130
130
  # @return [Async::Task<void>] The task.
131
131
  #
@@ -45,10 +45,10 @@ module Discorb
45
45
  @count = data[:count]
46
46
  @me = data[:me]
47
47
  @emoji = if data[:emoji][:id].nil?
48
- UnicodeEmoji.new(data[:emoji][:name])
49
- else
50
- PartialEmoji.new(data[:emoji])
51
- end
48
+ UnicodeEmoji.new(data[:emoji][:name])
49
+ else
50
+ PartialEmoji.new(data[:emoji])
51
+ end
52
52
  end
53
53
  end
54
54
  end
@@ -56,8 +56,8 @@ module Discorb
56
56
  # @param [Discorb::Embed] embed The embed to send.
57
57
  # @param [Array<Discorb::Embed>] embeds The embeds to send.
58
58
  # @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions to send.
59
- # @param [Discorb::File] file The file to send.
60
- # @param [Array<Discorb::File>] files The files to send.
59
+ # @param [Discorb::Attachment] attachment The attachment to send.
60
+ # @param [Array<Discorb::Attachment>] attachment The attachments to send.
61
61
  # @param [String] username The username of the message.
62
62
  # @param [String] avatar_url The avatar URL of the message.
63
63
  # @param [Boolean] wait Whether to wait for the message to be sent.
@@ -65,24 +65,34 @@ module Discorb
65
65
  # @return [Discorb::Webhook::Message] The message that was sent.
66
66
  # @return [Async::Task<nil>] If `wait` is false.
67
67
  #
68
- def post(content = nil, tts: false, embed: nil, embeds: nil, allowed_mentions: nil,
69
- file: nil, files: nil, username: nil, avatar_url: Discorb::Unset, wait: true)
68
+ def post(
69
+ content = nil,
70
+ tts: false,
71
+ embed: nil,
72
+ embeds: nil,
73
+ allowed_mentions: nil,
74
+ attachment: nil,
75
+ attachments: nil,
76
+ username: nil,
77
+ avatar_url: Discorb::Unset,
78
+ wait: true
79
+ )
70
80
  Async do
71
81
  payload = {}
72
82
  payload[:content] = content if content
73
83
  payload[:tts] = tts
74
84
  tmp_embed = if embed
75
- [embed]
76
- elsif embeds
77
- embeds
78
- end
85
+ [embed]
86
+ elsif embeds
87
+ embeds
88
+ end
79
89
  payload[:embeds] = tmp_embed.map(&:to_hash) if tmp_embed
80
90
  payload[:allowed_mentions] = allowed_mentions&.to_hash
81
91
  payload[:username] = username if username
82
92
  payload[:avatar_url] = avatar_url if avatar_url != Discorb::Unset
83
- files = [file]
93
+ attachments = [attachment] if attachment
84
94
  _resp, data = @http.multipart_request(Route.new("#{url}?wait=#{wait}", "//webhooks/:webhook_id/:token", :post),
85
- files, payload, headers: headers).wait
95
+ attachments, payload, headers: headers).wait
86
96
  data && Webhook::Message.new(self, data)
87
97
  end
88
98
  end
@@ -137,8 +147,8 @@ module Discorb
137
147
  # @param [Discorb::Embed] embed The new embed of the message.
138
148
  # @param [Array<Discorb::Embed>] embeds The new embeds of the message.
139
149
  # @param [Array<Discorb::Attachment>] attachments The attachments to remain.
140
- # @param [Discorb::File] file The file to send.
141
- # @param [Array<Discorb::File>] files The files to send.
150
+ # @param [Discorb::Attachment] file The file to send.
151
+ # @param [Array<Discorb::Attachment>] files The files to send.
142
152
  # @param [Discorb::AllowedMentions] allowed_mentions The allowed mentions to send.
143
153
  #
144
154
  # @return [Async::Task<void>] The task.
@@ -176,10 +186,12 @@ module Discorb
176
186
  #
177
187
  def delete_message!(message)
178
188
  Async do
179
- @http.request(Route.new(
180
- "#{url}/messages/#{Utils.try(message, :id)}",
181
- "//webhooks/:webhook_id/:token/messages/:message_id", :delete
182
- )).wait
189
+ @http.request(
190
+ Route.new(
191
+ "#{url}/messages/#{Utils.try(message, :id)}",
192
+ "//webhooks/:webhook_id/:token/messages/:message_id", :delete
193
+ )
194
+ ).wait
183
195
  message
184
196
  end
185
197
  end
data/po/yard.pot CHANGED
@@ -2907,23 +2907,23 @@ msgid "### How can I send files?"
2907
2907
  msgstr ""
2908
2908
 
2909
2909
  #: ../docs/faq.md:65
2910
- msgid "Use {Discorb::File} class."
2910
+ msgid "Use {Discorb::Attachment} class."
2911
2911
  msgstr ""
2912
2912
 
2913
2913
  #: ../docs/faq.md:67
2914
2914
  msgid "```ruby\n"
2915
2915
  "# Send a file\n"
2916
- "message.channel.post file: Discorb::File.new(File.open(\"./README.md\"))"
2916
+ "message.channel.post file: Discorb::Attachment.new(File.open(\"./README.md\"))"
2917
2917
  msgstr ""
2918
2918
 
2919
2919
  #: ../docs/faq.md:71
2920
2920
  msgid "# Send some files with text\n"
2921
- "message.channel.post \"File!\", files: [Discorb::File.new(File.open(\"./README.md\")), Discorb::File.new(File.open(\"./License.txt\"))]"
2921
+ "message.channel.post \"File!\", files: [Discorb::Attachment.new(File.open(\"./README.md\")), Discorb::Attachment.new(File.open(\"./License.txt\"))]"
2922
2922
  msgstr ""
2923
2923
 
2924
2924
  #: ../docs/faq.md:74
2925
2925
  msgid "# Send a string as a file\n"
2926
- "message.channel.post file: Discorb::File.from_string(\"Hello world!\", \"hello.txt\")\n"
2926
+ "message.channel.post file: Discorb::Attachment.from_string(\"Hello world!\", \"hello.txt\")\n"
2927
2927
  "```"
2928
2928
  msgstr ""
2929
2929
 
@@ -9511,7 +9511,7 @@ msgstr ""
9511
9511
  msgid "a new instance of Attachment"
9512
9512
  msgstr ""
9513
9513
 
9514
- # Discorb::File
9514
+ # Discorb::Attachment
9515
9515
  #: ../lib/discorb/file.rb:53
9516
9516
  msgid "Represents a file to send as an attachment."
9517
9517
  msgstr ""
@@ -9537,7 +9537,7 @@ msgstr ""
9537
9537
  msgid "The content type of the file. If not set, it is guessed from the filename."
9538
9538
  msgstr ""
9539
9539
 
9540
- # Discorb::File#initialize
9540
+ # Discorb::Attachment#initialize
9541
9541
  #: ../lib/discorb/file.rb:64
9542
9542
  msgid "Creates a new file from IO."
9543
9543
  msgstr ""
@@ -9570,7 +9570,7 @@ msgstr ""
9570
9570
  msgid "tag|param|content_type"
9571
9571
  msgstr ""
9572
9572
 
9573
- # Discorb::File.from_string
9573
+ # Discorb::Attachment.from_string
9574
9574
  #: ../lib/discorb/file.rb:79
9575
9575
  msgid "Creates a new file from a string."
9576
9576
  msgstr ""
@@ -11738,7 +11738,7 @@ msgstr ""
11738
11738
  msgid "A helper method to send multipart/form-data requests for creating messages."
11739
11739
  msgstr ""
11740
11740
 
11741
- # @param [Array<Discorb::File>]
11741
+ # @param [Array<Discorb::Attachment>]
11742
11742
  #: ../lib/discorb/http.rb:154
11743
11743
  #: ../lib/discorb/interaction/response.rb:91
11744
11744
  #: ../lib/discorb/interaction/response.rb:115
@@ -11750,7 +11750,7 @@ msgstr ""
11750
11750
  msgid "tag|param|files"
11751
11751
  msgstr ""
11752
11752
 
11753
- # @param [Array<Discorb::File>] files
11753
+ # @param [Array<Discorb::Attachment>] files
11754
11754
  #: ../lib/discorb/http.rb:154
11755
11755
  #: ../lib/discorb/interaction/response.rb:91
11756
11756
  #: ../lib/discorb/interaction/response.rb:115
@@ -12357,7 +12357,7 @@ msgstr ""
12357
12357
  msgid "tag|param|attachments"
12358
12358
  msgstr ""
12359
12359
 
12360
- # @param [Discorb::File]
12360
+ # @param [Discorb::Attachment]
12361
12361
  #: ../lib/discorb/interaction/response.rb:91
12362
12362
  #: ../lib/discorb/interaction/response.rb:115
12363
12363
  #: ../lib/discorb/modules.rb:25
@@ -12375,7 +12375,7 @@ msgstr ""
12375
12375
  msgid "The new embeds of the message."
12376
12376
  msgstr ""
12377
12377
 
12378
- # @param [Discorb::File] file
12378
+ # @param [Discorb::Attachment] file
12379
12379
  #: ../lib/discorb/interaction/response.rb:91
12380
12380
  #: ../lib/discorb/interaction/response.rb:115
12381
12381
  #: ../lib/discorb/modules.rb:25
@@ -0,0 +1,96 @@
1
+ ---
2
+ sources:
3
+ - name: ruby/gem_rbs_collection
4
+ remote: https://github.com/ruby/gem_rbs_collection.git
5
+ revision: main
6
+ repo_dir: gems
7
+ path: ".gem_rbs_collection"
8
+ gems:
9
+ - name: activesupport
10
+ version: '6.0'
11
+ source:
12
+ type: git
13
+ name: ruby/gem_rbs_collection
14
+ revision: 8e1f19e0c8768b6bac2815fe65a3310298ba400e
15
+ remote: https://github.com/ruby/gem_rbs_collection.git
16
+ repo_dir: gems
17
+ - name: ast
18
+ version: '2.4'
19
+ source:
20
+ type: git
21
+ name: ruby/gem_rbs_collection
22
+ revision: 8e1f19e0c8768b6bac2815fe65a3310298ba400e
23
+ remote: https://github.com/ruby/gem_rbs_collection.git
24
+ repo_dir: gems
25
+ - name: date
26
+ version: '0'
27
+ source:
28
+ type: stdlib
29
+ - name: forwardable
30
+ version: '0'
31
+ source:
32
+ type: stdlib
33
+ - name: i18n
34
+ version: '1.10'
35
+ source:
36
+ type: git
37
+ name: ruby/gem_rbs_collection
38
+ revision: 8e1f19e0c8768b6bac2815fe65a3310298ba400e
39
+ remote: https://github.com/ruby/gem_rbs_collection.git
40
+ repo_dir: gems
41
+ - name: listen
42
+ version: '3.2'
43
+ source:
44
+ type: git
45
+ name: ruby/gem_rbs_collection
46
+ revision: 8e1f19e0c8768b6bac2815fe65a3310298ba400e
47
+ remote: https://github.com/ruby/gem_rbs_collection.git
48
+ repo_dir: gems
49
+ - name: parallel
50
+ version: '1.20'
51
+ source:
52
+ type: git
53
+ name: ruby/gem_rbs_collection
54
+ revision: 8e1f19e0c8768b6bac2815fe65a3310298ba400e
55
+ remote: https://github.com/ruby/gem_rbs_collection.git
56
+ repo_dir: gems
57
+ - name: prime
58
+ version: '0'
59
+ source:
60
+ type: stdlib
61
+ - name: rainbow
62
+ version: '3.0'
63
+ source:
64
+ type: git
65
+ name: ruby/gem_rbs_collection
66
+ revision: 8e1f19e0c8768b6bac2815fe65a3310298ba400e
67
+ remote: https://github.com/ruby/gem_rbs_collection.git
68
+ repo_dir: gems
69
+ - name: singleton
70
+ version: '0'
71
+ source:
72
+ type: stdlib
73
+ - name: time
74
+ version: '0'
75
+ source:
76
+ type: stdlib
77
+ - name: uri
78
+ version: '0'
79
+ source:
80
+ type: stdlib
81
+ - name: monitor
82
+ version: '0'
83
+ source:
84
+ type: stdlib
85
+ - name: logger
86
+ version: '0'
87
+ source:
88
+ type: stdlib
89
+ - name: mutex_m
90
+ version: '0'
91
+ source:
92
+ type: stdlib
93
+ - name: pathname
94
+ version: '0'
95
+ source:
96
+ type: stdlib
@@ -0,0 +1,17 @@
1
+ # Download sources
2
+ sources:
3
+ - name: ruby/gem_rbs_collection
4
+ remote: https://github.com/ruby/gem_rbs_collection.git
5
+ revision: main
6
+ repo_dir: gems
7
+
8
+ # A directory to install the downloaded RBSs
9
+ path: .gem_rbs_collection
10
+
11
+ gems:
12
+ # Skip loading rbs gem's RBS.
13
+ # It's unnecessary if you don't use rbs as a library.
14
+ - name: rbs
15
+ ignore: true
16
+ - name: discorb
17
+ ignore: true
data/sig/async.rbs ADDED
@@ -0,0 +1,5 @@
1
+ module Async
2
+ class Task[T]
3
+ def wait: () -> T
4
+ end
5
+ end