rusty_json 1.2.4 → 1.3.0
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/lib/rusty_json/rust_struct.rb +5 -2
- data/lib/rusty_json/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: 1c9ef1c89673145a99fb39a3ca8b4f49a0fc96f1
|
|
4
|
+
data.tar.gz: 2f484046fbf70e184cb249b2654b0fb8ad7eb657
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 85df969307b62a7c96b4b7c1958a6d2845e0743cee83ba1463b5c4d6929feaf7b4629603345b9a13af0b06029b68895c847167498d8e63b318fcc089b634bc66
|
|
7
|
+
data.tar.gz: 9e956eaaa7a627a5b0f6b42680ec7ca2498ddc97f70e33b163ff08f608734c712f73959128bdb0c1a169f0a81dfd7ddd6d0542973297ab6e25ab9bdfd706dd0f
|
|
@@ -86,11 +86,14 @@ module RustyJson
|
|
|
86
86
|
members = @values.map do |key, value|
|
|
87
87
|
type = RustStruct.type_name(value[0])
|
|
88
88
|
subtype = RustStruct.type_name(value[1])
|
|
89
|
-
|
|
89
|
+
# TODO: add option for pub / private
|
|
90
|
+
# Will this be a per field thing that is configurable from
|
|
91
|
+
# within the JSON or will it be configured on the parse command?
|
|
92
|
+
member = " pub #{key}: #{type}"
|
|
90
93
|
member << "<#{subtype}>" unless value[1].nil?
|
|
91
94
|
member
|
|
92
95
|
end
|
|
93
|
-
struct << "struct #{@name} {\n" + members.join(",\n") + ",\n}\n\n"
|
|
96
|
+
struct << "pub struct #{@name} {\n" + members.join(",\n") + ",\n}\n\n"
|
|
94
97
|
struct = struct.gsub("\n\n\n", "\n\n")
|
|
95
98
|
reset if @root
|
|
96
99
|
struct
|
data/lib/rusty_json/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rusty_json
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Chris MacNaughton
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-10-
|
|
11
|
+
date: 2015-10-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|