ttable 0.0.5 → 0.0.6

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
  SHA1:
3
- metadata.gz: 1f9e1e599a37ce385956a28adc05f12f4117268f
4
- data.tar.gz: 60a4d595fbd5239bb850201719d232d12526d07d
3
+ metadata.gz: 0593100cc29009bbec61da7f47c925cf1c5f1043
4
+ data.tar.gz: 5d20aca2ee528e308a96ac0f27584f5cd5e8e848
5
5
  SHA512:
6
- metadata.gz: f0dba24fea9494ea6bfa9e45c714bbd75a92e805038d23680adbd60ee2916071291ba27369817c23349dff69bd97d2e8093242b8271f7b0da1e811131cc031aa
7
- data.tar.gz: 7ff65690e862568a008fdc24e7a9f94999b2e4b7115e42dd39f084437bf84add096c4c9e9657fd0eacfba1882276ffa3ef1db8bb59518d1eb318ded26cc359ff
6
+ metadata.gz: ef944c97c37bd45bbef0831fad22652e9c3d8127f6a00a394a0ec8c5f265196b7efb79408826abde3217a37019f32901c968defeee96ae3f07f1e0d4d809b1b0
7
+ data.tar.gz: 88eefbdc9c9ba2fbc2bccac1691d965d4ae78262279af3c56ac70a6e7d109e91b9f472fb411a9168a6a28601c5c87c59451e772d7d6dde84ad8d79e2030dc47c
@@ -6,7 +6,7 @@ class String
6
6
  def twidth
7
7
  result = 0
8
8
 
9
- %w{ ☺️ ❤️ ♍️ }.each do |c|
9
+ %w{ ☺️ ❤️ ♍️ ☔️ }.each do |c|
10
10
  if include?(c)
11
11
  result += 1 * scan(c).size
12
12
  gsub!(c, '')
@@ -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
@@ -1,5 +1,5 @@
1
1
  module Terminal
2
2
  class Table
3
- VERSION = '0.0.5'
3
+ VERSION = '0.0.6'
4
4
  end
5
5
  end
@@ -337,5 +337,25 @@ describe String do
337
337
  subject { '→_→' }
338
338
  its(:twidth) { should == 3 }
339
339
  end
340
+
341
+ context '☞' do
342
+ subject { '☞' }
343
+ its(:twidth) { should == 1 }
344
+ end
345
+
346
+ context 'ë' do
347
+ subject { 'ë' }
348
+ its(:twidth) { should == 1 }
349
+ end
350
+
351
+ context '☔️' do
352
+ subject { '☔️' }
353
+ its(:twidth) { should == 1 }
354
+ end
355
+
356
+ context "ϵ( 'Θ' )϶" do
357
+ subject { "ϵ( 'Θ' )϶" }
358
+ its(:twidth) { should == 9 }
359
+ end
340
360
  end
341
361
  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.5
4
+ version: 0.0.6
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-06 00:00:00.000000000 Z
11
+ date: 2014-11-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler