signore 1.1.0 → 1.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3836fca9879726bbdd969adeb450e296799c3bbcbce890d3f00bae4381ae0fde
4
- data.tar.gz: 5bbe4c90bd1f80dd63d6062a89f2708f9f92be3f4f69917c0f8fa00cb08454a3
3
+ metadata.gz: 8e95122bc00fde56c3d7e52415e769f9d369f7737be3f779fed410801e8850c3
4
+ data.tar.gz: cedaa5ee2bf05aab92027a562f0054b9867082a41ddba6b8995f762476e65368
5
5
  SHA512:
6
- metadata.gz: e5e6381cb3b0067c61c8f8951528c166deeca50b2cdaf00aff640f42b3ab203fe4366925948cf20f0506a8b2a432028933020d1918d46548c9fe90e5a3a4a1b0
7
- data.tar.gz: 72170f9b4ae8a52d92ac780fa2a581b87cdc5202cd613ea440506c582b5aefd69515c55f784da530b34201febb915b65e0780c18221bc8242c660ba63a6a6070
6
+ metadata.gz: 15dd472578ad616ef36d258e9c584638c095a5309537fae7494645e49342915801b6bcca02cd172d0cc2f9782a3310ecd43e7430260bfa1b22114c2745cffa9b
7
+ data.tar.gz: b3bc83bafd1d76005cba92267ececd083dcef1d656b22782bb42c7cb63f3dab01ee813b62ba7c852afe00ec7c3a54295bf8214f5387926c4990bd52adf1de49f
data/gems.locked CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- signore (1.0.0)
4
+ signore (1.1.2)
5
5
  lovely_rufus (~> 1.0)
6
6
  pstore (~> 0.2.0)
7
7
 
@@ -40,7 +40,7 @@ GEM
40
40
  dry-inflector (~> 1.0)
41
41
  dry-logic (~> 1.4)
42
42
  zeitwerk (~> 2.6)
43
- json (2.12.0)
43
+ json (2.12.2)
44
44
  language_server-protocol (3.17.0.5)
45
45
  lint_roller (1.1.0)
46
46
  logger (1.7.0)
@@ -65,7 +65,7 @@ GEM
65
65
  rexml (~> 3.1)
66
66
  regexp_parser (2.10.0)
67
67
  rexml (3.4.1)
68
- rubocop (1.75.6)
68
+ rubocop (1.75.7)
69
69
  json (~> 2.3)
70
70
  language_server-protocol (~> 3.17.0.2)
71
71
  lint_roller (~> 1.1.0)
@@ -25,7 +25,8 @@ 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(' - ', '')
29
+ .gsub(/(?<=\p{L})['"]/, '’').tr('\'"', '‘')
29
30
  end
30
31
 
31
32
  def params
data/signore.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.license = 'AGPL-3.0-or-later'
11
11
  gem.name = 'signore'
12
12
  gem.summary = 'signore: an email signature manager/randomiser'
13
- gem.version = '1.1.0'
13
+ gem.version = '1.1.2'
14
14
 
15
15
  gem.required_ruby_version = '~> 3.4'
16
16
 
@@ -52,14 +52,25 @@ module Signore
52
52
  _(sig).must_equal Signature.new(author: 'Patrick Ewing', text: text)
53
53
  end
54
54
 
55
- it 'replaces apostrophes with proper quotation marks' do
56
- simple = "There's no 'i' in 'denial'."
57
- author = 'ʎoɟ ʎɹoɔ'
58
- input = StringIO.new("#{simple}\n\n#{author}\n\n\n")
59
- sig = nil
60
- capture_io { sig = SigFromStream.call input }
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
- _(sig).must_equal Signature.new(author:, text:)
64
+ _(sng).must_equal Signature.new(author: author.strip, text:)
65
+ _(dbl).must_equal Signature.new(author: author.strip, text:)
66
+ end
67
+
68
+ it 'replaces hyphens with en dashes' do
69
+ stream = "355/113 - not π, but an incredible simulation.\n\n\n\n\n"
70
+ sig = nil
71
+ capture_io { sig = SigFromStream.call(StringIO.new(stream)) }
72
+ text = '355/113 – not π, but an incredible simulation.'
73
+ _(sig).must_equal Signature.new(text:)
63
74
  end
64
75
  end
65
76
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: signore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Szotkowski