Class: Opsk::Module

Inherits:
Thor::Group
  • Object
show all
Includes:
Thorable, Thor::Actions
Defined in:
lib/opskeleton/module.rb

Instance Method Summary collapse

Methods included from Thorable

included

Instance Method Details

#create_moduleObject



9
10
11
12
13
14
# File 'lib/opskeleton/module.rb', line 9

def create_module
  inside('static-modules') do
    run("puppet module generate puppet-#{name}")
    run("mv puppet-#{name} #{name}")
  end
end

#create_rakefileObject



22
23
24
25
26
# File 'lib/opskeleton/module.rb', line 22

def create_rakefile
  rakefile = "static-modules/#{name}/Rakefile"
  remove_file(rakefile)
  template('templates/module/Rakefile.erb',rakefile)
end

#rspecObject



16
17
18
19
20
# File 'lib/opskeleton/module.rb', line 16

def rspec
 inside("static-modules/#{name}/") do
   run("rspec-puppet-init")
 end
end

#spec_helperObject



28
29
30
31
32
# File 'lib/opskeleton/module.rb', line 28

def spec_helper
  spec_helper = "static-modules/#{name}/spec/spec_helper.rb"
  remove_file(spec_helper)
  template('templates/module/spec_helper.rb',spec_helper)
end