salesforce_bulk_query 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/salesforce_bulk_query/version.rb +1 -1
- data/lib/salesforce_bulk_query.rb +12 -3
- data/spec/salesforce_bulk_query_spec.rb +2 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14c6c47c7354675aa3a523f74c53b3634bae49df
|
4
|
+
data.tar.gz: 42711066f4c36b616544355475554aceb097915f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02663ff473cd34a7c19331c7e60ffe987e2e9acc55389c61d79da638565b018ba8fce3166eaafb27d717e0a9205c5310d39b773e51bc970c6f82fdbb6c005ae7
|
7
|
+
data.tar.gz: 4c5d030b769934c744550d3dcf59d6fc3d6b0a6d88570e39366662f129601c20569f17bee8e63d9af1be794c5c833444e42859005902d44c0b2cb3ce70ecbd86
|
@@ -86,8 +86,9 @@ module SalesforceBulkQuery
|
|
86
86
|
|
87
87
|
# nice list of files to log
|
88
88
|
if @logger && ! results[:filenames].empty?
|
89
|
-
|
90
|
-
@logger.info "
|
89
|
+
|
90
|
+
@logger.info "Download finished. Downloaded files in #{File.dirname(results[:filenames][0])}. Filename size [line count]:"
|
91
|
+
@logger.info "\n" + results[:filenames].sort.map{|f| "#{File.basename(f)} #{File.size(f)} #{line_count(f) if options[:count_lines]}"}.join("\n")
|
91
92
|
end
|
92
93
|
return results
|
93
94
|
end
|
@@ -103,6 +104,14 @@ module SalesforceBulkQuery
|
|
103
104
|
end
|
104
105
|
|
105
106
|
private
|
107
|
+
|
108
|
+
# record count if they want to
|
109
|
+
def line_count(f)
|
110
|
+
i = 0
|
111
|
+
CSV.foreach(f, :headers => true) {|_| i+=1}
|
112
|
+
i
|
113
|
+
end
|
114
|
+
|
106
115
|
# create a hash with just the fields we want to show in logs
|
107
116
|
def results_to_string(results)
|
108
117
|
return results.merge({
|
@@ -117,4 +126,4 @@ module SalesforceBulkQuery
|
|
117
126
|
})
|
118
127
|
end
|
119
128
|
end
|
120
|
-
end
|
129
|
+
end
|