ttable 0.0.4 → 0.0.5
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/lib/terminal/table.rb +1 -1
- data/lib/terminal/table/version.rb +1 -1
- data/spec/terminal/table_spec.rb +20 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1f9e1e599a37ce385956a28adc05f12f4117268f
|
4
|
+
data.tar.gz: 60a4d595fbd5239bb850201719d232d12526d07d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f0dba24fea9494ea6bfa9e45c714bbd75a92e805038d23680adbd60ee2916071291ba27369817c23349dff69bd97d2e8093242b8271f7b0da1e811131cc031aa
|
7
|
+
data.tar.gz: 7ff65690e862568a008fdc24e7a9f94999b2e4b7115e42dd39f084437bf84add096c4c9e9657fd0eacfba1882276ffa3ef1db8bb59518d1eb318ded26cc359ff
|
data/lib/terminal/table.rb
CHANGED
@@ -19,7 +19,7 @@ class String
|
|
19
19
|
elsif %w{ ͡ ͜ }.include?(c)
|
20
20
|
# zero width
|
21
21
|
result += 0
|
22
|
-
elsif %w{ ě ì • é · ♪ … ω ˊ ˋ √ “ ” ☻ ※ ◎ ◆ ‘ ★ ’ — ° ʖ ¯ ≥ ≤ ≧ ∇ ≦ ❤ }.include?(c)
|
22
|
+
elsif %w{ ě ì • é · ♪ … ω ˊ ˋ √ “ ” ☻ ※ ◎ ◆ ‘ ★ ’ — ° ʖ ¯ ≥ ≤ ≧ ∇ ≦ ❤ ☺ ╭ ╯ ε ╰ ╮ з ∠ → }.include?(c)
|
23
23
|
result += 1
|
24
24
|
elsif c == ' ' # ord == 8198
|
25
25
|
result += 1
|
data/spec/terminal/table_spec.rb
CHANGED
@@ -317,5 +317,25 @@ describe String do
|
|
317
317
|
subject { '❤' }
|
318
318
|
its(:twidth) { should == 1 }
|
319
319
|
end
|
320
|
+
|
321
|
+
context '☺' do
|
322
|
+
subject { '☺' }
|
323
|
+
its(:twidth) { should == 1 }
|
324
|
+
end
|
325
|
+
|
326
|
+
context '╭(╯ε╰)╮' do
|
327
|
+
subject { '╭(╯ε╰)╮' }
|
328
|
+
its(:twidth) { should == 7 }
|
329
|
+
end
|
330
|
+
|
331
|
+
context '_(:з)∠)_' do
|
332
|
+
subject { '_(:з)∠)_' }
|
333
|
+
its(:twidth) { should == 8 }
|
334
|
+
end
|
335
|
+
|
336
|
+
context '→_→' do
|
337
|
+
subject { '→_→' }
|
338
|
+
its(:twidth) { should == 3 }
|
339
|
+
end
|
320
340
|
end
|
321
341
|
end
|