rexec 1.2.4 → 1.2.6
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.
- data/{README.rdoc → README.md} +28 -19
- data/lib/rexec/to_cmd.rb +12 -0
- data/lib/rexec/version.rb +1 -1
- metadata +9 -11
data/{README.rdoc → README.md}
RENAMED
|
@@ -1,46 +1,55 @@
|
|
|
1
|
-
|
|
1
|
+
RExec
|
|
2
|
+
=====
|
|
2
3
|
|
|
3
|
-
Author
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
* Author: Samuel G. D. Williams (<http://www.oriontransfer.co.nz>)
|
|
5
|
+
* Copyright (C) 2007, 2009, 2011 Samuel G. D. Williams.
|
|
6
|
+
* Released under the MIT license.
|
|
6
7
|
|
|
7
8
|
RExec stands for Remote Execute and provides support for executing processes
|
|
8
9
|
both locally and remotely. It provides a number of different tools to assist
|
|
9
10
|
with running Ruby code:
|
|
10
11
|
|
|
11
12
|
* A framework to send Ruby code to a remote server for execution.
|
|
12
|
-
* A framework for writing command line daemons (i.e.
|
|
13
|
-
* A comprehensive
|
|
13
|
+
* A framework for writing command line daemons (i.e. `start`, `restart`, `stop`, `status`).
|
|
14
|
+
* A comprehensive `Task` class for launching tasks, managing input and output, exit status, etc.
|
|
14
15
|
* Basic privilege management code for changing the processes owner.
|
|
15
16
|
* A bunch of helpers for various different things (such as reading a file backwards).
|
|
16
|
-
*
|
|
17
|
+
* `daemon-exec` executable for running regular shell tasks in the background.
|
|
17
18
|
|
|
18
|
-
|
|
19
|
+
For more information please see the [project page][1].
|
|
19
20
|
|
|
20
|
-
|
|
21
|
+
[1]: http://www.oriontransfer.co.nz/gems/rexec
|
|
22
|
+
|
|
23
|
+
Comprehensive process management
|
|
24
|
+
--------------------------------
|
|
25
|
+
|
|
26
|
+
`RExec::Task` provides a comprehensive wrapper for low level process execution
|
|
21
27
|
and life-cycle management. You can easy spawn new child processes, background
|
|
22
28
|
processes and execute Ruby code in a child instance.
|
|
23
29
|
|
|
24
|
-
|
|
30
|
+
Light weight bi-directional communication
|
|
31
|
+
-----------------------------------------
|
|
25
32
|
|
|
26
|
-
The
|
|
33
|
+
The `RExec::Connection` provides a simple process based API for communicating
|
|
27
34
|
with distant instances of Ruby. These can either be local or remote, such
|
|
28
35
|
as over SSH.
|
|
29
36
|
|
|
30
|
-
|
|
37
|
+
Simple daemonization
|
|
38
|
+
--------------------
|
|
31
39
|
|
|
32
|
-
The
|
|
40
|
+
The `RExec::Daemon` module provides the foundation to develop long-running
|
|
33
41
|
background processes. Simply create a daemon class which inherits from
|
|
34
|
-
|
|
35
|
-
with the standard command line interface, e.g.
|
|
36
|
-
and
|
|
42
|
+
`RExec::Daemon::Base` and you can have a fully featured background daemon
|
|
43
|
+
with the standard command line interface, e.g. `start`, `restart`, `status`
|
|
44
|
+
and `stop`.
|
|
37
45
|
|
|
38
|
-
Along with this, a executable is included called
|
|
46
|
+
Along with this, a executable is included called `daemon-exec` which allows
|
|
39
47
|
for any standard shell script to be run as a background process.
|
|
40
48
|
|
|
41
|
-
|
|
49
|
+
License
|
|
50
|
+
-------
|
|
42
51
|
|
|
43
|
-
Copyright (c) 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
|
|
52
|
+
Copyright (c) 2007, 2009, 2011 Samuel G. D. Williams. <http://www.oriontransfer.co.nz>
|
|
44
53
|
|
|
45
54
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
46
55
|
of this software and associated documentation files (the "Software"), to deal
|
data/lib/rexec/to_cmd.rb
CHANGED
|
@@ -6,6 +6,18 @@ class Array
|
|
|
6
6
|
end
|
|
7
7
|
end
|
|
8
8
|
|
|
9
|
+
class Pathname
|
|
10
|
+
def to_cmd
|
|
11
|
+
to_s.to_cmd
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
class Symbol
|
|
16
|
+
def to_cmd
|
|
17
|
+
to_s.to_cmd
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
9
21
|
class String
|
|
10
22
|
# Conditionally quote a string if it contains whitespace or quotes.
|
|
11
23
|
def to_cmd
|
data/lib/rexec/version.rb
CHANGED
metadata
CHANGED
|
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
|
5
5
|
segments:
|
|
6
6
|
- 1
|
|
7
7
|
- 2
|
|
8
|
-
-
|
|
9
|
-
version: 1.2.
|
|
8
|
+
- 6
|
|
9
|
+
version: 1.2.6
|
|
10
10
|
platform: ruby
|
|
11
11
|
authors:
|
|
12
12
|
- Samuel Williams
|
|
@@ -14,7 +14,7 @@ autorequire:
|
|
|
14
14
|
bindir: bin
|
|
15
15
|
cert_chain: []
|
|
16
16
|
|
|
17
|
-
date: 2011-07-
|
|
17
|
+
date: 2011-07-17 00:00:00 +12:00
|
|
18
18
|
default_executable: daemon-exec
|
|
19
19
|
dependencies: []
|
|
20
20
|
|
|
@@ -24,8 +24,8 @@ executables:
|
|
|
24
24
|
- daemon-exec
|
|
25
25
|
extensions: []
|
|
26
26
|
|
|
27
|
-
extra_rdoc_files:
|
|
28
|
-
|
|
27
|
+
extra_rdoc_files: []
|
|
28
|
+
|
|
29
29
|
files:
|
|
30
30
|
- bin/daemon-exec
|
|
31
31
|
- lib/rexec/client.rb
|
|
@@ -50,16 +50,14 @@ files:
|
|
|
50
50
|
- test/server_test.rb
|
|
51
51
|
- test/task.rb
|
|
52
52
|
- test/task_test.rb
|
|
53
|
-
- README.
|
|
53
|
+
- README.md
|
|
54
54
|
has_rdoc: yard
|
|
55
|
-
homepage: http://www.oriontransfer.co.nz/
|
|
55
|
+
homepage: http://www.oriontransfer.co.nz/gems/rexec
|
|
56
56
|
licenses: []
|
|
57
57
|
|
|
58
58
|
post_install_message:
|
|
59
|
-
rdoc_options:
|
|
60
|
-
|
|
61
|
-
- README.rdoc
|
|
62
|
-
- --no-private
|
|
59
|
+
rdoc_options: []
|
|
60
|
+
|
|
63
61
|
require_paths:
|
|
64
62
|
- lib
|
|
65
63
|
required_ruby_version: !ruby/object:Gem::Requirement
|