restforce 6.2.3 → 7.0.0

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: fb14e30b8ad47c0d7fd1090e75181ebf8c47a01ae5d59ec574cb4d00842288ad
4
- data.tar.gz: 69e1bbb2a318dd71b20c38a23aef43f94e29285a6a9d979aca97b16a30c85afb
3
+ metadata.gz: 6a22215414b1c1ee4264e25ab13469d1e19b1ec88263ec118b8dc1937a5867d7
4
+ data.tar.gz: 78fbdda639da07c4f4bdb48656a55a068e6a91d9f17a938d909fb27e747b1840
5
5
  SHA512:
6
- metadata.gz: a15b13f4cb356c77aa571e9421bad05cb8056ed807df0ae746f81fa58c310869dd61c439b20808214e52500c4fa0be2ba754103a3d16fda710de3497995c51ac
7
- data.tar.gz: 46ffc1a1e53a30c578c28895f401b6dcdc3c2b9846293c452c2d4c7f5a8aee838ca04d6d7bd9b159a69f399ef4c8cc9e75988e5ea39d9926f5ef5f0b92f1991a
6
+ metadata.gz: d3e16bc52f787d054849826bacbc6a9f9fcd839847d3afdad7ef889b1f8211179238cba65bf3de1903e4e94d62d88de6be223139a4e40eca60ba8f543b64d945
7
+ data.tar.gz: 1daae50110e5848ff47ba97fa3ddc36418fab74f4cd10a7f3643c487397cd64681b091efabf037dcd026f2679a9ce91a5df36d5f88545804ba58a5394cce8090
@@ -6,10 +6,10 @@ jobs:
6
6
  strategy:
7
7
  fail-fast: false
8
8
  matrix:
9
- ruby_version: ['2.7', '3.0', '3.1', '3.2']
9
+ ruby_version: ['3.0', '3.1', '3.2']
10
10
  steps:
11
11
  - name: Checkout code
12
- uses: actions/checkout@v3
12
+ uses: actions/checkout@v4
13
13
  - name: Setup Ruby ${{ matrix.ruby_version }}
14
14
  uses: ruby/setup-ruby@v1
15
15
  with:
@@ -10,12 +10,12 @@ jobs:
10
10
  # For v2.0.x, we test v2.0.0 and v2.0.1 because v2.0.0 has a special behaviour where
11
11
  # the Net::HTTP adapter is not included. See
12
12
  # https://github.com/lostisland/faraday/blob/main/UPGRADING.md#faraday-20.
13
- faraday_version: ['1.1.0', '1.2.0', '1.3.1', '1.4.3', '1.5.1', '1.6.0', '1.7.2', '1.8.0', '1.9.3', '1.10.3', '2.0.0', '2.0.1', '2.1.0', '2.2.0', '2.3.0', '2.4.0', '2.5.2', '2.6.0', '2.7.4']
13
+ faraday_version: ['1.1.0', '1.2.0', '1.3.1', '1.4.3', '1.5.1', '1.6.0', '1.7.2', '1.8.0', '1.9.3', '1.10.3', '2.0.0', '2.0.1', '2.1.0', '2.2.0', '2.3.0', '2.4.0', '2.5.2', '2.6.0', '2.7.11']
14
14
  env:
15
15
  FARADAY_VERSION: ~> ${{ matrix.faraday_version }}
16
16
  steps:
17
17
  - name: Checkout code
18
- uses: actions/checkout@v3
18
+ uses: actions/checkout@v4
19
19
  - name: Setup Ruby ${{ matrix.ruby_version }}
20
20
  uses: ruby/setup-ruby@v1
21
21
  with:
data/.rubocop.yml CHANGED
@@ -8,7 +8,7 @@ AllCops:
8
8
  - .*/**/*
9
9
  - vendor/**/*
10
10
  NewCops: enable
11
- TargetRubyVersion: 2.7
11
+ TargetRubyVersion: 3.0
12
12
 
13
13
  # Limit lines to 90 characters.
14
14
  Layout/LineLength:
