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.
Files changed (60) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +64 -5
  3. data/README.md +296 -192
  4. data/lib/happymapper/anonymous_mapper.rb +46 -43
  5. data/lib/happymapper/attribute.rb +7 -5
  6. data/lib/happymapper/element.rb +19 -22
  7. data/lib/happymapper/item.rb +19 -21
  8. data/lib/happymapper/supported_types.rb +20 -28
  9. data/lib/happymapper/text_node.rb +4 -3
  10. data/lib/happymapper/version.rb +3 -1
  11. data/lib/happymapper.rb +336 -362
  12. data/lib/nokogiri-happymapper.rb +4 -0
  13. metadata +124 -105
  14. data/spec/attribute_default_value_spec.rb +0 -50
  15. data/spec/attributes_spec.rb +0 -36
  16. data/spec/fixtures/address.xml +0 -9
  17. data/spec/fixtures/ambigous_items.xml +0 -22
  18. data/spec/fixtures/analytics.xml +0 -61
  19. data/spec/fixtures/analytics_profile.xml +0 -127
  20. data/spec/fixtures/atom.xml +0 -19
  21. data/spec/fixtures/commit.xml +0 -52
  22. data/spec/fixtures/current_weather.xml +0 -89
  23. data/spec/fixtures/current_weather_missing_elements.xml +0 -18
  24. data/spec/fixtures/default_namespace_combi.xml +0 -6
  25. data/spec/fixtures/dictionary.xml +0 -20
  26. data/spec/fixtures/family_tree.xml +0 -21
  27. data/spec/fixtures/inagy.xml +0 -85
  28. data/spec/fixtures/lastfm.xml +0 -355
  29. data/spec/fixtures/multiple_namespaces.xml +0 -170
  30. data/spec/fixtures/multiple_primitives.xml +0 -5
  31. data/spec/fixtures/optional_attributes.xml +0 -6
  32. data/spec/fixtures/pita.xml +0 -133
  33. data/spec/fixtures/posts.xml +0 -23
  34. data/spec/fixtures/product_default_namespace.xml +0 -18
  35. data/spec/fixtures/product_no_namespace.xml +0 -10
  36. data/spec/fixtures/product_single_namespace.xml +0 -10
  37. data/spec/fixtures/quarters.xml +0 -19
  38. data/spec/fixtures/radar.xml +0 -21
  39. data/spec/fixtures/set_config_options.xml +0 -3
  40. data/spec/fixtures/statuses.xml +0 -422
  41. data/spec/fixtures/subclass_namespace.xml +0 -50
  42. data/spec/fixtures/unformatted_address.xml +0 -1
  43. data/spec/fixtures/wrapper.xml +0 -11
  44. data/spec/happymapper/attribute_spec.rb +0 -12
  45. data/spec/happymapper/element_spec.rb +0 -9
  46. data/spec/happymapper/item_spec.rb +0 -136
  47. data/spec/happymapper/text_node_spec.rb +0 -9
  48. data/spec/happymapper_parse_spec.rb +0 -113
  49. data/spec/happymapper_spec.rb +0 -1129
  50. data/spec/has_many_empty_array_spec.rb +0 -43
  51. data/spec/ignay_spec.rb +0 -95
  52. data/spec/inheritance_spec.rb +0 -107
  53. data/spec/mixed_namespaces_spec.rb +0 -61
  54. data/spec/parse_with_object_to_update_spec.rb +0 -111
  55. data/spec/spec_helper.rb +0 -7
  56. data/spec/to_xml_spec.rb +0 -201
  57. data/spec/to_xml_with_namespaces_spec.rb +0 -232
  58. data/spec/wilcard_tag_name_spec.rb +0 -96
  59. data/spec/wrap_spec.rb +0 -82
  60. data/spec/xpath_spec.rb +0 -89
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: f94968fd78baee9196d17340ee0fa5731c6f6fd1
4
- data.tar.gz: 7ca5b00acc1126a265473d583ee331beb00a50e0
2
+ SHA256:
3
+ metadata.gz: df07426975e91e50aa2aec4abd1583c85021a314296b10b06079e09126198120
4
+ data.tar.gz: 910f91cb9ed649317e82605c8571c9a59744e23d53a327e2b228f32a8f275758
5
5
  SHA512:
6
- metadata.gz: e1d779907f83b14a9b392d4dbcca7515dbda14bc8e9932b48a78cbaf7924df5e65adef12454c294947a7e86167dca1866900133985da9ed6cc14bf57fb392e37
7
- data.tar.gz: 5205073663f778a8b699d4d54aa63a1d171f12ee300cbc991bd7e3fb4ee2cc252fc2d4540b270ecadb75e0567bf8abceda913dae822f6c9f103275fe70822785
6
+ metadata.gz: 9e2c3a0b37ab88d2887b6c5b3e6043c33606102a2e8389e591f259d26b5bd1cc973dcdcb73316b287c0132f2ce5e9c9f4fd3ecfa8904f779eccc5833bfab4342
7
+ data.tar.gz: ba72beaa7d76b55268c0da2e0957604a280d66cba3b334a6fc4a0ee483afc21e3f696d5fd0c5c5ac6d103f94f9a6cab9b20c6541fd5ef36043b5a28a59aa9e05
data/CHANGELOG.md CHANGED
@@ -1,9 +1,68 @@
1
- ## 0.6.0 / Unreleased
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 #wrap method allows you to better model xml content that is buried deep
35
- within the xml. This implementation addresses issues with calling #to_xml
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