restforce 5.0.5 → 5.0.6

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: 38acae68870155f93e38df159915fc242a663d02a4dbb252bb294c51763842e5
4
- data.tar.gz: eeae1f3c32d469a435121baa0c9857b222cffea7055b4b3b50c84854191a5950
3
+ metadata.gz: 6644bf699621fb5414dce1dce275e5a265fca50305bcfca98864b6c1683f1687
4
+ data.tar.gz: 5ef0177a3a91dbe1637fc493b7f0bc478fca34c49e392abb1eccdf8bf951aa66
5
5
  SHA512:
6
- metadata.gz: e75731e44bfb826364edd12410a159d59a20c16865c4e6134736ec0ca83b06266cf8f5455772c92628fd092be94e4efb042951bbd6456865fc24d8cd2f7e3b80
7
- data.tar.gz: af8a20544ea4f628a162d8038b8515ca2bd0333bd92f3796cbd19fcd713abfa46043395ee56a858ab5f2568b85e1961097269ac56fc29417633ead0dcbcd46f8
6
+ metadata.gz: 7c7d3e8b58743f8d4ae6ae9255c2d89cc78b06a5e963350784ff3c884396bf1ef03fb986f2aba7bd231d8ae9af2f0b2af78a77c98fcb62356ac09b1411753e13
7
+ data.tar.gz: 5c8bb85fdcd28e5eba8d0939ef1868d42b99d079cddd056941ec7c4cf591d3789caa2b569cafeb8415a89755e567de1a93486dc9c18c5507275adad5631374cc
@@ -0,0 +1,19 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ open-pull-requests-limit: 10
8
+ ignore:
9
+ - dependency-name: rubocop
10
+ versions:
11
+ - 1.10.0
12
+ - 1.11.0
13
+ - 1.12.0
14
+ - 1.12.1
15
+ - 1.9.0
16
+ - dependency-name: webmock
17
+ versions:
18
+ - 3.12.0
19
+ - 3.12.1
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## 5.0.6 (Jun 17, 2021)
2
+
3
+ * Handle the `API_DISABLED_FOR_ORG` error returned by Salesforce (@cmac)
4
+ * Handle the `METHOD_NOT_ALLOWED` error returned by Salesforce (@timrogers)
5
+ * Handle the `APEX_ERROR` error returned by Salesforce (@timrogers)
6
+
1
7
  ## 5.0.5 (Feb 17, 2021)
2
8
 
3
9
  * Handle the `CANNOT_EXECUTE_FLOW_TRIGGER` error returned by Salesforce (@almusavi, @timrogers)
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.5'
28
+ gem 'restforce', '~> 5.0.6'
29
29
 
30
30
  And then execute:
31
31
 
@@ -61,9 +61,9 @@ module Restforce
61
61
  def initialize(opts = {})
62
62
  raise ArgumentError, 'Please specify a hash of options' unless opts.is_a?(Hash)
63
63
 
64
- @options = Hash[Restforce.configuration.options.map do |option|
64
+ @options = Restforce.configuration.options.map do |option|
65
65
  [option, Restforce.configuration.send(option)]
66
- end]
66
+ end.to_h
67
67
 
68
68
  @options.merge! opts
69
69
  yield builder if block_given?
@@ -17,8 +17,12 @@ module Restforce
17
17
 
18
18
  class AlreadyInProcess < ResponseError; end
19
19
 
20
+ class ApexError < ResponseError; end
21
+
20
22
  class ApiCurrentlyDisabled < ResponseError; end
21
23
 
24
+ class ApiDisabledForOrg < ResponseError; end
25
+
22
26
  class AssigneeTypeRequired < ResponseError; end
23
27
 
24
28
  class BadCustomEntityParentDomain < ResponseError; end
@@ -303,6 +307,8 @@ module Restforce
303
307
 
304
308
  class MergeFailed < ResponseError; end
305
309
 
310
+ class MethodNotAllowed < ResponseError; end
311
+
306
312
  class MissingArgument < ResponseError; end
307
313
 
308
314
  class NonuniqueShippingAddress < ResponseError; end
