datamix 0.1.2 → 0.1.4

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
  SHA256:
3
- metadata.gz: 6bfb1b0251aacb01846ec71202c446d51a6c3d07c8a8fc7d8fa16c30a1c85040
4
- data.tar.gz: 9bd3e8d79b28a2eab789d92f8df3721f433a540fe2f799283d28beb49461ee30
3
+ metadata.gz: a10bffb2bd1b0a2fde795c030ed59884ff8628fc1b43aa0c5da909cef138b81d
4
+ data.tar.gz: 2957319193a9db08e06454de009892f33860a242d254aa8885ec23c905436f56
5
5
  SHA512:
6
- metadata.gz: d575702cdd2556ca1248b885a47f2565336d8fd07b2f6f148e1d51fb9a7b7f19661b02c843fc8af6cd1dda52c99a005e7d82f2c81a365aa1019821508c62c740
7
- data.tar.gz: a2ffdfbd1165b0b65edab24f14fa955313ac958c7ebc5f703f3e6044f75d097f019f20abd22860cecfba62d39d3918c9a8fb790be44ce7295be4451bc9a4eaa4
6
+ metadata.gz: 014c5cef08223c1413cb212e401bf66b348ed3c1eb6ffe9ea1f4cedb713c5379daebf3c182ba2b0f0ccd826157b8764a9f0f536c5d7ef5a29e42d4f013f77be0
7
+ data.tar.gz: 45cb5917902b7ecfb6281960ad6846ac5380c17c03f7d5aa9b1526631f4c89435de39a5f81121c4dbf57bbb574c2e3c7af55e2353f2bbbaaa8305817c15d13ed
data/README.md CHANGED
@@ -4,8 +4,6 @@ DataMix - DSL for manipulating tabular data
4
4
  [![Gem Version](https://badge.fury.io/rb/datamix.svg)](https://badge.fury.io/rb/datamix)
5
5
  [![Build Status](https://travis-ci.com/DannyBen/datamix.svg?branch=master)](https://travis-ci.com/DannyBen/datamix)
6
6
  [![Maintainability](https://api.codeclimate.com/v1/badges/7af46250a35a02dfa0d4/maintainability)](https://codeclimate.com/github/DannyBen/datamix/maintainability)
7
- [![Test Coverage](https://api.codeclimate.com/v1/badges/7af46250a35a02dfa0d4/test_coverage)](https://codeclimate.com/github/DannyBen/datamix/test_coverage)
8
-
9
7
 
10
8
  ---
11
9
 
@@ -6,3 +6,5 @@ require 'datamix/refinements/array'
6
6
  require 'datamix/refinements/csv_table'
7
7
  require 'datamix/refinements/nil'
8
8
  require 'datamix/refinements/object'
9
+
10
+ require 'byebug' if ENV['BYEBUG']
@@ -1,4 +1,4 @@
1
- require 'terminal-table'
1
+ require 'tty-table'
2
2
 
3
3
  module DataMix
4
4
  refine CSV::Table do
@@ -108,7 +108,9 @@ module DataMix
108
108
  def to_ascii(rows=:all)
109
109
  table = rows == :all ? by_row : first(rows)
110
110
  rows = table.map { |row| row.fields }
111
- Terminal::Table.new(headings: headers, rows: rows).to_s
111
+ table = TTY::Table.new headers, rows
112
+ result = table.render :ascii, padding: [0,1]
113
+ "#{result}\n"
112
114
  end
113
115
 
114
116
  # Convert table to a TSV string
@@ -1,3 +1,3 @@
1
1
  module DataMix
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: datamix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-01-11 00:00:00.000000000 Z
11
+ date: 2019-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: terminal-table
14
+ name: tty-table
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.7.3
19
+ version: '0.11'
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: 1.7.3
26
+ version: '0.11'
27
27
  description: DSL for manipulating tabular data
28
28
  email: db@dannyben.com
29
29
  executables: []
@@ -57,8 +57,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
57
57
  - !ruby/object:Gem::Version
58
58
  version: '0'
59
59
  requirements: []
60
- rubyforge_project:
61
- rubygems_version: 2.7.6
60
+ rubygems_version: 3.0.3
62
61
  signing_key:
63
62
  specification_version: 4
64
63
  summary: DSL for manipulating tabular data