restforce-db 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/lib/file_daemon.rb +42 -0
  3. data/lib/restforce/db/accumulator.rb +41 -0
  4. data/lib/restforce/db/attribute_map.rb +132 -0
  5. data/lib/restforce/db/collector.rb +79 -0
  6. data/lib/restforce/db/initializer.rb +62 -0
  7. data/lib/restforce/db/instances/base.rb +1 -14
  8. data/lib/restforce/db/instances/salesforce.rb +7 -0
  9. data/lib/restforce/db/mapping.rb +33 -79
  10. data/lib/restforce/db/record_types/base.rb +0 -30
  11. data/lib/restforce/db/runner.rb +80 -0
  12. data/lib/restforce/db/synchronizer.rb +29 -37
  13. data/lib/restforce/db/version.rb +1 -1
  14. data/lib/restforce/db/worker.rb +53 -40
  15. data/lib/restforce/db.rb +6 -0
  16. data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/when_synchronization_is_stale/updates_the_database_record.yml → Restforce_DB_Collector/_run/given_a_Salesforce_record_with_an_associated_database_record/returns_the_attributes_from_both_records.yml} +36 -36
  17. data/test/cassettes/Restforce_DB_Collector/_run/given_an_existing_Salesforce_record/returns_the_attributes_from_the_Salesforce_record.yml +197 -0
  18. data/test/cassettes/Restforce_DB_Collector/_run/given_an_existing_database_record/returns_the_attributes_from_the_database_record.yml +81 -0
  19. data/test/cassettes/Restforce_DB_Initializer/_run/given_an_existing_Salesforce_record/for_a_non-root_mapping/does_not_create_a_database_record.yml +119 -0
  20. data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/when_synchronization_is_up-to-date/does_not_update_the_database_record.yml → Restforce_DB_Initializer/_run/given_an_existing_Salesforce_record/for_a_root_mapping/creates_a_matching_database_record.yml} +28 -28
  21. data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_an_existing_database_record → Restforce_DB_Initializer/_run/given_an_existing_database_record/for_a_root_mapping}/populates_Salesforce_with_the_new_record.yml +44 -44
  22. data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_an_existing_Salesforce_record/for_a_non-root_mapping/does_not_create_a_database_record.yml → Restforce_DB_Instances_Salesforce/_synced_/when_a_matching_database_record_exists/returns_true.yml} +30 -30
  23. data/test/cassettes/{Restforce_DB_Synchronizer/_run/given_an_existing_Salesforce_record/for_a_root_mapping/creates_a_matching_database_record.yml → Restforce_DB_Instances_Salesforce/_synced_/when_no_matching_database_record_exists/returns_false.yml} +30 -30
  24. data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/updates_the_database_record.yml +194 -0
  25. data/test/cassettes/Restforce_DB_Synchronizer/_run/given_a_Salesforce_record_with_an_associated_database_record/updates_the_salesforce_record.yml +233 -0
  26. data/test/lib/restforce/db/accumulator_test.rb +71 -0
  27. data/test/lib/restforce/db/attribute_map_test.rb +70 -0
  28. data/test/lib/restforce/db/collector_test.rb +91 -0
  29. data/test/lib/restforce/db/initializer_test.rb +92 -0
  30. data/test/lib/restforce/db/instances/active_record_test.rb +0 -13
  31. data/test/lib/restforce/db/instances/salesforce_test.rb +20 -13
  32. data/test/lib/restforce/db/mapping_test.rb +1 -37
  33. data/test/lib/restforce/db/record_types/active_record_test.rb +0 -40
  34. data/test/lib/restforce/db/runner_test.rb +40 -0
  35. data/test/lib/restforce/db/synchronizer_test.rb +26 -86
  36. metadata +23 -7
@@ -21,10 +21,10 @@ http_interactions:
21
21
  message: OK
22
22
  headers:
23
23
  Date:
24
- - Thu, 26 Mar 2015 10:37:35 GMT
24
+ - Mon, 06 Apr 2015 15:01:25 GMT
25
25
  Set-Cookie:
