immosquare-extensions 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9eac5ff3164cb73f659292ba3a389b9213f647e5c5c54f9da0c6535ec68ca573
4
- data.tar.gz: e1bc371e64193f0d4750298aa0c5e18a88827caa5c2d4826885a8caa530f4ccd
3
+ metadata.gz: e917d43fa0c52a52495031fcf8918d689411b68265a0b95eb87c5646797c6926
4
+ data.tar.gz: c78f61c33ee2afe225db23c232e2b413b754c482a0851a9fe6ed536721b507dc
5
5
  SHA512:
6
- metadata.gz: 734f2700c95e499f2a4fa35f7b7b7fc80f81aac58d5480332db03490919b5cec8fad77355cc9d5014c21b613144eca10981818422420fe64a54dc4ff5bb210ef
7
- data.tar.gz: a8076f8d899a9fa2bb6b54b09e15c2b6674f59141fc1d4d17e90e481f9de7c362fef9ffa5ebc0b9d7b7c55aeebc28a5ee338c0dad1d5775cfceb7d87a7304297
6
+ metadata.gz: 1eba48121714cdfe6de72216ef5f46067005ba1ed272e7f0bc22f92db2423bb897469d60aa940c701c9f713f9927bc6daa47bfa94ed242276d401b6635f603ae
7
+ data.tar.gz: e8b7307de7f4006f3135287624ef8cb863d7e0d55920d87046eb1fd52ac8ee3a5752d8154e0516d701bc8456538007b00e038d8779f92197e16f3b989d4bcdf9
@@ -33,7 +33,7 @@ class File
33
33
  ## Read the content of the file with the detected encoding,
34
34
  ## falling back to UTF-8 if the detected encoding is empty or invalid.
35
35
  ##============================================================##
36
- detected_encoding = `uchardet #{file_path}`.strip
36
+ detected_encoding = `uchardet #{file_path}`.strip.to_s.upcase
37
37
  encoding_whitelist = [
38
38
  "UTF-8", # Encodage universel pour texte avec ou sans accents
39
39
  "Windows-1252", # Utilisé couramment pour les langues occidentales
@@ -64,7 +64,8 @@ class File
64
64
  "UTF-16BE", # UTF-16 Big Endian
65
65
  "UTF-32LE", # UTF-32 Little Endian
66
66
  "UTF-32BE" # UTF-32 Big Endian
67
- ]
67
+ ].map(&:upcase)
68
+
68
69
 
69
70
 
70
71
  encoding_to_use = detected_encoding.empty? || !encoding_whitelist.include?(detected_encoding) ? "UTF-8" : "#{detected_encoding}:UTF-8"
@@ -1,3 +1,3 @@
1
1
  module ImmosquareExtensions
2
- VERSION = "0.1.15".freeze
2
+ VERSION = "0.1.16".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: immosquare-extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.15
4
+ version: 0.1.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - IMMO SQUARE
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-03-05 00:00:00.000000000 Z
11
+ date: 2024-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unicode_utils