Sha256: 9904a1b469c31725b6763f8465e87b58532c1454cbbcd6b5148030861f5039f7

Contents?: true

Size: 548 Bytes

Versions: 3

Compression:

Stored size: 548 Bytes

Contents

# typed: true
# frozen_string_literal: true

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

3 entries across 3 versions & 1 rubygems

Version Path
packwerk-2.3.0 lib/packwerk/spring_command.rb
packwerk-2.2.2 lib/packwerk/spring_command.rb
packwerk-2.2.1 lib/packwerk/spring_command.rb