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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 277d63a0aa18baa0da5411fbf47b302f03690b90
4
- data.tar.gz: 010c1b4a1c87f0102b3c60153874623a32bd62a2
3
+ metadata.gz: 20fe690c2615ff8d4daa0563c86cd1566b97c4f1
4
+ data.tar.gz: 551172ff254bf579478020a5438bb0bf66259133
5
5
  SHA512:
6
- metadata.gz: c39e6e7765c741de7efce0ae6d2655fdb97b18e0b31a2d7d261ff71ceb6445009d14b442a203891e49054b4b81c8883c1a4452a83431b2543e13c2aca702d725
7
- data.tar.gz: a0703525fc854c47b0b0d28829c18a7b6d186348b099c28f23137a6c1c3c685646eb5b66ca02fd193d063bdd3a206b75ce2957ecc0980e084c43997de3ad8bfa
6
+ metadata.gz: 167fe1995eaefc2377d95621eb747b78391df907dce3fcbbd6060f711958576c3f8486a7265aa5b8573bd384fd6f4017686f0824b025e275e7880e23f2feded9
7
+ data.tar.gz: ef4e25bd4ff31aaeb9e135722074f384492ea99f1ff7692c20e466069654c3b8c25fc0f26794f04324b35c1e1e6339b8f97c9475ae01585011f0c528cd5864bb
@@ -9,3 +9,4 @@ rvm:
9
9
  - 2.2
10
10
  - 2.3.4
11
11
  - 2.4.1
12
+ - 2.5.0
@@ -1,3 +1,12 @@
1
+ ## v.1.1.0
2
+ 2018/01/08
3
+
4
+ ### Update Feature
5
+ * unicode gem の代わりに unicode-display_width と unicode-emoji を使用 by
6
+ * https://github.com/tbpgr/kosi/pull/3
7
+ * Ruby 2.5対応等
8
+ * https://github.com/tbpgr/kosi/pull/4
9
+
1
10
  ## v.1.0.1
2
11
  2017/08/22
3
12
 
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 )
@@ -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.add_runtime_dependency 'unicode', '>= 0.4.4'
21
+ spec.required_ruby_version = '~> 2.0'
22
22
 
23
- spec.add_development_dependency 'bundler', '~> 1.15.3'
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'
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
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 Charactors)
11
+ # TableFormat for Terminal(Use Japanese Characters)
12
12
  module Kosi
13
13
  end
@@ -1,7 +1,7 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
  require 'kosi/options'
3
3
 
4
- # TableFormat for Terminal(Use Japanese Charactors)
4
+ # TableFormat for Terminal(Use Japanese Characters)
5
5
  module Kosi
6
6
  # Align
7
7
  class Align
@@ -1,6 +1,7 @@
1
+ # frozen_string_literal: true
1
2
  require 'kosi/options'
2
3
 
3
- # TableFormat for Terminal(Use Japanese Charactors)
4
+ # TableFormat for Terminal(Use Japanese Characters)
4
5
  module Kosi
5
6
  # CharOption
6
7
  class CharOption
@@ -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 Charactors)
5
+ # TableFormat for Terminal(Use Japanese Characters)
5
6
  module Kosi
6
7
  # ConnectorChar
7
8
  class ConnectorChar < CharOption
@@ -1,7 +1,7 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
  require 'kosi/options'
3
3
 
4
- # TableFormat for Terminal(Use Japanese Charactors)
4
+ # TableFormat for Terminal(Use Japanese Characters)
5
5
  module Kosi
6
6
  # Header
7
7
  class Header
@@ -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 Charactors)
5
+ # TableFormat for Terminal(Use Japanese Characters)
5
6
  module Kosi
6
7
  # HorizontalBorderChar
7
8
  class HorizontalBorderChar < CharOption
@@ -1,6 +1,6 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
- # TableFormat for Terminal(Use Japanese Charactors)
3
+ # TableFormat for Terminal(Use Japanese Characters)
4
4
  module Kosi
5
5
  # Options
6
6
  module OptionKeys
@@ -1,7 +1,7 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
  require 'kosi/options'
3
3
 
4
- # TableFormat for Terminal(Use Japanese Charactors)
4
+ # TableFormat for Terminal(Use Japanese Characters)
5
5
  module Kosi
6
6
  # SeparateEachRow
7
7
  class SeparateEachRow
@@ -1,3 +1,3 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
  require 'kosi/validators/each_array_length_validator'
3
3
  require 'kosi/validators/row_type_validator'
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  # Kosi
4
4
  module Kosi
@@ -1,4 +1,4 @@
1
- # encoding: utf-8
1
+ # frozen_string_literal: true
2
2
 
3
3
  # Kosi
4
4
  module Kosi
@@ -1,4 +1,5 @@
1
- # TableFormat for Terminal(Use Japanese Charactors)
1
+ # frozen_string_literal: true
2
+ # TableFormat for Terminal(Use Japanese Characters)
2
3
  module Kosi
3
- VERSION = '1.0.1'
4
+ VERSION = '1.1.0'
4
5
  end
@@ -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 Charactors)
5
+ # TableFormat for Terminal(Use Japanese Characters)
5
6
  module Kosi
6
7
  # VerticalBorderChar
7
8
  class VerticalBorderChar < CharOption
@@ -1,9 +1,10 @@
1
- # encoding: utf-8
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 Charactors)
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.width(e)
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.1
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: 2017-08-22 00:00:00.000000000 Z
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.4.4
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.4.4
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.3
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.3
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
  - - ">="