nebulous 0.0.7 → 0.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: 3d178029d741448e75747602a1d1ae846c8d4dd6
4
- data.tar.gz: ca2a9c8af4960dd3ab3cc3394fabe8e08993eede
3
+ metadata.gz: 7bd0a6f4d3f113c1f2d6538c030f2c88b750530a
4
+ data.tar.gz: a740e101add3bc77b8b0640b6bbffb034ca9df4f
5
5
  SHA512:
6
- metadata.gz: e689c9d3b236000d651f12a6ce37fb8680aac68ed599c4ff53e1d4eaa534d9b7e396b4caa98e34f187276837c9885111f4af3d755a10086eabb3264eb0f17b54
7
- data.tar.gz: ba1941cd6c376dad8d67d4564f59c59db78573e18b0da13a0dd34f4179d6549e1281c06238ab62a3f3b8201ecadd8f27d24451461f0b60353bf30fb6dc563683
6
+ metadata.gz: 07905a4a8ab161501018832be757ee6ec8d8b5d737ac4be332ed99bce006aecd8817a6683fc6caa44bf43240295c4d64d4786e596bb388db535e339b741a0753
7
+ data.tar.gz: b051ab11fb60c9b0130263134c07babb2127cc241a928dfe90c4b9c17fb999d9e33b2afe86e44094d0ec5c5ffa1e6af18e3289aaace4e19fd4063631f2a4ed9f
@@ -6,6 +6,10 @@ module Nebulous
6
6
  Row.parse(read_complete_line, options).to_numeric.merge(@headers)
7
7
  end
8
8
 
9
+ def raw_headers
10
+ Row.parse(readline, options)
11
+ end
12
+
9
13
  def read_headers
10
14
  @headers ||= Row.headers(readline, options) if options[:headers]
11
15
  end
@@ -28,6 +28,11 @@ module Nebulous
28
28
  merge_delimiters
29
29
  end
30
30
 
31
+ def headers
32
+ @file.rewind
33
+ raw_headers
34
+ end
35
+
31
36
  def process(&block)
32
37
  @index = 0
33
38
  read_headers
@@ -1,3 +1,3 @@
1
1
  module Nebulous
2
- VERSION = '0.0.7'.freeze
2
+ VERSION = '0.1.0'.freeze
3
3
  end
@@ -25,6 +25,16 @@ describe Nebulous::Parser do
25
25
  end
26
26
  end
27
27
 
28
+ context '#headers' do
29
+ context 'around fetching headers' do
30
+ it 'returns expected headers' do
31
+ expect(parser.headers).to eq(
32
+ ["First name", "Last name", "From", "Access", "Qty"]
33
+ )
34
+ end
35
+ end
36
+ end
37
+
28
38
  context '#process' do
29
39
  context 'around limits' do
30
40
  let(:parser) { subject.new(path, limit: limit) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nebulous
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Graves