26
- - BrowserId=EQNneFgNS3CrbaBDH8cJYg;Path=/;Domain=.salesforce.com;Expires=Mon,
27
- 25-May-2015 10:37:35 GMT
26
+ - BrowserId=fERSgZ4JTeuiJriZGh5z5g;Path=/;Domain=.salesforce.com;Expires=Fri,
27
+ 05-Jun-2015 15:01:25 GMT
28
28
  Expires:
29
29
  - Thu, 01 Jan 1970 00:00:00 GMT
30
30
  Pragma:
@@ -37,22 +37,22 @@ http_interactions:
37
37
  - chunked
38
38
  body:
39
39
  encoding: ASCII-8BIT
40
- string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1427366255847","token_type":"Bearer","instance_url":"https://<host>","signature":"vL9LHoNJyc1s8G+RNz5UOFUSJNiu/nPd09YEFZlVuFU=","access_token":"00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ"}'
40
+ string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1428332485560","token_type":"Bearer","instance_url":"https://<host>","signature":"GBS/8ndYpWxyywchO4vevnh1DcQqCs1JQ+G8a/Ju8T4=","access_token":"00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil"}'
41
41
  http_version:
42
- recorded_at: Thu, 26 Mar 2015 10:37:35 GMT
42
+ recorded_at: Mon, 06 Apr 2015 15:01:25 GMT
43
43
  - request:
44
44
  method: post
45
45
  uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
46
46
  body:
47
47
  encoding: UTF-8
48
- string: '{"Name":"Custom object","Example_Field__c":"Some sample text"}'
48
+ string: '{"Name":"Sample object"}'
49
49
  headers:
50
50
  User-Agent:
51
51
  - Faraday v0.9.1
52
52
  Content-Type:
53
53
  - application/json
54
54
  Authorization:
55
- - OAuth 00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ
55
+ - OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
56
56
  Accept-Encoding:
57
57
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
58
  Accept:
@@ -63,28 +63,28 @@ http_interactions:
63
63
  message: Created
64
64
  headers:
65
65
  Date:
66
- - Thu, 26 Mar 2015 10:37:36 GMT
66
+ - Mon, 06 Apr 2015 15:01:27 GMT
67
67
  Set-Cookie:
68
- - BrowserId=Ik6Y5AJWSKSwd79qV31BPA;Path=/;Domain=.salesforce.com;Expires=Mon,
69
- 25-May-2015 10:37:36 GMT
68
+ - BrowserId=35nO5t0KR8ukyZaToZMtpw;Path=/;Domain=.salesforce.com;Expires=Fri,
69
+ 05-Jun-2015 15:01:27 GMT
70
70
  Expires:
71
71
  - Thu, 01 Jan 1970 00:00:00 GMT
72
72
  Sforce-Limit-Info:
73
- - api-usage=43/15000
73
+ - api-usage=25/15000
74
74
  Location:
75
- - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001J1BPAA0"
75
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpnAAG"
76
76
  Content-Type:
77
77
  - application/json;charset=UTF-8
78
78
  Transfer-Encoding:
79
79
  - chunked
80
80
  body:
81
81
  encoding: ASCII-8BIT
82
- string: '{"id":"a001a000001J1BPAA0","success":true,"errors":[]}'
82
+ string: '{"id":"a001a000001LGpnAAG","success":true,"errors":[]}'
83
83
  http_version:
84
- recorded_at: Thu, 26 Mar 2015 10:37:36 GMT
84
+ recorded_at: Mon, 06 Apr 2015 15:01:27 GMT
85
85
  - request:
86
86
  method: get
87
- uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20SystemModstamp%20%3C=%202015-03-26T10:37:36Z
87
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001LGpnAAG%27
88
88
  body:
89
89
  encoding: US-ASCII
90
90
  string: ''
@@ -92,7 +92,7 @@ http_interactions:
92
92
  User-Agent:
93
93
  - Faraday v0.9.1
94
94
  Authorization:
95
- - OAuth 00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ
95
+ - OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
96
96
  Accept-Encoding:
97
97
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
98
  Accept:
@@ -103,27 +103,27 @@ http_interactions:
103
103
  message: OK
104
104
  headers:
105
105
  Date:
