Class: GithubPages::DeployTask

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
JekyllRakeExt, JsonRakeExt
Defined in:
lib/ghpages_deploy/rake/task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from JsonRakeExt

directory_sitemap, #json_sitemap, update_sitemap

Methods included from JekyllRakeExt

#init_jekyll

Constructor Details

#initialize(*args) {|_self| ... } ⇒ DeployTask

Returns a new instance of DeployTask.

Yields:

  • (_self)

Yield Parameters:



13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# File 'lib/ghpages_deploy/rake/task.rb', line 13

def initialize(*args)
  @args = args
  @destinations = []
  @handler = GithubPages::Handler.new

  yield self if block_given?

  @source &&= @source.gsub(%r{^#{Dir.pwd}[\/]?}, '')

  @source ||= '.'
  @remote ||= 'origin'

  @destinations << '.' if @destinations.empty?

  define
end

Instance Attribute Details

#handlerObject (readonly)

Returns the value of attribute handler.



31
32
33
# File 'lib/ghpages_deploy/rake/task.rb', line 31

def handler
  @handler
end

#remoteObject

Returns the value of attribute remote.



30
31
32
# File 'lib/ghpages_deploy/rake/task.rb', line 30

def remote
  @remote
end

#sourceObject

Returns the value of attribute source.



30
31
32
# File 'lib/ghpages_deploy/rake/task.rb', line 30

def source
  @source
end

Instance Method Details

#register(destination) ⇒ Object



33
34
35
# File 'lib/ghpages_deploy/rake/task.rb', line 33

def register(destination)
  @destinations << destination
end