restforce 5.0.0 → 5.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
  SHA256:
3
- metadata.gz: c668433781a24af5211bf9c102e5601ef69919a856928fb4a876de43bb96fa14
4
- data.tar.gz: 5d5ee573dc491e1eb38703028d2c107d28a9fa2b37616f08e3004cc20c653868
3
+ metadata.gz: 30927d4c4482b918c5d7bce04db72c65a26dfeb6671c637310271beeead93efc
4
+ data.tar.gz: 6a3925cad38fcd9b17ed7989be9a18c9e371647d84f514b99acda6c3d3af3735
5
5
  SHA512:
6
- metadata.gz: f938c2e517cb05c33c4526c04c0384edaa70f39bed1a391a58032fb52574fd50c20fab21f859439957070506d4c03d84447134885e14d5ad59f3bff02f689545
7
- data.tar.gz: f2c466b8d4ae41bc6519dfaa27dbdbae2e302ad99c1ca52456f94bc391f243f99037bad48fc58533b83bb9cb146a30580e0cbe79a91cd9872e70fd0c9775865d
6
+ metadata.gz: e06ff037a4b28de59bbe136f4bf8498057069d295f3a0b61bbc2f4cee1014fe76eaa6c1877fdafc731a19712e00c3205049da0f87229bab2111a67f0fb3894cc
7
+ data.tar.gz: 9c96d213af65c81cf0f89f3583bf7faa7f39a3c71193b7412c836d80ce19149766dce3a966a00fa8cd067f773249a58a58dcfbf4b051b32d55bd30da22b9fd07
@@ -1,3 +1,11 @@
1
+ ## 5.0.1 (Aug 13, 2020)
2
+
3
+ * Handle the undocumented `API_CURRENTLY_DISABLED` error returned by Salesforce (@ruipserra, @timrogers)
4
+ * Handle the undocumented `MALFORMED_QUERY` error returned by Salesforce (@scottserok, @timrogers)
5
+ * Handle the undocumented `INVALID_QUERY_FILTER_OPERATOR` error returned by Salesforce (@Dantemss, @timrogers)
6
+ * Add documentation and scripts for running the
7
+ library's tests using Docker (@ryansch)
8
+
1
9
  ## 5.0.0 (Jul 10, 2020)
2
10
 
