kosi 1.0.1 → 1.1.0
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/CHANGELOG.md +9 -0
- data/README.md +0 -4
- data/kosi.gemspec +4 -2
- data/lib/kosi.rb +2 -2
- data/lib/kosi/align.rb +2 -2
- data/lib/kosi/char_option.rb +2 -1
- data/lib/kosi/connector_char.rb +2 -1
- data/lib/kosi/header.rb +2 -2
- data/lib/kosi/horizontal_border_char.rb +2 -1
- data/lib/kosi/options.rb +2 -2
- data/lib/kosi/separate_each_row.rb +2 -2
- data/lib/kosi/validators.rb +1 -1
- data/lib/kosi/validators/each_array_length_validator.rb +1 -1
- data/lib/kosi/validators/row_type_validator.rb +1 -1
- data/lib/kosi/version.rb +3 -2
- data/lib/kosi/vertical_border_char.rb +2 -1
- data/lib/table.rb +5 -4
- metadata +25 -11
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 20fe690c2615ff8d4daa0563c86cd1566b97c4f1
|
4
|
+
data.tar.gz: 551172ff254bf579478020a5438bb0bf66259133
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 167fe1995eaefc2377d95621eb747b78391df907dce3fcbbd6060f711958576c3f8486a7265aa5b8573bd384fd6f4017686f0824b025e275e7880e23f2feded9
|
7
|
+
data.tar.gz: ef4e25bd4ff31aaeb9e135722074f384492ea99f1ff7692c20e466069654c3b8c25fc0f26794f04324b35c1e1e6339b8f97c9475ae01585011f0c528cd5864bb
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -287,10 +287,6 @@ x*******x*******x*******x
|
|
287
287
|
x*******x*******x*******x
|
288
288
|
~~~
|
289
289
|
|
290
|
-
## :memo: 注意事項
|
291
|
-
* gem のバージョンが 2.0.1 以下だと unicode gem でエラーが発生するケースがあるようです。
|
292
|
-
その場合は gem を 2.0.2 以上に Update してください。
|
293
|
-
|
294
290
|
## :two_men_holding_hands: Contributing :two_women_holding_hands:
|
295
291
|
|
296
292
|
1. Fork it ( https://github.com/tbpgr/kosi/fork )
|
data/kosi.gemspec
CHANGED
@@ -18,9 +18,11 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
-
spec.
|
21
|
+
spec.required_ruby_version = '~> 2.0'
|
22
22
|
|
23
|
-
spec.
|
23
|
+
spec.add_runtime_dependency 'unicode-display_width', '~> 1.0'
|
24
|
+
spec.add_runtime_dependency 'unicode-emoji', '~> 0.9'
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
24
26
|
spec.add_development_dependency 'rake'
|
25
27
|
spec.add_development_dependency 'rspec', '~> 3.6.0'
|
26
28
|
spec.add_development_dependency 'simplecov', '~> 0.14.1'
|
data/lib/kosi.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
require 'kosi/align'
|
3
3
|
require 'kosi/connector_char'
|
4
4
|
require 'kosi/header'
|
@@ -8,6 +8,6 @@ require 'kosi/separate_each_row'
|
|
8
8
|
require 'kosi/vertical_border_char'
|
9
9
|
require 'table'
|
10
10
|
|
11
|
-
# TableFormat for Terminal(Use Japanese
|
11
|
+
# TableFormat for Terminal(Use Japanese Characters)
|
12
12
|
module Kosi
|
13
13
|
end
|
data/lib/kosi/align.rb
CHANGED
data/lib/kosi/char_option.rb
CHANGED
data/lib/kosi/connector_char.rb
CHANGED
data/lib/kosi/header.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'kosi/options'
|
2
3
|
require 'kosi/char_option'
|
3
4
|
|
4
|
-
# TableFormat for Terminal(Use Japanese
|
5
|
+
# TableFormat for Terminal(Use Japanese Characters)
|
5
6
|
module Kosi
|
6
7
|
# HorizontalBorderChar
|
7
8
|
class HorizontalBorderChar < CharOption
|
data/lib/kosi/options.rb
CHANGED
data/lib/kosi/validators.rb
CHANGED
data/lib/kosi/version.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
require 'kosi/options'
|
2
3
|
require 'kosi/char_option'
|
3
4
|
|
4
|
-
# TableFormat for Terminal(Use Japanese
|
5
|
+
# TableFormat for Terminal(Use Japanese Characters)
|
5
6
|
module Kosi
|
6
7
|
# VerticalBorderChar
|
7
8
|
class VerticalBorderChar < CharOption
|
data/lib/table.rb
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
#
|
1
|
+
# frozen_string_literal: true
|
2
2
|
require 'kosi'
|
3
3
|
require 'kosi/validators'
|
4
|
-
require 'unicode'
|
4
|
+
require 'unicode/display_width/no_string_ext'
|
5
|
+
require 'unicode/emoji'
|
5
6
|
|
6
|
-
# TableFormat for Terminal(Use Japanese
|
7
|
+
# TableFormat for Terminal(Use Japanese Characters)
|
7
8
|
module Kosi
|
8
9
|
# Table
|
9
10
|
class Table
|
@@ -60,7 +61,7 @@ module Kosi
|
|
60
61
|
|
61
62
|
def ascii1_other2_size(column)
|
62
63
|
column.split('').reduce(0) do |a, e|
|
63
|
-
a += Unicode.
|
64
|
+
a += Unicode::DisplayWidth.of(e, 1, {}, emoji: true)
|
64
65
|
a
|
65
66
|
end
|
66
67
|
end
|
metadata
CHANGED
@@ -1,43 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kosi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tbpgr
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: unicode
|
14
|
+
name: unicode-display_width
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
19
|
+
version: '1.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: unicode-emoji
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.9'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.9'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - "~>"
|
32
46
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.15
|
47
|
+
version: '1.15'
|
34
48
|
type: :development
|
35
49
|
prerelease: false
|
36
50
|
version_requirements: !ruby/object:Gem::Requirement
|
37
51
|
requirements:
|
38
52
|
- - "~>"
|
39
53
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.15
|
54
|
+
version: '1.15'
|
41
55
|
- !ruby/object:Gem::Dependency
|
42
56
|
name: rake
|
43
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -146,9 +160,9 @@ require_paths:
|
|
146
160
|
- lib
|
147
161
|
required_ruby_version: !ruby/object:Gem::Requirement
|
148
162
|
requirements:
|
149
|
-
- - "
|
163
|
+
- - "~>"
|
150
164
|
- !ruby/object:Gem::Version
|
151
|
-
version: '0'
|
165
|
+
version: '2.0'
|
152
166
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
153
167
|
requirements:
|
154
168
|
- - ">="
|