max_api_client 0.2.0 → 0.2.1

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: 7d6578ded53eb4717c32d40728c217f163db0e8149bc813b084c6920692201dd
4
- data.tar.gz: 338a01c773c1be6502cd37161bf1b11011a08717fd006055db99e9ff7466716c
3
+ metadata.gz: 27ac8308d00327a1e3848f279c837713bea821078faba27f2ad8e24e07edd172
4
+ data.tar.gz: 67edf9db28d76eea0812ee2823b33d59720f68053376b82e780e4a5e2b872379
5
5
  SHA512:
6
- metadata.gz: a656768c33a27bf0c4d6a61b8eb8c6ef807b2177472c19c99c70ed29ec4f4d9a4ee9dfaec2a8db4d330582040d79b8500d511bcb3dd8e55fd178f98058f8fb09
7
- data.tar.gz: 99f540522f43226232847ee792d1950643c7ff56464b693813b60d7a3da6cd07fa155c62978c95630cf8f7da78385ffbe5c6eb48b79392b5ca7e395362901751
6
+ metadata.gz: 0dd2acfbc78db8a6149a0517adb7f347b8d5812a902e3cd722c1c661129543f4f789899b0c98aa7ee74ea26cde534e8bb03bd042cadb2ca121b54f110402e764
7
+ data.tar.gz: 9afff6a241f3c853d075779740fd6f7681f53849322a161b1cc086b9993eb6836fd2a8847d00e0676c91d5de16901ce67f47a6d09c34ba010ebccdbed29a10bf
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.1] - 2026-10-28
4
+
5
+ - Attachment objects implement `as_json`, so ActiveSupport's `to_json` (Rails) serializes them the same as `JSON.generate` instead of dumping instance variables.
6
+
3
7
  ## [0.2.0] - 2026-10-03
4
8
 
5
9
  Synced with Max Bot API schema 0.0.33.
@@ -10,6 +10,12 @@ module MaxApiClient
10
10
  def to_json(*args)
11
11
  to_h.to_json(*args)
12
12
  end
13
+
14
+ # Encoders that go through as_json (ActiveSupport's to_json in Rails) get the same
15
+ # payload as JSON.generate instead of the object's instance variables.
16
+ def as_json(*)
17
+ to_h
18
+ end
13
19
  end
14
20
 
15
21
  # Shared attachment implementation for upload-backed media objects.
@@ -2,5 +2,5 @@
2
2
 
3
3
  # Root namespace for gem version information.
4
4
  module MaxApiClient
5
- VERSION = "0.2.0"
5
+ VERSION = "0.2.1"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: max_api_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexandr Zimin