avro 1.12.0 → 1.12.1
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/lib/avro/VERSION.txt +1 -1
- data/lib/avro/schema_validator.rb +9 -7
- data/test/test_logical_types.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46d81e90862e8e8e5a31ae68f1d8f71a9b23f4973c9e2a640adb8cabeecdc215
|
4
|
+
data.tar.gz: 6cc227d9ec1d04cc0b0bfb8419a761cc97f50ffdc74d764e770a14a22d284dca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c14cbff47951d9a225d14c5dc8eb0d73636c55fc0a56bd0d39832353438b9dc99f2208eedd0357efca09af282ddd4fe7d6eabe176d1f35706a67ff69e7e177be
|
7
|
+
data.tar.gz: 20887f5e463266809a5c7a5fbe753b292ee1d47129c6288afcdbd5a7b1c4c79167fd57bfe9238fcc1e1689182c6cab97ae4b59bca34cda2e8746df0722e968d4
|
data/lib/avro/VERSION.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.12.
|
1
|
+
1.12.1
|
@@ -121,19 +121,19 @@ module Avro
|
|
121
121
|
|
122
122
|
case expected_schema.type_sym
|
123
123
|
when :null
|
124
|
-
|
124
|
+
return type_mismatch_error(expected_schema, datum, path, result) unless datum.nil?
|
125
125
|
when :boolean
|
126
|
-
|
126
|
+
return type_mismatch_error(expected_schema, datum, path, result) unless BOOLEAN_VALUES.include?(datum)
|
127
127
|
when :string, :bytes
|
128
|
-
|
128
|
+
return type_mismatch_error(expected_schema, datum, path, result) unless datum.is_a?(String)
|
129
129
|
when :int
|
130
|
-
|
130
|
+
return type_mismatch_error(expected_schema, datum, path, result) unless datum.is_a?(Integer)
|
131
131
|
result.add_error(path, "out of bound value #{datum}") unless INT_RANGE.cover?(datum)
|
132
132
|
when :long
|
133
|
-
|
133
|
+
return type_mismatch_error(expected_schema, datum, path, result) unless datum.is_a?(Integer)
|
134
134
|
result.add_error(path, "out of bound value #{datum}") unless LONG_RANGE.cover?(datum)
|
135
135
|
when :float, :double
|
136
|
-
|
136
|
+
return type_mismatch_error(expected_schema, datum, path, result) unless datum.is_a?(Float) || datum.is_a?(Integer) || datum.is_a?(BigDecimal)
|
137
137
|
when :fixed
|
138
138
|
if datum.is_a? String
|
139
139
|
result.add_error(path, fixed_string_message(expected_schema.size, datum)) unless datum.bytesize == expected_schema.size
|
@@ -143,7 +143,9 @@ module Avro
|
|
143
143
|
when :enum
|
144
144
|
result.add_error(path, enum_message(expected_schema.symbols, datum)) unless expected_schema.symbols.include?(datum)
|
145
145
|
end
|
146
|
-
|
146
|
+
end
|
147
|
+
|
148
|
+
def type_mismatch_error(expected_schema, datum, path, result)
|
147
149
|
result.add_error(path, "expected type #{expected_schema.type_sym}, got #{actual_value_message(datum)}")
|
148
150
|
end
|
149
151
|
|
data/test/test_logical_types.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.12.
|
4
|
+
version: 1.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Apache Software Foundation
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: multi_json
|
@@ -72,7 +72,7 @@ metadata:
|
|
72
72
|
homepage_uri: https://avro.apache.org/
|
73
73
|
bug_tracker_uri: https://issues.apache.org/jira/browse/AVRO
|
74
74
|
source_code_uri: https://github.com/apache/avro
|
75
|
-
documentation_uri: https://avro.apache.org/docs/1.12.
|
75
|
+
documentation_uri: https://avro.apache.org/docs/1.12.1/
|
76
76
|
rubygems_mfa_required: 'true'
|
77
77
|
post_install_message:
|
78
78
|
rdoc_options:
|