Class: Docker_Sync::WatchStrategy::Remote_logs
- Inherits:
-
Object
- Object
- Docker_Sync::WatchStrategy::Remote_logs
- Includes:
- Execution, Thor::Shell
- Defined in:
- lib/docker-sync/watch_strategy/remotelogs.rb
Instance Method Summary collapse
- #clean ⇒ Object
-
#initialize(sync_name, options) ⇒ Remote_logs
constructor
A new instance of Remote_logs.
- #run ⇒ Object
- #stop ⇒ Object
- #watch ⇒ Object
- #watch_fork ⇒ Object
- #watch_options ⇒ Object
- #watch_thread ⇒ Object
Methods included from Execution
Constructor Details
#initialize(sync_name, options) ⇒ Remote_logs
Returns a new instance of Remote_logs.
15 16 17 18 19 20 21 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 15 def initialize(sync_name, ) @options = @sync_name = sync_name @watch_fork = nil @watch_thread = nil @unison = Docker_Sync::SyncStrategy::NativeOsx.new(@sync_name, @options) end |
Instance Method Details
#clean ⇒ Object
32 33 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 32 def clean end |
#run ⇒ Object
23 24 25 26 27 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 23 def run say_status 'success', "Showing unison logs from your sync container: #{@unison.get_container_name}", :green cmd = "docker exec #{@unison.get_container_name} tail -F /tmp/unison.log" @watch_thread = threadexec(cmd, 'Sync Log:') end |
#stop ⇒ Object
29 30 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 29 def stop end |
#watch ⇒ Object
35 36 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 35 def watch end |
#watch_fork ⇒ Object
41 42 43 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 41 def watch_fork return @watch_fork end |
#watch_options ⇒ Object
38 39 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 38 def end |
#watch_thread ⇒ Object
45 46 47 |
# File 'lib/docker-sync/watch_strategy/remotelogs.rb', line 45 def watch_thread return @watch_thread end |