mind_control 0.1.2 → 0.1.3
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/README.md +16 -0
- data/lib/mind_control/version.rb +1 -1
- data/lib/mind_control.rb +2 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dd0b3e4b1d7a17eff34595ed3f57d2aec1ded54
|
4
|
+
data.tar.gz: cd24a3916671b8cdd118faa374e3206e1a0f26d4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d9f931c672d9bb26a96db82f52ef1a7f419adad366f3a34cdbaef73ec7ad23bf8bb9c3ae143496a8600cb34ccc498ba9144803b45e8ccca65a68a4d47ad80a4
|
7
|
+
data.tar.gz: cc5892b58c3271cf427a1e2286cc5cb504fc76b08fa3fde4b28f7bf1118ab66b2b91831927f5962d9adc0ab3805064389f0b7de25539b8a2a21e640e7eaf3773
|
data/README.md
CHANGED
@@ -53,6 +53,8 @@ Or set program name (see "Connection"):
|
|
53
53
|
MindControl.start :name => "some name"
|
54
54
|
```
|
55
55
|
|
56
|
+
**NB:** HOME (or XDG_CACHE_HOME) environment variable MUST be set for host program!
|
57
|
+
|
56
58
|
### Connection
|
57
59
|
|
58
60
|
Run in terminal:
|
@@ -98,6 +100,20 @@ require "mind_control/em"
|
|
98
100
|
MindControl.start :target => EventMachine
|
99
101
|
```
|
100
102
|
|
103
|
+
### Capistrano task
|
104
|
+
|
105
|
+
You can use capistrano to start SSH session:
|
106
|
+
|
107
|
+
```ruby
|
108
|
+
task :mind_control, :roles => :app do
|
109
|
+
server = find_servers_for_task( current_task ).first
|
110
|
+
|
111
|
+
exec <<-SH
|
112
|
+
ssh #{server.user || user}@#{server.host} -p #{server.port || 22} -t "#{rvm_shell} -c 'cd #{current_path} && bundle exec mind_control'"
|
113
|
+
SH
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
101
117
|
## TODO
|
102
118
|
|
103
119
|
- Better readme;
|
data/lib/mind_control/version.rb
CHANGED
data/lib/mind_control.rb
CHANGED
@@ -35,7 +35,8 @@ module MindControl
|
|
35
35
|
process_name = options[ :name ] || $PROGRAM_NAME
|
36
36
|
|
37
37
|
# Make name filesystem safe
|
38
|
-
|
38
|
+
# NB: we can't use gsub! because $PROGRAM_NAME is frozen
|
39
|
+
process_name = process_name.gsub( /[^[[:alnum:]]\-_]/, "_" )
|
39
40
|
|
40
41
|
# Some shared temp directory for sockets.
|
41
42
|
socket_dir = options[ :sockets_dir ] || DEFAULT_SOCKETS_DIR
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mind_control
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Denis Diachkov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-06-
|
11
|
+
date: 2013-06-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: highline
|