pin_up 1.4.3 → 1.4.4

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: e164965651e50f81fdc85cb4b21a4f4717428244c72f868cbdeda2b971841312
4
- data.tar.gz: 4c5b20e30b65d3eafe442a71a53705ec5163c13571cc872564047da2abe956f9
3
+ metadata.gz: 1fe1a32870ffc34d85629f81a363474e79a62499f8f5a38e14f96f0b292b6017
4
+ data.tar.gz: e67a6b43dac04ee50e47349792030937ff7b8afa9583a4db4b26779cea21c0a2
5
5
  SHA512:
6
- metadata.gz: 5db2600657d67aa262c3aef1ee3715ad3d6c3c75029ff7ac75ec0058384728a6e046233cbbef7b37cc8dfd08db7d53dabfd9a4c90a1735600fdf2589cc4ed08b
7
- data.tar.gz: fb81889c9bfd3de39550f85a9fe1954e73ef5cc17d80bcccdf9ba2fbcfafe80dfd4b73861e0b47bbc1be1a28ad525bf857b9ff5b21794879b600abbe1e34fa48
6
+ metadata.gz: d563d8e6c9d69ad1d1bc3e6d07fbfa79b780f087711cf558a10f386de2b222e2d281de650ba3054ab1a0956916c6e5df1b35fa85b13c392c263615dbe10753fb
7
+ data.tar.gz: 58ff548e91c809c51274c1badfde3ad39e5ea63d447a57f0507e1a48a115a6c9565bc8be82c3fba4fac8df52fc72457cc2d6529b98da0c3d3e884aa087af8e84
data/Gemfile CHANGED
@@ -1,3 +1,15 @@
1
- source "https://rubygems.org"
1
+ source 'https://rubygems.org'
2
+
3
+ gem 'httparty'
4
+ gem 'rexml'
5
+
6
+ group :development do
7
+ gem 'rake'
8
+ gem 'rdoc'
9
+ gem 'rspec'
10
+ gem 'juwelier', '~> 2.1.0'
11
+ gem 'simplecov'
12
+ gem 'webmock'
13
+ gem 'vcr'
14
+ end
2
15
 
3
- gemspec
data/Gemfile.lock CHANGED
@@ -1,51 +1,114 @@
1
- PATH
2
- remote: .
3
- specs:
4
- pin_up (1.4.3)
5
- httparty (= 0.17.0)
6
-
7
1
  GEM
8
2
  remote: https://rubygems.org/
9
3
  specs:
10
- addressable (2.6.0)
11
- public_suffix (>= 2.0.2, < 4.0)
12
- crack (0.4.3)
13
- safe_yaml (~> 1.0.0)
14
- diff-lcs (1.3)
15
- hashdiff (0.4.0)
16
- httparty (0.17.0)
17
- mime-types (~> 3.0)
4
+ addressable (2.8.5)
5
+ public_suffix (>= 2.0.2, < 6.0)
6
+ builder (3.2.4)
7
+ crack (0.4.5)
8
+ rexml
9
+ descendants_tracker (0.0.4)
10
+ thread_safe (~> 0.3, >= 0.3.1)
11
+ diff-lcs (1.5.0)
12
+ docile (1.4.0)
13
+ faraday (1.10.3)
14
+ faraday-em_http (~> 1.0)
15
+ faraday-em_synchrony (~> 1.0)
16
+ faraday-excon (~> 1.1)
17
+ faraday-httpclient (~> 1.0)
18
+ faraday-multipart (~> 1.0)
19
+ faraday-net_http (~> 1.0)
20
+ faraday-net_http_persistent (~> 1.0)
21
+ faraday-patron (~> 1.0)
22
+ faraday-rack (~> 1.0)
23
+ faraday-retry (~> 1.0)
24
+ ruby2_keywords (>= 0.0.4)
25
+ faraday-em_http (1.0.0)
26
+ faraday-em_synchrony (1.0.0)
27
+ faraday-excon (1.1.0)
28
+ faraday-httpclient (1.0.1)
29
+ faraday-multipart (1.0.4)
30
+ multipart-post (~> 2)
31
+ faraday-net_http (1.0.1)
32
+ faraday-net_http_persistent (1.2.0)
33
+ faraday-patron (1.0.0)
34
+ faraday-rack (1.0.0)
35
+ faraday-retry (1.0.3)
36
+ git (1.18.0)
37
+ addressable (~> 2.8)
38
+ rchardet (~> 1.8)
39
+ github_api (0.19.0)
40
+ addressable (~> 2.4)
41
+ descendants_tracker (~> 0.0.4)
42
+ faraday (>= 0.8, < 2)
43
+ hashie (~> 3.5, >= 3.5.2)
44
+ oauth2 (~> 1.0)
45
+ hashdiff (1.0.1)
46
+ hashie (3.6.0)
47
+ highline (2.1.0)
48
+ httparty (0.21.0)
49
+ mini_mime (>= 1.0.0)
18
50
  multi_xml (>= 0.5.2)