@@ -396,7 +402,9 @@ module Restforce
396
402
  ERROR_EXCEPTION_CLASSES = {
397
403
  "ALL_OR_NONE_OPERATION_ROLLED_BACK" => AllOrNoneOperationRolledBack,
398
404
  "ALREADY_IN_PROCESS" => AlreadyInProcess,
405
+ "APEX_ERROR" => ApexError,
399
406
  "API_CURRENTLY_DISABLED" => ApiCurrentlyDisabled,
407
+ "API_DISABLED_FOR_ORG" => ApiDisabledForOrg,
400
408
  "ASSIGNEE_TYPE_REQUIRED" => AssigneeTypeRequired,
401
409
  "BAD_CUSTOM_ENTITY_PARENT_DOMAIN" => BadCustomEntityParentDomain,
402
410
  "BCC_NOT_ALLOWED_IF_BCC_COMPLIANCE_ENABLED" =>
@@ -548,6 +556,7 @@ module Restforce
548
556
  "MAX_TM_RULES_EXCEEDED" => MaxTmRulesExceeded,
549
557
  "MAX_TM_RULE_ITEMS_EXCEEDED" => MaxTmRuleItemsExceeded,
550
558
  "MERGE_FAILED" => MergeFailed,
559
+ "METHOD_NOT_ALLOWED" => MethodNotAllowed,
551
560
  "MISSING_ARGUMENT" => MissingArgument,
552
561
  "NONUNIQUE_SHIPPING_ADDRESS" => NonuniqueShippingAddress,
553
562
  "NO_APPLICABLE_PROCESS" => NoApplicableProcess,
@@ -20,9 +20,9 @@ module Restforce
20
20
  def call(env)
21
21
  debug('request') do
22
22
  dump url: env[:url].to_s,
23
- method: env[:method],
24
- headers: env[:request_headers],
25
- body: env[:body]
23
+ method: env[:method],
24
+ headers: env[:request_headers],
25
+ body: env[:body]
26
26
  end
27
27
  super
28
28
  end
@@ -30,8 +30,8 @@ module Restforce
30
30
  def on_complete(env)
31
31
  debug('response') do
32
32
  dump status: env[:status].to_s,
33
- headers: env[:response_headers],
34
- body: env[:body]
33
+ headers: env[:response_headers],
34
+ body: env[:body]
35
35
  end
36
36
  end
37
37
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '5.0.5'
4
+ VERSION = '5.0.6'
5
5
  end
data/restforce.gemspec CHANGED
@@ -35,7 +35,7 @@ Gem::Specification.new do |gem|
35
35
  gem.add_development_dependency 'rspec', '~> 2.14.0'
36
36
  gem.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
37
37
 
38
- gem.add_development_dependency 'rubocop', '~> 1.9.1'
38
+ gem.add_development_dependency 'rubocop', '~> 1.17.0'
39
39
  gem.add_development_dependency 'simplecov', '~> 0.21.2'
40
- gem.add_development_dependency 'webmock', '~> 3.11.1'
40
+ gem.add_development_dependency 'webmock', '~> 3.13.0'
41
41
  end
@@ -437,11 +437,11 @@ shared_examples_for Restforce::AbstractClient do
437
437
  @query = stub_api_request('query\?q=SELECT%20some,%20fields%20FROM%20object').
438
438
  with(headers: { 'Authorization' => "OAuth #{oauth_token}" }).
439
439
  to_return(status: 401,
440
- body: fixture('expired_session_response'),
441
- headers: { 'Content-Type' => 'application/json' }).then.
440
+ body: fixture('expired_session_response'),
441
+ headers: { 'Content-Type' => 'application/json' }).then.
442
442
  to_return(status: 200,
443
- body: fixture('sobject/query_success_response'),
444
- headers: { 'Content-Type' => 'application/json' })
443
+ body: fixture('sobject/query_success_response'),
444
+ headers: { 'Content-Type' => 'application/json' })
445
445
 
446
446
  @login = stub_login_request(
447
447
  with_body: "grant_type=password&client_id=client_id&client_secret=" \
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.5
4
+ version: 5.0.6
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: 2021-02-17 00:00:00.000000000 Z
12
+ date: 2021-06-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -133,14 +133,14 @@ dependencies:
133
133
  requirements:
134
134
  - - "~>"
135
135
  - !ruby/object:Gem::Version
136
- version: 1.9.1
136
+ version: 1.17.0
137
137
  type: :development
138
138
  prerelease: false
139
139
  version_requirements: !ruby/object:Gem::Requirement
140
140
  requirements:
141
141
  - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: 1.9.1
143
+ version: 1.17.0
144
144
  - !ruby/object:Gem::Dependency
145
145
  name: simplecov
146
146
  requirement: !ruby/object:Gem::Requirement
@@ -161,14 +161,14 @@ dependencies:
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: 3.11.1
164
+ version: 3.13.0
165
165
  type: :development
166
166
  prerelease: false
167
167
  version_requirements: !ruby/object:Gem::Requirement
168
168
  requirements:
169
169
  - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: 3.11.1
171
+ version: 3.13.0
172
172
  description: A lightweight Ruby client for the Salesforce REST API
173
173
  email:
174
174
  - me@timrogers.co.uk
@@ -179,6 +179,7 @@ extra_rdoc_files: []
179
179
  files:
180
180
  - ".circleci/config.yml"
181
181
  - ".github/ISSUE_TEMPLATE/unhandled-salesforce-error.md"
182
+ - ".github/dependabot.yml"
182
183
  - ".gitignore"
183
184
  - ".rubocop.yml"
184
185
  - ".rubocop_todo.yml"