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 +4 -4
- data/.travis.yml +4 -6
- data/lib/bulkforce/batch.rb +9 -3
- data/lib/bulkforce/connection.rb +11 -0
- data/lib/bulkforce/http.rb +5 -0
- data/lib/bulkforce/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54775fd3b90a539a604bc061d625f46b16b94c81
|
4
|
+
data.tar.gz: 6d788cd867f65cfaccfdb3d3e6112ebba3dc47f5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 500adb4c1b4db87c306ebbefc44a80966e82fac8ebae31fc423f0c1e13520ef23a3b7f177c73c278e7bf2a92d409455450055f19a25659528a8b4fb541e7cb14
|
7
|
+
data.tar.gz: 23663bd25870c6e1bfbece9252db8e95618533eecf698849051c5620c4d1cfe454bf3f009834728b649de3067d3960c8c17a24959b39c29af5dd427a3a67c329
|
data/.travis.yml
CHANGED
@@ -2,12 +2,10 @@ language: ruby
|
|
2
2
|
cache: bundler
|
3
3
|
bundler_args: --without documentation production
|
4
4
|
rvm:
|
5
|
-
- 1.
|
6
|
-
- 2.
|
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
|
17
|
+
- bundle exec rspec --tag ~type:integration
|
data/lib/bulkforce/batch.rb
CHANGED
@@ -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
|
-
|
43
|
-
|
44
|
-
|
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
|
data/lib/bulkforce/connection.rb
CHANGED
@@ -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,
|
data/lib/bulkforce/http.rb
CHANGED
@@ -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))
|
data/lib/bulkforce/version.rb
CHANGED
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.
|
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-
|
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:
|