forest_admin_agent 1.43.0 → 1.43.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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 66f7512ff41d63e36a47f1b185aea527183400d42c75bed6d96d89174240c65f
|
|
4
|
+
data.tar.gz: bf0a4a245127713056932ec2b8df5e418dfd8bd4afe7a67fef29d092507b4747
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a32d256300750da27e820335a8b1c9953d967edca5f5d88b946c5d89ff33a3fee793e63ad7d800560c6e422bb97e30a3c04df032c607fb64c81aaa0b2bf42715
|
|
7
|
+
data.tar.gz: b050f6daf82e9596b99fc8d235acc62b478f44e2f2d6463570ff68b3e19a5582f9b8021ddf2f7e16d0ef6906202b962c5f2fec5122f68e7638b7e982553ad568
|
|
@@ -50,7 +50,7 @@ module ForestAdminAgent
|
|
|
50
50
|
end
|
|
51
51
|
|
|
52
52
|
def self.parse_projection_from_header(collection, args)
|
|
53
|
-
header = args.dig(:headers, 'HTTP_FOREST_PROJECTION')&.
|
|
53
|
+
header = decode_header_value(args.dig(:headers, 'HTTP_FOREST_PROJECTION'))&.strip
|
|
54
54
|
|
|
55
55
|
return if header.nil? || header.empty?
|
|
56
56
|
|
|
@@ -83,6 +83,21 @@ module ForestAdminAgent
|
|
|
83
83
|
}
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
+
# Rack hands header values back as raw bytes. A column named after a workspace's own free
|
|
87
|
+
# text -- `Ce que j'ai vérifié` -- reaches us either as UTF-8 or, from a browser (which
|
|
88
|
+
# sends a header value as one byte per code unit), as Latin-1. Left tagged BINARY it
|
|
89
|
+
# matches no schema key, and interpolating it into the not-found message raises
|
|
90
|
+
# Encoding::CompatibilityError before that 400 is ever built. The fallback cannot raise
|
|
91
|
+
# in turn: ISO-8859-1 defines all 256 bytes, and each maps to a character UTF-8 can hold.
|
|
92
|
+
def self.decode_header_value(value)
|
|
93
|
+
return if value.nil?
|
|
94
|
+
|
|
95
|
+
utf8 = value.to_s.dup.force_encoding(Encoding::UTF_8)
|
|
96
|
+
return utf8 if utf8.valid_encoding?
|
|
97
|
+
|
|
98
|
+
utf8.force_encoding(Encoding::ISO_8859_1).encode(Encoding::UTF_8)
|
|
99
|
+
end
|
|
100
|
+
|
|
86
101
|
def self.add_polymorphic_type_fields(collection, requested_field_names)
|
|
87
102
|
polymorphic_relations = collection.schema[:fields].select { |_, field| field.type == 'PolymorphicManyToOne' }
|
|
88
103
|
|
|
@@ -197,7 +212,7 @@ module ForestAdminAgent
|
|
|
197
212
|
"Available fields are: [#{available_fields}]. " \
|
|
198
213
|
'Please check if the field name is correct.'
|
|
199
214
|
end
|
|
200
|
-
private_class_method :add_polymorphic_type_fields, :build_projection_fields,
|
|
215
|
+
private_class_method :decode_header_value, :add_polymorphic_type_fields, :build_projection_fields,
|
|
201
216
|
:build_header_projection_fields, :get_field,
|
|
202
217
|
:expand_polymorphic_leaf, :nested_polymorphic_linkage_fields,
|
|
203
218
|
:polymorphic_linkage_columns, :each_field_along_path,
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: forest_admin_agent
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.43.
|
|
4
|
+
version: 1.43.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Matthieu
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: exe
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2026-09-
|
|
12
|
+
date: 2026-09-15 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: activesupport
|