106
- - Thu, 26 Mar 2015 10:37:37 GMT
106
+ - Mon, 06 Apr 2015 15:01:28 GMT
107
107
  Set-Cookie:
108
- - BrowserId=qTBk072VQtGC-YUomSi2Vw;Path=/;Domain=.salesforce.com;Expires=Mon,
109
- 25-May-2015 10:37:37 GMT
108
+ - BrowserId=oAxfzYGTTZSrw3A6NzKQ9g;Path=/;Domain=.salesforce.com;Expires=Fri,
109
+ 05-Jun-2015 15:01:28 GMT
110
110
  Expires:
111
111
  - Thu, 01 Jan 1970 00:00:00 GMT
112
112
  Sforce-Limit-Info:
113
- - api-usage=43/15000
113
+ - api-usage=24/15000
114
114
  Content-Type:
115
115
  - application/json;charset=UTF-8
116
116
  Transfer-Encoding:
117
117
  - chunked
118
118
  body:
119
119
  encoding: ASCII-8BIT
120
- string: '{"totalSize":3,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001IjCFAA0"},"Id":"a001a000001IjCFAA0","SystemModstamp":"2015-03-24T08:25:04.000+0000","Name":"andrew@tablexi.com","Example_Field__c":null},{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001IjP2AAK"},"Id":"a001a000001IjP2AAK","SystemModstamp":"2015-03-24T08:27:33.000+0000","Name":"somebody+new@example.com","Example_Field__c":null},{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001J1BPAA0"},"Id":"a001a000001J1BPAA0","SystemModstamp":"2015-03-26T10:37:36.000+0000","Name":"Custom
121
- object","Example_Field__c":"Some sample text"}]}'
120
+ string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpnAAG"},"Id":"a001a000001LGpnAAG","SystemModstamp":"2015-04-06T15:01:27.000+0000","Name":"Sample
121
+ object","Example_Field__c":null}]}'
122
122
  http_version:
123
- recorded_at: Thu, 26 Mar 2015 10:37:37 GMT
123
+ recorded_at: Mon, 06 Apr 2015 15:01:28 GMT
124
124
  - request:
125
125
  method: delete
126
- uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001J1BPAA0
126
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpnAAG
127
127
  body:
128
128
  encoding: US-ASCII
129
129
  string: ''
@@ -131,7 +131,7 @@ http_interactions:
131
131
  User-Agent:
132
132
  - Faraday v0.9.1
133
133
  Authorization:
134
- - OAuth 00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ
134
+ - OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
135
135
  Accept-Encoding:
136
136
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
137
137
  Accept:
@@ -142,17 +142,17 @@ http_interactions:
142
142
  message: No Content
143
143
  headers:
144
144
  Date:
145
- - Thu, 26 Mar 2015 10:37:39 GMT
145
+ - Mon, 06 Apr 2015 15:01:31 GMT
146
146
  Set-Cookie:
147
- - BrowserId=f9ymsL_dSE6W6jeY7m0KTA;Path=/;Domain=.salesforce.com;Expires=Mon,
148
- 25-May-2015 10:37:39 GMT
147
+ - BrowserId=x--P6F6eRS2VDmm5GzlWnw;Path=/;Domain=.salesforce.com;Expires=Fri,
148
+ 05-Jun-2015 15:01:31 GMT
149
149
  Expires:
150
150
  - Thu, 01 Jan 1970 00:00:00 GMT
151
151
  Sforce-Limit-Info:
152
- - api-usage=43/15000
152
+ - api-usage=24/15000
153
153
  body:
154
154
  encoding: UTF-8
155
155
  string: ''
156
156
  http_version:
157
- recorded_at: Thu, 26 Mar 2015 10:37:39 GMT
157
+ recorded_at: Mon, 06 Apr 2015 15:01:31 GMT
158
158
  recorded_with: VCR 2.9.3
@@ -21,10 +21,10 @@ http_interactions:
21
21
  message: OK
22
22
  headers:
23
23
  Date:
24
- - Thu, 26 Mar 2015 10:38:52 GMT
24
+ - Mon, 06 Apr 2015 15:01:20 GMT
25
25
  Set-Cookie:
