shale 0.3.0 → 0.5.0

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