19
- json (1.8.6)
20
- mime-types (3.2.2)
21
- mime-types-data (~> 3.2015)
22
- mime-types-data (3.2019.0331)
23
- multi_json (1.13.1)
51
+ juwelier (2.1.3)
52
+ builder
53
+ bundler (>= 1.13)
54
+ git (>= 1.2.5)
55
+ github_api
56
+ highline (>= 1.6.15)
57
+ nokogiri (>= 1.5.10)
58
+ rake
59
+ rdoc
60
+ semver
61
+ jwt (2.7.1)
62
+ mini_mime (1.1.5)
63
+ mini_portile2 (2.8.5)
64
+ multi_json (1.15.0)
24
65
  multi_xml (0.6.0)
25
- public_suffix (3.1.1)
26
- rdoc (3.12.2)
27
- json (~> 1.4)
28
- rspec (3.7.0)
29
- rspec-core (~> 3.7.0)
30
- rspec-expectations (~> 3.7.0)
31
- rspec-mocks (~> 3.7.0)
32
- rspec-core (3.7.1)
33
- rspec-support (~> 3.7.0)
34
- rspec-expectations (3.7.0)
66
+ multipart-post (2.3.0)
67
+ nokogiri (1.15.4)
68
+ mini_portile2 (~> 2.8.2)
69
+ racc (~> 1.4)
70
+ oauth2 (1.4.11)
71
+ faraday (>= 0.17.3, < 3.0)
72
+ jwt (>= 1.0, < 3.0)
73
+ multi_json (~> 1.3)
74
+ multi_xml (~> 0.5)
75
+ rack (>= 1.2, < 4)
76
+ psych (5.1.1.1)
77
+ stringio
78
+ public_suffix (5.0.3)
79
+ racc (1.7.3)
80
+ rack (3.0.8)
81
+ rake (13.1.0)
82
+ rchardet (1.8.0)
83
+ rdoc (6.6.0)
84
+ psych (>= 4.0.0)
85
+ rexml (3.2.6)
86
+ rspec (3.12.0)
87
+ rspec-core (~> 3.12.0)
88
+ rspec-expectations (~> 3.12.0)
89
+ rspec-mocks (~> 3.12.0)
90
+ rspec-core (3.12.2)
91
+ rspec-support (~> 3.12.0)
92
+ rspec-expectations (3.12.3)
35
93
  diff-lcs (>= 1.2.0, < 2.0)
36
- rspec-support (~> 3.7.0)
37
- rspec-mocks (3.7.0)
94
+ rspec-support (~> 3.12.0)
95
+ rspec-mocks (3.12.6)
38
96
  diff-lcs (>= 1.2.0, < 2.0)
39
- rspec-support (~> 3.7.0)
40
- rspec-support (3.7.1)
41
- safe_yaml (1.0.5)
42
- simplecov (0.7.1)
43
- multi_json (~> 1.0)
44
- simplecov-html (~> 0.7.1)
45
- simplecov-html (0.7.1)
46
- vcr (4.0.0)
47
- webmock (3.6.0)
48
- addressable (>= 2.3.6)
97
+ rspec-support (~> 3.12.0)
98
+ rspec-support (3.12.1)
99
+ ruby2_keywords (0.0.5)
100
+ semver (1.0.1)
101
+ simplecov (0.22.0)
102
+ docile (~> 1.1)
103
+ simplecov-html (~> 0.11)
104
+ simplecov_json_formatter (~> 0.1)
105
+ simplecov-html (0.12.3)
106
+ simplecov_json_formatter (0.1.4)
107
+ stringio (3.0.9)
108
+ thread_safe (0.3.6)
109
+ vcr (6.2.0)
110
+ webmock (3.19.1)
111
+ addressable (>= 2.8.0)
49
112
  crack (>= 0.3.2)
