Class: Ra10ke::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Includes:
Dependencies, Deprecation, Duplicates, Install, Solve, Syntax, Validate
Defined in:
lib/ra10ke.rb

Constant Summary

Constants included from Validate

Validate::BAD_EMOJI, Validate::GOOD_EMOJI

Constants included from Dependencies

Dependencies::BAD_EMOJI, Dependencies::GOOD_EMOJI

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Validate

#define_task_validate

Methods included from Install

#define_task_install

Methods included from Duplicates

#define_task_duplicates

Methods included from Deprecation

#define_task_deprecation

Methods included from Dependencies

#define_task_dependencies, #define_task_print_git_conversion

Methods included from Syntax

#define_task_syntax

Methods included from Solve

#define_task_solve_dependencies

Constructor Details

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

Returns a new instance of RakeTask.

Yields:

  • (_self)

Yield Parameters:



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# File 'lib/ra10ke.rb', line 26

def initialize(*args)
  @basedir         = Dir.pwd
  @moduledir       = nil
  @puppetfile_path = nil
  @puppetfile_name = nil
  @force           = nil
  @purge           = false

  yield(self) if block_given?

  namespace :r10k do
    define_task_solve_dependencies(*args)
    define_task_syntax(*args)
    define_task_dependencies(*args)
    define_task_deprecation(*args)
    define_task_duplicates(*args)
    define_task_install(*args)
    define_task_validate(*args)
    define_task_print_git_conversion(*args)
  end
end

Instance Attribute Details

#basedirObject

Returns the value of attribute basedir.



24
25
26
# File 'lib/ra10ke.rb', line 24

def basedir
  @basedir
end

#forceObject

Returns the value of attribute force.



24
25
26
# File 'lib/ra10ke.rb', line 24

def force
  @force
end

#moduledirObject

Returns the value of attribute moduledir.



24
25
26
# File 'lib/ra10ke.rb', line 24

def moduledir
  @moduledir
end

#puppetfile_nameObject

Returns the value of attribute puppetfile_name.



24
25
26
# File 'lib/ra10ke.rb', line 24

def puppetfile_name
  @puppetfile_name
end

#puppetfile_pathObject

Returns the value of attribute puppetfile_path.



24
25
26
# File 'lib/ra10ke.rb', line 24

def puppetfile_path
  @puppetfile_path
end

#purgeObject

Returns the value of attribute purge.



24
25
26
# File 'lib/ra10ke.rb', line 24

def purge
  @purge
end

Instance Method Details

#get_puppetfileObject



48
49
50
51
52
53
# File 'lib/ra10ke.rb', line 48

def get_puppetfile
  R10K::Puppetfile.new(@basedir, @moduledir, @puppetfile_path, @puppetfile_name, @force)
rescue ArgumentError # R10k < 2.6.0
  R10K::Puppetfile.new(@basedir, @moduledir,
                       @puppetfile_path || File.join(@basedir, @puppetfile_name || 'Puppetfile'))
end