Class: Swiftly::Push
- Inherits:
-
Thor
- Object
- Thor
- Swiftly::Push
show all
- Includes:
- Helpers, Thor::Actions
- Defined in:
- lib/swiftly/push.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
#production(project_name) ⇒ Object
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/swiftly/push.rb', line 37
def production( project_name )
settings = Swiftly::Project.settings( project_name )
database = Swiftly::Database.new project_name
verifiy_mina_credentials :production, settings, 'push to the'
dump_file = database.dump :production
database.sync :local, :production
mina 'deploy', :production, project_name
scp = <<-EOF.unindent
scp \
#{dump_file} \
#{settings[:production][:userhost]}:#{settings[:production][:ssh_path]}/current
EOF
swiftly_shell scp
end
|
#staging(project_name) ⇒ Object
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
# File 'lib/swiftly/push.rb', line 12
def staging( project_name )
settings = Swiftly::Project.settings( project_name )
database = Swiftly::Database.new project_name
verifiy_mina_credentials :staging, settings, 'push to the'
dump_file = database.dump :staging
database.sync :local, :staging
mina 'deploy', :staging, project_name
scp = <<-EOF.unindent
scp \
#{dump_file} \
#{settings[:staging][:userhost]}:#{settings[:staging][:ssh_path]}/current
EOF
swiftly_shell scp
end
|