bulkforce 1.0.0 → 1.0.1

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: bd81802354ece9013e686bedab350cd6be171e7d
4
- data.tar.gz: 57c3d0d6afe27d36e796b2cf017a47f0579a7623
3
+ metadata.gz: 54775fd3b90a539a604bc061d625f46b16b94c81
4
+ data.tar.gz: 6d788cd867f65cfaccfdb3d3e6112ebba3dc47f5
5
5
  SHA512:
6
- metadata.gz: 65771ee34113f04a2d22c4bb6b1ede93356d0f66a84845f595b61cedafa0fb793a1702fb9bf55e3e866f66376dd54d84e762acb135fa4520ae53537fd65196e4
7
- data.tar.gz: 375ea76a3395feada554bd313db8e80df6c4ee45377f81895454c573bc4f2574ae1258d35662336e28db17eb2125c919c2979af740bd47e13831776d27202b73
6
+ metadata.gz: 500adb4c1b4db87c306ebbefc44a80966e82fac8ebae31fc423f0c1e13520ef23a3b7f177c73c278e7bf2a92d409455450055f19a25659528a8b4fb541e7cb14
7
+ data.tar.gz: 23663bd25870c6e1bfbece9252db8e95618533eecf698849051c5620c4d1cfe454bf3f009834728b649de3067d3960c8c17a24959b39c29af5dd427a3a67c329
@@ -2,12 +2,10 @@ language: ruby
2
2
  cache: bundler
3
3
  bundler_args: --without documentation production
4
4
  rvm:
5
- - 1.9.3
6
- - 2.0.0
7
- - 2.1.5
8
- - 2.2.2
9
- - jruby-19mode
5
+ - 2.1.7
6
+ - 2.2.3
10
7
  - rbx
8
+ - jruby-9000
11
9
  - ruby-head
12
10
  - jruby-head
13
11
  matrix:
@@ -16,4 +14,4 @@ matrix:
16
14
  - rvm: jruby-head
17
15
  fast_finish: true
18
16
  script:
19
- - bundle exec rake spec
17
+ - bundle exec rspec --tag ~type:integration
@@ -39,9 +39,15 @@ class Bulkforce
39
39
  # results returned from Salesforce can be a single page id, or an array of ids.
40
40
  # if it"s an array of ids, we will fetch the results from each, and concatenate them.
41
41
  def results
42
- Array(query_result_id).map do |result_id|
43
- @connection.query_batch_result_data(@job_id, @batch_id, result_id)
44
- end.flatten
42
+ queried_result_id = query_result_id
43
+
44
+ if queried_result_id
45
+ Array(queried_result_id).map do |result_id|
46
+ @connection.query_batch_result_data(@job_id, @batch_id, result_id)
47
+ end.flatten
48
+ else
49
+ @connection.query_batch_result_id_csv(@job_id, @batch_id)
50
+ end
45
51
  end
46
52
 
47
53
  def raw_request
@@ -73,6 +73,17 @@ class Bulkforce
73
73
  )
74
74
  end
75
75
 
76
+ def query_batch_result_id_csv job_id, batch_id
77
+ @raw_result = Bulkforce::Http.query_batch_result_id_csv(
78
+ @instance,
79
+ @session_id,
80
+ job_id,
81
+ batch_id,
82
+ @api_version,
83
+ )
84
+ Bulkforce::Helper.parse_csv @raw_result
85
+ end
86
+
76
87
  def query_batch_result_data job_id, batch_id, result_id
77
88
  @raw_result = Bulkforce::Http.query_batch_result_data(
78
89
  @instance,
@@ -41,6 +41,11 @@ class Bulkforce
41
41
  process_xml_response(nori.parse(process_http_request(r)))
42
42
  end
43
43
 
44
+ def query_batch_result_id_csv *args
45
+ r = Http::Request.query_batch_result_id(*args)
46
+ normalize_csv(process_http_request(r))
47
+ end
48
+
44
49
  def query_batch_result_data *args
45
50
  r = Http::Request.query_batch_result_data(*args)
46
51
  normalize_csv(process_http_request(r))
@@ -1,3 +1,3 @@
1
1
  class Bulkforce
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bulkforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Valdivia
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-07-28 00:00:00.000000000 Z
12
+ date: 2015-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -197,3 +197,4 @@ test_files:
197
197
  - spec/spec_helper.rb
198
198
  - spec/support/integration_helpers.rb
199
199
  - spec/support/shared_examples.rb
200
+ has_rdoc: