tsv 0.0.1 → 0.0.2

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: 9872712bd4a1b57465a813c036ed829be77673b0
4
- data.tar.gz: e392e8d086e7d4277f2bbb868cb93a26e6ab07d2
3
+ metadata.gz: b69a0b82ebc54fb3e050ce023c611120c8b90927
4
+ data.tar.gz: f3ca28bf29303d12b4d95ce611fccd6d4893c184
5
5
  SHA512:
6
- metadata.gz: b4c7d0043ab7b5ae3a25769e1dca356c4ec672acef4310895c889ac991e3f764137176eb2490373c8028f9ce361e3f7600c8d9ab193fe6b9dbe0fd112b334e9b
7
- data.tar.gz: 1a9e12c59e28ebf235591b73f294b2bc02f2118307a6d71d83ada443e6188736d46bef9036e81690b55eed986a5c0d272919c185e48135450ecd9e561eedc3e5
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
@@ -1,3 +1,5 @@
1
+ require 'forwardable'
2
+
1
3
  require "tsv/version"
2
4
  require "tsv/row"
3
5
  require "tsv/cyclist"
data/lib/tsv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module TSV
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
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.1
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-07-10 00:00:00.000000000 Z
12
+ date: 2014-08-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Streamed TSV parser
15
15
  email: