gocardless_pro 2.21.0 → 2.22.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c285e5a1284e099a2840ea4dfb7a8282a73a38aa0def7e81f522654b4be5922
4
- data.tar.gz: 0443f073f12c0c6d69029a4a79d28634978274e73b6d1bc0a1517066c44b66e8
3
+ metadata.gz: 3bb8531d374a6fe482eaaccbc49cd9cbf1575f880cb9633c0b0848ca09157b76
4
+ data.tar.gz: 24e1f269a875c46dd8a2165f856ba18a4acea648aed82a600de26425bb32bd3d
5
5
  SHA512:
6
- metadata.gz: bf2401b3823b41bd1d562a80f0e7a8b0847a86f04e1ec29ad2e55b3caf814e39ea379f0686c6108b91de81701b8cebc697e0bd1f7cd4741c44176785c01bcc27
7
- data.tar.gz: f8aa9bd7ff1c8f969d54ae654b324395572459ec065e603601dbe5eb9a38ec61852724820dc8423bc7407e47004434dcee4b880b3a4d2678086b0f0729dece07
6
+ metadata.gz: b93423658f351048e9dd31cb216a86d2c389638d2079647457f68a521eaa4f749844c199cc2cfbb44904dcc18ed9608f94698d1e2e3201341e833714c8a6e6bc
7
+ data.tar.gz: a2836a224de279066f96d8fa28238368271cbfe967bda9015655ce68cca8262466821d6a923b87db2a050f85e99f14758de9c8214f61fd0089ae127a0cb229d2
@@ -1,50 +1,32 @@
1
- version: 2
2
- references:
3
- test_library: &test_library
1
+ version: 2.1
2
+
3
+ jobs:
4
+ test: &test
4
5
  parallelism: 1
6
+ parameters:
7
+ faraday-version: { type: string }
8
+ ruby-version: { type: string }
9
+ docker:
10
+ - image: ruby:<<parameters.ruby-version>>
11
+ environment:
12
+ - FARADAY_VERSION=<<parameters.faraday-version>>
5
13
  steps:
6
14
  - checkout
7
- - run: |
8
- bundle install
9
- bundle exec rspec
10
- jobs:
11
- test_ruby_2_5:
12
- <<: *test_library
13
- docker:
14
- - image: ruby:2.5
15
-
16
- test_ruby_2_4:
17
- <<: *test_library
18
- docker:
19
- - image: ruby:2.4
20
-
21
- test_ruby_2_3:
22
- <<: *test_library
23
- docker:
24
- - image: ruby:2.3
25
-
26
- test_ruby_2_2:
27
- <<: *test_library
28
- docker:
29
- - image: ruby:2.2
30
-
31
- test_ruby_2_1:
32
- <<: *test_library
33
- docker:
34
- - image: ruby:2.1
35
-
36
- test_ruby_2_0:
37
- <<: *test_library
38
- docker:
39
- - image: ruby:2.0
15
+ - run: bundle install && bundle exec rspec
40
16
 
41
17
  workflows:
42
18
  version: 2
43
- build:
19
+ tests:
44
20
  jobs:
