judges 0.58.0 → 0.58.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/Gemfile.lock +2 -2
- data/judges.gemspec +1 -1
- data/lib/judges/ascii_loog.rb +7 -0
- data/lib/judges.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 541c53ebfa3be7b249cd349cb3c222bfe931aeb816a6ba2a5abc65a27f436b3a
|
|
4
|
+
data.tar.gz: d5dc5d8d7037ec73e89101ce50da713418e96cf266d7503553721d60478818e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cbc21454cd7aa5207cb8a42e0efa48041ba55cd5e6092ce5deff46b4e1df3e3aafda90d9d7ca221ff732dd54e9f9b99080024a5164902b883f73afdefa930ac8
|
|
7
|
+
data.tar.gz: 8cb7034eb559cea6b26d9e6be0970ed53545b0d2584ff1b5169acb0873d966bc582ff54baf36517526bac5aa21383b5e561eb4f19c1fe40e08a27a08ba90839d
|
data/Gemfile.lock
CHANGED
|
@@ -156,7 +156,7 @@ GEM
|
|
|
156
156
|
racc (~> 1.4)
|
|
157
157
|
nokogiri (1.18.10-x86_64-linux-musl)
|
|
158
158
|
racc (~> 1.4)
|
|
159
|
-
online (0.
|
|
159
|
+
online (0.2.0)
|
|
160
160
|
timeout (~> 0.4)
|
|
161
161
|
os (1.1.4)
|
|
162
162
|
ostruct (0.6.3)
|
|
@@ -219,7 +219,7 @@ GEM
|
|
|
219
219
|
ffi (~> 1.1)
|
|
220
220
|
memoist3 (~> 1.0.0)
|
|
221
221
|
tago (0.4.0)
|
|
222
|
-
timeout (0.
|
|
222
|
+
timeout (0.5.0)
|
|
223
223
|
total (0.4.2)
|
|
224
224
|
typhoeus (1.4.1)
|
|
225
225
|
ethon (>= 0.9.0)
|
data/judges.gemspec
CHANGED
|
@@ -9,7 +9,7 @@ Gem::Specification.new do |s|
|
|
|
9
9
|
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version=
|
|
10
10
|
s.required_ruby_version = '>=3.2'
|
|
11
11
|
s.name = 'judges'
|
|
12
|
-
s.version = '0.58.
|
|
12
|
+
s.version = '0.58.1'
|
|
13
13
|
s.license = 'MIT'
|
|
14
14
|
s.summary = 'Command-Line Tool for a Factbase'
|
|
15
15
|
s.description =
|
data/lib/judges/ascii_loog.rb
CHANGED
|
@@ -39,6 +39,13 @@ class Judges::AsciiLoog
|
|
|
39
39
|
# @return [String] The converted message with ASCII symbols
|
|
40
40
|
def to_ascii(message)
|
|
41
41
|
result = message.to_s
|
|
42
|
+
if result.encoding != Encoding::UTF_8
|
|
43
|
+
begin
|
|
44
|
+
result = result.encode(Encoding::UTF_8, invalid: :replace, undef: :replace)
|
|
45
|
+
rescue Encoding::UndefinedConversionError, Encoding::InvalidByteSequenceError
|
|
46
|
+
result = result.force_encoding(Encoding::UTF_8).encode(Encoding::UTF_8, invalid: :replace, undef: :replace)
|
|
47
|
+
end
|
|
48
|
+
end
|
|
42
49
|
UNICODE_TO_ASCII.each do |unicode, ascii|
|
|
43
50
|
result = result.gsub(unicode, ascii)
|
|
44
51
|
end
|
data/lib/judges.rb
CHANGED