ensure-encoding 0.1 → 0.2
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 +7 -0
- data/lib/ensure/encoding.rb +2 -2
- metadata +29 -39
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: de589b0cde3e59662be1876e3421fd237ce2d1f2f184f29221b44fd09a4f6214
|
4
|
+
data.tar.gz: 3d6eabfc7ba2d371a03ab67a1caaa78195e2c8e30d5c25371c5e927aee561677
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: fdd1975d2180b38a51a488bf40a37fd53781777aba54cce96dda7bdaef406b7a3eac0b6bc99b704643f4bde58be249ac40457fc0668aaec6f49e990b61425c7b
|
7
|
+
data.tar.gz: f8e660a4eeeda4ebe5a1653bfaa7e0d87aa57ec75a0beed8484c7de114df396de82cc13bfc03ca95a5ce39dabd643916720d09a64fdea4577b6cdf96a6da5540
|
data/lib/ensure/encoding.rb
CHANGED
@@ -64,7 +64,7 @@ module Ensure
|
|
64
64
|
raise ::Encoding::InvalidByteSequenceError, "String is not encoded as `#{target_encoding}'" unless string.valid_encoding?
|
65
65
|
else
|
66
66
|
filters = (options[:invalid_characters] == :drop) ? { :replace => '', :undef => :replace, :invalid => :replace } : {}
|
67
|
-
string.encode!(target_encoding, external_encoding, filters)
|
67
|
+
string.encode!(target_encoding, external_encoding, **filters) # https://piechowski.io/post/last-arg-keyword-deprecated-ruby-2-7/
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
@@ -129,4 +129,4 @@ end
|
|
129
129
|
|
130
130
|
class String
|
131
131
|
include Ensure::Encoding::String
|
132
|
-
end
|
132
|
+
end
|
metadata
CHANGED
@@ -1,61 +1,51 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ensure-encoding
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Manfred Stienstra
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
date: 2010-01-11 00:00:00 +01:00
|
13
|
-
default_executable:
|
11
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
14
12
|
dependencies: []
|
15
|
-
|
16
13
|
description: " Ensure the character encoding in Strings coming from untrusted sources.\n"
|
17
14
|
email: manfred@fngtps.com
|
18
15
|
executables: []
|
19
|
-
|
20
16
|
extensions: []
|
21
|
-
|
22
|
-
extra_rdoc_files:
|
17
|
+
extra_rdoc_files:
|
23
18
|
- README.rdoc
|
24
19
|
- LICENSE
|
25
|
-
files:
|
26
|
-
- README.rdoc
|
20
|
+
files:
|
27
21
|
- LICENSE
|
28
|
-
-
|
22
|
+
- README.rdoc
|
29
23
|
- lib/ensure.rb
|
30
|
-
|
31
|
-
homepage:
|
24
|
+
- lib/ensure/encoding.rb
|
25
|
+
homepage:
|
32
26
|
licenses: []
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
- --
|
27
|
+
metadata:
|
28
|
+
rubygems_mfa_required: 'true'
|
29
|
+
post_install_message:
|
30
|
+
rdoc_options:
|
31
|
+
- "--all"
|
32
|
+
- "--charset"
|
38
33
|
- utf-8
|
39
|
-
require_paths:
|
34
|
+
require_paths:
|
40
35
|
- lib
|
41
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
-
requirements:
|
36
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
43
38
|
- - ">="
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
46
|
-
|
47
|
-
|
48
|
-
requirements:
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '2.0'
|
41
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
42
|
+
requirements:
|
49
43
|
- - ">="
|
50
|
-
- !ruby/object:Gem::Version
|
51
|
-
version:
|
52
|
-
version:
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
53
46
|
requirements: []
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
signing_key:
|
58
|
-
specification_version: 3
|
47
|
+
rubygems_version: 3.2.22
|
48
|
+
signing_key:
|
49
|
+
specification_version: 4
|
59
50
|
summary: Ensure the character encoding in Strings coming from untrusted sources.
|
60
51
|
test_files: []
|
61
|
-
|