tsv 0.0.1 → 0.0.2
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 +4 -4
- data/.travis.yml +10 -0
- data/README.md +4 -0
- data/lib/tsv.rb +2 -0
- data/lib/tsv/version.rb +1 -1
- data/spec/spec_helper.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b69a0b82ebc54fb3e050ce023c611120c8b90927
|
4
|
+
data.tar.gz: f3ca28bf29303d12b4d95ce611fccd6d4893c184
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1963c89c34987e9767cd5cc5bfe8d482018c5d0468b5b74866c377bd037473835fbdc6767b11f14362a0b8741e0e44b02a783a0e33ee57b22bc3c84ac1d5e87a
|
7
|
+
data.tar.gz: 42d99362bca82d106e8715f949cadd56e3868edbfd0380e0642ed6c6febcbc77e1077d7ed2fabd0f1118d3a7516d8a076c4d29d4964d8bfe682459734ae5fee1
|
data/.travis.yml
CHANGED
@@ -11,3 +11,13 @@ rvm:
|
|
11
11
|
- 2.1.2
|
12
12
|
- rbx-2.2.6
|
13
13
|
- jruby
|
14
|
+
|
15
|
+
# Part of test suite - building gem and trying to require it via ruby -e
|
16
|
+
# This way we check if gem is loadable and works without any problems in vanilla ruby
|
17
|
+
script: >
|
18
|
+
rake build&&gem install pkg/tsv*.gem&&ruby -e 'require "tsv"; TSV.parse_file("spec/fixtures/example.tsv").to_a'&&rake
|
19
|
+
|
20
|
+
matrix:
|
21
|
+
allow_failures:
|
22
|
+
- rvm: rbx-2.2.6
|
23
|
+
- rvm: jruby
|
data/README.md
CHANGED
@@ -32,6 +32,10 @@ Or install it yourself as:
|
|
32
32
|
`TSV.parse_file` accepts path to TSV file, returning lazy enumerator, yielding TSV::Row objects on demand
|
33
33
|
`TSV.parse_file` is also aliased as `[]`, allowing for `TSV[filename]` syntax
|
34
34
|
|
35
|
+
#### TSV::Cyclist
|
36
|
+
|
37
|
+
While TSV specification requires headers, popular use doesn't necessarily adhere. In order to cope both `TSV::parse` and `TSV::parse_file` return Cyclist objects, that apart from acting as enumerators expose two additional methods: `#with_headers` and `#without_headers`. Neither method preserves read position by design.
|
38
|
+
|
35
39
|
#### TSV::Row
|
36
40
|
|
37
41
|
By default TSV::Row behaves like an Array of strings, derived from TSV row. However this similarity is limited to Enumerable methods. In case a real array is needed, `#to_a` will behave as expected.
|
data/lib/tsv.rb
CHANGED
data/lib/tsv/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'bundler/setup'
|
3
3
|
|
4
|
+
require "codeclimate-test-reporter"
|
5
|
+
CodeClimate::TestReporter.start
|
6
|
+
|
4
7
|
require 'pry'
|
5
8
|
require 'rspec'
|
6
9
|
|
7
10
|
require 'tsv'
|
8
11
|
|
9
|
-
require "codeclimate-test-reporter"
|
10
|
-
CodeClimate::TestReporter.start
|
11
|
-
|
12
12
|
# Disabling old rspec should syntax
|
13
13
|
RSpec.configure do |config|
|
14
14
|
config.expect_with :rspec do |c|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tsv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmytro Soltys
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-
|
12
|
+
date: 2014-08-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Streamed TSV parser
|
15
15
|
email:
|