tty-table 0.7.0 → 0.8.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: 2842eafedd508702de25386dd7bce4bd8904f930
4
- data.tar.gz: d4969e9ea05c9bdaea3d98abe20d5326e0e0ea93
3
+ metadata.gz: 8c089433bedbafa807caaba4025f66443e2edb93
4
+ data.tar.gz: c91840f0c6ade317d39c49625f0f5858a318b212
5
5
  SHA512:
6
- metadata.gz: 9849f80f8267563b4f884c2888dfa18b6099e9209480b68e792a758179e11f616cc3adc4d95543b09279cd8fd6ad3f26c3ea1a0bf5afebdf9f8f01e4d1571be2
7
- data.tar.gz: f8108b28bbff284e92e128db0d2217bd1f0fb3ea73c0d83ea14689d425133f796f46f774ccadd75818fddef62e01ccaabbe3e57964db3b7f0be58313abeb3927
6
+ metadata.gz: dbbe1cf16d1bf2e68b07f4641f3643e808fcca717361d6b71f48bf6c02c440dbd32372abc6d22c3dabd7e142897c756ad5df956c04e921be075cf606abad7f9d
7
+ data.tar.gz: 77198994da68496eeb19315bd8b4304e9f8649c52a77dc61a0ce9d629a2f454f4f3eeb526f8c175648c309af3fed942a45f0de791086d46cb8070e3631072435
@@ -1,5 +1,11 @@
1
1
  # Change log
2
2
 
3
+ ## [v0.8.0] - 2017-02-27
4
+
5
+ ### Changed
6
+ * Change necromancer dependency to fix Ruby 2.4.0
7
+ * Change to use relative paths to load files
8
+
3
9
  ## [v0.7.0] - 2017-01-15
4
10
 
5
11
  ### Changed
@@ -63,6 +69,7 @@
63
69
 
64
70
  * Initial implementation and release
65
71
 
72
+ [v0.8.0]: https://github.com/piotrmurach/tty-table/compare/v0.7.0...v0.8.0
66
73
  [v0.7.0]: https://github.com/piotrmurach/tty-table/compare/v0.6.0...v0.7.0
67
74
  [v0.6.0]: https://github.com/piotrmurach/tty-table/compare/v0.5.0...v0.6.0
