Class: DockerizeStack::Command
- Inherits:
-
Thor
- Object
- Thor
- DockerizeStack::Command
show all
- Includes:
- Thor::Actions, ThorActionsExtend
- Defined in:
- lib/dockerize_stack.rb
Constant Summary
ThorActionsExtend::CONFIG
Instance Method Summary
collapse
#fetch_template_variables, #run
Instance Method Details
#gatsby ⇒ Object
56
57
58
59
60
61
62
63
|
# File 'lib/dockerize_stack.rb', line 56
def gatsby
@type = :gatsby
run(options, @type)
all_file_paths(@type).each do |file_path|
file_name = file_path.gsub("/templates/#{@type}", '')
template file_name, "#{@output_folder}/#{file_name.gsub('.erb', '')}"
end
end
|
#rails ⇒ Object
20
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/dockerize_stack.rb', line 20
def rails
run(options, :rails)
all_file_paths(:rails).each do |file_path|
if file_path =~ %r{./templates/rails/kubernetes} && !@kubernetes
return false
end
file_name = file_path.gsub('/templates/rails', '')
template file_name, "#{@output_folder}/#{file_name.gsub('.erb', '')}"
end
puts 'Update your database.yml based in database-docker.yml'
end
|
#react ⇒ Object
40
41
42
43
44
45
46
|
# File 'lib/dockerize_stack.rb', line 40
def react
run(options, :react)
all_file_paths(:react).each do |file_path|
file_name = file_path.gsub('/templates/react', '')
template file_name, "#{@output_folder}/#{file_name.gsub('.erb', '')}"
end
end
|
#strapi ⇒ Object
73
74
75
76
77
78
79
80
|
# File 'lib/dockerize_stack.rb', line 73
def strapi
@type = :strapi
run(options, @type)
all_file_paths(@type).each do |file_path|
file_name = file_path.gsub("/templates/#{@type}", '')
template file_name, "#{@output_folder}/#{file_name.gsub('.erb', '')}"
end
end
|