fizx-csvget 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +8 -1
- data/VERSION +1 -1
- data/csvget.gemspec +1 -1
- data/lib/csvget.rb +2 -1
- metadata +1 -1
data/README.rdoc
CHANGED
@@ -16,7 +16,14 @@
|
|
16
16
|
- http://github.com/fizx/parsley/tree/master and its dependencies.
|
17
17
|
- Rubygems
|
18
18
|
|
19
|
-
==
|
19
|
+
== Running on EC2
|
20
|
+
|
21
|
+
> git clone git://github.com/fizx/csvget-ec2-recipe.git
|
22
|
+
> cd csvget-ec2-recipe
|
23
|
+
> ./boot.rb
|
24
|
+
> ssh YOUR_INSTANCE
|
25
|
+
|
26
|
+
== Local Installation
|
20
27
|
|
21
28
|
1. Install the dependencies.
|
22
29
|
2. > gem sources -a http://gems.github.com
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.2
|
data/csvget.gemspec
CHANGED
data/lib/csvget.rb
CHANGED
@@ -31,7 +31,8 @@ class CSVStore
|
|
31
31
|
values = [values] unless values.is_a?(Array)
|
32
32
|
file_name = File.join(@output_folder, "#{prefix}.csv")
|
33
33
|
h = @headers[prefix] ||= values.first.keys
|
34
|
-
|
34
|
+
should_write_headers = !File.exists?(file_name)
|
35
|
+
f = @files[prefix] ||= FasterCSV.open(file_name, "a", :headers => h, :write_headers => should_write_headers)
|
35
36
|
|
36
37
|
values.each do |hash|
|
37
38
|
arr = h.inject([]) do |memo, key|
|