Class: Syncoku::Remote
Overview
Responsible for syncing to a remote app
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Runnable
#run_command, #test_command
Constructor Details
#initialize(remote) ⇒ Remote
Returns a new instance of Remote.
9
10
11
|
# File 'lib/syncoku/remote.rb', line 9
def initialize(remote)
@remote = remote
end
|
Instance Attribute Details
#remote ⇒ Object
Returns the value of attribute remote.
7
8
9
|
# File 'lib/syncoku/remote.rb', line 7
def remote
@remote
end
|
Instance Method Details
#app_name ⇒ Object
30
31
32
|
# File 'lib/syncoku/remote.rb', line 30
def app_name
@app_name ||= run_command("git remote -v | grep #{remote} | grep push").match(/heroku\.com:(.*)\.git/)[1]
end
|
#both(args) ⇒ Object
13
14
15
16
|
# File 'lib/syncoku/remote.rb', line 13
def both(args)
db(args)
s3(args) if S3.config?
end
|
#rebuild(args) ⇒ Object
26
27
28
|
# File 'lib/syncoku/remote.rb', line 26
def rebuild(args)
puts "Rebuild not implemented"
end
|
#s3(args) ⇒ Object
22
23
24
|
# File 'lib/syncoku/remote.rb', line 22
def s3(args)
Syncoku::S3.new(remote).sync
end
|