jsi 0.0.3 → 0.0.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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/jsi/base.rb +1 -1
- data/lib/jsi/json-schema-fragments.rb +2 -1
- data/lib/jsi/json/node.rb +2 -1
- data/lib/jsi/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: 898a2aae157baa1fc01f6e3e28286f4b6fc9be61b7e47689529acdfdbc8c9c17
|
4
|
+
data.tar.gz: 9328c06ac1cc07993f27644b3c94b87b1667be06b6404af2ce5753fb7dc3da1a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 874021cfce6aa05353a897d8519cf319ce0de3fc1a2176cefcc7505eddd8960a2525bbb484a0a3fcaa81ac030768a0d64337f1a3f86e6fbb13403ffbdb13eadc
|
7
|
+
data.tar.gz: e67feab1a13a2a23ed51ad75d7622ab9f7093b3dbf0cb79d896f1bd56e6f1f0deb322151b8b7529226a111124de01dceeb4f9981759b358ab78d50b337e2cbef
|
data/CHANGELOG.md
CHANGED
data/lib/jsi/base.rb
CHANGED
@@ -83,7 +83,7 @@ module JSON
|
|
83
83
|
# takes a root json document and evaluates this pointer through the document, returning the value
|
84
84
|
# pointed to by this pointer.
|
85
85
|
def evaluate(document)
|
86
|
-
reference_tokens.inject(document) do |value, token|
|
86
|
+
res = reference_tokens.inject(document) do |value, token|
|
87
87
|
if value.respond_to?(:to_ary)
|
88
88
|
if token.is_a?(String) && token =~ /\A\d|[1-9]\d+\z/
|
89
89
|
token = token.to_i
|
@@ -104,6 +104,7 @@ module JSON
|
|
104
104
|
raise(ReferenceError, "Invalid resolution for #{to_s}: #{token.inspect} cannot be resolved in #{value.inspect}")
|
105
105
|
end
|
106
106
|
end
|
107
|
+
res
|
107
108
|
end
|
108
109
|
|
109
110
|
# the pointer string representation of this Pointer
|
data/lib/jsi/json/node.rb
CHANGED
@@ -64,7 +64,8 @@ module JSI
|
|
64
64
|
|
65
65
|
# the raw content of this Node from the underlying document at this Node's path.
|
66
66
|
def content
|
67
|
-
pointer.evaluate(document)
|
67
|
+
content = pointer.evaluate(document)
|
68
|
+
content
|
68
69
|
end
|
69
70
|
|
70
71
|
# returns content at the given subscript - call this the subcontent.
|
data/lib/jsi/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jsi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ethan
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.7.
|
142
|
+
rubygems_version: 2.7.8
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: 'JSI: JSON-Schema instantiation'
|