iron-import 0.8.6 → 0.8.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/History.txt +3 -0
- data/Version.txt +1 -1
- data/lib/iron/import/data_reader.rb +2 -0
- data/spec/importer/importer_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0c9cad49ed06dfb8000477555421a8c109c3d13a112619039372c58ea0e3475
|
4
|
+
data.tar.gz: 9a686352b1c0158fd87fdcda9c021390e6707508dfdc77a9712f6f8a372c32e5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c38498e700b3bc7174cb5cc5762c15b390cf0f9dbb83bd5af12a43fa702eed58245c43fdba71b1a201fc0c8bab5c79e3aa287c82bd1074cf1a9844318beb702
|
7
|
+
data.tar.gz: 24b26fec53dfb0b348413754e66b628aa1008eaf98e6c5fbaacb5b546ba7c3bff969e96657b0866ee5f0dc591f1c4a32f2a2cd9b89e7908eb057e22d7b98209d
|
data/History.txt
CHANGED
data/Version.txt
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.8.
|
1
|
+
0.8.7
|
@@ -146,6 +146,7 @@ class Importer
|
|
146
146
|
if supports_stream?
|
147
147
|
# Stream loader defined, run it
|
148
148
|
load_each(:stream, path_or_stream, scopes, &block)
|
149
|
+
path_or_stream.rewind
|
149
150
|
else
|
150
151
|
# Write to temp file, as some of our readers only read physical files, annoyingly
|
151
152
|
file = Tempfile.new(['importer', ".#{format}"])
|
@@ -157,6 +158,7 @@ class Importer
|
|
157
158
|
ensure
|
158
159
|
file.close
|
159
160
|
file.unlink
|
161
|
+
path_or_stream.rewind
|
160
162
|
end
|
161
163
|
end
|
162
164
|
|
@@ -328,4 +328,11 @@ describe Importer do
|
|
328
328
|
]
|
329
329
|
end
|
330
330
|
|
331
|
+
it 'should rewind stream after reading' do
|
332
|
+
stream = File.open(SpecHelper.sample_path('2-sheets.xlsx'))
|
333
|
+
stream.pos.should == 0
|
334
|
+
rows = Importer.read_lines(2, stream, :scope => 'Sheet 2')
|
335
|
+
stream.pos.should == 0
|
336
|
+
end
|
337
|
+
|
331
338
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron-import
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rob Morris
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: iron-extensions
|