class Pushwagner::Hooks

Deployer strategy for maven repos (wip).

Attributes

local[R]
remote[R]

Public Class Methods

new(env) click to toggle source
# File lib/pushwagner/hooks.rb, line 16
def initialize(env)
  raise "Invalid environment" unless env
  default_cfg = { before: [], after: [] }
  @local = Hooks::Local.new(env, env.hooks['local'] || default_cfg)
  @remote = Hooks::Remote.new(env, env.hooks['remote'] || default_cfg)
end

Public Instance Methods

run(target) click to toggle source
# File lib/pushwagner/hooks.rb, line 23
def run(target)
  if target == :before
    local.run(target)
    remote.run(target)
  elsif target == :after
    local.run(target)
    remote.run(target)
  end
end