onyxcord 1.1.7 → 1.1.8
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 +4 -4
- data/CHANGELOG.md +15 -0
- data/lib/onyxcord/data/component.rb +14 -0
- data/lib/onyxcord/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 07ea78b3a647f1f03a640e750eef4e5a99595f6afa66ce9be842d012c5e8e2c1
|
|
4
|
+
data.tar.gz: '08f1edd1b05510983d80766f627db7372edb8f3bce6234ba9cb4d669e9cf2070'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '092c91e1b949b091079169f2977c44745fea551a93e2cc3d065df2b9c51b534cbb027a01519d781dfc0fe2f783c360eecccee29d46b4f0bb28cd99350bde56cf'
|
|
7
|
+
data.tar.gz: 076604ea2c7a9a6a0c9303fedfbd5e1cac58cb11cbc741d88afff80a838f80da5637a292b494a6d84ae63da4ce5fc435c8eb3548dcb833961dff588ff6b24974
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.1.8 - 2026-06-28
|
|
4
|
+
|
|
5
|
+
### Correcoes
|
|
6
|
+
|
|
7
|
+
- `Components::Label` agora delega `custom_id`, `value` e `values` para o componente interativo interno, mantendo compatibilidade com codigo legado de modal que itera por `event.components`.
|
|
8
|
+
- Modais modernos continuam preservando `label`, `description` e `component`, enquanto `event.value(custom_id)`, `event.values(custom_id)` e acesso direto em `event.components` funcionam de forma consistente.
|
|
9
|
+
|
|
10
|
+
### Validacao
|
|
11
|
+
|
|
12
|
+
- `bundle exec rspec spec/components_v2_spec.rb`: sucesso.
|
|
13
|
+
- `ruby -c lib/onyxcord/data/component.rb`: sucesso.
|
|
14
|
+
- `ruby -c spec/components_v2_spec.rb`: sucesso.
|
|
15
|
+
- `gem build onyxcord.gemspec`: sucesso.
|
|
16
|
+
- `gem build onyxcord-webhooks.gemspec`: sucesso.
|
|
17
|
+
|
|
3
18
|
## 1.1.7 - 2026-06-28
|
|
4
19
|
|
|
5
20
|
### Melhorias
|
|
@@ -485,6 +485,14 @@ module OnyxCord
|
|
|
485
485
|
|
|
486
486
|
# A parent component for interactive modal components.
|
|
487
487
|
class Label
|
|
488
|
+
# Methods from the wrapped interactive component that should remain
|
|
489
|
+
# available for legacy modal code that iterates over event.components.
|
|
490
|
+
DELEGATED_COMPONENT_METHODS = %i[
|
|
491
|
+
custom_id
|
|
492
|
+
value
|
|
493
|
+
values
|
|
494
|
+
].freeze
|
|
495
|
+
|
|
488
496
|
# @return [Integer] the numeric identifier of the label.
|
|
489
497
|
attr_reader :id
|
|
490
498
|
|
|
@@ -505,6 +513,12 @@ module OnyxCord
|
|
|
505
513
|
@description = data['description']
|
|
506
514
|
@component = Components.from_data(data['component'], @bot)
|
|
507
515
|
end
|
|
516
|
+
|
|
517
|
+
DELEGATED_COMPONENT_METHODS.each do |name|
|
|
518
|
+
define_method(name) do
|
|
519
|
+
@component.public_send(name) if @component.respond_to?(name)
|
|
520
|
+
end
|
|
521
|
+
end
|
|
508
522
|
end
|
|
509
523
|
|
|
510
524
|
# A surface that allows users to upload files in a modal.
|
data/lib/onyxcord/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: onyxcord
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Gustavo Silva
|
|
@@ -109,14 +109,14 @@ dependencies:
|
|
|
109
109
|
requirements:
|
|
110
110
|
- - "~>"
|
|
111
111
|
- !ruby/object:Gem::Version
|
|
112
|
-
version: 1.1.
|
|
112
|
+
version: 1.1.8
|
|
113
113
|
type: :runtime
|
|
114
114
|
prerelease: false
|
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
|
116
116
|
requirements:
|
|
117
117
|
- - "~>"
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: 1.1.
|
|
119
|
+
version: 1.1.8
|
|
120
120
|
- !ruby/object:Gem::Dependency
|
|
121
121
|
name: bundler
|
|
122
122
|
requirement: !ruby/object:Gem::Requirement
|