Class: Swiftly::Create
- Inherits:
-
Thor
- Object
- Thor
- Swiftly::Create
show all
- Includes:
- Helpers
- Defined in:
- lib/swiftly/create.rb
Instance Method Summary
collapse
Methods included from Helpers
#find_and_replace, #find_and_replace_all, #fix_serialization, #fix_text, #mina, #return_cmd, #swiftly_shell, #unzip, #update_setting, #verifiy_mina_credentials, #zip
Instance Method Details
#git(project_name) ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/swiftly/create.rb', line 33
def git( project_name )
settings = Swiftly::Config.load :global
project_path = File.join(
settings[:sites_path],
project_name
)
CreateProject.new( [
project_name,
project_path
] ).invoke_all
CreateGit.new([
project_path
]).invoke_all
end
|
#project(project_name) ⇒ Object
17
18
19
20
21
22
23
24
25
26
27
28
29
|
# File 'lib/swiftly/create.rb', line 17
def project( project_name )
project_path = File.join(
Swiftly::Config.load( :global )[:sites_path],
project_name
)
CreateProject.new([
project_name,
project_path
]).invoke_all
end
|
#wordpress(project_name) ⇒ Object
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
# File 'lib/swiftly/create.rb', line 57
def wordpress project_name
global_settings = Swiftly::Config.load :global
project_settings = Swiftly::Config.load :swiftly
template = Swiftly::Template.retrieve :wordpress, options[:template]
say_status "#{APP_NAME}:", "Wordpress template #{options[:template]} cannot be found.", :yellow unless template
abort unless template
project_path = File.join(
global_settings[:sites_path],
project_name
)
CreateProject.new([
project_name,
project_path
]).invoke_all
CreateWordpress.new([
project_name,
template,
project_path
]).invoke_all
CreateGit.new([
project_path
]).invoke_all
end
|