legion-json 1.3.0 → 1.3.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: 9d9fac81994418377b668dbf12b3604728fde04c4f1a2817708bb510348ab241
4
- data.tar.gz: c92b8f3cfe4dcc21edf25f4e85fc46943ec464271b52f88a476370ea4660c260
3
+ metadata.gz: c9207e4ba4de5d46962daf28c5eba3f52062f0732093807f64d1fecaf08ac4e9
4
+ data.tar.gz: 66b65ae39fd1092625bf665a0a2324b502cda70a10f1d6b45841b962aaa049d1
5
5
  SHA512:
6
- metadata.gz: f0f1413e53aee221483a807b32758b696479f8e6d61e89275eca79c5ea00597e96db3136c883643a01b389729dace324021ea188363be973e63df923dae12899
7
- data.tar.gz: a07792a1311935bab4613c2b2a992f72ca4caad6612f3e2ddcb8a5b7f4bff538a741bb401718fbacf75fb007e38d10d630996d8e1d399f536ebe1d07aea2ca15
6
+ metadata.gz: d7abc40ed9df6cb3a95a87549891d0bee745d2b32bb1a200c92124ac0ad866cdb0657e6ceaab9e10ab0c1f1dbc51a3775dd6fd382f0b9dccf183cc449e172c58
7
+ data.tar.gz: '0474844c608b995629c9f2ca594e0f149a53064a11a35f87d5fe8a7847eaf0c3caedf64e044917e9f9b0b8fbcdbba58a407dc0b0adb4763fdd37fc0a46ba481c'
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Legion::JSON
2
2
 
3
+ ## [1.3.1] - 2026-03-27
4
+
5
+ ### Changed
6
+ - `.dump` now accepts `**kwargs` — callers can pass `Legion::JSON.dump(key: val)` without wrapping in `{}`
7
+ - `pretty:` keyword option preserved; all other kwargs become the serialized object
8
+
3
9
  ## [1.3.0] - 2026-03-26
4
10
 
5
11
  ### Added
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Legion
4
4
  module Json
5
- VERSION = '1.3.0'
5
+ VERSION = '1.3.1'
6
6
  end
7
7
  end
data/lib/legion/json.rb CHANGED
@@ -21,8 +21,9 @@ module Legion
21
21
  end
22
22
  module_function :load
23
23
 
24
- def dump(object, pretty: false)
25
- parser.dump(object, pretty: pretty)
24
+ def dump(object = nil, pretty: false, **kwargs)
25
+ data = object.nil? ? kwargs : object
26
+ parser.dump(data, pretty: pretty)
26
27
  end
27
28
  module_function :dump
28
29
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: legion-json
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esity