Skip to content

Commit

Permalink
Require 3rd party dependencies only if needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
rogerluan committed Dec 27, 2023
1 parent 145e2bc commit 8ae492b
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/arkana/config_parser.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require "yaml"
require "yaml" unless defined?(YAML)
require_relative "models/config"
require_relative "helpers/ui"

Expand Down
4 changes: 2 additions & 2 deletions lib/arkana/kotlin_code_generator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "erb"
require "fileutils"
require "erb" unless defined?(Erb)
require "fileutils" unless defined?(FileUtils)
require_relative "helpers/string"

# Responsible for generating Kotlin source and test files.
Expand Down
2 changes: 1 addition & 1 deletion lib/arkana/salt_generator.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

require "securerandom"
require "securerandom" unless defined?(SecureRandom)
require_relative "models/salt"

# Responsible for generating the salt.
Expand Down
4 changes: 2 additions & 2 deletions lib/arkana/swift_code_generator.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# frozen_string_literal: true

require "erb"
require "fileutils"
require "erb" unless defined?(Erb)
require "fileutils" unless defined?(FileUtils)
require_relative "helpers/string"

# Responsible for generating Swift source and test files.
Expand Down

0 comments on commit 8ae492b

Please sign in to comment.