nokogiri-happymapper 0.6.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +64 -5
- data/README.md +296 -192
- data/lib/happymapper/anonymous_mapper.rb +46 -43
- data/lib/happymapper/attribute.rb +7 -5
- data/lib/happymapper/element.rb +19 -22
- data/lib/happymapper/item.rb +19 -21
- data/lib/happymapper/supported_types.rb +20 -28
- data/lib/happymapper/text_node.rb +4 -3
- data/lib/happymapper/version.rb +3 -1
- data/lib/happymapper.rb +336 -362
- data/lib/nokogiri-happymapper.rb +4 -0
- metadata +124 -105
- data/spec/attribute_default_value_spec.rb +0 -50
- data/spec/attributes_spec.rb +0 -36
- data/spec/fixtures/address.xml +0 -9
- data/spec/fixtures/ambigous_items.xml +0 -22
- data/spec/fixtures/analytics.xml +0 -61
- data/spec/fixtures/analytics_profile.xml +0 -127
- data/spec/fixtures/atom.xml +0 -19
- data/spec/fixtures/commit.xml +0 -52
- data/spec/fixtures/current_weather.xml +0 -89
- data/spec/fixtures/current_weather_missing_elements.xml +0 -18
- data/spec/fixtures/default_namespace_combi.xml +0 -6
- data/spec/fixtures/dictionary.xml +0 -20
- data/spec/fixtures/family_tree.xml +0 -21
- data/spec/fixtures/inagy.xml +0 -85
- data/spec/fixtures/lastfm.xml +0 -355
- data/spec/fixtures/multiple_namespaces.xml +0 -170
- data/spec/fixtures/multiple_primitives.xml +0 -5
- data/spec/fixtures/optional_attributes.xml +0 -6
- data/spec/fixtures/pita.xml +0 -133
- data/spec/fixtures/posts.xml +0 -23
- data/spec/fixtures/product_default_namespace.xml +0 -18
- data/spec/fixtures/product_no_namespace.xml +0 -10
- data/spec/fixtures/product_single_namespace.xml +0 -10
- data/spec/fixtures/quarters.xml +0 -19
- data/spec/fixtures/radar.xml +0 -21
- data/spec/fixtures/set_config_options.xml +0 -3
- data/spec/fixtures/statuses.xml +0 -422
- data/spec/fixtures/subclass_namespace.xml +0 -50
- data/spec/fixtures/unformatted_address.xml +0 -1
- data/spec/fixtures/wrapper.xml +0 -11
- data/spec/happymapper/attribute_spec.rb +0 -12
- data/spec/happymapper/element_spec.rb +0 -9
- data/spec/happymapper/item_spec.rb +0 -136
- data/spec/happymapper/text_node_spec.rb +0 -9
- data/spec/happymapper_parse_spec.rb +0 -113
- data/spec/happymapper_spec.rb +0 -1129
- data/spec/has_many_empty_array_spec.rb +0 -43
- data/spec/ignay_spec.rb +0 -95
- data/spec/inheritance_spec.rb +0 -107
- data/spec/mixed_namespaces_spec.rb +0 -61
- data/spec/parse_with_object_to_update_spec.rb +0 -111
- data/spec/spec_helper.rb +0 -7
- data/spec/to_xml_spec.rb +0 -201
- data/spec/to_xml_with_namespaces_spec.rb +0 -232
- data/spec/wilcard_tag_name_spec.rb +0 -96
- data/spec/wrap_spec.rb +0 -82
- data/spec/xpath_spec.rb +0 -89
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: df07426975e91e50aa2aec4abd1583c85021a314296b10b06079e09126198120
|
4
|
+
data.tar.gz: 910f91cb9ed649317e82605c8571c9a59744e23d53a327e2b228f32a8f275758
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9e2c3a0b37ab88d2887b6c5b3e6043c33606102a2e8389e591f259d26b5bd1cc973dcdcb73316b287c0132f2ce5e9c9f4fd3ecfa8904f779eccc5833bfab4342
|
7
|
+
data.tar.gz: ba72beaa7d76b55268c0da2e0957604a280d66cba3b334a6fc4a0ee483afc21e3f696d5fd0c5c5ac6d103f94f9a6cab9b20c6541fd5ef36043b5a28a59aa9e05
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,68 @@
|
|
1
|
-
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.9.0 / 2022-01-21
|
4
|
+
|
5
|
+
* Add official support for Ruby 2.7, 3.0 and 3.1
|
6
|
+
* Drop support for Ruby 2.3, 2.4 and 2.5
|
7
|
+
* Fix handling of attributes and elements with `state_when_nil` set
|
8
|
+
([#165](https://github.com/mvz/happymapper/pull/165))
|
9
|
+
|
10
|
+
## 0.8.1 / 2019-03-18
|
11
|
+
|
12
|
+
* Allow requiring `nokogiri-happymapper`
|
13
|
+
([#103](https://github.com/mvz/happymapper/pull/103))
|
14
|
+
|
15
|
+
## 0.8.0 / 2018-08-28
|
16
|
+
|
17
|
+
### Breaking Changes
|
18
|
+
|
19
|
+
* Ensure child elements only parse direct child nodes when parsing anonymously
|
20
|
+
([#100](https://github.com/mvz/happymapper/pull/100))
|
21
|
+
|
22
|
+
### Improvements
|
23
|
+
|
24
|
+
* Improve documentation
|
25
|
+
([#99](https://github.com/mvz/happymapper/pull/99))
|
26
|
+
|
27
|
+
### Bug fixes
|
28
|
+
|
29
|
+
* Handle repeated camel-cased elements as `has_many` when parsing anonymously
|
30
|
+
([#101](https://github.com/mvz/happymapper/pull/101))
|
31
|
+
* Avoid creating extra elements named `text` when parsing anonymously
|
32
|
+
([#98](https://github.com/mvz/happymapper/pull/98))
|
33
|
+
|
34
|
+
## 0.7.0 / 2018-08-27
|
35
|
+
|
36
|
+
### Breaking Changes
|
37
|
+
|
38
|
+
* Remove constant `HappyMapper::DEFAULT_NS`
|
39
|
+
([#78](https://github.com/mvz/happymapper/pull/78))
|
40
|
+
* Drop support for Ruby 2.2 and below
|
41
|
+
([#80](https://github.com/mvz/happymapper/pull/80))
|
42
|
+
|
43
|
+
### Improvements
|
44
|
+
|
45
|
+
* Support Ruby 2.5
|
46
|
+
* Always sort namespaces. This adds support for JRuby.
|
47
|
+
([#84](https://github.com/mvz/happymapper/pull/84))
|
48
|
+
|
49
|
+
### Bug fixes
|
50
|
+
|
51
|
+
* Ensure `#to_xml` generates UTF-8 content
|
52
|
+
([#88](https://github.com/mvz/happymapper/pull/88))
|
53
|
+
* Handle namespaces for nested value elements when parsing anonymously
|
54
|
+
([#87](https://github.com/mvz/happymapper/pull/87))
|
55
|
+
* Handle attributes with a namespace that is different from the element
|
56
|
+
namespace ([#87](https://github.com/mvz/happymapper/pull/87))
|
57
|
+
* Ensure camel-cased elements have content in anonymous parse
|
58
|
+
([#85](https://github.com/mvz/happymapper/pull/85))
|
59
|
+
|
60
|
+
## 0.6.0 / 2017-09-17
|
2
61
|
|
3
62
|
* Prevent parsing of empty string for Date, DateTime (wushugene)
|
4
63
|
* Rescue nil dates (sarsena)
|
5
64
|
* Preserve XML value (benoist)
|
6
|
-
* Restore after_parse callback support (codekitchen)
|
65
|
+
* Restore `after_parse` callback support (codekitchen)
|
7
66
|
* Parse specific types before general types (Ivo Wever)
|
8
67
|
* Higher priority for namespace on element declarations (Ivo Wever)
|
9
68
|
|
@@ -14,7 +73,7 @@
|
|
14
73
|
## 0.5.8 / 2013-10-12
|
15
74
|
|
16
75
|
* Allow child elements to remove their parent's namespacing (dcarneiro)
|
17
|
-
* has_many elements were returning nil because the tag name was being ignored (haarts)
|
76
|
+
* `has_many` elements were returning nil because the tag name was being ignored (haarts)
|
18
77
|
* Subclassed happymapper classes are allowed to override elements (benoist)
|
19
78
|
* Attributes on elements with dashes will properly created methods (alex-klepa)
|
20
79
|
* 'Embedded' attributes break parsing when parent element is not present (geoffwa)
|
@@ -31,8 +90,8 @@
|
|
31
90
|
|
32
91
|
## 0.5.4/ 2012-09-25
|
33
92
|
|
34
|
-
* the
|
35
|
-
within the xml. This implementation addresses issues with calling
|
93
|
+
* the `#wrap` method allows you to better model xml content that is buried deep
|
94
|
+
within the xml. This implementation addresses issues with calling `#to_xml`
|
36
95
|
with content that was parsed from an xpath. (zrob)
|
37
96
|
|
38
97
|
* Parent HappyMapper classes may dictate the name of the tag for the child
|