utils 0.0.81 → 0.0.82
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/lib/utils/editor.rb +4 -2
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +5 -2
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85ce1623a7e47439352723aa155771aa01fb6736
|
4
|
+
data.tar.gz: ec9ce26f04a73b26c0411b78c210f4d7b3ecabc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 255e2546e728afe76ca1a25be1e0241875855341b388b32d8b6b841574393744994983f3b183ab3d8d4f6ba3640aebbcb90f12c8b4dc882b1c7a9ae992e4e092
|
7
|
+
data.tar.gz: 28471e78f74c2023c990cd92fee399b80fe0690a80044e384056443d0fc89a8f8f9c89a58f24de92b4095243f08df327a89b8d322e2815cf65ef804928d50b4a
|
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.82
|
data/lib/utils/editor.rb
CHANGED
@@ -2,6 +2,7 @@ require 'tins/xt/full'
|
|
2
2
|
require 'tins/deep_const_get'
|
3
3
|
require 'fileutils'
|
4
4
|
require 'rbconfig'
|
5
|
+
require 'pstree'
|
5
6
|
|
6
7
|
module Utils
|
7
8
|
class Editor
|
@@ -168,11 +169,12 @@ module Utils
|
|
168
169
|
sleep pause_duration
|
169
170
|
edit_remote_send('<ESC>:bw<CR>')
|
170
171
|
else
|
172
|
+
pstree = PSTree.new
|
171
173
|
switch_to_index =
|
172
174
|
`tmux list-panes -F '\#{pane_pid} \#{pane_index}'`.lines.find { |l|
|
173
175
|
pid, index = l.split(' ')
|
174
|
-
pid.to_i
|
175
|
-
if
|
176
|
+
pid = pid.to_i
|
177
|
+
if pstree.find { |ps| ps.pid != $$ && ps.ppid == pid && ps.cmd =~ %r(/edit( |$)) }
|
176
178
|
break index.to_i
|
177
179
|
end
|
178
180
|
}
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "utils"
|
5
|
-
s.version = "0.0.
|
5
|
+
s.version = "0.0.82"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Florian Frank"]
|
9
|
-
s.date = "2013-05-
|
9
|
+
s.date = "2013-05-15"
|
10
10
|
s.description = "This ruby gem provides some useful command line utilities"
|
11
11
|
s.email = "flori@ping.de"
|
12
12
|
s.executables = ["chroot-exec", "chroot-libs", "classify", "create_tags", "discover", "edit", "edit_wait", "enum", "errf", "git-empty", "irb_connect", "myex", "number_files", "on_change", "path", "probe", "remote_copy", "same_files", "search", "sedit", "ssh-tunnel", "strip_spaces", "unquarantine_apps", "untest", "utils-install-config", "utils-utilsrc", "vacuum_firefox_sqlite", "xmp"]
|
@@ -26,12 +26,14 @@ Gem::Specification.new do |s|
|
|
26
26
|
s.add_runtime_dependency(%q<tins>, ["~> 0.6"])
|
27
27
|
s.add_runtime_dependency(%q<term-ansicolor>, ["~> 1.0"])
|
28
28
|
s.add_runtime_dependency(%q<dslkit>, ["~> 0.2.10"])
|
29
|
+
s.add_runtime_dependency(%q<pstree>, [">= 0"])
|
29
30
|
s.add_runtime_dependency(%q<pry-editline>, [">= 0"])
|
30
31
|
else
|
31
32
|
s.add_dependency(%q<gem_hadar>, ["~> 0.1.8"])
|
32
33
|
s.add_dependency(%q<tins>, ["~> 0.6"])
|
33
34
|
s.add_dependency(%q<term-ansicolor>, ["~> 1.0"])
|
34
35
|
s.add_dependency(%q<dslkit>, ["~> 0.2.10"])
|
36
|
+
s.add_dependency(%q<pstree>, [">= 0"])
|
35
37
|
s.add_dependency(%q<pry-editline>, [">= 0"])
|
36
38
|
end
|
37
39
|
else
|
@@ -39,6 +41,7 @@ Gem::Specification.new do |s|
|
|
39
41
|
s.add_dependency(%q<tins>, ["~> 0.6"])
|
40
42
|
s.add_dependency(%q<term-ansicolor>, ["~> 1.0"])
|
41
43
|
s.add_dependency(%q<dslkit>, ["~> 0.2.10"])
|
44
|
+
s.add_dependency(%q<pstree>, [">= 0"])
|
42
45
|
s.add_dependency(%q<pry-editline>, [">= 0"])
|
43
46
|
end
|
44
47
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.82
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-05-
|
11
|
+
date: 2013-05-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: 0.2.10
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pstree
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
84
|
name: pry-editline
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|