50
113
  hashdiff (>= 0.4.0, < 2.0.0)
51
114
 
@@ -53,12 +116,15 @@ PLATFORMS
53
116
  ruby
54
117
 
55
118
  DEPENDENCIES
56
- pin_up!
57
- rdoc (~> 3.12)
58
- rspec (~> 3.7.0)
59
- simplecov (~> 0.7.1)
60
- vcr (~> 4.0.0)
61
- webmock (~> 3.6.0)
119
+ httparty
120
+ juwelier (~> 2.1.0)
121
+ rake
122
+ rdoc
123
+ rexml
124
+ rspec
125
+ simplecov
126
+ vcr
127
+ webmock
62
128
 
63
129
  BUNDLED WITH
64
- 1.17.2
130
+ 2.4.14
data/Rakefile CHANGED
@@ -11,8 +11,8 @@ rescue Bundler::BundlerError => e
11
11
  end
12
12
  require 'rake'
13
13
 
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
14
+ require 'juwelier'
15
+ Juwelier::Tasks.new do |gem|
16
16
  # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
17
  gem.name = "pin_up"
18
18
  gem.homepage = "http://github.com/dNitza/pin_up"
@@ -24,7 +24,7 @@ Jeweler::Tasks.new do |gem|
24
24
  # dependencies defined in Gemfile
25
25
  gem.files.exclude(Dir.glob('spec/vcr/*.yml'))
26
26
  end
27
- Jeweler::RubygemsDotOrgTasks.new
27
+ Juwelier::RubygemsDotOrgTasks.new
28
28
 
29
29
  require 'rake/testtask'
30
30
  Rake::TestTask.new(:test) do |test|
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.3
1
+ 1.4.4
data/lib/pin_up/charge.rb CHANGED
@@ -37,7 +37,7 @@ module Pin
37
37
  options.merge! page: page if page
38
38
 
39
39
  options.each do |key, option|
40
- term += "#{key.to_s}=#{URI.encode(option.to_s)}&"
40
+ term += "#{key.to_s}=#{CGI.escape(option.to_s)}&"
41
41
  end
42
42
  build_collection_response(make_request(:get, {url: "charges/search?#{term}" } ), pagination)
43
43
  end
@@ -38,7 +38,7 @@ module Pin
38
38
  # and any of: email, card (hash),card_token
39
39
  # args: token (String), options (Hash)
40
40
  # returns: a subscription object
41
- # https://pin.net.au/docs/api/subscriptions#put-subscription
41
+ # https://pinpayments.com/developers/api-reference/subscriptions#put-subscription
42
42
  # NB: When providing a card (hash), you need to specify
43
43
  # the full list of details.
44
44
  def self.update(token, card_token = nil)
@@ -44,7 +44,7 @@ module Pin
44
44
  options.merge! page: page if page
45
45
 
46
46
  options.each do |key, option|
47
- term += "#{key.to_s}=#{URI.encode(option.to_s)}&"
47
+ term += "#{key.to_s}=#{CGI.escape(option.to_s)}&"
48
48
  end
49
49
  build_collection_response(make_request(:get, {url: "transfers/search?#{term}" } ), pagination)
50
50
  end
data/pin_up.gemspec CHANGED
@@ -1,20 +1,21 @@
1
- # Generated by jeweler
1
+ # Generated by juwelier
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
3
+ # Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: pin_up 1.4.0 ruby lib
5
+ # stub: pin_up 1.4.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "pin_up".freeze
9
- s.version = "1.4.3"
9
+ s.version = "1.4.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib".freeze]
13
13
  s.authors = ["Daniel Nitsikopoulos".freeze]
14
- s.date = "2018-06-15"
14
+ s.date = "2023-11-16"
15
15
  s.description = "A Ruby gem wrapper for the pin-payments (pinpayments.com) API".freeze
16
16
  s.email = "dnitza@gmail.com".freeze
17
17
  s.extra_rdoc_files = [
18
+ "CHANGELOG.md",
18
19
  "LICENSE.txt",
19
20
  "README.md"
20
21
  ]
@@ -64,26 +65,33 @@ Gem::Specification.new do |s|
64
65
  ]
