file_processor 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.rspec +0 -1
- data/.travis.yml +2 -1
- data/Gemfile.lock +13 -13
- data/README.md +5 -1
- data/lib/file_processor/csv.rb +3 -4
- data/lib/file_processor/version.rb +1 -1
- data/spec/spec_helper.rb +5 -0
- metadata +5 -13
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MTM0MzYxZjMxMmZmNTZkY2E2MTE0NGFjZTE5NGUzYTJiZDdjMzgxZg==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
YTVkYmExNWM2NTYyZTBhMzMxNzUzN2ZiMzFmMTYxZTBmMGQ5ZjVjNQ==
|
7
|
+
SHA512:
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
MzUzMGM5ZGY5Mjg3Mjc4MjdlMmEyZmQ4ZGNhYjE3YmQ1ZGI1MTc4YjMyOGNi
|
10
|
+
MTEwNDM2MGY1MmMwYTEyYTczN2JiMDAzYWUyMzE4ODUwZjU1MjQxZTliNjQ3
|
11
|
+
ZWQ5MGQzYTIzYjg0MWQ5MjU3N2ExZGNkNDAyMDVjZWZhNjI1NWQ=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YmM0MWM1NjYzYWQyYzg5MjQ3ZjkxY2Y2NDZhMDNmZGExYWU4OWZhZWFjYzVl
|
14
|
+
ZDZmNTIzNjI0YTViNTU3OTkyNWFlMGY1ZGRhNWYzN2RmMTAxOWZlYzNiMzBl
|
15
|
+
YmFjMWYwYzNiMWVjZTQ3ZDI2MmYzODgzMTFlZjViMDdlY2ZjMTE=
|
data/.rspec
CHANGED
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
file_processor (0.
|
4
|
+
file_processor (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
columnize (0.3.6)
|
10
|
-
debugger (1.6.
|
10
|
+
debugger (1.6.2)
|
11
11
|
columnize (>= 0.3.1)
|
12
12
|
debugger-linecache (~> 1.2.0)
|
13
|
-
debugger-ruby_core_source (~> 1.2.
|
13
|
+
debugger-ruby_core_source (~> 1.2.3)
|
14
14
|
debugger-linecache (1.2.0)
|
15
|
-
debugger-ruby_core_source (1.2.
|
15
|
+
debugger-ruby_core_source (1.2.3)
|
16
16
|
diff-lcs (1.2.4)
|
17
17
|
json (1.7.7)
|
18
|
-
multi_json (1.
|
19
|
-
rake (10.0
|
20
|
-
rspec (2.14.
|
21
|
-
rspec-core (
|
22
|
-
rspec-expectations (
|
23
|
-
rspec-mocks (
|
24
|
-
rspec-core (2.14.
|
25
|
-
rspec-expectations (2.14.
|
18
|
+
multi_json (1.8.2)
|
19
|
+
rake (10.1.0)
|
20
|
+
rspec (2.14.1)
|
21
|
+
rspec-core (~> 2.14.0)
|
22
|
+
rspec-expectations (~> 2.14.0)
|
23
|
+
rspec-mocks (~> 2.14.0)
|
24
|
+
rspec-core (2.14.7)
|
25
|
+
rspec-expectations (2.14.3)
|
26
26
|
diff-lcs (>= 1.1.3, < 2.0)
|
27
|
-
rspec-mocks (2.14.
|
27
|
+
rspec-mocks (2.14.4)
|
28
28
|
simplecov (0.7.1)
|
29
29
|
multi_json (~> 1.0)
|
30
30
|
simplecov-html (~> 0.7.1)
|
data/README.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# FileProcessor
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![build status][1]][2]
|
4
|
+
[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/dtmtec/file_processor/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
|
5
|
+
|
6
|
+
[1]: https://travis-ci.org/dtmtec/file_processor.png
|
7
|
+
[2]: http://travis-ci.org/dtmtec/file_processor
|
4
8
|
|
5
9
|
A more powerful CSV file processor
|
6
10
|
|
data/lib/file_processor/csv.rb
CHANGED
@@ -120,15 +120,14 @@ module FileProcessor
|
|
120
120
|
tempfile.write(line)
|
121
121
|
end
|
122
122
|
ensure
|
123
|
-
tempfile.close
|
124
|
-
loaded_io.close
|
123
|
+
tempfile.close if tempfile
|
124
|
+
loaded_io.close if loaded_io
|
125
125
|
Encoding.default_internal = @original_default_internal
|
126
126
|
end
|
127
127
|
|
128
128
|
def decompress(loaded_io)
|
129
129
|
if detect_compression? || gzipped?
|
130
|
-
Zlib::GzipReader.
|
131
|
-
decompressed_io.getc # attempt to read from a compressed io
|
130
|
+
Zlib::GzipReader.new(loaded_io).tap do
|
132
131
|
@gzipped = true
|
133
132
|
end
|
134
133
|
else
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,15 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.2.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Vicente Mundim
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-04-03 00:00:00.000000000 Z
|
13
12
|
dependencies: []
|
14
13
|
description: A more powerful CSV file processor
|
15
14
|
email:
|
@@ -50,33 +49,26 @@ files:
|
|
50
49
|
- spec/support/fixtures/base.csv.gz
|
51
50
|
homepage:
|
52
51
|
licenses: []
|
52
|
+
metadata: {}
|
53
53
|
post_install_message:
|
54
54
|
rdoc_options: []
|
55
55
|
require_paths:
|
56
56
|
- lib
|
57
57
|
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
-
none: false
|
59
58
|
requirements:
|
60
59
|
- - ! '>='
|
61
60
|
- !ruby/object:Gem::Version
|
62
61
|
version: '0'
|
63
|
-
segments:
|
64
|
-
- 0
|
65
|
-
hash: -785318963478006114
|
66
62
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
-
none: false
|
68
63
|
requirements:
|
69
64
|
- - ! '>='
|
70
65
|
- !ruby/object:Gem::Version
|
71
66
|
version: '0'
|
72
|
-
segments:
|
73
|
-
- 0
|
74
|
-
hash: -785318963478006114
|
75
67
|
requirements: []
|
76
68
|
rubyforge_project:
|
77
|
-
rubygems_version:
|
69
|
+
rubygems_version: 2.2.2
|
78
70
|
signing_key:
|
79
|
-
specification_version:
|
71
|
+
specification_version: 4
|
80
72
|
summary: A more powerful CSV file processor
|
81
73
|
test_files:
|
82
74
|
- spec/file_processor/csv_spec.rb
|