Sha256: aa6d3853128bc36e4e6226140417416d33610294d63c9b7ee369fb1f5c5dbe73

Contents?: true

Size: 751 Bytes

Versions: 28

Compression:

Stored size: 751 Bytes

Contents

# typed: strict
# frozen_string_literal: true

module CodeOwnership
  module Private
    # This class handles loading extensions to code_ownership using the `require` directive
    # in the `code_ownership.yml` configuration.
    module ExtensionLoader
      class << self
        extend T::Sig
        sig { params(require_directive: String).void }
        def load(require_directive)
          # We want to transform the require directive to behave differently
          # if it's a specific local file being required versus a gem
          if require_directive.start_with?(".")
            require File.join(Pathname.pwd, require_directive)
          else
            require require_directive
          end
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
code_ownership-1.36.2 lib/code_ownership/private/extension_loader.rb
code_ownership-1.36.1 lib/code_ownership/private/extension_loader.rb
code_ownership-1.36.0 lib/code_ownership/private/extension_loader.rb
code_ownership-1.35.0 lib/code_ownership/private/extension_loader.rb
code_ownership-1.34.2 lib/code_ownership/private/extension_loader.rb
code_ownership-1.34.1 lib/code_ownership/private/extension_loader.rb
code_ownership-1.33.1 lib/code_ownership/private/extension_loader.rb
code_ownership-1.33.0 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.19 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.18 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.17 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.16 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.15 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.14 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.13 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.12 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.11 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.10 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.9 lib/code_ownership/private/extension_loader.rb
code_ownership-1.32.8 lib/code_ownership/private/extension_loader.rb