diff --git a/.rubocop.yml b/.rubocop.yml index 8c0f48a7f..031686797 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -13,6 +13,9 @@ Layout/IndentArray: Layout/IndentHash: EnforcedStyle: consistent +Style/FrozenStringLiteralComment: + EnforcedStyle: always + Style/StringLiterals: EnforcedStyle: double_quotes diff --git a/Gemfile b/Gemfile index 808b57053..8d13dd037 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + source "https://rubygems.org" gemspec diff --git a/Rakefile b/Rakefile index 495981330..0284c1389 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "rake/testtask" require "rubocop/rake_task" diff --git a/bin/stripe-console b/bin/stripe-console index e7b1cce7e..ecf27d2f2 100755 --- a/bin/stripe-console +++ b/bin/stripe-console @@ -1,5 +1,7 @@ #!/usr/bin/env ruby +# frozen_string_literal: true + require "irb" require "irb/completion" diff --git a/lib/stripe.rb b/lib/stripe.rb index ac70d20ca..e5732d19f 100644 --- a/lib/stripe.rb +++ b/lib/stripe.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Stripe Ruby bindings # API spec at https://stripe.com/docs/api require "cgi" diff --git a/lib/stripe/account.rb b/lib/stripe/account.rb index 966261bf5..000a06100 100644 --- a/lib/stripe/account.rb +++ b/lib/stripe/account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Account < APIResource extend Gem::Deprecate diff --git a/lib/stripe/alipay_account.rb b/lib/stripe/alipay_account.rb index e0e1ee870..ea92b5692 100644 --- a/lib/stripe/alipay_account.rb +++ b/lib/stripe/alipay_account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class AlipayAccount < APIResource include Stripe::APIOperations::Save diff --git a/lib/stripe/api_operations/create.rb b/lib/stripe/api_operations/create.rb index 1ec29873b..831859e2e 100644 --- a/lib/stripe/api_operations/create.rb +++ b/lib/stripe/api_operations/create.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module APIOperations module Create diff --git a/lib/stripe/api_operations/delete.rb b/lib/stripe/api_operations/delete.rb index aa047bae2..35571cf19 100644 --- a/lib/stripe/api_operations/delete.rb +++ b/lib/stripe/api_operations/delete.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module APIOperations module Delete diff --git a/lib/stripe/api_operations/list.rb b/lib/stripe/api_operations/list.rb index 4c46930e6..65c46adc0 100644 --- a/lib/stripe/api_operations/list.rb +++ b/lib/stripe/api_operations/list.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module APIOperations module List diff --git a/lib/stripe/api_operations/nested_resource.rb b/lib/stripe/api_operations/nested_resource.rb index 36deff3a2..bee575b17 100644 --- a/lib/stripe/api_operations/nested_resource.rb +++ b/lib/stripe/api_operations/nested_resource.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module APIOperations # Adds methods to help manipulate a subresource from its parent resource so diff --git a/lib/stripe/api_operations/request.rb b/lib/stripe/api_operations/request.rb index 70a6ecc05..cf38b482b 100644 --- a/lib/stripe/api_operations/request.rb +++ b/lib/stripe/api_operations/request.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module APIOperations module Request diff --git a/lib/stripe/api_operations/save.rb b/lib/stripe/api_operations/save.rb index 77add5cdd..566becbb4 100644 --- a/lib/stripe/api_operations/save.rb +++ b/lib/stripe/api_operations/save.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module APIOperations module Save diff --git a/lib/stripe/api_resource.rb b/lib/stripe/api_resource.rb index 75b25c4ed..d31d0c463 100644 --- a/lib/stripe/api_resource.rb +++ b/lib/stripe/api_resource.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class APIResource < StripeObject include Stripe::APIOperations::Request diff --git a/lib/stripe/apple_pay_domain.rb b/lib/stripe/apple_pay_domain.rb index 21fa53fdf..740f1f10d 100644 --- a/lib/stripe/apple_pay_domain.rb +++ b/lib/stripe/apple_pay_domain.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe # Domains registered for Apple Pay on the Web class ApplePayDomain < APIResource diff --git a/lib/stripe/application_fee.rb b/lib/stripe/application_fee.rb index 375f08520..0691a70a4 100644 --- a/lib/stripe/application_fee.rb +++ b/lib/stripe/application_fee.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class ApplicationFee < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/application_fee_refund.rb b/lib/stripe/application_fee_refund.rb index 1b29a75ea..27fded1cc 100644 --- a/lib/stripe/application_fee_refund.rb +++ b/lib/stripe/application_fee_refund.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class ApplicationFeeRefund < APIResource include Stripe::APIOperations::Save diff --git a/lib/stripe/balance.rb b/lib/stripe/balance.rb index bd1fc6d57..34b9d64e2 100644 --- a/lib/stripe/balance.rb +++ b/lib/stripe/balance.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Balance < SingletonAPIResource OBJECT_NAME = "balance".freeze diff --git a/lib/stripe/balance_transaction.rb b/lib/stripe/balance_transaction.rb index 0232c3386..2bc646760 100644 --- a/lib/stripe/balance_transaction.rb +++ b/lib/stripe/balance_transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class BalanceTransaction < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/bank_account.rb b/lib/stripe/bank_account.rb index a57ba5b14..53d0688a7 100644 --- a/lib/stripe/bank_account.rb +++ b/lib/stripe/bank_account.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class BankAccount < APIResource include Stripe::APIOperations::Save diff --git a/lib/stripe/bitcoin_receiver.rb b/lib/stripe/bitcoin_receiver.rb index b5091f1b8..f9f960f31 100644 --- a/lib/stripe/bitcoin_receiver.rb +++ b/lib/stripe/bitcoin_receiver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class BitcoinReceiver < APIResource # Directly creating or retrieving BitcoinReceivers is deprecated. Please use diff --git a/lib/stripe/bitcoin_transaction.rb b/lib/stripe/bitcoin_transaction.rb index 941a30560..966937cb0 100644 --- a/lib/stripe/bitcoin_transaction.rb +++ b/lib/stripe/bitcoin_transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class BitcoinTransaction < APIResource # Directly retrieving BitcoinTransactions is deprecated. Please use the diff --git a/lib/stripe/card.rb b/lib/stripe/card.rb index 523e9f5eb..0bd1dc32d 100644 --- a/lib/stripe/card.rb +++ b/lib/stripe/card.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Card < APIResource include Stripe::APIOperations::Save diff --git a/lib/stripe/charge.rb b/lib/stripe/charge.rb index eff0a6c65..96ce19d94 100644 --- a/lib/stripe/charge.rb +++ b/lib/stripe/charge.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Charge < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/country_spec.rb b/lib/stripe/country_spec.rb index 06bdc2f60..4bae8ffd4 100644 --- a/lib/stripe/country_spec.rb +++ b/lib/stripe/country_spec.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class CountrySpec < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/coupon.rb b/lib/stripe/coupon.rb index 5439abe51..767500e32 100644 --- a/lib/stripe/coupon.rb +++ b/lib/stripe/coupon.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Coupon < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/customer.rb b/lib/stripe/customer.rb index 21bce5bae..c37033901 100644 --- a/lib/stripe/customer.rb +++ b/lib/stripe/customer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Customer < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/dispute.rb b/lib/stripe/dispute.rb index abfbd1ae3..5b7f2892f 100644 --- a/lib/stripe/dispute.rb +++ b/lib/stripe/dispute.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Dispute < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/ephemeral_key.rb b/lib/stripe/ephemeral_key.rb index 16431f760..96c18493c 100644 --- a/lib/stripe/ephemeral_key.rb +++ b/lib/stripe/ephemeral_key.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class EphemeralKey < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/errors.rb b/lib/stripe/errors.rb index c4af5a7a1..b5c2032ca 100644 --- a/lib/stripe/errors.rb +++ b/lib/stripe/errors.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe # StripeError is the base error from which all other more specific Stripe # errors derive. diff --git a/lib/stripe/event.rb b/lib/stripe/event.rb index 18fe68fd5..5a627a523 100644 --- a/lib/stripe/event.rb +++ b/lib/stripe/event.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Event < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/exchange_rate.rb b/lib/stripe/exchange_rate.rb index ccebbbbfa..2db05dfac 100644 --- a/lib/stripe/exchange_rate.rb +++ b/lib/stripe/exchange_rate.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class ExchangeRate < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/file_upload.rb b/lib/stripe/file_upload.rb index 983548a40..f598ab012 100644 --- a/lib/stripe/file_upload.rb +++ b/lib/stripe/file_upload.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class FileUpload < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/invoice.rb b/lib/stripe/invoice.rb index bc84d3592..495d66691 100644 --- a/lib/stripe/invoice.rb +++ b/lib/stripe/invoice.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Invoice < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/invoice_item.rb b/lib/stripe/invoice_item.rb index 12f6373a8..e5d9b6268 100644 --- a/lib/stripe/invoice_item.rb +++ b/lib/stripe/invoice_item.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class InvoiceItem < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/invoice_line_item.rb b/lib/stripe/invoice_line_item.rb index 4703d7fcb..a2056bbc4 100644 --- a/lib/stripe/invoice_line_item.rb +++ b/lib/stripe/invoice_line_item.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class InvoiceLineItem < StripeObject OBJECT_NAME = "line_item".freeze diff --git a/lib/stripe/issuer_fraud_record.rb b/lib/stripe/issuer_fraud_record.rb index c686ae590..835b5a8c1 100644 --- a/lib/stripe/issuer_fraud_record.rb +++ b/lib/stripe/issuer_fraud_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class IssuerFraudRecord < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/list_object.rb b/lib/stripe/list_object.rb index 343d141ee..58cae0adb 100644 --- a/lib/stripe/list_object.rb +++ b/lib/stripe/list_object.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class ListObject < StripeObject include Enumerable diff --git a/lib/stripe/login_link.rb b/lib/stripe/login_link.rb index f2b41e4c2..09eba2f4b 100644 --- a/lib/stripe/login_link.rb +++ b/lib/stripe/login_link.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class LoginLink < APIResource OBJECT_NAME = "login_link".freeze diff --git a/lib/stripe/oauth.rb b/lib/stripe/oauth.rb index d1b55efa1..a07778ae6 100644 --- a/lib/stripe/oauth.rb +++ b/lib/stripe/oauth.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module OAuth module OAuthOperations diff --git a/lib/stripe/order.rb b/lib/stripe/order.rb index c0d682314..3ad042de1 100644 --- a/lib/stripe/order.rb +++ b/lib/stripe/order.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Order < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/order_return.rb b/lib/stripe/order_return.rb index ee0683a7a..6940a6f57 100644 --- a/lib/stripe/order_return.rb +++ b/lib/stripe/order_return.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class OrderReturn < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/payout.rb b/lib/stripe/payout.rb index 91893a5df..335da40e2 100644 --- a/lib/stripe/payout.rb +++ b/lib/stripe/payout.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Payout < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/plan.rb b/lib/stripe/plan.rb index fe01be2be..192bf301b 100644 --- a/lib/stripe/plan.rb +++ b/lib/stripe/plan.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Plan < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/product.rb b/lib/stripe/product.rb index f7fe6c5b5..56466908e 100644 --- a/lib/stripe/product.rb +++ b/lib/stripe/product.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Product < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/recipient.rb b/lib/stripe/recipient.rb index da20d07a6..bd2d603e8 100644 --- a/lib/stripe/recipient.rb +++ b/lib/stripe/recipient.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe # Recipients objects are deprecated. Please use Stripe Connect instead. class Recipient < APIResource diff --git a/lib/stripe/recipient_transfer.rb b/lib/stripe/recipient_transfer.rb index 7128a689d..30faaaee3 100644 --- a/lib/stripe/recipient_transfer.rb +++ b/lib/stripe/recipient_transfer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class RecipientTransfer < StripeObject OBJECT_NAME = "recipient_transfer".freeze diff --git a/lib/stripe/refund.rb b/lib/stripe/refund.rb index c08330103..b832b0f07 100644 --- a/lib/stripe/refund.rb +++ b/lib/stripe/refund.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Refund < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/reversal.rb b/lib/stripe/reversal.rb index 42d9de732..725de0672 100644 --- a/lib/stripe/reversal.rb +++ b/lib/stripe/reversal.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Reversal < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/singleton_api_resource.rb b/lib/stripe/singleton_api_resource.rb index 2748647d5..00abb51ff 100644 --- a/lib/stripe/singleton_api_resource.rb +++ b/lib/stripe/singleton_api_resource.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class SingletonAPIResource < APIResource def self.resource_url diff --git a/lib/stripe/sku.rb b/lib/stripe/sku.rb index ada998bb9..c60e70984 100644 --- a/lib/stripe/sku.rb +++ b/lib/stripe/sku.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class SKU < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/source.rb b/lib/stripe/source.rb index 399eaba3b..cfa60715a 100644 --- a/lib/stripe/source.rb +++ b/lib/stripe/source.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Source < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/source_transaction.rb b/lib/stripe/source_transaction.rb index a661a9a51..545162a03 100644 --- a/lib/stripe/source_transaction.rb +++ b/lib/stripe/source_transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class SourceTransaction < StripeObject OBJECT_NAME = "source_transaction".freeze diff --git a/lib/stripe/stripe_client.rb b/lib/stripe/stripe_client.rb index c98a47687..523f4873d 100644 --- a/lib/stripe/stripe_client.rb +++ b/lib/stripe/stripe_client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe # StripeClient executes requests against the Stripe API and allows a user to # recover both a resource a call returns as well as a response object that diff --git a/lib/stripe/stripe_object.rb b/lib/stripe/stripe_object.rb index 3aca0757e..de92a4568 100644 --- a/lib/stripe/stripe_object.rb +++ b/lib/stripe/stripe_object.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class StripeObject include Enumerable diff --git a/lib/stripe/stripe_response.rb b/lib/stripe/stripe_response.rb index 3bae162f9..2028d1cc7 100644 --- a/lib/stripe/stripe_response.rb +++ b/lib/stripe/stripe_response.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe # StripeResponse encapsulates some vitals of a response that came back from # the Stripe API. diff --git a/lib/stripe/subscription.rb b/lib/stripe/subscription.rb index 90ec34429..285953dac 100644 --- a/lib/stripe/subscription.rb +++ b/lib/stripe/subscription.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Subscription < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/subscription_item.rb b/lib/stripe/subscription_item.rb index ab3da8360..91689feb1 100644 --- a/lib/stripe/subscription_item.rb +++ b/lib/stripe/subscription_item.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class SubscriptionItem < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/three_d_secure.rb b/lib/stripe/three_d_secure.rb index 191056f4e..e713eb0a9 100644 --- a/lib/stripe/three_d_secure.rb +++ b/lib/stripe/three_d_secure.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class ThreeDSecure < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/token.rb b/lib/stripe/token.rb index 71ed05249..acf35275c 100644 --- a/lib/stripe/token.rb +++ b/lib/stripe/token.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Token < APIResource extend Stripe::APIOperations::Create diff --git a/lib/stripe/topup.rb b/lib/stripe/topup.rb index 619310fd1..21218e71a 100644 --- a/lib/stripe/topup.rb +++ b/lib/stripe/topup.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Topup < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/transfer.rb b/lib/stripe/transfer.rb index a8d5bbaaf..a96e89cae 100644 --- a/lib/stripe/transfer.rb +++ b/lib/stripe/transfer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class Transfer < APIResource extend Stripe::APIOperations::List diff --git a/lib/stripe/usage_record.rb b/lib/stripe/usage_record.rb index 255001d54..9f18788ed 100644 --- a/lib/stripe/usage_record.rb +++ b/lib/stripe/usage_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe class UsageRecord < APIResource def self.create(params = {}, opts = {}) diff --git a/lib/stripe/util.rb b/lib/stripe/util.rb index c2a4691d2..ebdfa23a2 100644 --- a/lib/stripe/util.rb +++ b/lib/stripe/util.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "cgi" module Stripe diff --git a/lib/stripe/version.rb b/lib/stripe/version.rb index 91b27e6f4..24f9e11ac 100644 --- a/lib/stripe/version.rb +++ b/lib/stripe/version.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe VERSION = "3.14.0".freeze end diff --git a/lib/stripe/webhook.rb b/lib/stripe/webhook.rb index 0e00890f0..ae8615b4c 100644 --- a/lib/stripe/webhook.rb +++ b/lib/stripe/webhook.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module Webhook DEFAULT_TOLERANCE = 300 diff --git a/stripe.gemspec b/stripe.gemspec index ad18963d7..e77dcad2e 100644 --- a/stripe.gemspec +++ b/stripe.gemspec @@ -1,3 +1,5 @@ +# frozen_string_literal: true + $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "lib")) require "stripe/version" diff --git a/test/api_stub_helpers.rb b/test/api_stub_helpers.rb index e69de29bb..8e9b8f90f 100644 --- a/test/api_stub_helpers.rb +++ b/test/api_stub_helpers.rb @@ -0,0 +1 @@ +# frozen_string_literal: true diff --git a/test/stripe/account_external_accounts_operations_test.rb b/test/stripe/account_external_accounts_operations_test.rb index 94ff50e00..703ef6a50 100644 --- a/test/stripe/account_external_accounts_operations_test.rb +++ b/test/stripe/account_external_accounts_operations_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/account_login_links_operations_test.rb b/test/stripe/account_login_links_operations_test.rb index a2e3f7409..3671ce3dd 100644 --- a/test/stripe/account_login_links_operations_test.rb +++ b/test/stripe/account_login_links_operations_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/account_test.rb b/test/stripe/account_test.rb index 198bc68f8..2cbc7980d 100644 --- a/test/stripe/account_test.rb +++ b/test/stripe/account_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/alipay_account_test.rb b/test/stripe/alipay_account_test.rb index f59253f27..e960f1cf4 100644 --- a/test/stripe/alipay_account_test.rb +++ b/test/stripe/alipay_account_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/api_operations_test.rb b/test/stripe/api_operations_test.rb index 4412d1df4..962eaaea3 100644 --- a/test/stripe/api_operations_test.rb +++ b/test/stripe/api_operations_test.rb @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/api_resource_test.rb b/test/stripe/api_resource_test.rb index 336b31c5f..f160fe86d 100644 --- a/test/stripe/api_resource_test.rb +++ b/test/stripe/api_resource_test.rb @@ -1,4 +1,6 @@ # -*- coding: utf-8 -*- +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/apple_pay_domain_test.rb b/test/stripe/apple_pay_domain_test.rb index 5c792dca6..3ac50d9fb 100644 --- a/test/stripe/apple_pay_domain_test.rb +++ b/test/stripe/apple_pay_domain_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/application_fee_refund_test.rb b/test/stripe/application_fee_refund_test.rb index 07d7c5e7c..c63d7834e 100644 --- a/test/stripe/application_fee_refund_test.rb +++ b/test/stripe/application_fee_refund_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/application_fee_refunds_operations_test.rb b/test/stripe/application_fee_refunds_operations_test.rb index 223c3cac7..2f4ad683e 100644 --- a/test/stripe/application_fee_refunds_operations_test.rb +++ b/test/stripe/application_fee_refunds_operations_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/application_fee_test.rb b/test/stripe/application_fee_test.rb index bed487876..0cabb9b0c 100644 --- a/test/stripe/application_fee_test.rb +++ b/test/stripe/application_fee_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/balance_test.rb b/test/stripe/balance_test.rb index 22a707204..772508b54 100644 --- a/test/stripe/balance_test.rb +++ b/test/stripe/balance_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/bank_account_test.rb b/test/stripe/bank_account_test.rb index 7ddc201c2..f0ebc0655 100644 --- a/test/stripe/bank_account_test.rb +++ b/test/stripe/bank_account_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/charge_test.rb b/test/stripe/charge_test.rb index dadc3530d..44b0da7ce 100644 --- a/test/stripe/charge_test.rb +++ b/test/stripe/charge_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/country_spec_test.rb b/test/stripe/country_spec_test.rb index 2dc9e5632..c1e69b787 100644 --- a/test/stripe/country_spec_test.rb +++ b/test/stripe/country_spec_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/coupon_test.rb b/test/stripe/coupon_test.rb index bc8e491c2..848be4498 100644 --- a/test/stripe/coupon_test.rb +++ b/test/stripe/coupon_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/customer_card_test.rb b/test/stripe/customer_card_test.rb index ab844a146..3e6658fc8 100644 --- a/test/stripe/customer_card_test.rb +++ b/test/stripe/customer_card_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/customer_sources_operations_test.rb b/test/stripe/customer_sources_operations_test.rb index c86abcc1f..b89b688e5 100644 --- a/test/stripe/customer_sources_operations_test.rb +++ b/test/stripe/customer_sources_operations_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/customer_test.rb b/test/stripe/customer_test.rb index ae94b4f3d..d119d1563 100644 --- a/test/stripe/customer_test.rb +++ b/test/stripe/customer_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/dispute_test.rb b/test/stripe/dispute_test.rb index 373a4f3f5..8539140e6 100644 --- a/test/stripe/dispute_test.rb +++ b/test/stripe/dispute_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/ephemeral_key_test.rb b/test/stripe/ephemeral_key_test.rb index f03409ff3..90dd4f861 100644 --- a/test/stripe/ephemeral_key_test.rb +++ b/test/stripe/ephemeral_key_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/errors_test.rb b/test/stripe/errors_test.rb index 4f8a1fe59..9f94e0a87 100644 --- a/test/stripe/errors_test.rb +++ b/test/stripe/errors_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/exchange_rate_test.rb b/test/stripe/exchange_rate_test.rb index 65a2ff678..8156eb779 100644 --- a/test/stripe/exchange_rate_test.rb +++ b/test/stripe/exchange_rate_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/file_upload_test.rb b/test/stripe/file_upload_test.rb index b2448fcf2..fa79a09d5 100644 --- a/test/stripe/file_upload_test.rb +++ b/test/stripe/file_upload_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/invoice_item_test.rb b/test/stripe/invoice_item_test.rb index b40ca8d66..04a0616aa 100644 --- a/test/stripe/invoice_item_test.rb +++ b/test/stripe/invoice_item_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/invoice_line_item_test.rb b/test/stripe/invoice_line_item_test.rb index 428fe7cb6..542902782 100644 --- a/test/stripe/invoice_line_item_test.rb +++ b/test/stripe/invoice_line_item_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/invoice_test.rb b/test/stripe/invoice_test.rb index dd145c033..ebf8582ad 100644 --- a/test/stripe/invoice_test.rb +++ b/test/stripe/invoice_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/issuer_fraud_record_test.rb b/test/stripe/issuer_fraud_record_test.rb index 1b0cc2021..b7462bbc6 100644 --- a/test/stripe/issuer_fraud_record_test.rb +++ b/test/stripe/issuer_fraud_record_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/list_object_test.rb b/test/stripe/list_object_test.rb index 296c8ff0f..a9b22ae59 100644 --- a/test/stripe/list_object_test.rb +++ b/test/stripe/list_object_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/login_link_test.rb b/test/stripe/login_link_test.rb index 56480a04c..b23397a35 100644 --- a/test/stripe/login_link_test.rb +++ b/test/stripe/login_link_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/oauth_test.rb b/test/stripe/oauth_test.rb index 12022d54d..33fcebec6 100644 --- a/test/stripe/oauth_test.rb +++ b/test/stripe/oauth_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/order_return_test.rb b/test/stripe/order_return_test.rb index d87f5ad36..2bc2578be 100644 --- a/test/stripe/order_return_test.rb +++ b/test/stripe/order_return_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/order_test.rb b/test/stripe/order_test.rb index 8c8258297..ed992f260 100644 --- a/test/stripe/order_test.rb +++ b/test/stripe/order_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/payout_test.rb b/test/stripe/payout_test.rb index 0b656c90c..e70f6ade7 100644 --- a/test/stripe/payout_test.rb +++ b/test/stripe/payout_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/plan_test.rb b/test/stripe/plan_test.rb index c22adf9d1..531b8ecee 100644 --- a/test/stripe/plan_test.rb +++ b/test/stripe/plan_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/product_test.rb b/test/stripe/product_test.rb index 997ce66bd..cff7512f7 100644 --- a/test/stripe/product_test.rb +++ b/test/stripe/product_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/recipient_test.rb b/test/stripe/recipient_test.rb index 8265c558f..990a5159d 100644 --- a/test/stripe/recipient_test.rb +++ b/test/stripe/recipient_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/refund_test.rb b/test/stripe/refund_test.rb index b82647c88..4708e0b77 100644 --- a/test/stripe/refund_test.rb +++ b/test/stripe/refund_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/reversal_test.rb b/test/stripe/reversal_test.rb index 757e6d318..a691866f6 100644 --- a/test/stripe/reversal_test.rb +++ b/test/stripe/reversal_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/sku_test.rb b/test/stripe/sku_test.rb index f97f67b42..3b0d3b4b5 100644 --- a/test/stripe/sku_test.rb +++ b/test/stripe/sku_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/source_test.rb b/test/stripe/source_test.rb index 33be36909..7a03aa5a7 100644 --- a/test/stripe/source_test.rb +++ b/test/stripe/source_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/source_transaction_test.rb b/test/stripe/source_transaction_test.rb index f5ce90c45..f7322cb66 100644 --- a/test/stripe/source_transaction_test.rb +++ b/test/stripe/source_transaction_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/stripe_client_test.rb b/test/stripe/stripe_client_test.rb index 137b7eaa2..c9ef34359 100644 --- a/test/stripe/stripe_client_test.rb +++ b/test/stripe/stripe_client_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/stripe_object_test.rb b/test/stripe/stripe_object_test.rb index a6c21a02b..aa18aba6f 100644 --- a/test/stripe/stripe_object_test.rb +++ b/test/stripe/stripe_object_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/stripe_response_test.rb b/test/stripe/stripe_response_test.rb index a24346977..025d6da62 100644 --- a/test/stripe/stripe_response_test.rb +++ b/test/stripe/stripe_response_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/subscription_item_test.rb b/test/stripe/subscription_item_test.rb index 08b37aa61..8033e0c68 100644 --- a/test/stripe/subscription_item_test.rb +++ b/test/stripe/subscription_item_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/subscription_test.rb b/test/stripe/subscription_test.rb index ecccf26db..d2c404097 100644 --- a/test/stripe/subscription_test.rb +++ b/test/stripe/subscription_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/three_d_secure_test.rb b/test/stripe/three_d_secure_test.rb index c9493cda1..5296e59a2 100644 --- a/test/stripe/three_d_secure_test.rb +++ b/test/stripe/three_d_secure_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/topup_test.rb b/test/stripe/topup_test.rb index 14d3c3d36..cd23ba7a8 100644 --- a/test/stripe/topup_test.rb +++ b/test/stripe/topup_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/transfer_reversals_operations_test.rb b/test/stripe/transfer_reversals_operations_test.rb index 5fb971178..3101223da 100644 --- a/test/stripe/transfer_reversals_operations_test.rb +++ b/test/stripe/transfer_reversals_operations_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/transfer_test.rb b/test/stripe/transfer_test.rb index 72de926a8..1f2c26078 100644 --- a/test/stripe/transfer_test.rb +++ b/test/stripe/transfer_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/usage_record_test.rb b/test/stripe/usage_record_test.rb index b2742fc22..c3e1f9b66 100644 --- a/test/stripe/usage_record_test.rb +++ b/test/stripe/usage_record_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/util_test.rb b/test/stripe/util_test.rb index 90b115ab6..a36ea1ede 100644 --- a/test/stripe/util_test.rb +++ b/test/stripe/util_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe/webhook_test.rb b/test/stripe/webhook_test.rb index cf4990242..4f4ff4e78 100644 --- a/test/stripe/webhook_test.rb +++ b/test/stripe/webhook_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../../test_helper", __FILE__) module Stripe diff --git a/test/stripe_test.rb b/test/stripe_test.rb index 0d6f53d80..571a8ac88 100644 --- a/test/stripe_test.rb +++ b/test/stripe_test.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require File.expand_path("../test_helper", __FILE__) class StripeTest < Test::Unit::TestCase diff --git a/test/test_data.rb b/test/test_data.rb index 93c1184e9..d4f030d4f 100644 --- a/test/test_data.rb +++ b/test/test_data.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Stripe module TestData def make_error(type, message) diff --git a/test/test_helper.rb b/test/test_helper.rb index ba3ec80d0..0a722c379 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require "coveralls" Coveralls.wear!("test_frameworks")