Skip to content

Commit

Permalink
Support ruby 3 and bump version
Browse files Browse the repository at this point in the history
  • Loading branch information
ikraamg committed Jun 25, 2024
1 parent 3d5165e commit 4858ba0
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions afterpay.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ Gem::Specification.new do |spec|

spec.add_runtime_dependency 'faraday', '~> 1.0'
spec.add_runtime_dependency 'faraday_middleware', '~> 1.0'
spec.add_runtime_dependency 'hashie', '~> 4.0'
spec.add_runtime_dependency 'hashie', '>= 4.0'

spec.add_development_dependency 'bundler', '~> 2.2.22'
spec.add_development_dependency 'bundler', '>= 2.2.22'
spec.add_development_dependency 'codecov', '~> 0.5.2'
spec.add_development_dependency 'factory_bot', '~> 4.11.1'
spec.add_development_dependency 'faker', '~> 1.9.1'
spec.add_development_dependency 'faker', '~> 2.22.0'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'relaxed-rubocop', '~> 2.5'
spec.add_development_dependency 'rspec', '~> 3.0'
Expand Down
2 changes: 1 addition & 1 deletion lib/afterpay/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

module Afterpay
VERSION = '0.5.0'
VERSION = '0.6.0'
end
4 changes: 2 additions & 2 deletions spec/factories/courier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
priority { 'STANDARD' }

name { Faker::Lorem.word }
tracking { Faker::Number.number(10) }
shipped_at { Faker::Time.between(DateTime.now - 1, DateTime.now) }
tracking { Faker::Number.number(digits: 10) }
shipped_at { Faker::Time.between(from: DateTime.now - 1, to: DateTime.now) }
end
end
4 changes: 2 additions & 2 deletions spec/factories/item.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
FactoryBot.define do
factory :item, class: Afterpay::Components::Item do
name { Faker::Lorem.word }
sku { Faker::Lorem.characters(5) }
quantity { Faker::Number.between(1, 25) }
sku { Faker::Lorem.characters(number: 5) }
quantity { Faker::Number.between(from: 1, to: 25) }
price { build(:money) }
end
end
2 changes: 1 addition & 1 deletion spec/factories/money.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FactoryBot.define do
factory :money, class: Afterpay::Components::Money do
amount { Faker::Number.decimal(2, 2) }
amount { Faker::Number.decimal(l_digits: 2, r_digits: 2) }
currency { Faker::Currency.code }
end
end
2 changes: 1 addition & 1 deletion spec/factories/order.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
factory :order, class: Afterpay::Components::Order do
payment_type { 'PAY_BY_INSTALLMENT' }

merchant_reference { Faker::Lorem.characters(5) }
merchant_reference { Faker::Lorem.characters(number: 5) }

amount { build(:money) }
tax_amount { build(:money) }
Expand Down
4 changes: 2 additions & 2 deletions spec/factories/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FactoryBot.define do
factory :payment, class: Afterpay::Components::Payment do
merchant_reference { Faker::Lorem.characters(5) }
token { Faker::Lorem.characters(15) }
merchant_reference { Faker::Lorem.characters(number: 5) }
token { Faker::Lorem.characters(number: 15) }
end
end
2 changes: 1 addition & 1 deletion spec/factories/refund.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

FactoryBot.define do
factory :refund, class: Afterpay::Components::Refund do
merchant_reference { Faker::Lorem.characters(5) }
merchant_reference { Faker::Lorem.characters(number: 5) }
amount { build(:money) }
end
end

0 comments on commit 4858ba0

Please sign in to comment.