Sha256: ec05e42a80aa45cb25865227a51a0f28403490faf691f5ae496fb10c0b5cead5

Contents?: true

Size: 550 Bytes

Versions: 4

Compression:

Stored size: 550 Bytes

Contents

# frozen_string_literal: true
# typed: ignore

require "spring/commands"

module Packwerk
  class SpringCommand
    def env(*)
      # Packwerk needs to run in a test environment, which has a set of autoload paths that are
      # often a superset of the dev/prod paths (for example, test/support/helpers)
      "test"
    end

    def exec_name
      "packwerk"
    end

    def gem_name
      "packwerk"
    end

    def call
      load(Gem.bin_path(gem_name, exec_name))
    end
  end

  Spring.register_command("packwerk", SpringCommand.new)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
packwerk-1.1.0 lib/packwerk/spring_command.rb
packwerk-1.0.2 lib/packwerk/spring_command.rb
packwerk-1.0.1 lib/packwerk/spring_command.rb
packwerk-1.0.0 lib/packwerk/spring_command.rb