onyxcord 1.1.3 → 1.1.4

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: 86ca3fde0fa78c2cee74a2d481d82aaa7f70d4988cb16d9af7dec046162e93cd
4
- data.tar.gz: c7a9ced4d4f29a8d4a03a765bea9f9779ab3662c55bf23872fc75b1abbe1d0a3
3
+ metadata.gz: faa13116d56881eff441634bdd885ed2650739cdea9be5e3807ec94d0c4c8965
4
+ data.tar.gz: 8738d765d59e229c5c1476bc1029e32c82f6ad1d417295380ffaae4fb8d65e22
5
5
  SHA512:
6
- metadata.gz: a095fe07369dde14d2a59d2d3562f7a04a6ee8665a0dcd00f629c19dd85065a029a2c02838d2e2acc106536f89734281551dc5b89533209bd51ab080183e89e4
7
- data.tar.gz: 9086e3c2e05157280aa58d65c5f177f1e1916c1861aa666badf2aa30fe6df8768e89ac8f4f22edc02441ee5067a1cc78370ac13ea087e4323fb9a0705e877d27
6
+ metadata.gz: e36c649784e3eda4f2928bf2801013072fabf8bd40b4f5bcba232fef37155fc36ccfa27041656ef988152a78d1bbe9b4d3145e7cf384169b8279d1f80417f5f6
7
+ data.tar.gz: a4dd38f5c246e0bc9e9432ee0f75f54a641bbce30cf143a4b95eb73f8da08810baa76d4fd46e81e279e9d2cac5e4618df8f3f0acbb9c15ecc5643e411ac21592
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.1.4 - 2026-06-28
4
+
5
+ ### Melhorias
6
+
7
+ - `MediaGallery` agora aceita URLs diretas e hashes no builder, como `media_gallery('https://...')`, alem do formato em bloco.
8
+ - `FileComponent`/`file_display` agora aceita a URL do attachment como primeiro argumento, como `file_display('attachment://arquivo.txt')`.
9
+
10
+ ### Correcoes
11
+
12
+ - Parser de `MediaGallery` e `FileUpload` ficou mais tolerante quando o payload nao traz `items` ou `values`.
13
+
14
+ ### Validacao
15
+
16
+ - `bundle exec rspec spec/components_v2_spec.rb`: 13 exemplos, 0 falhas.
17
+
3
18
  ## 1.1.3 - 2026-06-23
4
19
 
5
20
  ### Melhorias
@@ -331,7 +331,7 @@ module OnyxCord
331
331
  def initialize(data, bot)
332
332
  @bot = bot
333
333
  @id = data['id']
334
- @items = data['items'].map { |item| Item.new(item, @bot) }
334
+ @items = Array(data['items']).map { |item| Item.new(item, @bot) }
335
335
  end
336
336
 
337
337
  # A singular media attachment.
@@ -515,7 +515,7 @@ module OnyxCord
515
515
  @bot = bot
516
516
  @id = data['id']
517
517
  @custom_id = data['custom_id']
518
- @values = data['values'].map(&:to_i)
518
+ @values = Array(data['values']).map(&:to_i)
519
519
  end
520
520
  end
521
521
 
@@ -3,5 +3,5 @@
3
3
  # OnyxCord and all its functionality, in this case only the version.
4
4
  module OnyxCord
5
5
  # The current version of onyxcord.
6
- VERSION = '1.1.3'
6
+ VERSION = '1.1.4'
7
7
  end
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.3
4
+ version: 1.1.4
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.3
112
+ version: 1.1.4
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.3
119
+ version: 1.1.4
120
120
  - !ruby/object:Gem::Dependency
121
121
  name: bundler
122
122
  requirement: !ruby/object:Gem::Requirement