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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 696fd9a85294fbb472b51831c64e131ab2621f64
4
- data.tar.gz: 71b19e9b4161993cef4dbe9961ff5cf847ce2c7b
3
+ metadata.gz: 4dd0b3e4b1d7a17eff34595ed3f57d2aec1ded54
4
+ data.tar.gz: cd24a3916671b8cdd118faa374e3206e1a0f26d4
5
5
  SHA512:
6
- metadata.gz: bec3f47e955feeedf129024eb9f6024e3f6d070c92d989cf8514ccc299fcb1ea04cd5601fab483d49273c5f9a6449c97a2fd33cbf9c8acef9073134a2b030344
7
- data.tar.gz: 0db81ab0f37875f0be3bcd3a186eea69d6a077a76bdbc32961ce2bb4a3408d5544c3fd502c40f0442fd9015c6e5ba7a15f9be7fd3e084ac0ccc5df3743b0629b
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;
@@ -1,4 +1,4 @@
1
1
  # encoding: utf-8
2
2
  module MindControl
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
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
- process_name.gsub! /[^[[:alnum:]]\-_]/, "_"
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.2
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-06 00:00:00.000000000 Z
11
+ date: 2013-06-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline