signore 1.1.0 → 1.1.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/gems.locked +1 -1
- data/lib/signore/sig_from_stream.rb +1 -1
- data/signore.gemspec +1 -1
- data/test/signore/sig_from_stream_test.rb +10 -7
- 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: a5d6232c0ce36ac9911766abf858a6b5b284203ee1d2ac8dc30c85816324f767
|
4
|
+
data.tar.gz: 1c55135df2c6ae267d8234b231ba7cf5f31ba06c772994fc7f2319043c9b9647
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d91eab8bb1ca1b1c0fa415223085f7c437edbe4617220d76575457e70965cd7605a4429a1232a895ed0c401866f109967dfffe50682a443967ae5a0e49ab5608
|
7
|
+
data.tar.gz: ad9382bb5adff4026f2481510b3f9d114c86104735d0c2d424ed764c70ceca257913fdac2344801ffa1ad51364e1dae2f5b231378adee8219e75311cfee14ca3
|
data/gems.locked
CHANGED
@@ -25,7 +25,7 @@ module Signore
|
|
25
25
|
def get_param(param)
|
26
26
|
puts "\n#{param}?"
|
27
27
|
separator = param == :text ? "\n\n" : "\n"
|
28
|
-
input.gets(separator).strip.gsub(/(?<=\p{L})'/, '’').tr("'
|
28
|
+
input.gets(separator).strip.gsub(/(?<=\p{L})['"]/, '’').tr('\'"', '‘')
|
29
29
|
end
|
30
30
|
|
31
31
|
def params
|
data/signore.gemspec
CHANGED
@@ -52,14 +52,17 @@ module Signore
|
|
52
52
|
_(sig).must_equal Signature.new(author: 'Patrick Ewing', text: text)
|
53
53
|
end
|
54
54
|
|
55
|
-
it 'replaces apostrophes
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
55
|
+
it 'replaces apostrophes and quotation marks with typographic ones' do
|
56
|
+
sng = nil
|
57
|
+
dbl = nil
|
58
|
+
single = "There's no 'i' in 'denial'."
|
59
|
+
double = 'There"s no "i" in "denial".'
|
60
|
+
author = "\n\nʎoɟ ʎɹoɔ\n\n\n"
|
61
|
+
capture_io { sng = SigFromStream.call(StringIO.new(single + author)) }
|
62
|
+
capture_io { dbl = SigFromStream.call(StringIO.new(double + author)) }
|
61
63
|
text = 'There’s no ‘i’ in ‘denial’.'
|
62
|
-
_(
|
64
|
+
_(sng).must_equal Signature.new(author: author.strip, text:)
|
65
|
+
_(dbl).must_equal Signature.new(author: author.strip, text:)
|
63
66
|
end
|
64
67
|
end
|
65
68
|
end
|