shale 0.3.1 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +37 -0
  3. data/README.md +398 -41
  4. data/exe/shaleb +108 -36
  5. data/lib/shale/adapter/nokogiri/document.rb +97 -0
  6. data/lib/shale/adapter/nokogiri/node.rb +100 -0
  7. data/lib/shale/adapter/nokogiri.rb +11 -151
  8. data/lib/shale/adapter/ox/document.rb +90 -0
  9. data/lib/shale/adapter/ox/node.rb +97 -0
  10. data/lib/shale/adapter/ox.rb +9 -134
  11. data/lib/shale/adapter/rexml/document.rb +98 -0
  12. data/lib/shale/adapter/rexml/node.rb +99 -0
  13. data/lib/shale/adapter/rexml.rb +9 -150
  14. data/lib/shale/adapter/toml_rb.rb +34 -0
  15. data/lib/shale/attribute.rb +6 -0
  16. data/lib/shale/error.rb +56 -0
  17. data/lib/shale/mapper.rb +67 -13
  18. data/lib/shale/mapping/descriptor/xml.rb +10 -1
  19. data/lib/shale/mapping/dict.rb +18 -0
  20. data/lib/shale/mapping/xml.rb +40 -5
  21. data/lib/shale/schema/compiler/boolean.rb +21 -0
  22. data/lib/shale/schema/compiler/complex.rb +88 -0
  23. data/lib/shale/schema/compiler/date.rb +21 -0
  24. data/lib/shale/schema/compiler/float.rb +21 -0
  25. data/lib/shale/schema/compiler/integer.rb +21 -0
  26. data/lib/shale/schema/compiler/property.rb +70 -0
  27. data/lib/shale/schema/compiler/string.rb +21 -0
  28. data/lib/shale/schema/compiler/time.rb +21 -0
  29. data/lib/shale/schema/compiler/value.rb +21 -0
  30. data/lib/shale/schema/compiler/xml_complex.rb +50 -0
  31. data/lib/shale/schema/compiler/xml_property.rb +73 -0
  32. data/lib/shale/schema/json_compiler.rb +331 -0
  33. data/lib/shale/schema/{json → json_generator}/base.rb +2 -2
  34. data/lib/shale/schema/{json → json_generator}/boolean.rb +1 -1
  35. data/lib/shale/schema/{json → json_generator}/collection.rb +2 -2
  36. data/lib/shale/schema/{json → json_generator}/date.rb +1 -1
  37. data/lib/shale/schema/{json → json_generator}/float.rb +1 -1
  38. data/lib/shale/schema/{json → json_generator}/integer.rb +1 -1
  39. data/lib/shale/schema/{json → json_generator}/object.rb +5 -2
  40. data/lib/shale/schema/{json → json_generator}/ref.rb +1 -1
  41. data/lib/shale/schema/{json → json_generator}/schema.rb +6 -4
  42. data/lib/shale/schema/{json → json_generator}/string.rb +1 -1
  43. data/lib/shale/schema/{json → json_generator}/time.rb +1 -1
  44. data/lib/shale/schema/json_generator/value.rb +23 -0
  45. data/lib/shale/schema/{json.rb → json_generator.rb} +36 -36
  46. data/lib/shale/schema/xml_compiler.rb +919 -0
  47. data/lib/shale/schema/{xml → xml_generator}/attribute.rb +1 -1
  48. data/lib/shale/schema/{xml → xml_generator}/complex_type.rb +5 -2
  49. data/lib/shale/schema/{xml → xml_generator}/element.rb +1 -1
  50. data/lib/shale/schema/{xml → xml_generator}/import.rb +1 -1
  51. data/lib/shale/schema/{xml → xml_generator}/ref_attribute.rb +1 -1
  52. data/lib/shale/schema/{xml → xml_generator}/ref_element.rb +1 -1
  53. data/lib/shale/schema/{xml → xml_generator}/schema.rb +5 -5
  54. data/lib/shale/schema/{xml → xml_generator}/typed_attribute.rb +1 -1
  55. data/lib/shale/schema/{xml → xml_generator}/typed_element.rb +1 -1
  56. data/lib/shale/schema/{xml.rb → xml_generator.rb} +25 -26
  57. data/lib/shale/schema.rb +44 -5
  58. data/lib/shale/type/{composite.rb → complex.rb} +156 -51
  59. data/lib/shale/type/value.rb +31 -2
  60. data/lib/shale/utils.rb +42 -7
  61. data/lib/shale/version.rb +1 -1
  62. data/lib/shale.rb +22 -19
  63. data/shale.gemspec +3 -3
  64. metadata +50 -29
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shale
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kamil Giszczak
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-05-10 00:00:00.000000000 Z
11
+ date: 2022-07-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description: Ruby object mapper and serializer for XML, JSON and YAML.
13
+ description: Ruby object mapper and serializer for XML, JSON, TOML and YAML.
14
14
  email:
15
15
  - beerkg@gmail.com
16
16
  executables:
@@ -25,8 +25,15 @@ files:
25
25
  - lib/shale.rb
26
26
  - lib/shale/adapter/json.rb
27
27
  - lib/shale/adapter/nokogiri.rb
28
+ - lib/shale/adapter/nokogiri/document.rb
29
+ - lib/shale/adapter/nokogiri/node.rb
28
30
  - lib/shale/adapter/ox.rb