26
- - BrowserId=37YKB17FQXeugJwOsd0zkw;Path=/;Domain=.salesforce.com;Expires=Mon,
27
- 25-May-2015 10:38:52 GMT
26
+ - BrowserId=9UkDltOYSSu1vP54zLx4QQ;Path=/;Domain=.salesforce.com;Expires=Fri,
27
+ 05-Jun-2015 15:01:20 GMT
28
28
  Expires:
29
29
  - Thu, 01 Jan 1970 00:00:00 GMT
30
30
  Pragma:
@@ -37,22 +37,22 @@ http_interactions:
37
37
  - chunked
38
38
  body:
39
39
  encoding: ASCII-8BIT
40
- string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1427366333069","token_type":"Bearer","instance_url":"https://<host>","signature":"fLjdti3hVSnGVmDfe2q7IuyM0ezADibgQZn8IJjabQ0=","access_token":"00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ"}'
40
+ string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1428332480120","token_type":"Bearer","instance_url":"https://<host>","signature":"EUwqb7x31VJ+yJ0lgsC7JwgnXdSItzgBAL8Kos1gDnQ=","access_token":"00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil"}'
41
41
  http_version:
42
- recorded_at: Thu, 26 Mar 2015 10:38:53 GMT
42
+ recorded_at: Mon, 06 Apr 2015 15:01:20 GMT
43
43
  - request:
44
44
  method: post
45
45
  uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
46
46
  body:
47
47
  encoding: UTF-8
48
- string: '{"Name":"Custom object","Example_Field__c":"Some sample text"}'
48
+ string: '{"Name":"Sample object"}'
49
49
  headers:
50
50
  User-Agent:
51
51
  - Faraday v0.9.1
52
52
  Content-Type:
53
53
  - application/json
54
54
  Authorization:
55
- - OAuth 00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ
55
+ - OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
56
56
  Accept-Encoding:
57
57
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
58
  Accept:
@@ -63,28 +63,28 @@ http_interactions:
63
63
  message: Created
64
64
  headers:
65
65
  Date:
66
- - Thu, 26 Mar 2015 10:38:53 GMT
66
+ - Mon, 06 Apr 2015 15:01:21 GMT
67
67
  Set-Cookie:
68
- - BrowserId=MBCeRTzjSuudckQJYgK3TA;Path=/;Domain=.salesforce.com;Expires=Mon,
69
- 25-May-2015 10:38:53 GMT
68
+ - BrowserId=o6ko1pC1SeiZoZdFI8DKQw;Path=/;Domain=.salesforce.com;Expires=Fri,
69
+ 05-Jun-2015 15:01:21 GMT
70
70
  Expires:
71
71
  - Thu, 01 Jan 1970 00:00:00 GMT
72
72
  Sforce-Limit-Info:
73
- - api-usage=55/15000
73
+ - api-usage=24/15000
74
74
  Location:
75
- - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001J1BUAA0"
75
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpiAAG"
76
76
  Content-Type:
77
77
  - application/json;charset=UTF-8
78
78
  Transfer-Encoding:
79
79
  - chunked
80
80
  body:
81
81
  encoding: ASCII-8BIT
82
- string: '{"id":"a001a000001J1BUAA0","success":true,"errors":[]}'
82
+ string: '{"id":"a001a000001LGpiAAG","success":true,"errors":[]}'
83
83
  http_version:
84
- recorded_at: Thu, 26 Mar 2015 10:38:54 GMT
84
+ recorded_at: Mon, 06 Apr 2015 15:01:21 GMT
85
85
  - request:
86
86
  method: get
87
- uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20SystemModstamp%20%3C=%202015-03-26T10:38:54Z
87
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001LGpiAAG%27
88
88
  body:
89
89
  encoding: US-ASCII
90
90
  string: ''
@@ -92,7 +92,7 @@ http_interactions:
92
92
  User-Agent:
93
93
  - Faraday v0.9.1
94
94
  Authorization:
95
- - OAuth 00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ
95
+ - OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
96
96
  Accept-Encoding:
97
97
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
98
  Accept:
@@ -103,27 +103,27 @@ http_interactions:
103
103
  message: OK