65
66
  s.homepage = "http://github.com/dNitza/pin_up".freeze
66
67
  s.licenses = ["MIT".freeze]
67
- s.rubygems_version = "2.7.3".freeze
68
+ s.rubygems_version = "3.2.22".freeze
68
69
  s.summary = "A Ruby gem wrapper for the pin-payments API".freeze
69
70
 
70
71
  if s.respond_to? :specification_version then
71
72
  s.specification_version = 4
73
+ end
72
74
 
73
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
74
- s.add_runtime_dependency(%q<httparty>.freeze, ["= 0.17.0"])
75
- s.add_development_dependency(%q<rdoc>.freeze, ["~> 3.12"])
76
- s.add_development_dependency(%q<rspec>.freeze, ["~> 3.7.0"])
77
- s.add_development_dependency(%q<simplecov>.freeze, ["~> 0.7.1"])
78
- s.add_development_dependency(%q<webmock>.freeze, ["~> 3.6.0"])
79
- s.add_development_dependency(%q<vcr>.freeze, ["~> 4.0.0"])
80
- else
81
- s.add_dependency(%q<httparty>.freeze, ["= 0.17.0"])
82
- s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
83
- end
75
+ if s.respond_to? :add_runtime_dependency then
76
+ s.add_runtime_dependency(%q<httparty>.freeze, [">= 0"])
77
+ s.add_runtime_dependency(%q<rexml>.freeze, [">= 0"])
78
+ s.add_development_dependency(%q<rake>.freeze, [">= 0"])
79
+ s.add_development_dependency(%q<rdoc>.freeze, [">= 0"])
80
+ s.add_development_dependency(%q<rspec>.freeze, [">= 0"])
81
+ s.add_development_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
82
+ s.add_development_dependency(%q<simplecov>.freeze, [">= 0"])
83
+ s.add_development_dependency(%q<webmock>.freeze, [">= 0"])
84
+ s.add_development_dependency(%q<vcr>.freeze, [">= 0"])
84
85
  else
85
- s.add_dependency(%q<httparty>.freeze, ["= 0.17.0"])
86
- s.add_dependency(%q<rdoc>.freeze, ["~> 3.12"])
86
+ s.add_dependency(%q<httparty>.freeze, [">= 0"])
87
+ s.add_dependency(%q<rexml>.freeze, [">= 0"])
88
+ s.add_dependency(%q<rake>.freeze, [">= 0"])
89
+ s.add_dependency(%q<rdoc>.freeze, [">= 0"])
90
+ s.add_dependency(%q<rspec>.freeze, [">= 0"])
91
+ s.add_dependency(%q<juwelier>.freeze, ["~> 2.1.0"])
92
+ s.add_dependency(%q<simplecov>.freeze, [">= 0"])
93
+ s.add_dependency(%q<webmock>.freeze, [">= 0"])
94
+ s.add_dependency(%q<vcr>.freeze, [">= 0"])
87
95
  end
88
96
  end
89
97
 
