ttable 0.0.8 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -0
- data/README.md +79 -4
- data/lib/terminal/table.rb +45 -4
- data/lib/terminal/table/version.rb +1 -1
- data/spec/terminal/table_spec.rb +411 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8ae3e64a798e07f32c13402a936e74a529f1427
|
4
|
+
data.tar.gz: a54686e3897e2ec48ae70b6a05614121655c6aaf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4078a2f5bf58bdeda5756332cd96066f8ebc5360a15ad25c4c3f52611eb977dff5f718e71d71e27d84391d5fe730c7cc477cd1096b95d6882650f9a3b018986d
|
7
|
+
data.tar.gz: b432e8888c40e2ac345aef905a7c6b3268796ff734160f6ea09e523d2504098dbb5919754a3b81f32b44774e2cd0e9ad787d27be88930f897c47e445baae9c0b
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -27,15 +27,90 @@ Or install it yourself as:
|
|
27
27
|
|
28
28
|
## Usage
|
29
29
|
|
30
|
-
|
30
|
+
Supports array of array:
|
31
31
|
|
32
|
-
|
32
|
+
```ruby
|
33
|
+
puts Terminal::Table.new([%w{ hello 1 }, %w{ world 2 }])
|
34
|
+
=>
|
35
|
+
+-------+---+
|
36
|
+
| hello | 1 |
|
37
|
+
| world | 2 |
|
38
|
+
+-------+---+
|
39
|
+
```
|
40
|
+
|
41
|
+
Supports hash:
|
42
|
+
|
43
|
+
```ruby
|
44
|
+
puts Terminal::Table.new({ foo: 'bar' })
|
45
|
+
=>
|
46
|
+
+-----+
|
47
|
+
| foo |
|
48
|
+
+-----+
|
49
|
+
| bar |
|
50
|
+
+-----+
|
51
|
+
```
|
52
|
+
|
53
|
+
Support array of hash:
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
puts Terminal::Table.new([{ foo: 'bar1' }, { foo: 'bar2' }])
|
57
|
+
=>
|
58
|
+
+------+
|
59
|
+
| foo |
|
60
|
+
+------+
|
61
|
+
| bar1 |
|
62
|
+
| bar2 |
|
63
|
+
+------+
|
64
|
+
```
|
65
|
+
|
66
|
+
Support display of objects responds_to `#to_hash`:
|
67
|
+
|
68
|
+
```ruby
|
69
|
+
class Dummy
|
70
|
+
attr_accessor :foo
|
71
|
+
|
72
|
+
def to_hash
|
73
|
+
{ foo: @foo }
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
puts Terminal::Table.new(Dummy.new.tap { |d| d.foo = 'bar' })
|
78
|
+
=>
|
79
|
+
+-----+
|
80
|
+
| foo |
|
81
|
+
+-----+
|
82
|
+
| bar |
|
83
|
+
+-----+
|
84
|
+
```
|
85
|
+
|
86
|
+
Support :only and :except option:
|
87
|
+
|
88
|
+
```ruby
|
89
|
+
class Dummy2
|
90
|
+
attr_accessor :foo1, :foo2, :foo3
|
91
|
+
|
92
|
+
def to_hash
|
93
|
+
{ foo1: @foo1, foo2: @foo2, foo3: @foo3 }
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
object = Dummy2.new.tap { |d| d.foo1 = 'bar1'; d.foo2 = 'bar2'; d.foo3 = 'bar3' }
|
98
|
+
puts Terminal::Table.new(object, only: %w{ foo1 foo2 })
|
99
|
+
=>
|
100
|
+
+------+------+
|
101
|
+
| foo1 | foo2 |
|
102
|
+
+------+------+
|
103
|
+
| bar1 | bar2 |
|
104
|
+
+------+------+
|
105
|
+
```
|
106
|
+
|
107
|
+
## Credits
|
33
108
|
|
34
|
-
-
|
109
|
+
- [terminal-table gem](https://github.com/tj/terminal-table)
|
35
110
|
|
36
111
|
## Contributing
|
37
112
|
|
38
|
-
1. Fork it ( https://github.com/
|
113
|
+
1. Fork it ( https://github.com/forresty/ttable/fork )
|
39
114
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
40
115
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
41
116
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/lib/terminal/table.rb
CHANGED
@@ -3,24 +3,51 @@
|
|
3
3
|
require "gemoji"
|
4
4
|
|
5
5
|
class String
|
6
|
+
CHARS_OF_WIDTH_OF_2 = %w{ }
|
7
|
+
CHARS_OF_WIDTH_OF_1 = %w{ ě ì • é · ♪ … ω ˊ ˋ √ “ ” ☻ ※ ◎ ◆ ‘ ★ ’ — ° ʖ ¯ ≥ ≤
|
8
|
+
≧ ∇ ≦ ❤ ☺ ╭ ╯ ε ╰ ╮ з ∠ → ☞ ë ϵ Θ ϶ Ο Ι ⏎ ← ¥ ó ˶ ˵ ╥ ⊙ ☁ ▽ ⬇ ✌ ‾ ♚ ☀ ℃ Д
|
9
|
+
↓ ● ´ ☆ ・ _ ᵌ ∀ ノ Н а т ш △ ಠ ಥ ʕ ʔ ᴥ ୧ ◡ ୨ ๑ ƪ ˘ ₀ ᵒ ٩ ۶ ∮ ∧ ʚ Ծ ‸ Ï ♡
|
10
|
+
□ ¦ ┮ ┭ ✿ }
|
11
|
+
CHARS_OF_WIDTH_OF_0 = %w{ ͡ ͜ ̫ ᷄ }
|
12
|
+
CHAR_CODES_OF_WIDTH_0 = %w{ 8411 776 8409 8408 809 804 785 2370 820 822 823 769 800 768 805 }
|
13
|
+
CHAR_CODES_OF_WIDTH_1 = %w{ 8203 }
|
14
|
+
|
15
|
+
MULTI_CHAR_OF_WIDTH_1 = %w{ ☺️ ❤️ ♍️ ☔️ ‾᷄ ‾᷅ ⁻̫ ✖️ 😂 ☀︎ ❓ ⁉️ ☁︎ }
|
16
|
+
MULTI_CHAR_OF_WIDTH_2 = %w{ ・᷄ ・᷅ }
|
17
|
+
|
6
18
|
def twidth
|
7
19
|
result = 0
|
8
20
|
|
9
|
-
|
21
|
+
MULTI_CHAR_OF_WIDTH_1.each do |c|
|
10
22
|
if include?(c)
|
11
23
|
result += 1 * scan(c).size
|
12
24
|
gsub!(c, '')
|
13
25
|
end
|
14
26
|
end
|
15
27
|
|
28
|
+
MULTI_CHAR_OF_WIDTH_2.each do |c|
|
29
|
+
if include?(c)
|
30
|
+
result += 2 * scan(c).size
|
31
|
+
gsub!(c, '')
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
16
35
|
chars.inject(result) do |result, c|
|
17
36
|
if c.ord <= 126
|
18
37
|
result += 1
|
19
|
-
elsif
|
38
|
+
elsif CHAR_CODES_OF_WIDTH_0.find { |code| c.ord.to_s == code }
|
39
|
+
# zero width
|
40
|
+
result += 0
|
41
|
+
elsif CHAR_CODES_OF_WIDTH_1.find { |code| c.ord.to_s == code }
|
42
|
+
# zero width
|
43
|
+
result += 1
|
44
|
+
elsif CHARS_OF_WIDTH_OF_0.include?(c)
|
20
45
|
# zero width
|
21
46
|
result += 0
|
22
|
-
elsif
|
47
|
+
elsif CHARS_OF_WIDTH_OF_1.include?(c)
|
23
48
|
result += 1
|
49
|
+
elsif CHARS_OF_WIDTH_OF_2.include?(c)
|
50
|
+
result += 2
|
24
51
|
elsif c == ' ' # ord == 8198
|
25
52
|
result += 1
|
26
53
|
elsif Emoji.find_by_unicode(c)
|
@@ -45,11 +72,19 @@ module Terminal
|
|
45
72
|
attr_accessor :rows
|
46
73
|
attr_accessor :headings
|
47
74
|
attr_accessor :column_widths
|
75
|
+
attr_accessor :new_line_symbol
|
48
76
|
|
49
77
|
def initialize(object = nil, options = {})
|
50
78
|
@rows = []
|
51
79
|
@headings = []
|
52
80
|
@column_widths = []
|
81
|
+
|
82
|
+
if options[:use_new_line_symbol]
|
83
|
+
@new_line_symbol = '⏎'
|
84
|
+
else
|
85
|
+
@new_line_symbol = ' '
|
86
|
+
end
|
87
|
+
|
53
88
|
if object
|
54
89
|
if object.is_a?(Hash)
|
55
90
|
add_hash(object, options)
|
@@ -88,7 +123,7 @@ module Terminal
|
|
88
123
|
end
|
89
124
|
|
90
125
|
def recalculate_column_widths!
|
91
|
-
@rows = rows.map { |row| row.map { |item| item.to_s.gsub("\r\n",
|
126
|
+
@rows = rows.map { |row| row.map { |item| item.to_s.gsub("\r\n", @new_line_symbol).gsub("\n", @new_line_symbol).gsub("\r", @new_line_symbol) } }
|
92
127
|
|
93
128
|
if @rows.count > 0
|
94
129
|
(0...@rows.first.size).each do |col|
|
@@ -128,5 +163,11 @@ module Terminal
|
|
128
163
|
|
129
164
|
result + header_and_footer
|
130
165
|
end
|
166
|
+
|
167
|
+
class << self
|
168
|
+
def special_tokens
|
169
|
+
String::CHARS_OF_WIDTH_OF_1 + String::CHARS_OF_WIDTH_OF_0
|
170
|
+
end
|
171
|
+
end
|
131
172
|
end
|
132
173
|
end
|
data/spec/terminal/table_spec.rb
CHANGED
@@ -20,6 +20,11 @@ end
|
|
20
20
|
|
21
21
|
module Terminal
|
22
22
|
describe Table do
|
23
|
+
describe 'class methods' do
|
24
|
+
subject { Table }
|
25
|
+
it { should respond_to :special_tokens }
|
26
|
+
end
|
27
|
+
|
23
28
|
it { should respond_to :to_s }
|
24
29
|
|
25
30
|
describe 'initialize with array of array' do
|
@@ -179,6 +184,17 @@ END
|
|
179
184
|
its(:to_s) { should == expected.gsub(/^(\s+)/, '') }
|
180
185
|
end
|
181
186
|
|
187
|
+
context 'new line symbol' do
|
188
|
+
subject { Table.new(nil, use_new_line_symbol: true).tap { |t| t.rows = [["a\rb"]] } }
|
189
|
+
|
190
|
+
expected = <<END
|
191
|
+
+-----+
|
192
|
+
| a⏎b |
|
193
|
+
+-----+
|
194
|
+
END
|
195
|
+
its(:to_s) { should == expected.gsub(/^(\s+)/, '') }
|
196
|
+
end
|
197
|
+
|
182
198
|
context 'mutli calls to <<' do
|
183
199
|
it 'works as well' do
|
184
200
|
table = Table.new
|
@@ -407,5 +423,400 @@ describe String do
|
|
407
423
|
subject { 'にΟΙ' }
|
408
424
|
its(:twidth) { should == 4 }
|
409
425
|
end
|
426
|
+
|
427
|
+
context ' ̫' do
|
428
|
+
subject { ' ̫' }
|
429
|
+
its(:twidth) { should == 1 }
|
430
|
+
end
|
431
|
+
|
432
|
+
context ' ' do
|
433
|
+
subject { ' ' }
|
434
|
+
its(:twidth) { should == 2 }
|
435
|
+
end
|
436
|
+
|
437
|
+
context '←' do
|
438
|
+
subject { '←' }
|
439
|
+
its(:twidth) { should == 1 }
|
440
|
+
end
|
441
|
+
|
442
|
+
context '¥' do
|
443
|
+
subject { '¥' }
|
444
|
+
its(:twidth) { should == 1 }
|
445
|
+
end
|
446
|
+
|
447
|
+
context 'ó' do
|
448
|
+
subject { 'ó' }
|
449
|
+
its(:twidth) { should == 1 }
|
450
|
+
end
|
451
|
+
|
452
|
+
context '(˶‾᷄ ⁻̫ ‾᷅˵)' do
|
453
|
+
subject { '(˶‾᷄ ⁻̫ ‾᷅˵)' }
|
454
|
+
its(:twidth) { should == 9 }
|
455
|
+
end
|
456
|
+
|
457
|
+
context '╥' do
|
458
|
+
subject { '╥' }
|
459
|
+
its(:twidth) { should == 1 }
|
460
|
+
end
|
461
|
+
|
462
|
+
context '⊙' do
|
463
|
+
subject { '⊙' }
|
464
|
+
its(:twidth) { should == 1 }
|
465
|
+
end
|
466
|
+
|
467
|
+
context '(。・ω・。)ノ♡' do
|
468
|
+
pending 'not finished yet'
|
469
|
+
end
|
470
|
+
|
471
|
+
context '' do
|
472
|
+
subject { '' }
|
473
|
+
its(:twidth) { should == 1 }
|
474
|
+
end
|
475
|
+
|
476
|
+
context '👋' do
|
477
|
+
subject { '👋' }
|
478
|
+
its(:twidth) { should == 1 }
|
479
|
+
end
|
480
|
+
|
481
|
+
context '↓↓' do
|
482
|
+
subject { '↓↓' }
|
483
|
+
its(:twidth) { should == 2 }
|
484
|
+
end
|
485
|
+
|
486
|
+
context '℃' do
|
487
|
+
subject { '℃' }
|
488
|
+
its(:twidth) { should == 1 }
|
489
|
+
end
|
490
|
+
|
491
|
+
context '(●✿∀✿●)' do
|
492
|
+
subject { '(●✿∀✿●)' }
|
493
|
+
its(:twidth) { should == 7 }
|
494
|
+
end
|
495
|
+
|
496
|
+
context 'Д' do
|
497
|
+
subject { 'Д' }
|
498
|
+
its(:twidth) { should == 1 }
|
499
|
+
end
|
500
|
+
|
501
|
+
context '(´•̥̥̥ω•̥̥̥`)' do
|
502
|
+
pending
|
503
|
+
end
|
504
|
+
|
505
|
+
context ' ᷄' do
|
506
|
+
subject { ' ᷄' }
|
507
|
+
its(:twidth) { should == 1 }
|
508
|
+
end
|
509
|
+
|
510
|
+
context '‾' do
|
511
|
+
subject { '‾' }
|
512
|
+
its(:twidth) { should == 1 }
|
513
|
+
end
|
514
|
+
|
515
|
+
context '༼蛇精༽༄ ' do
|
516
|
+
pending
|
517
|
+
end
|
518
|
+
|
519
|
+
context '✌' do
|
520
|
+
subject { '✌' }
|
521
|
+
its(:twidth) { should == 1 }
|
522
|
+
end
|
523
|
+
|
524
|
+
context '(´Д` )' do
|
525
|
+
subject { '(´Д` )' }
|
526
|
+
its(:twidth) { should == 6 }
|
527
|
+
end
|
528
|
+
|
529
|
+
context '゜∀)ノ' do
|
530
|
+
subject { '゜∀)ノ' }
|
531
|
+
its(:twidth) { should == 6 }
|
532
|
+
end
|
533
|
+
|
534
|
+
context '⬇⬇⬇⬇' do
|
535
|
+
subject { '⬇⬇⬇⬇' }
|
536
|
+
its(:twidth) { should == 4 }
|
537
|
+
end
|
538
|
+
|
539
|
+
context 'ヽ(#`Д´)ノ' do
|
540
|
+
subject { 'ヽ(#`Д´)ノ' }
|
541
|
+
its(:twidth) { should == 9 }
|
542
|
+
end
|
543
|
+
|
544
|
+
context '~٩(๑ᵒ̴̶̷͈᷄ᗨᵒ̴̶̷͈᷅)و' do
|
545
|
+
pending
|
546
|
+
end
|
547
|
+
|
548
|
+
context '😂' do
|
549
|
+
subject { '😂' }
|
550
|
+
its(:twidth) { should == 1 }
|
551
|
+
end
|
552
|
+
|
553
|
+
context '⊙▽⊙' do
|
554
|
+
subject { '⊙▽⊙' }
|
555
|
+
its(:twidth) { should == 3 }
|
556
|
+
end
|
557
|
+
|
558
|
+
context '✖️✖️' do
|
559
|
+
subject { '✖️✖️' }
|
560
|
+
its(:twidth) { should == 2 }
|
561
|
+
end
|
562
|
+
|
563
|
+
context '☁' do
|
564
|
+
subject { '☁' }
|
565
|
+
its(:twidth) { should == 1 }
|
566
|
+
end
|
567
|
+
|
568
|
+
context '( ・᷄ ᵌ・᷅ )' do
|
569
|
+
subject { '( ・᷄ ᵌ・᷅ )' }
|
570
|
+
its(:twidth) { should == 10 }
|
571
|
+
end
|
572
|
+
|
573
|
+
context '(☆_☆)Y(^_^)Y ♪─O(≧∇≦)O─♪' do
|
574
|
+
pending
|
575
|
+
end
|
576
|
+
|
577
|
+
context '12~★ 今天新换的 (๑¯ิε ¯ิ๑)' do
|
578
|
+
pending
|
579
|
+
end
|
580
|
+
|
581
|
+
context '☀' do
|
582
|
+
subject { '☀' }
|
583
|
+
its(:twidth) { should == 1 }
|
584
|
+
end
|
585
|
+
|
586
|
+
context '☀︎' do
|
587
|
+
subject { '☀︎' }
|
588
|
+
its(:twidth) { should == 1 }
|
589
|
+
end
|
590
|
+
|
591
|
+
context '(´・_・`)' do
|
592
|
+
subject { '(´・_・`)' }
|
593
|
+
its(:twidth) { should == 7 }
|
594
|
+
end
|
595
|
+
|
596
|
+
context '୧⃛(๑⃙⃘◡̈๑⃙⃘)୨⃛' do
|
597
|
+
subject { '୧⃛(๑⃙⃘◡̈๑⃙⃘)୨⃛' }
|
598
|
+
its(:twidth) { should == 7 }
|
599
|
+
end
|
600
|
+
|
601
|
+
context '❓⁉️' do
|
602
|
+
subject { '❓⁉️' }
|
603
|
+
its(:twidth) { should == 2 }
|
604
|
+
end
|
605
|
+
|
606
|
+
context '⬇️⬇️⬇️⬇️⬇️…🌚!!!😰😤😤' do
|
607
|
+
pending
|
608
|
+
end
|
609
|
+
|
610
|
+
context '!' do
|
611
|
+
subject { '!' }
|
612
|
+
its(:twidth) { should == 2 }
|
613
|
+
end
|
614
|
+
|
615
|
+
context '~' do
|
616
|
+
subject { '~' }
|
617
|
+
its(:twidth) { should == 2 }
|
618
|
+
end
|
619
|
+
|
620
|
+
context '(˘̩̩̩ε˘̩ƪ)' do
|
621
|
+
subject { '(˘̩̩̩ε˘̩ƪ)' }
|
622
|
+
its(:twidth) { should == 6 }
|
623
|
+
end
|
624
|
+
|
625
|
+
context 'ʕ •ᴥ•ʔ' do
|
626
|
+
subject { 'ʕ •ᴥ•ʔ' }
|
627
|
+
its(:twidth) { should == 6 }
|
628
|
+
end
|
629
|
+
|
630
|
+
context '´●_●`' do
|
631
|
+
subject { '´●_●`' }
|
632
|
+
its(:twidth) { should == 6 }
|
633
|
+
end
|
634
|
+
|
635
|
+
context '_' do
|
636
|
+
subject { '_' }
|
637
|
+
its(:twidth) { should == 2 }
|
638
|
+
end
|
639
|
+
|
640
|
+
context '`' do
|
641
|
+
subject { '`' }
|
642
|
+
its(:twidth) { should == 1 }
|
643
|
+
end
|
644
|
+
|
645
|
+
context '´' do
|
646
|
+
subject { '´' }
|
647
|
+
its(:twidth) { should == 1 }
|
648
|
+
end
|
649
|
+
|
650
|
+
context '☆ゝ' do
|
651
|
+
subject { '☆ゝ' }
|
652
|
+
its(:twidth) { should == 3 }
|
653
|
+
end
|
654
|
+
|
655
|
+
context '(͏ ˉ ꈊ ˉ)✧˖°' do
|
656
|
+
pending
|
657
|
+
end
|
658
|
+
|
659
|
+
context '₍₍ (̨̡ ᗣ )̧̢ ₎₎' do
|
660
|
+
pending
|
661
|
+
end
|
662
|
+
|
663
|
+
context '♚' do
|
664
|
+
subject { '♚' }
|
665
|
+
its(:twidth) { should == 1 }
|
666
|
+
end
|
667
|
+
|
668
|
+
context '(●°u°●) 」' do
|
669
|
+
subject { '(●°u°●) 」' }
|
670
|
+
its(:twidth) { should == 11 }
|
671
|
+
end
|
672
|
+
|
673
|
+
context '」' do
|
674
|
+
subject { '」' }
|
675
|
+
its(:twidth) { should == 2 }
|
676
|
+
end
|
677
|
+
|
678
|
+
context '' do
|
679
|
+
subject { '' } # 8203
|
680
|
+
its(:twidth) { should == 1 }
|
681
|
+
end
|
682
|
+
|
683
|
+
context 'ಥ_ಥ' do
|
684
|
+
subject { 'ಥ_ಥ' }
|
685
|
+
its(:twidth) { should == 3 }
|
686
|
+
end
|
687
|
+
|
688
|
+
context '♪٩(´▽`๑)۶ ' do
|
689
|
+
subject { '♪٩(´▽`๑)۶ ' }
|
690
|
+
its(:twidth) { should == 11 }
|
691
|
+
end
|
692
|
+
|
693
|
+
context 'ಠ_ಠ' do
|
694
|
+
subject { 'ಠ_ಠ' }
|
695
|
+
its(:twidth) { should == 3 }
|
696
|
+
end
|
697
|
+
|
698
|
+
context '(ᵒ̤̑ ₀̑ ᵒ̤̑)' do
|
699
|
+
subject { '(ᵒ̤̑ ₀̑ ᵒ̤̑)' }
|
700
|
+
its(:twidth) { should == 7 }
|
701
|
+
end
|
702
|
+
|
703
|
+
context '눈_눈' do
|
704
|
+
subject { '눈_눈' }
|
705
|
+
its(:twidth) { should == 5 }
|
706
|
+
end
|
707
|
+
|
708
|
+
context '' do
|
709
|
+
subject { '' }
|
710
|
+
its(:twidth) { should == 1 }
|
711
|
+
end
|
712
|
+
|
713
|
+
context '((((;゚Д゚)))))))' do
|
714
|
+
pending
|
715
|
+
end
|
716
|
+
|
717
|
+
context '(∮∧∮)' do
|
718
|
+
subject { '(∮∧∮)' }
|
719
|
+
its(:twidth) { should == 7 }
|
720
|
+
end
|
721
|
+
|
722
|
+
context 'ヽ( ̄д ̄;)ノ' do
|
723
|
+
pending
|
724
|
+
end
|
725
|
+
|
726
|
+
context '(Ծ‸ Ծ )' do
|
727
|
+
subject { '(Ծ‸ Ծ )' }
|
728
|
+
its(:twidth) { should == 7 }
|
729
|
+
end
|
730
|
+
|
731
|
+
context '(۶ૈ ۜ ᵒ̌▱๋ᵒ̌ )۶ૈ=͟͟͞͞ ⌨' do
|
732
|
+
pending
|
733
|
+
end
|
734
|
+
|
735
|
+
context '(๑˃̵ᴗ˂̵)و ' do
|
736
|
+
pending
|
737
|
+
end
|
738
|
+
|
739
|
+
context '嘤ू(ʚ̴̶̷́ .̠ ʚ̴̶̷̥̀ ू) ' do
|
740
|
+
subject { '嘤ू(ʚ̴̶̷́ .̠ ʚ̴̶̷̥̀ ू) ' }
|
741
|
+
its(:twidth) { should == 11 }
|
742
|
+
end
|
743
|
+
|
744
|
+
context '⁽⁽٩(๑˃̶͈̀ ˂̶͈́)۶⁾⁾' do
|
745
|
+
pending
|
746
|
+
end
|
747
|
+
|
748
|
+
context '(ᵒ̤̑ ₀̑ ᵒ̤̑)' do
|
749
|
+
subject { '(ᵒ̤̑ ₀̑ ᵒ̤̑)' }
|
750
|
+
its(:twidth) { should == 7 }
|
751
|
+
end
|
752
|
+
|
753
|
+
context 'AÏcha' do
|
754
|
+
subject { 'AÏcha' }
|
755
|
+
its(:twidth) { should == 5 }
|
756
|
+
end
|
757
|
+
|
758
|
+
context '(ᵒ̤̑ ₀̑ ᵒ̤̑)' do
|
759
|
+
subject { '(ᵒ̤̑ ₀̑ ᵒ̤̑)' }
|
760
|
+
its(:twidth) { should == 7 }
|
761
|
+
end
|
762
|
+
|
763
|
+
context '(╯°Д°)╯︵ ┻━┻ ' do
|
764
|
+
pending
|
765
|
+
end
|
766
|
+
|
767
|
+
context '┭┮﹏┭┮' do
|
768
|
+
subject { '┭┮﹏┭┮' }
|
769
|
+
its(:twidth) { should == 6 }
|
770
|
+
end
|
771
|
+
|
772
|
+
context '=△=' do
|
773
|
+
subject { '=△=' }
|
774
|
+
its(:twidth) { should == 3 }
|
775
|
+
end
|
776
|
+
|
777
|
+
context ' (ؓؒؒؑؑؖؔؓؒؐؐ⁼̴̀ωؘؙؖؕؔؓؒؑؐؕ⁼̴̀ )✧' do
|
778
|
+
pending
|
779
|
+
end
|
780
|
+
|
781
|
+
context '(¦3[____]' do
|
782
|
+
subject { '(¦3[____]' }
|
783
|
+
its(:twidth) { should == 9 }
|
784
|
+
end
|
785
|
+
|
786
|
+
context '( •̥́ ˍ •̀ू )' do
|
787
|
+
pending
|
788
|
+
end
|
789
|
+
|
790
|
+
context 'Σ(゚д゚lll) ' do
|
791
|
+
pending
|
792
|
+
end
|
793
|
+
|
794
|
+
context '☁︎' do
|
795
|
+
subject { '☁︎' }
|
796
|
+
its(:twidth) { should == 1 }
|
797
|
+
end
|
798
|
+
|
799
|
+
context '▀ ▄ ‖ █ ‖▌‖' do
|
800
|
+
pending
|
801
|
+
end
|
802
|
+
|
803
|
+
context 'にこにー♡' do
|
804
|
+
subject { 'にこにー♡' }
|
805
|
+
its(:twidth) { should == 9 }
|
806
|
+
end
|
807
|
+
|
808
|
+
context 'Наташа' do
|
809
|
+
subject { 'Наташа' }
|
810
|
+
its(:twidth) { should == 6 }
|
811
|
+
end
|
812
|
+
|
813
|
+
context '(╯°□°)╯︵' do
|
814
|
+
subject { '(╯°□°)╯︵' }
|
815
|
+
its(:twidth) { should == 10 }
|
816
|
+
end
|
817
|
+
|
818
|
+
context 'Facebig(((o(*゚▽゚*)o)))' do
|
819
|
+
pending
|
820
|
+
end
|
410
821
|
end
|
411
822
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ttable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Forrest Ye
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-11-
|
11
|
+
date: 2014-11-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
version: '0'
|
97
97
|
requirements: []
|
98
98
|
rubyforge_project:
|
99
|
-
rubygems_version: 2.
|
99
|
+
rubygems_version: 2.4.4
|
100
100
|
signing_key:
|
101
101
|
specification_version: 4
|
102
102
|
summary: Terminal Table with @2x width character support
|