Sha256: 74d45139c28a9ec4d90bc77dc1b5aeb8ac41c7938815b741c7607fae5d884b9f

Contents?: true

Size: 292 Bytes

Versions: 8

Compression:

Stored size: 292 Bytes

Contents

class Kamal::Commands::Hook < Kamal::Commands::Base
  def run(hook, **details)
    [ hook_file(hook), env: tags(**details).env ]
  end

  def hook_exists?(hook)
    Pathname.new(hook_file(hook)).exist?
  end

  private
    def hook_file(hook)
      "#{config.hooks_path}/#{hook}"
    end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
kamal-1.4.0 lib/kamal/commands/hook.rb
kamal-1.3.1 lib/kamal/commands/hook.rb
kamal-1.3.0 lib/kamal/commands/hook.rb
kamal-1.2.0 lib/kamal/commands/hook.rb
kamal-1.1.0 lib/kamal/commands/hook.rb
kamal-1.0.0 lib/kamal/commands/hook.rb
kamal-0.16.1 lib/kamal/commands/hook.rb
kamal-0.16.0 lib/kamal/commands/hook.rb