45
- - test_ruby_2_5
46
- - test_ruby_2_4
47
- - test_ruby_2_3
48
- - test_ruby_2_2
49
- - test_ruby_2_1
50
- - test_ruby_2_0
21
+ - test:
22
+ matrix:
23
+ parameters:
24
+ faraday-version: ["0.9.2", "1.0"]
25
+ ruby-version: ["2.0", "2.1", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7"]
26
+ exclude:
27
+ - faraday-version: "1.0"
28
+ ruby-version: "2.0"
29
+ - faraday-version: "1.0"
30
+ ruby-version: "2.1"
31
+ - faraday-version: "1.0"
32
+ ruby-version: "2.2"
data/Gemfile CHANGED
@@ -1,2 +1,9 @@
1
1
  source 'https://rubygems.org'
2
2
  gemspec
3
+
4
+ # We support both pre-1.x and post-1.x Faraday versions, but to ensure compatibility we
5
+ # pin this gem against each in separate runs of CI, using the FARADAY_VERSION env var. For
6
+ # more details on the values, see .circleci/config.yml.
7
+ if ENV.key?("FARADAY_VERSION")
8
+ gem 'faraday', "~> #{ENV["FARADAY_VERSION"]}"
9
+ end
@@ -17,10 +17,10 @@ Gem::Specification.new do |spec|
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
18
  spec.require_paths = ['lib']
19
19
 
20
- spec.add_dependency 'faraday', ['>= 0.9.2', '< 1.0']
20
+ spec.add_dependency 'faraday', ['>= 0.9.2', '< 2']
21
21
 
22
22
  spec.add_development_dependency 'rspec', '~> 3.7.0'
23
- spec.add_development_dependency 'webmock', '~> 1.18'
23
+ spec.add_development_dependency 'webmock', '~> 3.8.3'
24
24
  spec.add_development_dependency 'rubocop', '~> 0.49.1'
25
25
  spec.add_development_dependency 'yard', '~> 0.9.11'
26
26
 
@@ -23,7 +23,7 @@ module GoCardlessPro
23
23
  @url = url
24
24
  root_url, @path_prefix = unpack_url(url)
25
25
  http_adapter = options[:http_adapter] || [:net_http]
26
- connection_options = options[:connection_options]
26
+ connection_options = options.fetch(:connection_options, {})
27
27
 
28
28
  @connection = Faraday.new(root_url, connection_options) do |faraday|
29
29
  faraday.response :raise_gocardless_errors
@@ -148,7 +148,7 @@ module GoCardlessPro
148
148
  'User-Agent' => user_agent.to_s,
149
149
  'Content-Type' => 'application/json',
150
150
  'GoCardless-Client-Library' => 'gocardless-pro-ruby',
151
- 'GoCardless-Client-Version' => '2.21.0',
151
+ 'GoCardless-Client-Version' => '2.22.0',
152
152
  },
153
153
  }
154
154
  end
@@ -4,5 +4,5 @@ end
4
4
 
5
5
  module GoCardlessPro
6
6
  # Current version of the GC gem
7
- VERSION = '2.21.0'.freeze
7
+ VERSION = '2.22.0'.freeze
8
8
  end
@@ -692,7 +692,7 @@ describe GoCardlessPro::Services::CreditorBankAccountsService do
692
692
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
693
693
  to_timeout
694
694
 
695
- expect { post_response }.to raise_error(Faraday::TimeoutError)
695
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
696
696
  expect(stub).to have_been_requested
697
697
  end
698
698
  end
@@ -754,7 +754,7 @@ describe GoCardlessPro::Services::CustomerBankAccountsService do
754
754
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
755
755
  to_timeout
756
756
 
757
- expect { post_response }.to raise_error(Faraday::TimeoutError)
757
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
758
758
  expect(stub).to have_been_requested
759
759
  end
760
760
  end
@@ -45,7 +45,7 @@ describe GoCardlessPro::Services::CustomerNotificationsService do
45
45
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
46
46
  to_timeout
47
47
 
48
- expect { post_response }.to raise_error(Faraday::TimeoutError)
48
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
49
49
  expect(stub).to have_been_requested
50
50
  end
51
51
  end
