Class: Syncoku::Remote

Inherits:
Object
  • Object
show all
Includes:
Git, Runnable
Defined in:
lib/syncoku/remote.rb

Overview

Responsible for syncing to a remote app

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Git

#extract_app_name

Methods included from Runnable

#run_command, #test_command

Constructor Details

#initialize(remote) ⇒ Remote

Returns a new instance of Remote.



10
11
12
# File 'lib/syncoku/remote.rb', line 10

def initialize(remote)
  @remote = remote
end

Instance Attribute Details

#remoteObject (readonly)

Returns the value of attribute remote.



8
9
10
# File 'lib/syncoku/remote.rb', line 8

def remote
  @remote
end

Instance Method Details

#app_nameObject



31
32
33
# File 'lib/syncoku/remote.rb', line 31

def app_name
  @app_name ||= extract_app_name remote
end

#both(args) ⇒ Object



14
15
16
17
# File 'lib/syncoku/remote.rb', line 14

def both(args)
  db(args)
  s3(args) if S3.config?
end

#db(args) ⇒ Object



19
20
21
# File 'lib/syncoku/remote.rb', line 19

def db(args)
  Syncoku::RemoteDb.new(app_name).sync(args)
end

#rebuild(args) ⇒ Object



27
28
29
# File 'lib/syncoku/remote.rb', line 27

def rebuild(args)
  puts "Rebuild not implemented"
end

#s3(args) ⇒ Object



23
24
25
# File 'lib/syncoku/remote.rb', line 23

def s3(args)
  Syncoku::S3.new(remote).sync(args)
end