Skip to content

Commit

Permalink
Require “active_support/all” at Beginning Instead of Each File
Browse files Browse the repository at this point in the history
This should help avoid active_support errors like NoMethodError on simple functions like `blank?` in GitHub Actions and non-Rails environments where ActiveSupport isn’t loaded.
  • Loading branch information
obahareth committed Nov 28, 2023
1 parent 8560070 commit 51bc541
Show file tree
Hide file tree
Showing 9 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion lib/zatca.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
require_relative "zatca/version"
require_relative "zatca/types"

require "active_support"
require "active_support/all"
require "zeitwerk"
require "dry-initializer"
require "dry-types"
Expand Down
2 changes: 0 additions & 2 deletions lib/zatca/signing/csr.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "active_support"

class ZATCA::Signing::CSR
attr_reader :key, :csr_options, :mode

Expand Down
1 change: 0 additions & 1 deletion lib/zatca/signing/ecdsa.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "active_support"
require "starkbank-ecdsa"

class ZATCA::Signing::ECDSA
Expand Down
1 change: 0 additions & 1 deletion lib/zatca/ubl/base_component.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
require "active_support"
require "dry-initializer"
require_relative "../types"

Expand Down
2 changes: 0 additions & 2 deletions lib/zatca/ubl/builder.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "active_support"

class ZATCA::UBL::Builder
extend Dry::Initializer

Expand Down
2 changes: 0 additions & 2 deletions lib/zatca/ubl/common_aggregate_components/allowance_charge.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "active_support"

class ZATCA::UBL::CommonAggregateComponents::AllowanceCharge < ZATCA::UBL::BaseComponent
attr_accessor :id, :charge_indicator, :allowance_charge_reason, :amount

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "active_support"

class ZATCA::UBL::CommonAggregateComponents::LegalMonetaryTotal < ZATCA::UBL::BaseComponent
attr_reader :line_extension_amount, :tax_exclusive_amount,
:tax_inclusive_amount, :allowance_total_amount, :prepaid_amount,
Expand Down
2 changes: 0 additions & 2 deletions lib/zatca/ubl/common_aggregate_components/party_tax_scheme.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "active_support"

class ZATCA::UBL::CommonAggregateComponents::PartyTaxScheme < ZATCA::UBL::BaseComponent
def initialize(
company_id: nil,
Expand Down
2 changes: 0 additions & 2 deletions lib/zatca/ubl/invoice.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require "active_support"

class ZATCA::UBL::Invoice < ZATCA::UBL::BaseComponent
TYPES = {
invoice: "388",
Expand Down

0 comments on commit 51bc541

Please sign in to comment.