salesforce_bulk_query 0.1.2 → 0.1.3

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: 37e885fe7f443a9c7ab9b3006f862e134d0b0fbb
4
- data.tar.gz: 0ded5e51edde95927af934907f3a98326f9971f9
3
+ metadata.gz: 81149267dbb6113a6a151f4cfe86fb9617a7ac4c
4
+ data.tar.gz: f31ea42f31cee0c7ad519d7d2f327091130d7032
5
5
  SHA512:
6
- metadata.gz: 19f45a42a8b1f3be36f9681fecae0a70670baa5fe1eab5d39339ec0ced4a299071b5eaefbc04d8776b8eda9fbbb59dee0db2f5eadf477a13fce05e1021d363f0
7
- data.tar.gz: b851dabb3da32e4ecdc693471dc9462c112a2488a5bdf78ede5c481cb025220c1032871476ae3f7c7bb98ca437c286c23070bf8fdccb782a229809aca7f5279f
6
+ metadata.gz: 26c32884ca08555921c25dea35529f42cd7cb50beaeac6c46b354e825ca97d61ae4960f9ecbdafd6a8633b0eb49c3abcd408ac6d3e7bead02f8e82bf494cfd09
7
+ data.tar.gz: ecd73fc49fa27ef6d04fbf73d9160f548bad4691ebbbb6b80d03441f40769ce6238f9f2f505a01c40482d43c5b599bd455b700ad4517ae95bccfa15dc927c31b
@@ -77,7 +77,7 @@ module SalesforceBulkQuery
77
77
  end
78
78
 
79
79
  def get_filename
80
- return "#{@sobject}_#{@batch_id}_#{@start}-#{@stop}.csv"
80
+ return "#{@sobject}_#{@start}_#{@stop}_#{@batch_id}.csv"
81
81
  end
82
82
 
83
83
  def get_result(options={})
@@ -177,6 +177,7 @@ module SalesforceBulkQuery
177
177
  @logger.info "unfinished batches: #{unfinished_batches}\nverification_fail_batches: #{verification_fail_batches}" if @logger
178
178
 
179
179
  return {
180
+ :finished => @unfinished_batches.empty?,
180
181
  :filenames => @filenames,
181
182
  :unfinished_batches => @unfinished_batches,
182
183
  :verification_fail_batches => verification_fail_batches
@@ -86,13 +86,12 @@ module SalesforceBulkQuery
86
86
  # check all jobs statuses and split what should be split
87
87
  @jobs_in_progress.each do |job|
88
88
 
89
- # check job status
90
- job_status = job.check_status
91
- job_over_limit = job.over_limit?
92
- job_done = job_status[:succeeded] || job_over_limit
93
-
94
89
  # download what's available
95
90
  job_results = job.get_available_results(options)
91
+
92
+ job_over_limit = job.over_limit?
93
+ job_done = job_results[:finished] || job_over_limit
94
+
96
95
  @logger.debug "job_results: #{job_results}" if @logger
97
96
 
98
97
  unfinished_batches = job_results[:unfinished_batches]
@@ -1,3 +1,3 @@
1
1
  module SalesforceBulkQuery
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
data/spec/spec_helper.rb CHANGED
@@ -6,6 +6,7 @@ RSpec.configure do |c|
6
6
  c.filter_run :focus => true
7
7
  c.run_all_when_everything_filtered = true
8
8
  c.filter_run_excluding :skip => true
9
+ c.formatter = :documentation
9
10
  end
10
11
 
11
12
  class SpecHelper
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salesforce_bulk_query
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petr Cvengros
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-29 00:00:00.000000000 Z
11
+ date: 2015-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json