babl-json 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 +4 -4
- data/CHANGELOG.md +7 -3
- data/lib/babl/nodes/terminal_value.rb +2 -1
- data/lib/babl/version.rb +1 -1
- data/spec/operators/nav_spec.rb +9 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a7476b8f458e689ec9a365ddb484fdfae227131
|
4
|
+
data.tar.gz: 6bd1ae10d995e90dfac925f1700b507590b03975
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1879d4cdbb15a27592e6efa36ef6a76b225d17b98f69d3ce38ccbc2fbdd26f890385b082ecd7a2ca8a3c1c7db354181eb2f4278268190ebb4d2abbaf741bdc04
|
7
|
+
data.tar.gz: 3ba37150e0b32e6e0ce64fdf11a5ffbe3772b937cf2e332e3b1b03cd10ed57233185d8361e44e4f53a14b8d6de95cff0c1560bf9c6cea82d45c347b0752932cc
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# BABL Changelog
|
2
2
|
|
3
|
+
## 0.2.1 (July 11, 2017)
|
4
|
+
|
5
|
+
- Fix: array serialization is broken.
|
6
|
+
|
3
7
|
## 0.2.0 (July 11, 2017)
|
4
8
|
|
5
9
|
- Added support for producing documentation using [JSON-Schema](http://json-schema.org/).
|
@@ -16,9 +20,9 @@
|
|
16
20
|
|
17
21
|
## 0.1.2 (May 22, 2017)
|
18
22
|
|
19
|
-
- Fixed a bug in `call(primitive)
|
20
|
-
- Improved test suite
|
23
|
+
- Fixed a bug in `call(primitive)`.
|
24
|
+
- Improved test suite.
|
21
25
|
|
22
26
|
## 0.1.1 (May 16, 2017)
|
23
27
|
|
24
|
-
- First released version
|
28
|
+
- First released version.
|
data/lib/babl/version.rb
CHANGED
data/spec/operators/nav_spec.rb
CHANGED
@@ -42,9 +42,10 @@ describe Babl::Operators::Nav do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
context 'block navigation' do
|
45
|
-
let(:object) { 42 }
|
46
45
|
template { nav { |x| x * 2 } }
|
47
46
|
|
47
|
+
let(:object) { 42 }
|
48
|
+
|
48
49
|
it { expect(json).to eq(84) }
|
49
50
|
it { expect(dependencies).to eq({}) }
|
50
51
|
|
@@ -58,5 +59,12 @@ describe Babl::Operators::Nav do
|
|
58
59
|
template { object(a: nav._) }
|
59
60
|
it { expect { compiled }.to raise_error Babl::Errors::InvalidTemplateError }
|
60
61
|
end
|
62
|
+
|
63
|
+
context 'nav to array of complex objects' do
|
64
|
+
template { nav(:arr) }
|
65
|
+
let(:object) { { arr: [nil, 1, 'lol', { a: [1] }, [], {}, true, false] } }
|
66
|
+
it { expect(json).to eq([nil, 1, 'lol', { 'a' => [1] }, [], {}, true, false]) }
|
67
|
+
it { expect(schema).to eq s_anything }
|
68
|
+
end
|
61
69
|
end
|
62
70
|
end
|