Skip to content

Commit d93bfa7

Browse files
author
Aman Aalam
authored
Merge pull request #55 from PaymentRails/DEVREL-109.inaccessible-version
[DEVREL-109] Fixup inaccessible gem version
2 parents 050231d + 0bb6ea0 commit d93bfa7

File tree

5 files changed

+9
-5
lines changed

5 files changed

+9
-5
lines changed

lib/paymentrails.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
require 'paymentrails/InvoicePayment'
2323

2424
module PaymentRails
25+
VERSION = '0.2.14'.freeze
26+
2527
def self.client(key, secret, environment = 'production', **optionals)
2628
Gateway.new(Configuration.new(key, secret, environment, **optionals))
2729
end

lib/paymentrails/Client.rb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ def send_request(endPoint, method, body = '')
4040
)
4141
http.use_ssl = @config.useSsl?
4242

43-
spec = Gem::Specification.load("paymentrails.gemspec")
44-
4543
time = Time.now.to_i
4644
headers = {'X-PR-Timestamp': time.to_s,
4745
'Authorization': generate_authorization(time, endPoint, method, body),
4846
'Content-Type': 'application/json',
49-
'Trolley-Source': "ruby-sdk_#{spec.version}"}
50-
47+
'Trolley-Source': "ruby-sdk_#{::PaymentRails::VERSION}"}
48+
5149
if method === "GET"
5250
request = Net::HTTP::Get.new(uri.request_uri, headers)
5351
elsif method === "POST"

lib/paymentrails/gateways/GatewayHelper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
module PaymentRails
22
module GatewayHelper
3+
# rubocop:disable Lint/SuppressedException
34
def loosely_hydrate_model(klass_instance, attributes)
45
attributes.each do |k, v|
56
begin
@@ -12,5 +13,6 @@ def loosely_hydrate_model(klass_instance, attributes)
1213

1314
klass_instance
1415
end
16+
# rubocop:enable Lint/SuppressedException
1517
end
1618
end

paymentrails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Gem::Specification.new do |s|
44
s.name = "paymentrails"
55
s.summary = "Trolley Ruby SDK"
66
s.description = "Ruby SDK for interacting with the Trolley API"
7-
s.version = '0.2.13'
7+
s.version = '0.2.14'
88
s.homepage = 'https://trolley.com/'
99
s.email = ['developer-tools@trolley.com']
1010
s.license = "MIT"

spec/integration/RecipientTest.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def test_lifecycle
4949
assert_equal(recipient.status, 'archived')
5050
end
5151

52+
# rubocop:disable Metrics/MethodLength
5253
def test_account
5354
uuid = SecureRandom.uuid.to_s
5455
recipient = @client.recipient.create(
@@ -88,4 +89,5 @@ def test_account
8889
accountList = @client.recipient_account.all(recipient.id)
8990
assert_equal(1, accountList.count)
9091
end
92+
# rubocop:enable Metrics/MethodLength
9193
end

0 commit comments

Comments
 (0)