json_world 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/json_world/dsl.rb +1 -1
- data/lib/json_world/property_definition.rb +9 -0
- data/lib/json_world/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36ef7bdefa96257f11c02b4b20f5f9fa3d04e12c
|
4
|
+
data.tar.gz: 15ba507ff51c82985fb0b820c7bc360d86f64742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f8149f3e22fee2bb7d0a0c9d78d1330c7bd705044465a2179dfdf856d34898324736bd0a0d85e197a9953610cde9dff2bdf3a265c0ce8f01eb2b319751b69e5c
|
7
|
+
data.tar.gz: 78ba6009028cfdd980c203c2e9b419e4c520e59d2ca2f95b04aa760f8981684f689b0a3d24f9645093bb2efe38e00dc036a051e8e60bd73a4ffd74a659cc224f
|
data/CHANGELOG.md
CHANGED
data/lib/json_world/dsl.rb
CHANGED
@@ -47,6 +47,13 @@ module JsonWorld
|
|
47
47
|
!!@options[:optional]
|
48
48
|
end
|
49
49
|
|
50
|
+
# @return [Hash{Symbol => Object}]
|
51
|
+
def raw_options
|
52
|
+
@options.merge(
|
53
|
+
property_name: @property_name,
|
54
|
+
)
|
55
|
+
end
|
56
|
+
|
50
57
|
private
|
51
58
|
|
52
59
|
# @return [String, nil]
|
@@ -138,6 +145,8 @@ module JsonWorld
|
|
138
145
|
"null"
|
139
146
|
when this_type == String || this_type == Time
|
140
147
|
"string"
|
148
|
+
when this_type.is_a?(String)
|
149
|
+
this_type
|
141
150
|
end
|
142
151
|
end.compact.uniq
|
143
152
|
strings.length >= 2 ? strings : strings.first
|
data/lib/json_world/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: json_world
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryo Nakamura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|