3
11
  For instructions on upgrading from Restforce 4.x to 5.x, see our ["Upgrading from Restforce 4.x to 5.x"](https://github.com/restforce/restforce/blob/master/UPGRADING.md) guide.
@@ -35,3 +35,23 @@ Some things that will increase the chance that your pull request is accepted:
35
35
  * Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
36
36
 
37
37
  *Adapted from [factory_bot_rails's CONTRIBUTING.md](https://github.com/thoughtbot/factory_bot_rails/blob/master/CONTRIBUTING.md).*
38
+
39
+ ## Docker
40
+
41
+ If you'd rather use a docker container to run the tests, you can use the following instructions.
42
+
43
+ To set up the container image:
44
+
45
+ `docker-compose build --pull`
46
+
47
+ To run specs:
48
+
49
+ `docker-compose run --rm restforce rspec`
50
+
51
+ To run rubocop:
52
+
53
+ `docker-compose run --rm restforce rubocop`
54
+
55
+ To reset the bundler cache:
56
+
57
+ `docker-compose down -v`
@@ -0,0 +1,31 @@
1
+ FROM ruby:2.6.5-alpine
2
+
3
+ RUN apk add --no-cache \
4
+ ca-certificates \
5
+ wget \
6
+ openssl \
7
+ bash \
8
+ build-base \
9
+ git \
10
+ sqlite-dev \
11
+ tzdata \
12
+ tini
13
+
14
+ ENV LANG en_US.UTF-8
15
+ ENV LANGUAGE en_US:en
16
+ ENV LC_ALL en_US.UTF-8
17
+
18
+ ENV BUNDLER_VERSION 2.1.4
19
+ RUN gem install bundler -v ${BUNDLER_VERSION} -i /usr/local/lib/ruby/gems/$(ls /usr/local/lib/ruby/gems) --force
20
+
21
+ WORKDIR /srv
22
+
23
+ COPY Gemfile restforce.gemspec /srv/
24
+ COPY lib/restforce/version.rb /srv/lib/restforce/version.rb
25
+
26
+ RUN bundle install
27
+
28
+ COPY . /srv/
29
+
30
+ ENTRYPOINT ["/sbin/tini", "-g", "--", "bundle", "exec"]
31
+ CMD ["rspec"]
data/README.md CHANGED
@@ -25,7 +25,7 @@ Features include:
25
25
 
26
26
  Add this line to your application's Gemfile:
27
27
 
28
- gem 'restforce', '~> 5.0.0'
28
+ gem 'restforce', '~> 5.0.1'
29
29
 
30
30
  And then execute:
31
31
 
@@ -333,8 +333,11 @@ client.update('Account', Id: '0016000000MRatd', Name: 'Whizbang Corp')
333
333
  ```ruby
334
334
  # Update the record with external `External__c` external ID set to '12'
335
335
  client.upsert('Account', 'External__c', External__c: 12, Name: 'Foobar')
336
+ # => true or "RecordId"
336
337
  ```
337
338
 
339
+ The upsert method will return the record Id if included in the response body from the Salesforce API; otherwise, it returns true. Currently the Salesforce API only returns the Id for newly created records.
340
+
338
341
  ### destroy
339
342
 
340
343
  ```ruby
@@ -0,0 +1,7 @@
1
+ version: "3.6"
2
+ services:
3
+ restforce:
4
+ build: .
5
+ image: restforce:dev
6
+ volumes:
7
+ - .:/srv
@@ -15,6 +15,7 @@ module Restforce
15
15
  # at least a semi-graceful manner.
16
16
  class AllOrNoneOperationRolledBack < ResponseError; end
17
17
  class AlreadyInProcess < ResponseError; end
18
+ class ApiCurrentlyDisabled < ResponseError; end
18
19
  class AssigneeTypeRequired < ResponseError; end
19
20
  class BadCustomEntityParentDomain < ResponseError; end
20
21
  class BccNotAllowedIfBccComplianceEnabled < ResponseError; end
@@ -111,6 +112,7 @@ module Restforce
111
112
  class InvalidOperation < ResponseError; end
112
113
  class InvalidOperator < ResponseError; end
113
114
  class InvalidOrNullForRestrictedPicklist < ResponseError; end
115
+ class InvalidQueryFilterOperator < ResponseError; end
114
116
  class InvalidPartnerNetworkStatus < ResponseError; end
115
117
  class InvalidPersonAccountOperation < ResponseError; end
116
118
  class InvalidReadOnlyUserDml < ResponseError; end
@@ -129,6 +131,7 @@ module Restforce
129
131
  class LoginChallengePending < ResponseError; end
130
132
  class LoginMustUseSecurityToken < ResponseError; end
131
133
  class MalformedId < ResponseError; end
134
+ class MalformedQuery < ResponseError; end
132
135
  class ManagerNotDefined < ResponseError; end
133
136
  class MassmailRetryLimitExceeded < ResponseError; end
134
137
  class MassMailLimitExceeded < ResponseError; end
@@ -195,6 +198,7 @@ module Restforce
195
198
  ERROR_EXCEPTION_CLASSES = {
196
199
  "ALL_OR_NONE_OPERATION_ROLLED_BACK" => AllOrNoneOperationRolledBack,
197
200
  "ALREADY_IN_PROCESS" => AlreadyInProcess,
201
+ "API_CURRENTLY_DISABLED" => ApiCurrentlyDisabled,
198
202
  "ASSIGNEE_TYPE_REQUIRED" => AssigneeTypeRequired,
199
203
  "BAD_CUSTOM_ENTITY_PARENT_DOMAIN" => BadCustomEntityParentDomain,
200
204
  "BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED" =>
@@ -300,6 +304,7 @@ module Restforce
300
304
  "INVALID_OPERATOR" => InvalidOperator,
301
305
  "INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST" =>
302
306
  InvalidOrNullForRestrictedPicklist,
307
+ "INVALID_QUERY_FILTER_OPERATOR" => InvalidQueryFilterOperator,
303
308
  "INVALID_PARTNER_NETWORK_STATUS" => InvalidPartnerNetworkStatus,
304
309
  "INVALID_PERSON_ACCOUNT_OPERATION" => InvalidPersonAccountOperation,
305
310
  "INVALID_READ_ONLY_USER_DML" => InvalidReadOnlyUserDml,
@@ -318,6 +323,7 @@ module Restforce
318
323
  "LOGIN_CHALLENGE_PENDING" => LoginChallengePending,
319
324
  "LOGIN_MUST_USE_SECURITY_TOKEN" => LoginMustUseSecurityToken,
320
325
  "MALFORMED_ID" => MalformedId,
326
+ "MALFORMED_QUERY" => MalformedQuery,
321
327
  "MANAGER_NOT_DEFINED" => ManagerNotDefined,
322
328
  "MASSMAIL_RETRY_LIMIT_EXCEEDED" => MassmailRetryLimitExceeded,
323
329
  "MASS_MAIL_LIMIT_EXCEEDED" => MassMailLimitExceeded,
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '5.0.0'
4
+ VERSION = '5.0.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restforce
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.0
4
+ version: 5.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Rogers
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2020-07-10 00:00:00.000000000 Z
12
+ date: 2020-08-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -185,12 +185,14 @@ files:
185
185
  - CHANGELOG.md
186
186
  - CODE_OF_CONDUCT.md
187
187
  - CONTRIBUTING.md
188
+ - Dockerfile
188
189
  - Gemfile
189
190
  - Guardfile
190
191
  - LICENSE
191
192
  - README.md
192
193
  - Rakefile
193
194
  - UPGRADING.md
195
+ - docker-compose.yml
194
196
  - lib/restforce.rb
195
197
  - lib/restforce/abstract_client.rb
196
198
  - lib/restforce/attachment.rb