utf8-cleaner 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/utf8-cleaner/uri_string.rb +2 -0
- data/lib/utf8-cleaner/version.rb +1 -1
- data/spec/uri_string_spec.rb +3 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 483d7ad030797ac6e4f59b23989e85cb02f8c871
|
4
|
+
data.tar.gz: ed06229b5cec24770bbfaba9c4586528a0f519a3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80b2ec52b93bf99814b479d1059db52f8a8c507ee8df0434c29cc644ba93a65100573c1e4a3609f97a0bd94170cdad23bee0926064dc2e52d9c2d429d88c2635
|
7
|
+
data.tar.gz: 019d366a8de11b5c55625be6e4c19f3260d35d62e059b30111acc1cfc0c8fc5cd0c9c173e8003308a5fc6fc409305a6e3aaaa23066a172215cddb7f268238f62
|
data/lib/utf8-cleaner/version.rb
CHANGED
data/spec/uri_string_spec.rb
CHANGED
@@ -12,6 +12,7 @@ module UTF8Cleaner
|
|
12
12
|
let(:no_byte_at_all) { URIString.new('%') }
|
13
13
|
let(:not_even_hex_chars1) { URIString.new('%x') }
|
14
14
|
let(:not_even_hex_chars2) { URIString.new('%0zhey') }
|
15
|
+
let(:mixed_encodings) { URIString.new('§%e2') }
|
15
16
|
|
16
17
|
describe '#new' do
|
17
18
|
it { expect(encoded_string).to be_a(URIString) }
|
@@ -26,6 +27,7 @@ module UTF8Cleaner
|
|
26
27
|
it { expect(no_byte_at_all.cleaned).to eq('') }
|
27
28
|
it { expect(not_even_hex_chars1.cleaned).to eq('') }
|
28
29
|
it { expect(not_even_hex_chars2.cleaned).to eq('hey') }
|
30
|
+
it { expect(mixed_encodings.cleaned).to eq('§') }
|
29
31
|
end
|
30
32
|
|
31
33
|
describe '#valid?' do
|
@@ -38,6 +40,7 @@ module UTF8Cleaner
|
|
38
40
|
it { expect(no_byte_at_all).to_not be_valid }
|
39
41
|
it { expect(not_even_hex_chars1).to_not be_valid }
|
40
42
|
it { expect(not_even_hex_chars2).to_not be_valid }
|
43
|
+
it { expect(mixed_encodings).to_not be_valid }
|
41
44
|
end
|
42
45
|
|
43
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utf8-cleaner
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leon Miller-Out
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|