Class: Opsk::Module
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Opsk::Module
show all
- Includes:
- Thorable, Thor::Actions
- Defined in:
- lib/opskeleton/module.rb
Instance Method Summary
collapse
Methods included from Thorable
#artifact, #artifact_path, #check_root, included, #machines, #meta, #name, #type_of
Instance Method Details
#create_module ⇒ Object
14
15
16
17
18
19
|
# File 'lib/opskeleton/module.rb', line 14
def create_module
inside('static-modules') do
run("puppet module generate puppet-#{name}")
run("mv puppet-#{name} #{name}")
end
end
|
#create_rakefile ⇒ Object
27
28
29
30
31
|
# File 'lib/opskeleton/module.rb', line 27
def create_rakefile
rakefile = "static-modules/#{name}/Rakefile"
remove_file(rakefile)
template('templates/module/Rakefile.erb',rakefile)
end
|
#rspec ⇒ Object
21
22
23
24
25
|
# File 'lib/opskeleton/module.rb', line 21
def rspec
inside("static-modules/#{name}/") do
run("rspec-puppet-init")
end
end
|
#spec_helper ⇒ Object
33
34
35
36
37
|
# File 'lib/opskeleton/module.rb', line 33
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
|
#validate ⇒ Object
9
10
11
|
# File 'lib/opskeleton/module.rb', line 9
def validate
check_root
end
|