ro_daemon 0.0.4 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/ro_daemon/daemon.rb +1 -0
- data/lib/ro_daemon/rmt.rb +31 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 87c65829ab5acd990578f1a53018098eab486159
|
4
|
+
data.tar.gz: ff65f2ae0efd72a70065c8b9229dd5f87ae1efd7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c502273d0899222ffae5766410116c3454b7b6e636bd7aa18177312dab9abea5c6b66ab69a4f4cd903dea20d2a897e434ec2b291dc784006297213802f7c1fb
|
7
|
+
data.tar.gz: bbbf1d23a3e2422d91a7302f28cdf293bfc4ea821937af3e1eda7909e193cef2c1380d5e719e922f932409490c2e592e46bc9ea87039c59653ee4b40f4df2ba1
|
data/lib/ro_daemon/daemon.rb
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'ro_cell/rmt'
|
2
|
+
module RoDaemon
|
3
|
+
class Rmt < ::RoCell::Rmt
|
4
|
+
def initialize(user_at_host=nil, *args, &blk)
|
5
|
+
if (user_at_host.nil?) or user_at_host.match(%r{vagrant})
|
6
|
+
super("vagrant@localhost",
|
7
|
+
se: Net::SSH.start(
|
8
|
+
"localhost", "vagrant",
|
9
|
+
auth_methods: ["publickey"],
|
10
|
+
port: 2222,
|
11
|
+
keys: [Pj.home(".vagrant.d/insecure_private_key")]))
|
12
|
+
else
|
13
|
+
super
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def sync(pj, *args, &blk)
|
18
|
+
@pj = pj
|
19
|
+
up(pj, *args, &blk)
|
20
|
+
self
|
21
|
+
end
|
22
|
+
|
23
|
+
def pj
|
24
|
+
@pj ||= home
|
25
|
+
end
|
26
|
+
|
27
|
+
def daemonize(cmd, *args, &blk)
|
28
|
+
sh "cd #{pj}; ro_daemonize #{cmd}"
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ro_daemon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -64,6 +64,7 @@ files:
|
|
64
64
|
- lib/ro_daemon/data.rb
|
65
65
|
- lib/ro_daemon/helper.rb
|
66
66
|
- lib/ro_daemon/mg.rb
|
67
|
+
- lib/ro_daemon/rmt.rb
|
67
68
|
- spec/lib/ro_daemon/daemon_spec.rb
|
68
69
|
- spec/rails_helper.rb
|
69
70
|
- spec/spec_helper.rb
|