104
104
  headers:
105
105
  Date:
106
- - Thu, 26 Mar 2015 10:38:55 GMT
106
+ - Mon, 06 Apr 2015 15:01:23 GMT
107
107
  Set-Cookie:
108
- - BrowserId=rtKeh9fcSRKtYNUePpgWfw;Path=/;Domain=.salesforce.com;Expires=Mon,
109
- 25-May-2015 10:38:55 GMT
108
+ - BrowserId=_eUCOgR0Q0qTFj6plVjkFA;Path=/;Domain=.salesforce.com;Expires=Fri,
109
+ 05-Jun-2015 15:01:23 GMT
110
110
  Expires:
111
111
  - Thu, 01 Jan 1970 00:00:00 GMT
112
112
  Sforce-Limit-Info:
113
- - api-usage=55/15000
113
+ - api-usage=24/15000
114
114
  Content-Type:
115
115
  - application/json;charset=UTF-8
116
116
  Transfer-Encoding:
117
117
  - chunked
118
118
  body:
119
119
  encoding: ASCII-8BIT
120
- string: '{"totalSize":3,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001IjCFAA0"},"Id":"a001a000001IjCFAA0","SystemModstamp":"2015-03-24T08:25:04.000+0000","Name":"andrew@tablexi.com","Example_Field__c":null},{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001IjP2AAK"},"Id":"a001a000001IjP2AAK","SystemModstamp":"2015-03-24T08:27:33.000+0000","Name":"somebody+new@example.com","Example_Field__c":null},{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001J1BUAA0"},"Id":"a001a000001J1BUAA0","SystemModstamp":"2015-03-26T10:38:54.000+0000","Name":"Custom
121
- object","Example_Field__c":"Some sample text"}]}'
120
+ string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpiAAG"},"Id":"a001a000001LGpiAAG","SystemModstamp":"2015-04-06T15:01:21.000+0000","Name":"Sample
121
+ object","Example_Field__c":null}]}'
122
122
  http_version:
123
- recorded_at: Thu, 26 Mar 2015 10:38:55 GMT
123
+ recorded_at: Mon, 06 Apr 2015 15:01:23 GMT
124
124
  - request:
125
125
  method: delete
126
- uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001J1BUAA0
126
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LGpiAAG
127
127
  body:
128
128
  encoding: US-ASCII
129
129
  string: ''
@@ -131,7 +131,7 @@ http_interactions:
131
131
  User-Agent:
132
132
  - Faraday v0.9.1
133
133
  Authorization:
134
- - OAuth 00D1a000000H3O9!AQ4AQFqDs34WtnS6RDwxyGdLSPYE_cFTuNjjnDvX2HbNhGMu917m6JyqchGFbdiOruyd5Z.w7uN.ogsJF4_8TMMzdt2fw7OZ
134
+ - OAuth 00D1a000000H3O9!AQ4AQFhXX0t0My8qCHdrUMfRwg3B5FPFTjOwddPzvTaHu0t9H1xiDVKOSpDxKItHiqnvYyMKqZVwaC5AIJvYk_bzVt8m7Vil
135
135
  Accept-Encoding:
136
136
  - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
137
137
  Accept:
@@ -142,17 +142,17 @@ http_interactions:
142
142
  message: No Content
143
143
  headers:
144
144
  Date:
145
- - Thu, 26 Mar 2015 10:38:57 GMT
145
+ - Mon, 06 Apr 2015 15:01:24 GMT
146
146
  Set-Cookie:
147
- - BrowserId=PGwh31HXTN2JpmU15oP_dw;Path=/;Domain=.salesforce.com;Expires=Mon,
148
- 25-May-2015 10:38:57 GMT
147
+ - BrowserId=vXRooNVARU21TzA74Xl5eg;Path=/;Domain=.salesforce.com;Expires=Fri,
148
+ 05-Jun-2015 15:01:24 GMT
149
149
  Expires:
150
150
  - Thu, 01 Jan 1970 00:00:00 GMT
151
151
  Sforce-Limit-Info:
152
- - api-usage=55/15000
152
+ - api-usage=24/15000
153
153
  body:
