adf_builder 1.3.1 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +1 -1
- data/lib/adf_builder/nodes/customer.rb +2 -0
- data/lib/adf_builder/nodes/provider.rb +1 -0
- data/lib/adf_builder/nodes/shared.rb +2 -4
- data/lib/adf_builder/nodes/vendor.rb +1 -0
- data/lib/adf_builder/serializer.rb +1 -0
- data/lib/adf_builder/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4427fa5879e80b83c94ffb041d1324ff0760d1e7728a8e323715b42a4639846b
|
|
4
|
+
data.tar.gz: 1449df8f0387179b263c5fbca4221342c9e435776094e7c3cb06b056ffbcea3d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f8abcc3c63d4b3da98a29f405f3867615554511f656289fa1bc2d736b9120f4973637373d4c7cdd94b81ce1aeafdf9be1aaec41980582037720b9930835d776
|
|
7
|
+
data.tar.gz: 432988541dcb6e88212419a59bebbc89ffa5fd3d6e3c8ac772adacee9f9d8f7ec2a553214c3b511a91e78c08c4d2939d528e168a5177b1ca76285a531565e4f9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,18 @@
|
|
|
1
|
+
## [1.5.0] - 2026-01-19
|
|
2
|
+
- **Provider Node Support**:
|
|
3
|
+
- Implemented `Provider` node with support for `name`, `service`, `url`, `email`, `phone`, and `contact`.
|
|
4
|
+
- Enforced `name` presence for `Provider`.
|
|
5
|
+
- **Validation Improvements**:
|
|
6
|
+
- `Phone`: Updated allowed types to include `:voice` and removed `:phone` (strictly following spec).
|
|
7
|
+
- `Serializer`: Fixed `primarycontact` being serialized as a child element instead of an attribute.
|
|
8
|
+
|
|
9
|
+
## [1.4.0] - 2026-01-19
|
|
10
|
+
- **Vendor & Customer Validation Improvements**:
|
|
11
|
+
- `Vendor`: Now requires `vendorname` and `contact`.
|
|
12
|
+
- `Customer`: Now requires `contact`.
|
|
13
|
+
- `Contact`: Refactored to use declarative `validates_presence_of :name` (previously manual check).
|
|
14
|
+
- Added comprehensive specs for new presence validations.
|
|
15
|
+
|
|
1
16
|
## [1.3.1] - 2026-01-19
|
|
2
17
|
- **Validation Refinement**: `Address` now strictly enforces 1 to 5 `street` lines.
|
|
3
18
|
|
data/Gemfile.lock
CHANGED
|
@@ -18,7 +18,7 @@ module AdfBuilder
|
|
|
18
18
|
ISO_3166 = %w[US CA MX GB DE FR GR IT ES JP CN IN BR RU ZA AU NZ KR SE NO FI DK NL BE CH].freeze
|
|
19
19
|
|
|
20
20
|
class Phone < Node
|
|
21
|
-
validates_inclusion_of :type, in: %i[
|
|
21
|
+
validates_inclusion_of :type, in: %i[voice fax cellphone pager]
|
|
22
22
|
validates_inclusion_of :time, in: %i[morning afternoon evening nopreference day]
|
|
23
23
|
validates_inclusion_of :preferredcontact, in: [0, 1, "0", "1"]
|
|
24
24
|
|
|
@@ -94,6 +94,7 @@ module AdfBuilder
|
|
|
94
94
|
|
|
95
95
|
class Contact < Node
|
|
96
96
|
validates_inclusion_of :primarycontact, in: [0, 1, "0", "1"]
|
|
97
|
+
validates_presence_of :name
|
|
97
98
|
|
|
98
99
|
def initialize(primary_contact: nil)
|
|
99
100
|
super()
|
|
@@ -103,9 +104,6 @@ module AdfBuilder
|
|
|
103
104
|
|
|
104
105
|
def validate!
|
|
105
106
|
super
|
|
106
|
-
# Custom Validation: Name is required
|
|
107
|
-
raise AdfBuilder::Error, "Contact must have a Name" unless @children.any? { |c| c.tag_name == :name }
|
|
108
|
-
|
|
109
107
|
# Custom Validation: At least one Phone OR Email
|
|
110
108
|
return if @children.any? { |c| %i[phone email].include?(c.tag_name) }
|
|
111
109
|
|
data/lib/adf_builder/version.rb
CHANGED