31
+ - lib/shale/adapter/ox/document.rb
32
+ - lib/shale/adapter/ox/node.rb
29
33
  - lib/shale/adapter/rexml.rb
34
+ - lib/shale/adapter/rexml/document.rb
35
+ - lib/shale/adapter/rexml/node.rb
36
+ - lib/shale/adapter/toml_rb.rb
30
37
  - lib/shale/attribute.rb
31
38
  - lib/shale/error.rb
32
39
  - lib/shale/mapper.rb
@@ -37,30 +44,44 @@ files:
37
44
  - lib/shale/mapping/validator.rb
38
45
  - lib/shale/mapping/xml.rb
39
46
  - lib/shale/schema.rb
40
- - lib/shale/schema/json.rb
41
- - lib/shale/schema/json/base.rb
42
- - lib/shale/schema/json/boolean.rb
43
- - lib/shale/schema/json/collection.rb
44
- - lib/shale/schema/json/date.rb
45
- - lib/shale/schema/json/float.rb
46
- - lib/shale/schema/json/integer.rb
47
- - lib/shale/schema/json/object.rb
48
- - lib/shale/schema/json/ref.rb
49
- - lib/shale/schema/json/schema.rb
50
- - lib/shale/schema/json/string.rb
51
- - lib/shale/schema/json/time.rb
52
- - lib/shale/schema/xml.rb
53
- - lib/shale/schema/xml/attribute.rb
54
- - lib/shale/schema/xml/complex_type.rb
55
- - lib/shale/schema/xml/element.rb
56
- - lib/shale/schema/xml/import.rb
57
- - lib/shale/schema/xml/ref_attribute.rb
58
- - lib/shale/schema/xml/ref_element.rb
59
- - lib/shale/schema/xml/schema.rb
60
- - lib/shale/schema/xml/typed_attribute.rb
61
- - lib/shale/schema/xml/typed_element.rb
47
+ - lib/shale/schema/compiler/boolean.rb
48
+ - lib/shale/schema/compiler/complex.rb
49
+ - lib/shale/schema/compiler/date.rb
50
+ - lib/shale/schema/compiler/float.rb
51
+ - lib/shale/schema/compiler/integer.rb
52
+ - lib/shale/schema/compiler/property.rb
53
+ - lib/shale/schema/compiler/string.rb
54
+ - lib/shale/schema/compiler/time.rb
55
+ - lib/shale/schema/compiler/value.rb
56
+ - lib/shale/schema/compiler/xml_complex.rb
57
+ - lib/shale/schema/compiler/xml_property.rb
58
+ - lib/shale/schema/json_compiler.rb
59
+ - lib/shale/schema/json_generator.rb
60
+ - lib/shale/schema/json_generator/base.rb
61
+ - lib/shale/schema/json_generator/boolean.rb
62
+ - lib/shale/schema/json_generator/collection.rb
63
+ - lib/shale/schema/json_generator/date.rb
64
+ - lib/shale/schema/json_generator/float.rb
65
+ - lib/shale/schema/json_generator/integer.rb
66
+ - lib/shale/schema/json_generator/object.rb
67
+ - lib/shale/schema/json_generator/ref.rb
68
+ - lib/shale/schema/json_generator/schema.rb
69
+ - lib/shale/schema/json_generator/string.rb
70
+ - lib/shale/schema/json_generator/time.rb
71
+ - lib/shale/schema/json_generator/value.rb
72
+ - lib/shale/schema/xml_compiler.rb
73
+ - lib/shale/schema/xml_generator.rb
74
+ - lib/shale/schema/xml_generator/attribute.rb
75
+ - lib/shale/schema/xml_generator/complex_type.rb
76
+ - lib/shale/schema/xml_generator/element.rb
77
+ - lib/shale/schema/xml_generator/import.rb
78
+ - lib/shale/schema/xml_generator/ref_attribute.rb
79
+ - lib/shale/schema/xml_generator/ref_element.rb
80
+ - lib/shale/schema/xml_generator/schema.rb
81
+ - lib/shale/schema/xml_generator/typed_attribute.rb
82
+ - lib/shale/schema/xml_generator/typed_element.rb
62
83
  - lib/shale/type/boolean.rb
63
- - lib/shale/type/composite.rb
84
+ - lib/shale/type/complex.rb
64
85
  - lib/shale/type/date.rb
65
86
  - lib/shale/type/float.rb
66
87
  - lib/shale/type/integer.rb
@@ -87,15 +108,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
87
108
  requirements:
88
109
  - - ">="
89
110
  - !ruby/object:Gem::Version
90
- version: 2.6.0
111
+ version: 2.7.0
91
112
  required_rubygems_version: !ruby/object:Gem::Requirement
92
113
  requirements:
93
114
  - - ">="
94
115
  - !ruby/object:Gem::Version
95
116
  version: '0'
96
117
  requirements: []
97
- rubygems_version: 3.1.6
118
+ rubygems_version: 3.3.7
98
119
  signing_key:
99
120
  specification_version: 4
100
- summary: Ruby object mapper and serializer for XML, JSON and YAML.
121
+ summary: Ruby object mapper and serializer for XML, JSON, TOML and YAML.
101
122
  test_files: []