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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 664d505f80465c4138d376b6b975cdf3bc8ccd2d
4
- data.tar.gz: 88bf4d5bffa691aa145e8c0cae2a0b58eb88cda2
3
+ metadata.gz: 87c65829ab5acd990578f1a53018098eab486159
4
+ data.tar.gz: ff65f2ae0efd72a70065c8b9229dd5f87ae1efd7
5
5
  SHA512:
6
- metadata.gz: d92895f89bdc6786e6901fb9b3345909326271750cde3a9e26b7e5021f829cb0dd5a12794824657936736f27f620319ea27977cb9afb2dc2791080ef902f7ebe
7
- data.tar.gz: e3c9729487cbb41e728eceea100be2a11b03c9d862c59d34ae1c4f447ca09722c10055a9b0112953cd737c1264e55668152aa0c0c49cbc0d76bf59f0e1962c5b
6
+ metadata.gz: 1c502273d0899222ffae5766410116c3454b7b6e636bd7aa18177312dab9abea5c6b66ab69a4f4cd903dea20d2a897e434ec2b291dc784006297213802f7c1fb
7
+ data.tar.gz: bbbf1d23a3e2422d91a7302f28cdf293bfc4ea821937af3e1eda7909e193cef2c1380d5e719e922f932409490c2e592e46bc9ea87039c59653ee4b40f4df2ba1
@@ -19,6 +19,7 @@ module RoDaemon
19
19
 
20
20
  stdout, stderr = d.stdout, d.stderr
21
21
  pid = spawn_daemon(cmd, stdout, stderr)
22
+
22
23
  fix_db_err do
23
24
  d.save
24
25
  end
@@ -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
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-03 00:00:00.000000000 Z
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