atlas_engine 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +39 -24
- data/app/countries/atlas_engine/at/country_profile.yml +1 -1
- data/app/countries/atlas_engine/au/country_profile.yml +1 -1
- data/app/countries/atlas_engine/be/country_profile.yml +2 -2
- data/app/countries/atlas_engine/ch/country_profile.yml +1 -1
- data/app/countries/atlas_engine/fr/country_profile.yml +1 -1
- data/app/countries/atlas_engine/nl/country_profile.yml +1 -1
- data/app/countries/atlas_engine/pl/country_profile.yml +1 -1
- data/app/countries/atlas_engine/us/country_profile.yml +1 -0
- data/app/graphql/atlas_engine/schema.graphql +14 -1
- data/app/graphql/atlas_engine/types/address_validation/address_input.rb +4 -0
- data/app/graphql/atlas_engine/types/address_validation/concern_type.rb +8 -1
- data/app/graphql/atlas_engine/types/address_validation/suggestion_type.rb +4 -0
- data/app/graphql/atlas_engine/types/message_format_type.rb +11 -0
- data/app/graphql/atlas_engine/types/query_type.rb +3 -1
- data/app/lib/atlas_engine/validation_transcriber/address_parsings.rb +14 -9
- data/app/lib/atlas_engine/validation_transcriber/formatter.rb +10 -1
- data/app/models/atlas_engine/address_number_range.rb +1 -1
- data/app/models/atlas_engine/address_validation/abstract_address.rb +12 -0
- data/app/models/atlas_engine/address_validation/address.rb +8 -0
- data/app/models/atlas_engine/address_validation/concern_record.rb +28 -0
- data/app/models/atlas_engine/address_validation/es/validators/full_address.rb +18 -5
- data/app/models/atlas_engine/address_validation/es/validators/full_address_street.rb +2 -2
- data/app/models/atlas_engine/address_validation/full_address_validator_base.rb +6 -2
- data/app/models/atlas_engine/address_validation/message_format.rb +13 -0
- data/app/models/atlas_engine/address_validation/predicate_pipeline_builder.rb +90 -0
- data/app/models/atlas_engine/address_validation/request.rb +1 -0
- data/app/models/atlas_engine/address_validation/suggestion.rb +26 -1
- data/app/models/atlas_engine/address_validation/validator.rb +31 -14
- data/app/models/atlas_engine/address_validation/validators/full_address/candidate_result.rb +9 -5
- data/app/models/atlas_engine/address_validation/validators/full_address/candidate_result_base.rb +4 -3
- data/app/models/atlas_engine/address_validation/validators/full_address/concern_builder.rb +19 -4
- data/app/models/atlas_engine/address_validation/validators/full_address/invalid_zip_concern_builder.rb +4 -3
- data/app/models/atlas_engine/address_validation/validators/full_address/invalid_zip_for_country_concern_builder.rb +6 -4
- data/app/models/atlas_engine/address_validation/validators/full_address/invalid_zip_for_province_concern_builder.rb +4 -2
- data/app/models/atlas_engine/address_validation/validators/full_address/no_candidate_result.rb +1 -1
- data/app/models/atlas_engine/address_validation/validators/full_address/suggestion_builder.rb +9 -2
- data/app/models/atlas_engine/address_validation/validators/full_address/unknown_address_concern_builder.rb +16 -4
- data/app/models/atlas_engine/address_validation/validators/full_address/unknown_province_concern_builder.rb +8 -3
- data/app/models/atlas_engine/address_validation/validators/full_address/unmatched_field_concern_builder.rb +13 -3
- data/app/models/atlas_engine/address_validation/validators/full_address/unsupported_script_result.rb +1 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/city/present.rb +1 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/country/exists.rb +5 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/country/valid_for_zip.rb +1 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/neighborhood/present.rb +35 -0
- data/app/models/atlas_engine/address_validation/validators/predicates/not_exceed_max_length.rb +18 -3
- data/app/models/atlas_engine/address_validation/validators/predicates/phone/valid.rb +3 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/predicate.rb +6 -2
- data/app/models/atlas_engine/address_validation/validators/predicates/province/exists.rb +3 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/province/valid_for_country.rb +3 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/street/present.rb +3 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/street_name/present.rb +35 -0
- data/app/models/atlas_engine/address_validation/validators/predicates/street_number/present.rb +35 -0
- data/app/models/atlas_engine/address_validation/validators/predicates/zip/present.rb +2 -2
- data/app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_country.rb +1 -1
- data/app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_province.rb +1 -1
- data/app/models/atlas_engine/services/validation.rb +4 -0
- data/db/data/validation_pipelines/es.yml +46 -0
- data/db/data/validation_pipelines/es_street.yml +46 -0
- data/db/data/validation_pipelines/local.yml +46 -0
- data/lib/atlas_engine/version.rb +1 -1
- metadata +39 -5
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module AtlasEngine
|
5
|
+
module AddressValidation
|
6
|
+
module Validators
|
7
|
+
module Predicates
|
8
|
+
module Neighborhood
|
9
|
+
class Present < Predicate
|
10
|
+
sig { override.returns(T.nilable(Concern)) }
|
11
|
+
def evaluate
|
12
|
+
build_concern if @address.neighborhood.blank? && @cache.country.neighborhood_required?
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
sig { returns(Concern) }
|
18
|
+
def build_concern
|
19
|
+
Concern.new(
|
20
|
+
field_names: [:neighborhood],
|
21
|
+
code: :neighborhood_blank,
|
22
|
+
type: T.must(Concern::TYPES[:error]),
|
23
|
+
type_level: 3,
|
24
|
+
suggestion_ids: [],
|
25
|
+
message: @cache.country.field(key: :neighborhood).error(
|
26
|
+
code: "blank_#{message_format.serialize}".to_sym,
|
27
|
+
).to_s,
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/app/models/atlas_engine/address_validation/validators/predicates/not_exceed_max_length.rb
CHANGED
@@ -6,14 +6,29 @@ module AtlasEngine
|
|
6
6
|
module Validators
|
7
7
|
module Predicates
|
8
8
|
class NotExceedMaxLength < Predicate
|
9
|
-
MAX_COMPONENT_LENGTH =
|
9
|
+
MAX_COMPONENT_LENGTH = T.let(
|
10
|
+
{
|
11
|
+
street_name: 200,
|
12
|
+
street_number: 50,
|
13
|
+
line2: 175,
|
14
|
+
neighborhood: 75,
|
15
|
+
default: 255,
|
16
|
+
},
|
17
|
+
T::Hash[Symbol, Integer],
|
18
|
+
)
|
19
|
+
|
10
20
|
sig { override.returns(T.nilable(Concern)) }
|
11
21
|
def evaluate
|
12
|
-
build_concern if address.send(@field).to_s.length >
|
22
|
+
build_concern if address.send(@field).to_s.length > limit
|
13
23
|
end
|
14
24
|
|
15
25
|
private
|
16
26
|
|
27
|
+
sig { returns(Integer) }
|
28
|
+
def limit
|
29
|
+
@limit ||= T.let(MAX_COMPONENT_LENGTH[@field] || T.must(MAX_COMPONENT_LENGTH[:default]), T.nilable(Integer))
|
30
|
+
end
|
31
|
+
|
17
32
|
sig { returns(Concern) }
|
18
33
|
def build_concern
|
19
34
|
Concern.new(
|
@@ -22,7 +37,7 @@ module AtlasEngine
|
|
22
37
|
type: T.must(Concern::TYPES[:error]),
|
23
38
|
type_level: 3,
|
24
39
|
suggestion_ids: [],
|
25
|
-
message: @cache.country.field(key: @field)&.error(code: :too_long).to_s,
|
40
|
+
message: @cache.country.field(key: @field)&.error(code: :too_long, options: { limit: limit }).to_s,
|
26
41
|
)
|
27
42
|
end
|
28
43
|
end
|
@@ -28,7 +28,9 @@ module AtlasEngine
|
|
28
28
|
type: T.must(Concern::TYPES[:error]),
|
29
29
|
type_level: 3,
|
30
30
|
suggestion_ids: [],
|
31
|
-
message: @cache.country.field(key: :phone).error(
|
31
|
+
message: @cache.country.field(key: :phone).error(
|
32
|
+
code: "invalid_#{message_format.serialize}".to_sym,
|
33
|
+
).to_s,
|
32
34
|
)
|
33
35
|
end
|
34
36
|
end
|
@@ -19,13 +19,17 @@ module AtlasEngine
|
|
19
19
|
sig { returns(Cache) }
|
20
20
|
attr_reader :cache
|
21
21
|
|
22
|
+
sig { returns(MessageFormat) }
|
23
|
+
attr_reader :message_format
|
24
|
+
|
22
25
|
delegate :address1, :address2, :city, :zip, :province_code, :country_code, to: :address
|
23
26
|
|
24
|
-
sig { params(field: Symbol, address: Address, cache: Cache).void }
|
25
|
-
def initialize(field:, address:, cache: Cache.new(address))
|
27
|
+
sig { params(field: Symbol, address: Address, message_format: MessageFormat, cache: Cache).void }
|
28
|
+
def initialize(field:, address:, message_format: MessageFormat::Instructional, cache: Cache.new(address))
|
26
29
|
@field = field
|
27
30
|
@address = address
|
28
31
|
@cache = cache
|
32
|
+
@message_format = message_format
|
29
33
|
end
|
30
34
|
|
31
35
|
sig { abstract.returns(T.nilable(Concern)) }
|
@@ -26,7 +26,9 @@ module AtlasEngine
|
|
26
26
|
type: T.must(Concern::TYPES[:error]),
|
27
27
|
type_level: 3,
|
28
28
|
suggestion_ids: [],
|
29
|
-
message: @cache.country.field(key: :province)&.error(
|
29
|
+
message: @cache.country.field(key: :province)&.error(
|
30
|
+
code: "blank_#{message_format.serialize}".to_sym,
|
31
|
+
).to_s,
|
30
32
|
)
|
31
33
|
end
|
32
34
|
|
data/app/models/atlas_engine/address_validation/validators/predicates/province/valid_for_country.rb
CHANGED
@@ -28,7 +28,9 @@ module AtlasEngine
|
|
28
28
|
type: T.must(Concern::TYPES[:error]),
|
29
29
|
type_level: 3,
|
30
30
|
suggestion_ids: [],
|
31
|
-
message: @cache.country.field(key: :province).error(
|
31
|
+
message: @cache.country.field(key: :province).error(
|
32
|
+
code: "blank_#{message_format.serialize}".to_sym,
|
33
|
+
).to_s,
|
32
34
|
)
|
33
35
|
end
|
34
36
|
|
@@ -22,7 +22,9 @@ module AtlasEngine
|
|
22
22
|
type: T.must(Concern::TYPES[:error]),
|
23
23
|
type_level: 3,
|
24
24
|
suggestion_ids: [],
|
25
|
-
message: @cache.country.field(key: :address1).error(
|
25
|
+
message: @cache.country.field(key: :address1).error(
|
26
|
+
code: "blank_#{message_format.serialize}".to_sym,
|
27
|
+
).to_s,
|
26
28
|
)
|
27
29
|
end
|
28
30
|
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module AtlasEngine
|
5
|
+
module AddressValidation
|
6
|
+
module Validators
|
7
|
+
module Predicates
|
8
|
+
module StreetName
|
9
|
+
class Present < Predicate
|
10
|
+
sig { override.returns(T.nilable(Concern)) }
|
11
|
+
def evaluate
|
12
|
+
build_concern if @address.street_name.blank? && @cache.country.street_name_required?
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
sig { returns(Concern) }
|
18
|
+
def build_concern
|
19
|
+
Concern.new(
|
20
|
+
field_names: [:street_name],
|
21
|
+
code: :street_name_blank,
|
22
|
+
type: T.must(Concern::TYPES[:error]),
|
23
|
+
type_level: 3,
|
24
|
+
suggestion_ids: [],
|
25
|
+
message: @cache.country.field(key: :street_name).error(
|
26
|
+
code: "blank_#{message_format.serialize}".to_sym,
|
27
|
+
).to_s,
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
data/app/models/atlas_engine/address_validation/validators/predicates/street_number/present.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
# typed: strict
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
module AtlasEngine
|
5
|
+
module AddressValidation
|
6
|
+
module Validators
|
7
|
+
module Predicates
|
8
|
+
module StreetNumber
|
9
|
+
class Present < Predicate
|
10
|
+
sig { override.returns(T.nilable(Concern)) }
|
11
|
+
def evaluate
|
12
|
+
build_concern if @address.street_number.blank? && @cache.country.street_number_required?
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
sig { returns(Concern) }
|
18
|
+
def build_concern
|
19
|
+
Concern.new(
|
20
|
+
field_names: [:street_number],
|
21
|
+
code: :street_number_blank,
|
22
|
+
type: T.must(Concern::TYPES[:error]),
|
23
|
+
type_level: 3,
|
24
|
+
suggestion_ids: [],
|
25
|
+
message: @cache.country.field(key: :street_number).error(
|
26
|
+
code: "blank_#{message_format.serialize}".to_sym,
|
27
|
+
).to_s,
|
28
|
+
)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -40,12 +40,12 @@ module AtlasEngine
|
|
40
40
|
province_name = @cache.province.province? ? @cache.province.full_name : address.province_code
|
41
41
|
if province_name.present?
|
42
42
|
@cache.country.field(key: :zip).error(
|
43
|
-
code:
|
43
|
+
code: "invalid_for_province_#{message_format.serialize}".to_sym,
|
44
44
|
options: { province: province_name },
|
45
45
|
).to_s
|
46
46
|
else
|
47
47
|
@cache.country.field(key: :zip).error(
|
48
|
-
code:
|
48
|
+
code: "invalid_for_country_#{message_format.serialize}".to_sym,
|
49
49
|
options: { country: @cache.country.short_name },
|
50
50
|
).to_s
|
51
51
|
end
|
data/app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_country.rb
CHANGED
@@ -32,7 +32,7 @@ module AtlasEngine
|
|
32
32
|
type_level: 3,
|
33
33
|
suggestion_ids: [],
|
34
34
|
message: @cache.country.field(key: :zip).error(
|
35
|
-
code:
|
35
|
+
code: "invalid_for_country_#{message_format.serialize}".to_sym,
|
36
36
|
options: { country: @cache.country.short_name },
|
37
37
|
).to_s,
|
38
38
|
)
|
data/app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_province.rb
CHANGED
@@ -43,7 +43,7 @@ module AtlasEngine
|
|
43
43
|
province_name = @cache.province.province? ? @cache.province.full_name : address.province_code
|
44
44
|
|
45
45
|
@cache.country.field(key: :zip).error(
|
46
|
-
code:
|
46
|
+
code: "invalid_for_province_#{message_format.serialize}".to_sym,
|
47
47
|
options: { province: province_name },
|
48
48
|
).to_s
|
49
49
|
end
|
@@ -22,11 +22,15 @@ module AtlasEngine
|
|
22
22
|
AddressValidation::MatchingStrategies::Local
|
23
23
|
end
|
24
24
|
|
25
|
+
message_format = AddressValidation::MessageFormat.try_deserialize(request.message_format) ||
|
26
|
+
AddressValidation::MessageFormat::Instructional
|
27
|
+
|
25
28
|
validator = AddressValidation::Validator.new(
|
26
29
|
address: request.address,
|
27
30
|
locale: request.locale,
|
28
31
|
matching_strategy: matching_strategy,
|
29
32
|
context: request.address.context.to_h,
|
33
|
+
message_format: message_format,
|
30
34
|
)
|
31
35
|
result = validator.run
|
32
36
|
|
@@ -52,6 +52,52 @@ pipeline:
|
|
52
52
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Street::BuildingNumberInAddress1OrAddress2
|
53
53
|
- field: address1
|
54
54
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Street::BuildingNumberInAddress1
|
55
|
+
- field: street_name
|
56
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::StreetName::Present
|
57
|
+
- field: street_name
|
58
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
59
|
+
- field: street_name
|
60
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
61
|
+
- field: street_name
|
62
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
63
|
+
- field: street_name
|
64
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
65
|
+
- field: street_name
|
66
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
67
|
+
- field: street_number
|
68
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::StreetNumber::Present
|
69
|
+
- field: street_number
|
70
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
71
|
+
- field: street_number
|
72
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
73
|
+
- field: street_number
|
74
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
75
|
+
- field: street_number
|
76
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
77
|
+
- field: street_number
|
78
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
79
|
+
- field: neighborhood
|
80
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::Neighborhood::Present
|
81
|
+
- field: neighborhood
|
82
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
83
|
+
- field: neighborhood
|
84
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
85
|
+
- field: neighborhood
|
86
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
87
|
+
- field: neighborhood
|
88
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
89
|
+
- field: neighborhood
|
90
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
91
|
+
- field: line2
|
92
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
93
|
+
- field: line2
|
94
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
95
|
+
- field: line2
|
96
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
97
|
+
- field: line2
|
98
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
99
|
+
- field: line2
|
100
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
55
101
|
- field: phone
|
56
102
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Phone::Valid
|
57
103
|
|
@@ -52,6 +52,52 @@ pipeline:
|
|
52
52
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Street::BuildingNumberInAddress1OrAddress2
|
53
53
|
- field: address1
|
54
54
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Street::BuildingNumberInAddress1
|
55
|
+
- field: street_name
|
56
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::StreetName::Present
|
57
|
+
- field: street_name
|
58
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
59
|
+
- field: street_name
|
60
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
61
|
+
- field: street_name
|
62
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
63
|
+
- field: street_name
|
64
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
65
|
+
- field: street_name
|
66
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
67
|
+
- field: street_number
|
68
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::StreetNumber::Present
|
69
|
+
- field: street_number
|
70
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
71
|
+
- field: street_number
|
72
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
73
|
+
- field: street_number
|
74
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
75
|
+
- field: street_number
|
76
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
77
|
+
- field: street_number
|
78
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
79
|
+
- field: neighborhood
|
80
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::Neighborhood::Present
|
81
|
+
- field: neighborhood
|
82
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
83
|
+
- field: neighborhood
|
84
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
85
|
+
- field: neighborhood
|
86
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
87
|
+
- field: neighborhood
|
88
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
89
|
+
- field: neighborhood
|
90
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
91
|
+
- field: line2
|
92
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
93
|
+
- field: line2
|
94
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
95
|
+
- field: line2
|
96
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
97
|
+
- field: line2
|
98
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
99
|
+
- field: line2
|
100
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
55
101
|
- field: phone
|
56
102
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Phone::Valid
|
57
103
|
|
@@ -56,5 +56,51 @@ pipeline:
|
|
56
56
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Street::BuildingNumberInAddress1OrAddress2
|
57
57
|
- field: address1
|
58
58
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Street::BuildingNumberInAddress1
|
59
|
+
- field: street_name
|
60
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::StreetName::Present
|
61
|
+
- field: street_name
|
62
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
63
|
+
- field: street_name
|
64
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
65
|
+
- field: street_name
|
66
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
67
|
+
- field: street_name
|
68
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
69
|
+
- field: street_name
|
70
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
71
|
+
- field: street_number
|
72
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::StreetNumber::Present
|
73
|
+
- field: street_number
|
74
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
75
|
+
- field: street_number
|
76
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
77
|
+
- field: street_number
|
78
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
79
|
+
- field: street_number
|
80
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
81
|
+
- field: street_number
|
82
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
83
|
+
- field: neighborhood
|
84
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::Neighborhood::Present
|
85
|
+
- field: neighborhood
|
86
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
87
|
+
- field: neighborhood
|
88
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
89
|
+
- field: neighborhood
|
90
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
91
|
+
- field: neighborhood
|
92
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
93
|
+
- field: neighborhood
|
94
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
95
|
+
- field: line2
|
96
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoEmojis
|
97
|
+
- field: line2
|
98
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxTokenCount
|
99
|
+
- field: line2
|
100
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NotExceedMaxLength
|
101
|
+
- field: line2
|
102
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoUrl
|
103
|
+
- field: line2
|
104
|
+
class: AtlasEngine::AddressValidation::Validators::Predicates::NoHtmlTags
|
59
105
|
- field: phone
|
60
106
|
class: AtlasEngine::AddressValidation::Validators::Predicates::Phone::Valid
|
data/lib/atlas_engine/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlas_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shopify
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: annex_29
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: csv
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: elasticsearch-model
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -240,14 +254,28 @@ dependencies:
|
|
240
254
|
requirements:
|
241
255
|
- - ">="
|
242
256
|
- !ruby/object:Gem::Version
|
243
|
-
version:
|
257
|
+
version: 1.3.0
|
244
258
|
type: :runtime
|
245
259
|
prerelease: false
|
246
260
|
version_requirements: !ruby/object:Gem::Requirement
|
247
261
|
requirements:
|
248
262
|
- - ">="
|
249
263
|
- !ruby/object:Gem::Version
|
250
|
-
version:
|
264
|
+
version: 1.3.0
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: csv
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0'
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
251
279
|
description: The Atlas Engine is a rails engine that provides a GraphQL API for address
|
252
280
|
validation.
|
253
281
|
email: developers@shopify.com
|
@@ -400,6 +428,7 @@ files:
|
|
400
428
|
- app/graphql/atlas_engine/types/base_scalar.rb
|
401
429
|
- app/graphql/atlas_engine/types/base_union.rb
|
402
430
|
- app/graphql/atlas_engine/types/matching_strategy_type.rb
|
431
|
+
- app/graphql/atlas_engine/types/message_format_type.rb
|
403
432
|
- app/graphql/atlas_engine/types/mutation_type.rb
|
404
433
|
- app/graphql/atlas_engine/types/query_type.rb
|
405
434
|
- app/graphql/atlas_engine/types/validation_supported_country.rb
|
@@ -478,8 +507,10 @@ files:
|
|
478
507
|
- app/models/atlas_engine/address_validation/full_address_validator_base.rb
|
479
508
|
- app/models/atlas_engine/address_validation/log_emitter.rb
|
480
509
|
- app/models/atlas_engine/address_validation/matching_strategies.rb
|
510
|
+
- app/models/atlas_engine/address_validation/message_format.rb
|
481
511
|
- app/models/atlas_engine/address_validation/normalizer.rb
|
482
512
|
- app/models/atlas_engine/address_validation/predicate_pipeline.rb
|
513
|
+
- app/models/atlas_engine/address_validation/predicate_pipeline_builder.rb
|
483
514
|
- app/models/atlas_engine/address_validation/request.rb
|
484
515
|
- app/models/atlas_engine/address_validation/result.rb
|
485
516
|
- app/models/atlas_engine/address_validation/runs_validation.rb
|
@@ -522,6 +553,7 @@ files:
|
|
522
553
|
- app/models/atlas_engine/address_validation/validators/predicates/city/present.rb
|
523
554
|
- app/models/atlas_engine/address_validation/validators/predicates/country/exists.rb
|
524
555
|
- app/models/atlas_engine/address_validation/validators/predicates/country/valid_for_zip.rb
|
556
|
+
- app/models/atlas_engine/address_validation/validators/predicates/neighborhood/present.rb
|
525
557
|
- app/models/atlas_engine/address_validation/validators/predicates/no_emojis.rb
|
526
558
|
- app/models/atlas_engine/address_validation/validators/predicates/no_html_tags.rb
|
527
559
|
- app/models/atlas_engine/address_validation/validators/predicates/no_url.rb
|
@@ -534,6 +566,8 @@ files:
|
|
534
566
|
- app/models/atlas_engine/address_validation/validators/predicates/street/building_number_in_address1.rb
|
535
567
|
- app/models/atlas_engine/address_validation/validators/predicates/street/building_number_in_address1_or_address2.rb
|
536
568
|
- app/models/atlas_engine/address_validation/validators/predicates/street/present.rb
|
569
|
+
- app/models/atlas_engine/address_validation/validators/predicates/street_name/present.rb
|
570
|
+
- app/models/atlas_engine/address_validation/validators/predicates/street_number/present.rb
|
537
571
|
- app/models/atlas_engine/address_validation/validators/predicates/zip/present.rb
|
538
572
|
- app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_country.rb
|
539
573
|
- app/models/atlas_engine/address_validation/validators/predicates/zip/valid_for_province.rb
|
@@ -615,7 +649,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
615
649
|
- !ruby/object:Gem::Version
|
616
650
|
version: '0'
|
617
651
|
requirements: []
|
618
|
-
rubygems_version: 3.5.
|
652
|
+
rubygems_version: 3.5.13
|
619
653
|
signing_key:
|
620
654
|
specification_version: 4
|
621
655
|
summary: Address Validation API
|