Class: Blazing::Hook

Inherits:
Object
  • Object
show all
Includes:
Logger
Defined in:
lib/blazing/hook.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target) ⇒ Hook

Returns a new instance of Hook.



10
11
12
13
14
15
# File 'lib/blazing/hook.rb', line 10

def initialize(target)
  @target = target
  @config = target.config
  @options = target.options
  @shell = Blazing::Shell.new
end

Instance Attribute Details

#targetObject

Returns the value of attribute target.



8
9
10
# File 'lib/blazing/hook.rb', line 8

def target
  @target
end

Instance Method Details

#rake_commandObject



22
23
24
# File 'lib/blazing/hook.rb', line 22

def rake_command
  "#{options_as_vars}bundle exec rake #{@config.rake_task}" if @config.rake_task
end

#setupObject



17
18
19
20
# File 'lib/blazing/hook.rb', line 17

def setup
  prepare_hook
  deploy_hook
end