data/spec/cards_spec.rb CHANGED
@@ -4,7 +4,7 @@ RSpec.describe 'Card', :vcr, class: Pin::Card do
4
4
  let(:card_1) {
5
5
  { number: '5520000000000000',
6
6
  expiry_month: '12',
7
- expiry_year: '2025',
7
+ expiry_year: Date.today.next_year.year.to_s,
8
8
  cvc: '123',
9
9
  name: 'Roland Robot',
10
10
  address_line1: '123 Fake Street',
data/spec/charges_spec.rb CHANGED
@@ -4,7 +4,7 @@ describe 'Charge', :vcr, class: Pin::Charges do
4
4
  let(:card_1) {
5
5
  { number: '5520000000000000',
6
6
  expiry_month: '12',
7
- expiry_year: '2025',
7
+ expiry_year: Date.today.next_year.year.to_s,
8
8
  cvc: '123',
9
9
  name: 'Roland Robot',
10
10
  address_line1: '123 Fake Street',
@@ -4,7 +4,7 @@ describe 'Customer', :vcr, class: Pin::Customer do
4
4
  let(:card_1) {
5
5
  { number: '5520000000000000',
6
6
  expiry_month: '12',
7
- expiry_year: '2025',
7
+ expiry_year: Date.today.next_year.year.to_s,
8
8
  cvc: '123',
9
9
  name: 'Roland Robot',
10
10
  address_line1: '123 Fake Street',
@@ -17,7 +17,7 @@ describe 'Customer', :vcr, class: Pin::Customer do
17
17
  let(:card_2) {
18
18
  { number: '4200000000000000',
19
19
  expiry_month: '12',
20
- expiry_year: '2020',
20
+ expiry_year: Date.today.next_year.year.to_s,
21
21
  cvc: '111',
22
22
  name: 'Roland TestRobot',
23
23
  address_line1: '123 Fake Road',
data/spec/errors_spec.rb CHANGED
@@ -4,7 +4,7 @@ describe 'Errors', :vcr, class: Pin::PinError do
4
4
  let(:card_1) {
5
5
  { number: '5520000000000000',
6
6
  expiry_month: '12',
7
- expiry_year: '2025',
7
+ expiry_year: Date.today.next_year.year.to_s,
8
8
  cvc: '123',
9
9
  name: 'Roland Robot',
10
10
  address_line1: '123 Fake Street',
@@ -17,7 +17,7 @@ describe 'Errors', :vcr, class: Pin::PinError do
17
17
  let(:card_2) {
18
18
  { number: '4200000000000000',
19
19
  expiry_month: '12',
20
- expiry_year: '2020',
20
+ expiry_year: Date.today.next_year.year.to_s,
21
21
  cvc: '111',
22
22
  name: 'Roland TestRobot',
23
23
  address_line1: '123 Fake Road',
@@ -36,26 +36,6 @@ describe 'Errors', :vcr, class: Pin::PinError do
36
36
  Pin::Customer.create('email@example.com', card_1)['token']
37
37
  }
38
38
 
39
- let(:charge_hash) {
40
- { email: 'email@example.com',
41
- description: 'A new charge from testing Pin gem',
42
- amount: '400',
43
- currency: 'AUD',
44
- ip_address: '127.0.0.1',
45
- card: {
46
- number: '5520000000000000',
47
- expiry_month: '05',
48
- expiry_year: '2012',
49
- cvc: '123',
50
- name: 'Roland Robot',
51
- address_line1: '42 Sevenoaks St',
52
- address_city: 'Lathlain',
53
- address_postcode: '6454',
54
- address_state: 'WA',
55
- address_country: 'Australia'
56
- } }
57
- }
58
-
59
39
  let(:hash_of_details) {
60
40
  { email: 'email@example.com',
61
41
  description: 'A new charge from testing Pin gem',
@@ -65,7 +45,7 @@ describe 'Errors', :vcr, class: Pin::PinError do
65
45
  card: {
66
46
  number: '5560000000000001',
67
47
  expiry_month: '12',
68
- expiry_year: '2025',
48
+ expiry_year: Date.today.next_year.year.to_s,
69
49
  cvc: '123',
70
50
  name: 'Roland Robot',
71
51
  address_line1: '42 Sevenoaks St',
@@ -335,11 +315,11 @@ describe 'Errors', :vcr, class: Pin::PinError do
335
315
  end
336
316
  end
337
317
 
338
- it 'should raise a 400 invalid state when deleting a cancelled subscription' do
318
+ it 'should raise a 422 invalid state when deleting a cancelled subscription' do
339
319
  deleted_subscription_token = Pin::Subscription.delete(subscription_1_token)['token']
340
320
  expect { Pin::Subscription.delete(deleted_subscription_token) }.to raise_error do |error|
341
321
  expect(error).to be_a Pin::InvalidResource
342
- expect(error.message).to eq 'Cannot cancel subscription when state is cancelling'
322
+ expect(error.message).to eq 'invalid_request: Cannot cancel subscription when state is cancelling'
343
323
  expect(error.response).to be_a Hash
344
324
  end
345
325
  end
data/spec/plan_spec.rb CHANGED
@@ -35,7 +35,7 @@ describe 'Plan', :vcr, class: Pin::Plan do
35
35
  let(:card_1) {
36
36
  { number: '5520000000000000',
37
37
  expiry_month: '12',
38
- expiry_year: '2025',
38
+ expiry_year: Date.today.next_year.year.to_s,
39
39
  cvc: '123',
40
40
  name: 'Roland Robot',
41
41
  address_line1: '123 Fake Street',
@@ -48,7 +48,7 @@ describe 'Plan', :vcr, class: Pin::Plan do
48
48
  let(:card_2) {
49
49
  { number: '4200000000000000',
50
50
  expiry_month: '12',
51
- expiry_year: '2020',
51
+ expiry_year: Date.today.next_year.year.to_s,
52
52
  cvc: '111',
53
53
  name: 'Roland TestRobot',
54
54
  address_line1: '123 Fake Road',
data/spec/refund_spec.rb CHANGED
@@ -4,7 +4,7 @@ describe 'Refund', :vcr, class: Pin::Refund do
4
4
  let(:card_1) {
5
5
  { number: '5520000000000000',
6
6
  expiry_month: '12',
7
- expiry_year: '2025',
7
+ expiry_year: Date.today.next_year.year.to_s,
8
8
  cvc: '123',
9
9
  name: 'Roland Robot',
10
10
  address_line1: '123 Fake Street',
data/spec/spec_helper.rb CHANGED
@@ -25,7 +25,7 @@ RSpec.configure do |config|
25
25
  .gsub(/[^\w\/]+/, '_')
26
26
  valid_keys = %w[record match_on_requests_on]
27
27
  options = example.metadata.select { |key,_| valid_keys.include? key }
28
- VCR.use_cassette(name, record: :all) { example.call }
28
+ VCR.use_cassette(name, record: :once) { example.call }
29
29
  end
30
30
  end
31
31
 
@@ -33,4 +33,7 @@ VCR.configure do |c|
33
33
  c.cassette_library_dir = 'spec/vcr'
34
34
  c.hook_into :webmock
35
35
  c.allow_http_connections_when_no_cassette = true
36
+
37
+ c.filter_sensitive_data('PIN_SECRET') { ENV['PIN_SECRET'] }
38
+ c.filter_sensitive_data('PIN_SECRET_BASIC_AUTH') { Base64.strict_encode64(ENV['PIN_SECRET'].to_s + ':') }
36
39
  end
@@ -35,7 +35,7 @@ describe 'Subscription', :vcr, class: Pin::Subscription do
35
35
  let(:card_1) {
36
36
  { number: '5520000000000000',
37
37
  expiry_month: '12',
38
- expiry_year: '2025',
38
+ expiry_year: Date.today.next_year.year.to_s,
39
39
  cvc: '123',
40
40
  name: 'Roland Robot',
41
41
  address_line1: '123 Fake Street',
@@ -48,7 +48,7 @@ describe 'Subscription', :vcr, class: Pin::Subscription do
48
48
  let(:card_2) {
49
49
  { number: '4200000000000000',
50
50
  expiry_month: '12',
51
- expiry_year: '2020',
51
+ expiry_year: Date.today.next_year.year.to_s,
52
52
  cvc: '111',
53
53
  name: 'Roland TestRobot',
54
54
  address_line1: '123 Fake Road',
@@ -2,8 +2,12 @@ require 'spec_helper'
2
2
  require 'securerandom'
3
3
 
4
4
  RSpec.describe 'WebhookEndpoints', :vcr, class: Pin::WebhookEndpoints do
5
+ let(:create_endpoint) {
6
+ Pin::WebhookEndpoints.create(url: "http://example.com/webhooks#{SecureRandom.urlsafe_base64}/")
7
+ }
8
+
5
9
  let(:token) {
6
- Pin::WebhookEndpoints.create({ url: "http://example.com/webhooks#{SecureRandom.urlsafe_base64}/" })['token']
10
+ create_endpoint['token']
7
11
  }
8
12
 
9
13
  before(:each) do
@@ -16,11 +20,13 @@ RSpec.describe 'WebhookEndpoints', :vcr, class: Pin::WebhookEndpoints do
16
20
  end
17
21
 
18
22
  it 'should list webhook endpoints' do
23
+ create_endpoint
19
24
  expect(Pin::WebhookEndpoints.all).to_not eq []
20
25
  Pin::WebhookEndpoints.delete(token) # since we are only allowed 5 or so sandbox webhooks
21
26
  end
22
27
 
23
28
  it 'should list webhook endpoint on a page given a page' do
29
+ create_endpoint
24
30
  request = Pin::WebhookEndpoints.all(1, true)
25
31
  expect(request[:response]).to_not eq []
26
32
  Pin::WebhookEndpoints.delete(token) # since we are only allowed 5 or so sandbox webhooks
metadata CHANGED
@@ -1,104 +1,147 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pin_up
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.3
4
+ version: 1.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Nitsikopoulos
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-15 00:00:00.000000000 Z
11
+ date: 2023-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.17.0
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.17.0
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
27
55
  - !ruby/object:Gem::Dependency
28
56
  name: rdoc
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
- - - "~>"
59
+ - - ">="
32
60
  - !ruby/object:Gem::Version
33
- version: '3.12'
61
+ version: '0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
- - - "~>"
66
+ - - ">="
39
67
  - !ruby/object:Gem::Version
40
- version: '3.12'
68
+ version: '0'
41
69
  - !ruby/object:Gem::Dependency
42
70
  name: rspec
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: juwelier
43
85
  requirement: !ruby/object:Gem::Requirement
44
86
  requirements:
45
87
  - - "~>"
46
88
  - !ruby/object:Gem::Version
47
- version: 3.7.0
89
+ version: 2.1.0
48
90
  type: :development
49
91
  prerelease: false
50
92
  version_requirements: !ruby/object:Gem::Requirement
51
93
  requirements:
52
94
  - - "~>"
53
95
  - !ruby/object:Gem::Version
54
- version: 3.7.0
96
+ version: 2.1.0
55
97
  - !ruby/object:Gem::Dependency
56
98
  name: simplecov
57
99
  requirement: !ruby/object:Gem::Requirement
58
100
  requirements:
59
- - - "~>"
101
+ - - ">="
60
102
  - !ruby/object:Gem::Version
61
- version: 0.7.1
103
+ version: '0'
62
104
  type: :development
63
105
  prerelease: false
64
106
  version_requirements: !ruby/object:Gem::Requirement
65
107
  requirements:
66
- - - "~>"
108
+ - - ">="
67
109
  - !ruby/object:Gem::Version
68
- version: 0.7.1
110
+ version: '0'
69
111
  - !ruby/object:Gem::Dependency
70
112
  name: webmock
71
113
  requirement: !ruby/object:Gem::Requirement
72
114
  requirements:
73
- - - "~>"
115
+ - - ">="
74
116
  - !ruby/object:Gem::Version
75
- version: 3.6.0
117
+ version: '0'
76
118
  type: :development
77
119
  prerelease: false
78
120
  version_requirements: !ruby/object:Gem::Requirement
79
121
  requirements:
80
- - - "~>"
122
+ - - ">="
81
123
  - !ruby/object:Gem::Version
82
- version: 3.6.0
124
+ version: '0'
83
125
  - !ruby/object:Gem::Dependency
84
126
  name: vcr
85
127
  requirement: !ruby/object:Gem::Requirement
86
128
  requirements:
87
- - - "~>"
129
+ - - ">="
88
130
  - !ruby/object:Gem::Version
89
- version: 4.0.0
131
+ version: '0'
90
132
  type: :development
91
133
  prerelease: false
92
134
  version_requirements: !ruby/object:Gem::Requirement
93
135
  requirements:
94
- - - "~>"
136
+ - - ">="
95
137
  - !ruby/object:Gem::Version
96
- version: 4.0.0
138
+ version: '0'
97
139
  description: A Ruby gem wrapper for the pin-payments (pinpayments.com) API
98
140
  email: dnitza@gmail.com
99
141
  executables: []
100
142
  extensions: []
101
143
  extra_rdoc_files:
144
+ - CHANGELOG.md
102
145
  - LICENSE.txt
103
146
  - README.md
104
147
  files:
@@ -148,7 +191,7 @@ homepage: http://github.com/dNitza/pin_up
148
191
  licenses:
149
192
  - MIT
150
193
  metadata: {}
151
- post_install_message:
194
+ post_install_message:
152
195
  rdoc_options: []
153
196
  require_paths:
154
197
  - lib
@@ -163,8 +206,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
206
  - !ruby/object:Gem::Version
164
207
  version: '0'
165
208
  requirements: []
166
- rubygems_version: 3.0.3
167
- signing_key:
209
+ rubygems_version: 3.2.22
210
+ signing_key:
168
211
  specification_version: 4
169
212
  summary: A Ruby gem wrapper for the pin-payments API
170
213
  test_files: []