xjson 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.rdoc +6 -0
- data/LICENSE +20 -0
- data/README.rdoc +3 -0
- data/doc/Xjson.html +1669 -0
- data/doc/Xjson/XjsonIncludeError.html +124 -0
- data/doc/Xjson/XjsonReferenceError.html +124 -0
- data/doc/_index.html +124 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +496 -0
- data/doc/file.CHANGELOG.html +79 -0
- data/doc/file.README.html +74 -0
- data/doc/file_list.html +61 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +74 -0
- data/doc/js/app.js +314 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +195 -0
- data/doc/top-level-namespace.html +110 -0
- data/lib/xjson.rb +270 -0
- data/markdown/README.md +130 -0
- data/test/golden/test.json +50 -0
- data/test/input/inc-arr.ext.json +4 -0
- data/test/input/inc-hash.ext.json +4 -0
- data/test/input/test.ext.json +33 -0
- data/test/test_xjson.rb +30 -0
- metadata +72 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
{
|
2
|
+
"action": "test",
|
3
|
+
|
4
|
+
"regressions": {
|
5
|
+
|
6
|
+
"all": {
|
7
|
+
"test": [
|
8
|
+
{ "name": "t_run_1_1" },
|
9
|
+
{ "@null": false },
|
10
|
+
{ "name": "t_run_1_2" },
|
11
|
+
{ "name": "t_run_1_3" },
|
12
|
+
{ "@include": "test/input/inc-arr.ext.json" }
|
13
|
+
]
|
14
|
+
}
|
15
|
+
},
|
16
|
+
|
17
|
+
"included-file": { "@include": "test/input/inc-hash.ext.json" },
|
18
|
+
|
19
|
+
"release" : "210701",
|
20
|
+
"minor" : "3",
|
21
|
+
"runroot" : { "@join": [ "-", "prog", {"@self":":regressions:all:test:1:0"} ] },
|
22
|
+
"home" : { "@env": "XJSON_FOOBAR" },
|
23
|
+
"test-dir" : { "@base": [ ":regressions:all:test:*", [ "dir", "test_dir" ] ] },
|
24
|
+
"test-dir-1_2" : { "@over": [ ":regressions:all:test:*:name:t_run_1_2:dir", "test_dir-1_2" ] },
|
25
|
+
|
26
|
+
"dut_files": [
|
27
|
+
{ "@join": [ "/", "/release", {"@self":"release"}, "src/main.c" ] },
|
28
|
+
{ "@eval": { "@join": [ " ", "echo YES:", {"@self": "minor"} ] } },
|
29
|
+
{ "myarr": { "@flat" : [ "foo", "bar", [ 1, 2 ,3 ] ] } }
|
30
|
+
],
|
31
|
+
|
32
|
+
"eof": true
|
33
|
+
}
|
data/test/test_xjson.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'test/unit'
|
2
|
+
require_relative '../lib/xjson.rb'
|
3
|
+
require 'fileutils'
|
4
|
+
|
5
|
+
class XjsonTest < Test::Unit::TestCase
|
6
|
+
|
7
|
+
def test_basic
|
8
|
+
|
9
|
+
FileUtils.mkdir_p( "test/result" )
|
10
|
+
|
11
|
+
ENV['XJSON_FOOBAR'] = "FOOBAR"
|
12
|
+
|
13
|
+
ifile = 'test/input/test.ext.json'
|
14
|
+
|
15
|
+
# Open file.
|
16
|
+
json = Xjson.new( ifile )
|
17
|
+
ofile = "test/result/test.json"
|
18
|
+
json.write_json_file( ofile )
|
19
|
+
|
20
|
+
golden_data = File.read( "test/golden/test.json" )
|
21
|
+
design_data = File.read( ofile )
|
22
|
+
|
23
|
+
assert_equal( golden_data, design_data )
|
24
|
+
|
25
|
+
FileUtils.rm_f ofile
|
26
|
+
FileUtils.rm_f "test/result"
|
27
|
+
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,72 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: xjson
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Tero Isannainen
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-07-10 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Xjson is extension to JSON format.
|
14
|
+
email: tero.isannainen@gmail.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files:
|
18
|
+
- README.rdoc
|
19
|
+
- CHANGELOG.rdoc
|
20
|
+
files:
|
21
|
+
- CHANGELOG.rdoc
|
22
|
+
- LICENSE
|
23
|
+
- README.rdoc
|
24
|
+
- doc/Xjson.html
|
25
|
+
- doc/Xjson/XjsonIncludeError.html
|
26
|
+
- doc/Xjson/XjsonReferenceError.html
|
27
|
+
- doc/_index.html
|
28
|
+
- doc/class_list.html
|
29
|
+
- doc/css/common.css
|
30
|
+
- doc/css/full_list.css
|
31
|
+
- doc/css/style.css
|
32
|
+
- doc/file.CHANGELOG.html
|
33
|
+
- doc/file.README.html
|
34
|
+
- doc/file_list.html
|
35
|
+
- doc/frames.html
|
36
|
+
- doc/index.html
|
37
|
+
- doc/js/app.js
|
38
|
+
- doc/js/full_list.js
|
39
|
+
- doc/js/jquery.js
|
40
|
+
- doc/method_list.html
|
41
|
+
- doc/top-level-namespace.html
|
42
|
+
- lib/xjson.rb
|
43
|
+
- markdown/README.md
|
44
|
+
- test/golden/test.json
|
45
|
+
- test/input/inc-arr.ext.json
|
46
|
+
- test/input/inc-hash.ext.json
|
47
|
+
- test/input/test.ext.json
|
48
|
+
- test/test_xjson.rb
|
49
|
+
homepage:
|
50
|
+
licenses:
|
51
|
+
- Ruby
|
52
|
+
metadata: {}
|
53
|
+
post_install_message: Check README...
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.9.3
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '0'
|
67
|
+
requirements: []
|
68
|
+
rubygems_version: 3.2.5
|
69
|
+
signing_key:
|
70
|
+
specification_version: 4
|
71
|
+
summary: Xjson is extension to JSON format.
|
72
|
+
test_files: []
|