executrix 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.travis.yml CHANGED
@@ -3,7 +3,7 @@ bundler_args: --without documentation production
3
3
  rvm:
4
4
  - 1.9.3
5
5
  - 2.0.0
6
- - jruby-19mode-1.7.4
6
+ - jruby-19mode
7
7
  - rbx-19mode
8
8
  matrix:
9
9
  allow_failures:
data/lib/executrix.rb CHANGED
@@ -44,7 +44,6 @@ module Executrix
44
44
  batch_id = @connection.add_query(job_id, query)
45
45
  @connection.close_job job_id
46
46
  batch_reference = Executrix::Batch.new @connection, job_id, batch_id
47
- batch_reference.init_result_id
48
47
  batch_reference.final_status
49
48
  end
50
49
 
@@ -34,18 +34,17 @@ module Executrix
34
34
  @connection.query_batch @job_id, @batch_id
35
35
  end
36
36
 
37
- # only needed for query
38
- def init_result_id
39
- max_retries = 5
40
- retry_count = 0
41
- while @result_id.nil? && retry_count < max_retries
42
- @result_id = @connection.query_batch_result_id(@job_id, @batch_id)[:result]
43
- retry_count += 1
44
- end
45
- end
46
-
47
37
  def results
38
+ init_result_id
48
39
  @connection.query_batch_result_data(@job_id, @batch_id, @result_id)
49
40
  end
41
+
42
+ private
43
+ def init_result_id
44
+ result_raw = @connection.query_batch_result_id(@job_id, @batch_id)
45
+ if result_raw
46
+ @result_id = result_raw[:result]
47
+ end
48
+ end
50
49
  end
51
50
  end
@@ -1,3 +1,3 @@
1
1
  module Executrix
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  end
@@ -56,7 +56,6 @@ describe Executrix::Api do
56
56
  empty_connection.should_receive(:create_job).ordered
57
57
  empty_connection.should_receive(:add_query).ordered
58
58
  empty_connection.should_receive(:close_job).ordered
59
- empty_batch.should_receive(:init_result_id).ordered
60
59
  empty_batch.should_receive(:final_status).ordered
61
60
  s.query(sobject_input, query_input)
62
61
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: executrix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-07-04 00:00:00.000000000 Z
13
+ date: 2013-07-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -105,7 +105,6 @@ files:
105
105
  - .rspec
106
106
  - .ruby-version
107
107
  - .travis.yml
108
- - CHANGELOG.md
109
108
  - Gemfile
110
109
  - Guardfile
111
110
  - LICENSE
@@ -138,7 +137,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
137
  version: '0'
139
138
  segments:
140
139
  - 0
141
- hash: 203849975840229404
140
+ hash: -2027489645870901694
142
141
  required_rubygems_version: !ruby/object:Gem::Requirement
143
142
  none: false
144
143
  requirements:
@@ -147,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
147
146
  version: '0'
148
147
  segments:
149
148
  - 0
150
- hash: 203849975840229404
149
+ hash: -2027489645870901694
151
150
  requirements: []
152
151
  rubyforge_project: executrix
153
152
  rubygems_version: 1.8.23
data/CHANGELOG.md DELETED
@@ -1,12 +0,0 @@
1
- ## 1.1.1 (June 21th, 2013)
2
-
3
- - Now really make OrgId accessible
4
-
5
- ## 1.1.0 (June 16th, 2013)
6
-
7
- - Add possibility to fetch OrgId after login
8
- - Update default Salesforce API version to 28.0
9
-
10
- ## 1.0.0 (May 13th, 2013)
11
-
12
- - initial release (rewrite of [salesforce_bulk](https://github.com/jorgevaldivia/salesforce_bulk))