@@ -882,7 +882,7 @@ describe GoCardlessPro::Services::CustomersService do
882
882
  stub = stub_request(:delete, /.*api.gocardless.com#{stub_url}/).
883
883
  to_timeout
884
884
 
885
- expect { delete_response }.to raise_error(Faraday::TimeoutError)
885
+ expect { delete_response }.to raise_error(Faraday::ConnectionFailed)
886
886
  expect(stub).to have_been_requested
887
887
  end
888
888
  end
@@ -927,7 +927,7 @@ describe GoCardlessPro::Services::InstalmentSchedulesService do
927
927
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
928
928
  to_timeout
929
929
 
930
- expect { post_response }.to raise_error(Faraday::TimeoutError)
930
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
931
931
  expect(stub).to have_been_requested
932
932
  end
933
933
  end
@@ -363,7 +363,7 @@ describe GoCardlessPro::Services::MandateImportsService do
363
363
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
364
364
  to_timeout
365
365
 
366
- expect { post_response }.to raise_error(Faraday::TimeoutError)
366
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
367
367
  expect(stub).to have_been_requested
368
368
  end
369
369
  end
@@ -432,7 +432,7 @@ describe GoCardlessPro::Services::MandateImportsService do
432
432
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
433
433
  to_timeout
434
434
 
435
- expect { post_response }.to raise_error(Faraday::TimeoutError)
435
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
436
436
  expect(stub).to have_been_requested
437
437
  end
438
438
  end
@@ -718,7 +718,7 @@ describe GoCardlessPro::Services::MandatesService do
718
718
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
719
719
  to_timeout
720
720
 
721
- expect { post_response }.to raise_error(Faraday::TimeoutError)
721
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
722
722
  expect(stub).to have_been_requested
723
723
  end
724
724
  end
@@ -797,7 +797,7 @@ describe GoCardlessPro::Services::MandatesService do
797
797
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
798
798
  to_timeout
799
799
 
800
- expect { post_response }.to raise_error(Faraday::TimeoutError)
800
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
801
801
  expect(stub).to have_been_requested
802
802
  end
803
803
  end
@@ -790,7 +790,7 @@ describe GoCardlessPro::Services::PaymentsService do
790
790
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
791
791
  to_timeout
792
792
 
793
- expect { post_response }.to raise_error(Faraday::TimeoutError)
793
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
794
794
  expect(stub).to have_been_requested
795
795
  end
796
796
  end
@@ -877,7 +877,7 @@ describe GoCardlessPro::Services::PaymentsService do
877
877
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
878
878
  to_timeout
879
879
 
880
- expect { post_response }.to raise_error(Faraday::TimeoutError)
880
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
881
881
  expect(stub).to have_been_requested
882
882
  end
883
883
  end
@@ -411,7 +411,7 @@ describe GoCardlessPro::Services::RedirectFlowsService do
411
411
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
412
412
  to_timeout
413
413
 
414
- expect { post_response }.to raise_error(Faraday::TimeoutError)
414
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
415
415
  expect(stub).to have_been_requested
416
416
  end
417
417
  end
@@ -916,7 +916,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
916
916
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
917
917
  to_timeout
918
918
 
919
- expect { post_response }.to raise_error(Faraday::TimeoutError)
919
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
920
920
  expect(stub).to have_been_requested
921
921
  end
922
922
  end
@@ -1017,7 +1017,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
1017
1017
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
1018
1018
  to_timeout
1019
1019
 
1020
- expect { post_response }.to raise_error(Faraday::TimeoutError)
1020
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
1021
1021
  expect(stub).to have_been_requested
1022
1022
  end
1023
1023
  end
@@ -1118,7 +1118,7 @@ describe GoCardlessPro::Services::SubscriptionsService do
1118
1118
  stub = stub_request(:post, /.*api.gocardless.com#{stub_url}/).
1119
1119
  to_timeout
1120
1120
 
1121
- expect { post_response }.to raise_error(Faraday::TimeoutError)
1121
+ expect { post_response }.to raise_error(Faraday::ConnectionFailed)
1122
1122
  expect(stub).to have_been_requested
1123
1123
  end
1124
1124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gocardless_pro
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.21.0
4
+ version: 2.22.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - GoCardless
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-06-01 00:00:00.000000000 Z
11
+ date: 2020-06-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -19,7 +19,7 @@ dependencies:
19
19
  version: 0.9.2
20
20
  - - "<"
21
21
  - !ruby/object:Gem::Version
22
- version: '1.0'
22
+ version: '2'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
@@ -29,7 +29,7 @@ dependencies:
29
29
  version: 0.9.2
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
- version: '1.0'
32
+ version: '2'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: rspec
35
35
  requirement: !ruby/object:Gem::Requirement
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '1.18'
53
+ version: 3.8.3
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '1.18'
60
+ version: 3.8.3
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rubocop
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -266,7 +266,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
266
266
  - !ruby/object:Gem::Version
267
267
  version: '0'
268
268
  requirements: []
269
- rubygems_version: 3.0.3
269
+ rubygems_version: 3.0.8
270
270
  signing_key:
271
271
  specification_version: 4
272
272
  summary: A gem for calling the GoCardless Pro API