68
75
  [v0.5.0]: https://github.com/piotrmurach/tty-table/compare/v0.4.0...v0.5.0
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # TTY::Table [![Gitter](https://badges.gitter.im/Join%20Chat.svg)][gitter]
2
-
3
2
  [![Gem Version](https://badge.fury.io/rb/tty-table.svg)][gem]
4
3
  [![Build Status](https://secure.travis-ci.org/piotrmurach/tty-table.svg?branch=master)][travis]
4
+ [![Build status](https://ci.appveyor.com/api/projects/status/8fxrbawbyomqd979?svg=true)][appveyor]
5
5
  [![Code Climate](https://codeclimate.com/github/piotrmurach/tty-table/badges/gpa.svg)][codeclimate]
6
6
  [![Coverage Status](https://coveralls.io/repos/github/piotrmurach/tty-table/badge.svg?branch=master)][coverage]
7
7
  [![Inline docs](http://inch-ci.org/github/piotrmurach/tty-table.svg?branch=master)][inchpages]
@@ -9,6 +9,7 @@
9
9
  [gitter]: https://gitter.im/piotrmurach/tty
10
10
  [gem]: http://badge.fury.io/rb/tty-table
11
11
  [travis]: http://travis-ci.org/piotrmurach/tty-table
12
+ [appveyor]: https://ci.appveyor.com/project/piotrmurach/tty-table
12
13
  [codeclimate]: https://codeclimate.com/github/piotrmurach/tty-table
13
14
  [coverage]: https://coveralls.io/github/piotrmurach/tty-table
14
15
  [inchpages]: http://inch-ci.org/github/piotrmurach/tty-table
@@ -0,0 +1,23 @@
1
+ ---
2
+ install:
3
+ - SET PATH=C:\Ruby%ruby_version%\bin;%PATH%
4
+ - ruby --version
5
+ - gem --version
6
+ - bundle install
7
+ build: off
8
+ test_script:
9
+ - bundle exec rake ci
10
+ environment:
11
+ matrix:
12
+ - ruby_version: "193"
13
+ - ruby_version: "200"
14
+ - ruby_version: "200-x64"
15
+ - ruby_version: "21"
16
+ - ruby_version: "21-x64"
17
+ - ruby_version: "22"
18
+ - ruby_version: "22-x64"
19
+ - ruby_version: "23"
20
+ - ruby_version: "23-x64"
21
+ matrix:
22
+ allow_failures:
23
+ - ruby_version: "193"
@@ -0,0 +1,10 @@
1
+ # encoding: utf-8
2
+
3
+ require 'tty-table'
4
+
5
+ table = TTY::Table.new header: ['header1', 'header2', 'header3']
6
+ table << ['a1', 'a2', 'a3']
7
+ table << ['b1','b2', 'b3']
8
+ table << ['c1', 'c2', 'c3']
9
+
10
+ puts table.render(:ascii, alignments: [:right, :center, :left])
@@ -0,0 +1,6 @@
1
+ # encoding: utf-8
2
+
3
+ require 'tty-table'
4
+
5
+ table = TTY::Table.new ['header1','header2'], [['a1', 'a2'], ['b1', 'b2']]
6
+ puts table.render(:basic)
@@ -1,5 +1,4 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/error'
4
- require 'tty/table/version'
5
- require 'tty/table'
3
+ require_relative 'tty/table/version'
4
+ require_relative 'tty/table'
@@ -4,13 +4,13 @@ require 'equatable'
4
4
  require 'forwardable'
5
5
  require 'necromancer'
6
6
 
7
- require 'tty/table/column_set'
8
- require 'tty/table/header'
9
- require 'tty/table/orientation'
10
- require 'tty/table/row'
11
- require 'tty/table/renderer'
12
- require 'tty/table/transformation'
13
- require 'tty/table/validatable'
7
+ require_relative 'table/column_set'
8
+ require_relative 'table/header'
9
+ require_relative 'table/orientation'
10
+ require_relative 'table/row'
11
+ require_relative 'table/renderer'
12
+ require_relative 'table/transformation'
13
+ require_relative 'table/validatable'
14
14
 
15
15
  module TTY
16
16
  # A core class intended for storing data in a structured, tabular form.
@@ -19,8 +19,7 @@ module TTY
19
19
  #
20
20
  # @api private
21
21
  def initialize(alignments)
22
- @converter = Necromancer.new
23
- @alignments = @converter.convert(alignments).to(:array).map(&:to_sym)
22
+ @alignments = Necromancer.convert(alignments).to(:array).map(&:to_sym)
24
23
  end
25
24
 
26
25
  # Iterate over each element in the alignment set
@@ -4,9 +4,10 @@ require 'equatable'
4
4
  require 'pastel'
5
5
  require 'verse'
6
6
 
7
- require 'tty/table/border_options'
8
- require 'tty/table/border_dsl'
9
- require 'tty/table/border/row_line'
7
+ require_relative 'border_options'
8
+ require_relative 'border_dsl'
9
+ require_relative 'border/row_line'
10
+ require_relative 'error'
10
11
 
11
12
  module TTY
12
13
  class Table
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/border'
3
+ require_relative '../border'
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/border'
3
+ require_relative '../border'
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,6 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/border'
3
+ #require 'tty/table/border'
4
+ require_relative '../border'
4
5
 
5
6
  module TTY
6
7
  class Table
@@ -1,7 +1,8 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'forwardable'
4
- require 'tty/table/border_options'
4
+
5
+ require_relative 'border_options'
5
6
 
6
7
  module TTY
7
8
  class Table
@@ -1,7 +1,8 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/column_set'
4
- require 'tty/table/border/null'
3
+ require_relative 'border/null'
4
+ require_relative 'column_set'
5
+ require_relative 'error'
5
6
 
6
7
  module TTY
7
8
  class Table
@@ -2,6 +2,8 @@
2
2
 
3
3
  require 'equatable'
4
4
 
5
+ require_relative 'error'
6
+
5
7
  module TTY
6
8
  class Table
7
9
  # A class that represents table column properties.
@@ -1,7 +1,9 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'forwardable'
4
- require 'tty/table/field'
4
+
5
+ require_relative 'error'
6
+ require_relative 'field'
5
7
 
6
8
  module TTY
7
9
  class Table
@@ -4,7 +4,6 @@ require 'delegate'
4
4
 
5
5
  module TTY
6
6
  class Table
7
-
8
7
  # Structure for holding table options with indifferent access
9
8
  class Options < DelegateClass(Hash)
10
9
 
@@ -25,6 +24,5 @@ module TTY
25
24
  end
26
25
 
27
26
  end # Options
28
-
29
27
  end # Table
30
28
  end # TTY
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/orientation/horizontal'
4
- require 'tty/table/orientation/vertical'
3
+ require_relative 'orientation/horizontal'
4
+ require_relative 'orientation/vertical'
5
5
 
6
6
  module TTY
7
7
  class Table
@@ -1,8 +1,9 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/renderer/basic'
4
- require 'tty/table/renderer/ascii'
5
- require 'tty/table/renderer/unicode'
3
+ require_relative 'error'
4
+ require_relative 'renderer/basic'
5
+ require_relative 'renderer/ascii'
6
+ require_relative 'renderer/unicode'
6
7
 
7
8
  module TTY
8
9
  class Table
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/border/ascii'
4
- require 'tty/table/renderer/basic'
3
+ require_relative '../border/ascii'
4
+ require_relative '../renderer/basic'
5
5
 
6
6
  module TTY
7
7
  class Table
@@ -3,22 +3,22 @@
3
3
  require 'tty-screen'
4
4
  require 'verse'
5
5
 
6
- require 'tty/table/alignment_set'
7
- require 'tty/table/border_dsl'
8
- require 'tty/table/border_options'
9
- require 'tty/table/border/null'
10
- require 'tty/table/column_constraint'
11
- require 'tty/table/column_set'
12
- require 'tty/table/header'
13
- require 'tty/table/indentation'
14
- require 'tty/table/operations'
15
- require 'tty/table/operation/alignment'
16
- require 'tty/table/operation/truncation'
17
- require 'tty/table/operation/wrapped'
18
- require 'tty/table/operation/filter'
19
- require 'tty/table/operation/escape'
20
- require 'tty/table/operation/padding'
21
- require 'tty/table/validatable'
6
+ require_relative '../alignment_set'
7
+ require_relative '../border_dsl'
8
+ require_relative '../border_options'
9
+ require_relative '../border/null'
10
+ require_relative '../column_constraint'
11
+ require_relative '../column_set'
12
+ require_relative '../header'
13
+ require_relative '../indentation'
14
+ require_relative '../operations'
15
+ require_relative '../operation/alignment'
16
+ require_relative '../operation/truncation'
17
+ require_relative '../operation/wrapped'
18
+ require_relative '../operation/filter'
19
+ require_relative '../operation/escape'
20
+ require_relative '../operation/padding'
21
+ require_relative '../validatable'
22
22
 
23
23
  module TTY
24
24
  class Table
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
 
3
- require 'tty/table/border/unicode'
3
+ require_relative '../border/unicode'
4
4
 
5
5
  module TTY
6
6
  class Table
@@ -1,7 +1,9 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'forwardable'
4
- require 'tty/table/field'
4
+
5
+ require_relative 'error'
6
+ require_relative 'field'
5
7
 
6
8
  module TTY
7
9
  class Table
@@ -1,5 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
+ require_relative 'error'
4
+
3
5
  module TTY
4
6
  class Table
5
7
  # Mixin to provide validation for {Table}.
@@ -2,6 +2,6 @@
2
2
 
3
3
  module TTY
4
4
  class Table
5
- VERSION = "0.7.0"
6
- end
5
+ VERSION = "0.8.0"
6
+ end # Table
7
7
  end # TTY
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = [""]
11
11
  spec.summary = %q{A flexible and intuitive table generator}
12
12
  spec.description = %q{A flexible and intuitive table generator}
13
- spec.homepage = "http://piotrmurach.github.io/tty/"
13
+ spec.homepage = "https://piotrmurach.github.io/tty/"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0")
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_dependency 'equatable', '~> 0.5.0'
22
- spec.add_dependency 'necromancer', '~> 0.3.0'
22
+ spec.add_dependency 'necromancer', '~> 0.4.0'
23
23
  spec.add_dependency 'pastel', '~> 0.7.0'
24
24
  spec.add_dependency 'tty-screen', '~> 0.5.0'
25
25
  spec.add_dependency 'verse', '~> 0.5.0'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tty-table
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Murach
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-15 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: equatable
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: 0.3.0
33
+ version: 0.4.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: 0.3.0
40
+ version: 0.4.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: pastel
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -144,7 +144,10 @@ files:
144
144
  - LICENSE.txt
145
145
  - README.md
146
146
  - Rakefile
147
+ - appveyor.yml
147
148
  - benchmarks/speed.rb
149
+ - examples/alignment.rb
150
+ - examples/basic.rb
148
151
  - lib/tty-table.rb
149
152
  - lib/tty/table.rb
150
153
  - lib/tty/table/alignment_set.rb
@@ -284,7 +287,7 @@ files:
284
287
  - tasks/coverage.rake
285
288
  - tasks/spec.rake
286
289
  - tty-table.gemspec
287
- homepage: http://piotrmurach.github.io/tty/
290
+ homepage: https://piotrmurach.github.io/tty/
288
291
  licenses:
289
292
  - MIT
290
293
  metadata: {}