154
154
  encoding: UTF-8
155
155
  string: ''
156
156
  http_version:
157
- recorded_at: Thu, 26 Mar 2015 10:39:00 GMT
157
+ recorded_at: Mon, 06 Apr 2015 15:01:24 GMT
158
158
  recorded_with: VCR 2.9.3
@@ -0,0 +1,194 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: post
5
+ uri: https://<host>/services/oauth2/token
6
+ body:
7
+ encoding: US-ASCII
8
+ string: grant_type=password&client_id=<client_id>&client_secret=<client_secret>&username=<username>&password=<password><security_token>
9
+ headers:
10
+ User-Agent:
11
+ - Faraday v0.9.1
12
+ Content-Type:
13
+ - application/x-www-form-urlencoded
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - "*/*"
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Date:
24
+ - Mon, 06 Apr 2015 19:27:38 GMT
25
+ Set-Cookie:
26
+ - BrowserId=LUqjfcxfRJyZBEi4RpKjng;Path=/;Domain=.salesforce.com;Expires=Fri,
27
+ 05-Jun-2015 19:27:38 GMT
28
+ Expires:
29
+ - Thu, 01 Jan 1970 00:00:00 GMT
30
+ Pragma:
31
+ - no-cache
32
+ Cache-Control:
33
+ - no-cache, no-store
34
+ Content-Type:
35
+ - application/json;charset=UTF-8
36
+ Transfer-Encoding:
37
+ - chunked
38
+ body:
39
+ encoding: ASCII-8BIT
40
+ string: '{"id":"https://login.salesforce.com/id/00D1a000000H3O9EAK/0051a000000UGT8AAO","issued_at":"1428348459031","token_type":"Bearer","instance_url":"https://<host>","signature":"epbxVf//yuoyezzkg/9e3hPpBbMrlVw7bI+oMbfRIdw=","access_token":"00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B"}'
41
+ http_version:
42
+ recorded_at: Mon, 06 Apr 2015 19:27:38 GMT
43
+ - request:
44
+ method: post
45
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c
46
+ body:
47
+ encoding: UTF-8
48
+ string: '{"Name":"Custom object","Example_Field__c":"Some sample text"}'
49
+ headers:
50
+ User-Agent:
51
+ - Faraday v0.9.1
52
+ Content-Type:
53
+ - application/json
54
+ Authorization:
55
+ - OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
56
+ Accept-Encoding:
57
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
58
+ Accept:
59
+ - "*/*"
60
+ response:
61
+ status:
62
+ code: 201
63
+ message: Created
64
+ headers:
65
+ Date:
66
+ - Mon, 06 Apr 2015 19:27:39 GMT
67
+ Set-Cookie:
68
+ - BrowserId=-62NedQVTxaHHEhk1U4w4w;Path=/;Domain=.salesforce.com;Expires=Fri,
69
+ 05-Jun-2015 19:27:39 GMT
70
+ Expires:
71
+ - Thu, 01 Jan 1970 00:00:00 GMT
72
+ Sforce-Limit-Info:
73
+ - api-usage=53/15000
74
+ Location:
75
+ - "/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG"
76
+ Content-Type:
77
+ - application/json;charset=UTF-8
78
+ Transfer-Encoding:
79
+ - chunked
80
+ body:
81
+ encoding: ASCII-8BIT
82
+ string: '{"id":"a001a000001LHpfAAG","success":true,"errors":[]}'
83
+ http_version:
84
+ recorded_at: Mon, 06 Apr 2015 19:27:39 GMT
85
+ - request:
86
+ method: get
87
+ uri: https://<host>/services/data/v26.0/query?q=select%20Id,%20SystemModstamp,%20Name,%20Example_Field__c%20from%20CustomObject__c%20where%20Id%20=%20%27a001a000001LHpfAAG%27
88
+ body:
89
+ encoding: US-ASCII
90
+ string: ''
91
+ headers:
92
+ User-Agent:
93
+ - Faraday v0.9.1
94
+ Authorization:
95
+ - OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
96
+ Accept-Encoding:
97
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
98
+ Accept:
99
+ - "*/*"
100
+ response:
101
+ status:
102
+ code: 200
103
+ message: OK
104
+ headers:
105
+ Date:
106
+ - Mon, 06 Apr 2015 19:27:40 GMT
107
+ Set-Cookie:
108
+ - BrowserId=KQ1mh36fQrC7w44C7ULJow;Path=/;Domain=.salesforce.com;Expires=Fri,
109
+ 05-Jun-2015 19:27:40 GMT
110
+ Expires:
111
+ - Thu, 01 Jan 1970 00:00:00 GMT
112
+ Sforce-Limit-Info:
113
+ - api-usage=54/15000
114
+ Content-Type:
115
+ - application/json;charset=UTF-8
116
+ Transfer-Encoding:
117
+ - chunked
118
+ body:
119
+ encoding: ASCII-8BIT
120
+ string: '{"totalSize":1,"done":true,"records":[{"attributes":{"type":"CustomObject__c","url":"/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG"},"Id":"a001a000001LHpfAAG","SystemModstamp":"2015-04-06T19:27:40.000+0000","Name":"Custom
121
+ object","Example_Field__c":"Some sample text"}]}'
122
+ http_version:
123
+ recorded_at: Mon, 06 Apr 2015 19:27:41 GMT
124
+ - request:
125
+ method: patch
126
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG
127
+ body:
128
+ encoding: UTF-8
129
+ string: '{"Name":"Some new name","Example_Field__c":"New sample text"}'
130
+ headers:
131
+ User-Agent:
132
+ - Faraday v0.9.1
133
+ Content-Type:
134
+ - application/json
135
+ Authorization:
136
+ - OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
137
+ Accept-Encoding:
138
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
139
+ Accept:
140
+ - "*/*"
141
+ response:
142
+ status:
143
+ code: 204
144
+ message: No Content
145
+ headers:
146
+ Date:
147
+ - Mon, 06 Apr 2015 19:27:42 GMT
148
+ Set-Cookie:
149
+ - BrowserId=k7CV_an-TPaQLzPu5_GIkQ;Path=/;Domain=.salesforce.com;Expires=Fri,
150
+ 05-Jun-2015 19:27:42 GMT
151
+ Expires:
152
+ - Thu, 01 Jan 1970 00:00:00 GMT
153
+ Sforce-Limit-Info:
154
+ - api-usage=54/15000
155
+ body:
156
+ encoding: UTF-8
157
+ string: ''
158
+ http_version:
159
+ recorded_at: Mon, 06 Apr 2015 19:27:42 GMT
160
+ - request:
161
+ method: delete
162
+ uri: https://<host>/services/data/v26.0/sobjects/CustomObject__c/a001a000001LHpfAAG
163
+ body:
164
+ encoding: US-ASCII
165
+ string: ''
166
+ headers:
167
+ User-Agent:
168
+ - Faraday v0.9.1
169
+ Authorization:
170
+ - OAuth 00D1a000000H3O9!AQ4AQEol4wrcAcAfVF3HH0vTJXCmqHaqBZX0.AfMcJFa2P3Ssl68tDLqC_BJKakn3tKiFCy4SzendJ0gWnbHWkqrzvFuNH6B
171
+ Accept-Encoding:
172
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
173
+ Accept:
174
+ - "*/*"
175
+ response:
176
+ status:
177
+ code: 204
178
+ message: No Content
179
+ headers:
180
+ Date:
181
+ - Mon, 06 Apr 2015 19:27:43 GMT
182
+ Set-Cookie:
183
+ - BrowserId=HeEi4Ul7SQ2h2IQOyYeSyA;Path=/;Domain=.salesforce.com;Expires=Fri,
184
+ 05-Jun-2015 19:27:43 GMT
185
+ Expires:
186
+ - Thu, 01 Jan 1970 00:00:00 GMT
187
+ Sforce-Limit-Info:
188
+ - api-usage=55/15000
189
+ body:
190
+ encoding: UTF-8
191
+ string: ''
192
+ http_version:
193
+ recorded_at: Mon, 06 Apr 2015 19:27:43 GMT
194
+ recorded_with: VCR 2.9.3