data/CHANGELOG.md CHANGED
@@ -1,3 +1,13 @@
1
+ # 7.0.0 (Oct 6, 2023)
2
+
3
+ __This version contains breaking changes. For help with upgrading, see [`UPGRADING.md`](https://github.com/restforce/restforce/blob/main/UPGRADING.md).__
4
+
5
+ * __⚠️ Drop support for Ruby 2.7__, since [Ruby 2.7 has reached its end-of-life](https://www.ruby-lang.org/en/downloads/) (@timrogers)
6
+
7
+ # 6.2.4 (Oct 6, 2023)
8
+
9
+ * Register the custom JSON middleware for Faraday with a more unique name to avoid clashes with other middleware (@dbackeus)
10
+
1
11
  # 6.2.3 (Jun 18 2023)
2
12
 
3
13
  * Handle the `CANNOT_DELETE_OWNER`, `CANNOT_POST_TO_ARCHIVED_GROUP`, `INVALID_INPUT`, `INVALID_MARKUP` and `INVALID_SEARCH` errors returned by the Salesforce API (@spurton)
data/Gemfile CHANGED
@@ -17,6 +17,6 @@ gem 'rspec', '~> 3.12.0'
17
17
  gem 'rspec-collection_matchers', '~> 1.2.0'
18
18
  gem 'rspec-its', '~> 1.3.0'
19
19
  gem 'rspec_junit_formatter', '~> 0.6.0'
20
- gem 'rubocop', '~> 1.52.1'
20
+ gem 'rubocop', '~> 1.56.3'
21
21
  gem 'simplecov', '~> 0.22.0'
22
- gem 'webmock', '~> 3.18.1'
22
+ gem 'webmock', '~> 3.19.1'
data/README.md CHANGED
@@ -27,7 +27,7 @@ Features include:
27
27
 
28
28
  Add this line to your application's Gemfile:
29
29
 
30
- gem 'restforce', '~> 6.2.3'
30
+ gem 'restforce', '~> 7.0.0'
31
31
 
32
32
  And then execute:
33
33
 
@@ -37,8 +37,9 @@ Or install it yourself as:
37
37
 
38
38
  $ gem install restforce
39
39
 
40
- __As of version 6.0.0, this gem is only compatible with Ruby 2.7.0 and later.__ If you're using an earlier Ruby version:
40
+ __As of version 7.0.0, this gem is only compatible with Ruby 3.0.0 and later.__ If you're using an earlier Ruby version:
41
41
 
42
+ * for Ruby 2.7, use version 6.2.4 or earlier
42
43
  * for Ruby 2.6, use version 5.3.1 or earlier
43
44
  * for Ruby 2.5, use version 5.0.6 or earlier
44
45
  * for Ruby 2.4, use version 4.3.0 or earlier
@@ -831,13 +832,6 @@ client.create!("CustomField", {
831
832
  })
832
833
  ```
833
834
 
834
- ## Links
835
-
836
- If you need a full Active Record experience, may be you can use
837
- [ActiveForce](https://github.com/ionia-corporation/active_force) that wraps
838
- Restforce and adds Associations, Query Building (like AREL), Validations and
839
- Callbacks.
840
-
841
835
  ## Contributing
842
836
 
843
837
  We welcome all contributions - they help us make Restforce the best gem possible.
data/UPGRADING.md CHANGED
@@ -1,3 +1,15 @@
1
+ # Upgrading from Restforce 6.x to 7.x
2
+
3
+ ## Ruby 2.7 is no longer supported
4
+
5
+ __Likelyhood of impact__: Moderate
6
+
7
+ Ruby 2.7 is no longer officially supported as an active version of the Ruby language. That means that it will not receive patches and security fixes.
8
+
9
+ Accordingly, we've dropped support for Ruby 2.7 in the Restforce library. The gemspec now specifies that only 3.0 onwards is supported, and this will be enforced by RubyGems.
10
+
11
+ Before you update to Restforce 7.x, you'll need to switch to Ruby 3.0.0 or later. The current version of Ruby at the time of writing is 3.2.2.
12
+
1
13
  # Upgrading from Restforce 5.x to 6.x
2
14
 
3
15
  __There are two breaking changes introduced in Restforce 6.x__. In this guide, you'll learn about these changes and what you should check in your code to make sure that it will work with the latest version of the library.
@@ -33,7 +33,7 @@ module Restforce
33
33
  # Handles multipart file uploads for blobs.
34
34
  builder.use Restforce::Middleware::Multipart
35
35
  # Converts the request into JSON.
36
- builder.request :json
36
+ builder.request :restforce_json
37
37
  # Handles reauthentication for 403 responses.
38
38
  if authentication_middleware
39
39
  builder.use authentication_middleware, self, options
@@ -52,7 +52,7 @@ module Restforce
52
52
  # Raises errors for 40x responses.
53
53
  builder.use Restforce::Middleware::RaiseError
54
54
  # Parses returned JSON response into a hash.
55
- builder.response :json, content_type: /\bjson$/
55
+ builder.response :restforce_json, content_type: /\bjson$/
56
56
  # Compress/Decompress the request/response
57
57
  unless adapter == :httpclient
58
58
  builder.use Restforce::Middleware::Gzip, self, options
@@ -50,7 +50,7 @@ module Restforce
50
50
  builder.use Faraday::Request::UrlEncoded
51
51
  builder.use Restforce::Middleware::Mashify, nil, @options
52
52
  builder.use Faraday::FollowRedirects::Middleware
53
- builder.response :json
53
+ builder.response :restforce_json
54
54
 
55
55
  if Restforce.log?
56
56
  builder.use Restforce::Middleware::Logger,
@@ -31,7 +31,7 @@ module Restforce
31
31
  CONTENT_TYPE = 'Content-Type'
32
32
 
33
33
  MIME_TYPE = 'application/json'
34
- MIME_TYPE_REGEX = %r{^application/(vnd\..+\+)?json$}.freeze
34
+ MIME_TYPE_REGEX = %r{^application/(vnd\..+\+)?json$}
35
35
 
36
36
  #
37
37
  # Taken from `lib/faraday/middleware.rb` in the `faraday`
@@ -87,4 +87,4 @@ module Restforce
87
87
  end
88
88
  end
89
89
 
90
- Faraday::Request.register_middleware(json: Restforce::Middleware::JsonRequest)
90
+ Faraday::Request.register_middleware(restforce_json: Restforce::Middleware::JsonRequest)
@@ -82,4 +82,4 @@ module Restforce
82
82
  end
83
83
  end
84
84
 
85
- Faraday::Response.register_middleware(json: Restforce::Middleware::JsonResponse)
85
+ Faraday::Response.register_middleware(restforce_json: Restforce::Middleware::JsonResponse)
@@ -60,7 +60,7 @@ module Restforce
60
60
  }
61
61
  end
62
62
 
63
- ERROR_CODE_MATCHER = /\A[A-Z_]+\z/.freeze
63
+ ERROR_CODE_MATCHER = /\A[A-Z_]+\z/
64
64
 
65
65
  def exception_class_for_error_code(error_code)
66
66
  return Restforce::ResponseError unless ERROR_CODE_MATCHER.match?(error_code)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Restforce
4
- VERSION = '6.2.3'
4
+ VERSION = '7.0.0'
5
5
  end
data/restforce.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |gem|
22
22
  'rubygems_mfa_required' => 'true'
23
23
  }
24
24
 
25
- gem.required_ruby_version = '>= 2.7'
25
+ gem.required_ruby_version = '>= 3.0'
26
26
 
27
27
  gem.add_dependency 'faraday', '< 2.8.0', '>= 1.1.0'
28
28
  gem.add_dependency 'faraday-follow_redirects', '<= 0.3.0', '< 1.0.0'
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: 6.2.3
4
+ version: 7.0.0
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: 2023-06-18 00:00:00.000000000 Z
12
+ date: 2023-10-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: faraday
@@ -286,14 +286,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
286
286
  requirements:
287
287
  - - ">="
288
288
  - !ruby/object:Gem::Version
289
- version: '2.7'
289
+ version: '3.0'
290
290
  required_rubygems_version: !ruby/object:Gem::Requirement
291
291
  requirements:
292
292
  - - ">="
293
293
  - !ruby/object:Gem::Version
294
294
  version: '0'
295
295
  requirements: []
296
- rubygems_version: 3.4.7
296
+ rubygems_version: 3.4.20
297
297
  signing_key:
298
298
  specification_version: 4
299
299
  summary: A lightweight Ruby client for the Salesforce REST API