utils 0.9.0 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Gemfile +1 -0
- data/Rakefile +4 -3
- data/VERSION +1 -1
- data/bin/brakeman2err +23 -13
- data/bin/create_tags +6 -4
- data/bin/discover +19 -7
- data/bin/edit +6 -2
- data/bin/myex +38 -15
- data/bin/probe +15 -33
- data/bin/search +5 -5
- data/bin/strip_spaces +1 -1
- data/bin/tmproc +21 -0
- data/bin/vcf2alias +46 -0
- data/lib/utils/editor.rb +21 -4
- data/lib/utils/finder.rb +91 -45
- data/lib/utils/grepper.rb +19 -6
- data/lib/utils/patterns.rb +13 -2
- data/lib/utils/version.rb +1 -1
- data/lib/utils/xt/source_location_extension.rb +6 -2
- data/utils.gemspec +12 -9
- metadata +23 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '0168640de88ac768d044217a1e65492ca4a8141c'
|
4
|
+
data.tar.gz: 4690e0a0a58b371c5ecc1efef47547da07af73f8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91b790e9449ba425ebd05a2d2bd41ce7c9ee696d9d352889561c6c9f47d5bc8f12ed5833ef17a5e7b9743ee8c3a6ee59bc80807d9e9a8a959d6a57989a21a89e
|
7
|
+
data.tar.gz: 9830a6c2fc92b191292e304d62125b64c723cd33947af282d2eb74185531af73a9ef58941d2e0a803873b40da4edf1f8d0fd55d46aeab44ba8fd6f7c2ce8b24b
|
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/Rakefile
CHANGED
@@ -13,13 +13,14 @@ GemHadar do
|
|
13
13
|
executables Dir['bin/*'].map(&File.method(:basename))
|
14
14
|
test_dir 'tests'
|
15
15
|
ignore '.*.sw[pon]', 'pkg', 'Gemfile.lock', '.rvmrc', '.AppleDouble',
|
16
|
-
'tags', '.bundle', '.DS_Store'
|
16
|
+
'tags', '.bundle', '.DS_Store', '.byebug_history'
|
17
17
|
readme 'README.md'
|
18
18
|
|
19
|
-
dependency 'tins', '~>1.
|
19
|
+
dependency 'tins', '~>1.14'
|
20
20
|
dependency 'term-ansicolor', '~>1.3'
|
21
21
|
dependency 'pstree', '~>0.1'
|
22
22
|
dependency 'pry-editline'
|
23
|
+
dependency 'infobar'
|
23
24
|
|
24
25
|
install_library do
|
25
26
|
libdir = CONFIG["sitelibdir"]
|
@@ -38,6 +39,6 @@ GemHadar do
|
|
38
39
|
install(file, bindir, :mode => 0755)
|
39
40
|
end
|
40
41
|
end
|
41
|
-
ENV['NO_GEMS'].to_i == 1 or sh 'gem install tins term-ansicolor pstree pry-editline'
|
42
|
+
ENV['NO_GEMS'].to_i == 1 or sh 'gem install tins term-ansicolor pstree pry-editline infobar'
|
42
43
|
end
|
43
44
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.10.0
|
data/bin/brakeman2err
CHANGED
@@ -1,23 +1,33 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'utils'
|
3
4
|
require 'json'
|
4
5
|
require 'tins/xt'
|
5
6
|
require 'tins/go'
|
6
7
|
include Tins::GO
|
8
|
+
require 'infobar'
|
7
9
|
|
8
|
-
opts = go '
|
10
|
+
opts = go 'ce'
|
9
11
|
if opts[?c]
|
10
12
|
brakeman = `bundle exec which brakeman`.full? or fail "cannot find brakeman in path"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
for
|
20
|
-
|
21
|
-
|
22
|
-
|
13
|
+
Infobar.busy(label: 'Computing brakeman results') do
|
14
|
+
system 'bundle exec brakeman -q -i config/brakeman.yml -o .brakeman.json 2>/dev/null' or fail "calling brakeman failed"
|
15
|
+
end
|
16
|
+
else
|
17
|
+
results = JSON File.read('.brakeman.json'), object_class: JSON::GenericObject
|
18
|
+
if opts[?e]
|
19
|
+
puts "Found #{results.errors.size} errors and #{results.warnings.size} warnings.",
|
20
|
+
"_" * 80
|
21
|
+
for error in results.errors
|
22
|
+
puts error.location, "Error #{error.error.inspect}"
|
23
|
+
end
|
24
|
+
else
|
25
|
+
puts "Found #{results.warnings.size} warnings.", "_" * 80
|
26
|
+
end
|
27
|
+
for warning in results.warnings
|
28
|
+
puts "#{warning.file}:#{warning.line}",
|
29
|
+
"#{warning.warning_type} (#{warning.confidence}) #{warning.message.inspect}",
|
30
|
+
warning.code, "See: #{warning.link}"
|
31
|
+
end
|
32
|
+
|
23
33
|
end
|
data/bin/create_tags
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'infobar'
|
4
|
+
|
3
5
|
paths = %w[ . ] + `bundle list --paths`.lines.map(&:chomp)
|
4
6
|
cmd = %w[ ctags --recurse=yes --languages=Ruby,C ] + paths
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
7
|
+
Infobar.busy(label: 'Creating tags') { system *cmd }
|
8
|
+
if megabytes = File.size('tags').to_f / 1024 ** 2 rescue nil
|
9
|
+
infobar.puts 'Created %.3fM of tags.' % megabytes
|
10
|
+
end
|
data/bin/discover
CHANGED
@@ -31,14 +31,17 @@ directory and file paths that are searched.
|
|
31
31
|
|
32
32
|
Options are
|
33
33
|
|
34
|
-
-
|
34
|
+
-pX interpret PATTERN argument as X=r for regexp or X=f for fuzzy
|
35
|
+
-r reset the search index
|
35
36
|
-c disable color output
|
36
37
|
-e open the matching files with edit command
|
37
38
|
-E pick one file to edit
|
38
39
|
-a CSET use only character set CSET from PATTERN
|
40
|
+
-iX use case insensitive matches with X=y (default) or not with X=n
|
39
41
|
-I SUFFIX only include files with suffix SUFFIX during finding
|
40
|
-
-
|
42
|
+
-d match also directories
|
41
43
|
-v be verbose
|
44
|
+
-n NUMBER the first NUMBER of matches is returned
|
42
45
|
-h display this help
|
43
46
|
|
44
47
|
Version is #{File.basename($0)} #{Utils::VERSION}.
|
@@ -46,28 +49,37 @@ Version is #{File.basename($0)} #{Utils::VERSION}.
|
|
46
49
|
exit 1
|
47
50
|
end
|
48
51
|
|
49
|
-
args = go 'I:a:
|
52
|
+
args = go 'n:I:i:a:p:creEvdh'
|
50
53
|
args[?h] and usage
|
51
|
-
pattern = ARGV.shift or usage
|
52
|
-
roots = (ARGV.empty? ? [ Dir.pwd ] : ARGV).map { |f| File.expand_path(f) }
|
53
54
|
|
54
55
|
Term::ANSIColor.coloring = (STDIN.tty? && ENV['TERM'] !~ /dumb/) && !args[?c]
|
55
56
|
STDOUT.sync = true
|
56
57
|
config = Utils::ConfigFile.new
|
57
58
|
config.configure_from_paths
|
58
59
|
args[?b] ||= config.discover.binary
|
60
|
+
|
61
|
+
pattern = ARGV.shift || ''
|
62
|
+
roots = (ARGV.empty? ? [ Dir.pwd ] : ARGV).map { |f| File.expand_path(f) }
|
63
|
+
|
59
64
|
finder = Finder.new(
|
60
65
|
:pattern => pattern,
|
61
66
|
:args => args,
|
62
67
|
:roots => roots,
|
63
68
|
:config => config
|
64
|
-
)
|
69
|
+
)
|
65
70
|
|
66
71
|
case
|
72
|
+
when pattern.empty? && args[?r]
|
73
|
+
exit
|
74
|
+
when pattern.empty?
|
75
|
+
usage
|
67
76
|
when args[?E]
|
77
|
+
finder.search
|
68
78
|
edit_files finder.paths, pick: true
|
69
79
|
when args[?e]
|
80
|
+
finder.search
|
70
81
|
edit_files finder.paths
|
71
82
|
else
|
72
|
-
|
83
|
+
finder.search
|
84
|
+
puts finder.output
|
73
85
|
end
|
data/bin/edit
CHANGED
@@ -22,6 +22,7 @@ Options are
|
|
22
22
|
-C COMMAND send visual command to the current running editor
|
23
23
|
-p DURATION pause for this many seconds to wait for vim's reaction
|
24
24
|
-S SERVER specify the server for this edit command
|
25
|
+
-l list current vim servers
|
25
26
|
-h display this help
|
26
27
|
|
27
28
|
Version is #{File.basename($0)} #{Utils::VERSION}.
|
@@ -29,7 +30,7 @@ Version is #{File.basename($0)} #{Utils::VERSION}.
|
|
29
30
|
exit 1
|
30
31
|
end
|
31
32
|
|
32
|
-
$opt = go 'p:S:c:g:
|
33
|
+
$opt = go 'p:S:c:g:wsmlh'
|
33
34
|
$opt[?h] and usage
|
34
35
|
|
35
36
|
config = Utils::ConfigFile.new
|
@@ -42,7 +43,10 @@ editor = Editor.new do |c|
|
|
42
43
|
c.mkdir = $opt[?m]
|
43
44
|
end
|
44
45
|
|
45
|
-
if $opt[?
|
46
|
+
if $opt[?l]
|
47
|
+
puts editor.serverlist
|
48
|
+
exit 0
|
49
|
+
elsif $opt[?s]
|
46
50
|
begin
|
47
51
|
until STDIN.eof?
|
48
52
|
line = STDIN.gets
|
data/bin/myex
CHANGED
@@ -1,31 +1,40 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
## vim: set ft=ruby et sw=2 ts=2:
|
2
3
|
# encoding: ascii-8bit
|
3
4
|
|
4
5
|
require 'tins/go'
|
5
6
|
include Tins::GO
|
7
|
+
require 'term/ansicolor'
|
8
|
+
include Term::ANSIColor
|
6
9
|
|
7
10
|
def usage
|
8
11
|
puts <<EOT
|
9
|
-
Usage: #{File.basename($0)} list|create|truncate|insert|replace [OPTION] [TABLES]
|
12
|
+
Usage: #{File.basename($0)} list|create|truncate|insert|replace|search [OPTION] [TABLES]
|
10
13
|
|
11
14
|
Commands are
|
12
|
-
- list:
|
15
|
+
- list: display all tables in the backup
|
13
16
|
|
14
|
-
- create:
|
15
|
-
|
16
|
-
-d
|
17
|
-
|
17
|
+
- create: display all create table statements in the backup. If TABLES
|
18
|
+
are given, display only those statements.
|
19
|
+
-d if this OPTION is given, first drop the table (if it exists)
|
20
|
+
before creation.
|
18
21
|
|
19
|
-
- truncate:
|
22
|
+
- truncate: all tables or the given TABLES, if they exist.
|
20
23
|
|
21
|
-
- insert:
|
22
|
-
|
23
|
-
-t
|
24
|
-
|
24
|
+
- insert: extract insert statemnts from the backup. If TABLES are given,
|
25
|
+
extract only those statements for these TABLES.
|
26
|
+
-t if this OPTION is given, truncate the table, before starting
|
27
|
+
to insert.
|
25
28
|
|
26
|
-
- replace:
|
27
|
-
|
28
|
-
|
29
|
+
- replace: extract insert statemnts from the backup, and convert them
|
30
|
+
into replace statements. If TABLES are given, extract only
|
31
|
+
those statements for these TABLES.
|
32
|
+
|
33
|
+
- search: search the insert statements from the backup matching the
|
34
|
+
pattern given with the -p option and output them in a context
|
35
|
+
of the size (as number of characters) given via the -C option.
|
36
|
+
-p PATTERN the pattern to match.
|
37
|
+
-C NUMBER the NUMBER of characters for the context.
|
29
38
|
EOT
|
30
39
|
exit 1
|
31
40
|
end
|
@@ -38,7 +47,7 @@ def bell(n = 1, s = 1)
|
|
38
47
|
end
|
39
48
|
|
40
49
|
cmd = ARGV.shift or usage
|
41
|
-
opts = go('
|
50
|
+
opts = go('dtDiC:p:')
|
42
51
|
|
43
52
|
STDOUT.sync = true
|
44
53
|
STDIN.set_encoding 'ascii-8bit'
|
@@ -89,6 +98,20 @@ when 'replace'
|
|
89
98
|
puts stmt.sub(/^INSERT INTO `(?:[^`]+)`/, "REPLACE INTO `#{table}`")
|
90
99
|
warn "Replaced into table #{table}."
|
91
100
|
end
|
101
|
+
when 'search'
|
102
|
+
pattern = opts[?p] or usage
|
103
|
+
c = (opts[?C] || 20).to_i
|
104
|
+
STDIN.each_line do |l|
|
105
|
+
if l =~ /^INSERT INTO `(#{ARGV.empty? ? '[^`]+' : ARGV * '|'})`.*?(#{pattern})/
|
106
|
+
table = $1
|
107
|
+
match = $2
|
108
|
+
context = l[ [ $~.begin(2) - c, 0 ].max..($~.end(2) + c) ]
|
109
|
+
context.sub!(match, bold(match))
|
110
|
+
table.encode!('UTF-8', undef: :replace, invalid: :replace)
|
111
|
+
context.encode!('UTF-8', undef: :replace, invalid: :replace)
|
112
|
+
puts "#{table}: …#{context}…"
|
113
|
+
end
|
114
|
+
end
|
92
115
|
else
|
93
116
|
usage
|
94
117
|
end
|
data/bin/probe
CHANGED
@@ -28,6 +28,9 @@ Version is #{File.basename($0)} #{Utils::VERSION}.
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def cmd(*args)
|
31
|
+
if ENV.key?('BUNDLE_GEMFILE')
|
32
|
+
args.unshift 'bundle', 'exec'
|
33
|
+
end
|
31
34
|
puts args * ' '
|
32
35
|
system(*args) or exit $?.exitstatus
|
33
36
|
end
|
@@ -37,13 +40,6 @@ def find_cmd(*cmds)
|
|
37
40
|
raise fail "no #{cmds * '|'} command found"
|
38
41
|
end
|
39
42
|
|
40
|
-
def zeus?
|
41
|
-
!`which zeus`.empty? && test(?S, '.zeus.sock')
|
42
|
-
end
|
43
|
-
singleton_class.class_eval do
|
44
|
-
memoize_function :zeus?
|
45
|
-
end
|
46
|
-
|
47
43
|
def spring?
|
48
44
|
`bin/spring status`.lines.first =~ /^Spring is running:/
|
49
45
|
rescue Errno::ENOENT
|
@@ -58,9 +54,6 @@ def start_server
|
|
58
54
|
spring? and
|
59
55
|
puts "Found spring running, I'll try to use it for running tests."
|
60
56
|
|
61
|
-
zeus? and
|
62
|
-
puts "Found a zeus socket file, I'll try to use it for running tests."
|
63
|
-
|
64
57
|
begin
|
65
58
|
DRb.start_service
|
66
59
|
DRbObject.new_with_uri($uri).shutdown
|
@@ -121,33 +114,22 @@ case ($opts[?t] || $config.probe.test_framework).to_sym
|
|
121
114
|
when :rspec
|
122
115
|
case
|
123
116
|
when spring?
|
124
|
-
rspec = %w[bin/spring rspec
|
125
|
-
when zeus?
|
126
|
-
rspec = %w[-S zeus rspec -rutils -f Utils::LineFormatter ]
|
117
|
+
rspec = %w[ bin/spring rspec ]
|
127
118
|
else
|
128
|
-
rspec = [ find_cmd('rspec', 'spec') ]
|
129
|
-
'Utils::LineFormatter'
|
119
|
+
rspec = [ find_cmd('rspec', 'spec') ]
|
130
120
|
end
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
$~.captures * ':'
|
138
|
-
else
|
139
|
-
a
|
140
|
-
end
|
121
|
+
rspec << '-rutils' << '-f' << 'Utils::LineFormatter'
|
122
|
+
$args = $args.map do |a|
|
123
|
+
if Utils::Editor::FILE_LINENUMBER_REGEXP =~ a
|
124
|
+
$~.captures.compact * ':'
|
125
|
+
else
|
126
|
+
a
|
141
127
|
end
|
142
|
-
cmd 'ruby', '-I', $config.probe.include_dirs_argument, *rspec,
|
143
|
-
*($args + testrunner_args)
|
144
128
|
end
|
129
|
+
cmd 'ruby', '-I', $config.probe.include_dirs_argument, *rspec,
|
130
|
+
*($args + testrunner_args)
|
145
131
|
when :'test-unit'
|
146
|
-
|
147
|
-
testrb = %w[-S zeus testrb]
|
148
|
-
else
|
149
|
-
testrb = find_cmd('testrb')
|
150
|
-
end
|
132
|
+
testrb = find_cmd('testrb')
|
151
133
|
if testname = $opts[?n]
|
152
134
|
cmd 'ruby', '-I', $config.probe.include_dirs_argument, *testrb,
|
153
135
|
'-n', testname, *($args + testrunner_args)
|
@@ -176,7 +158,7 @@ when :cucumber
|
|
176
158
|
else
|
177
159
|
$args = $args.map do |a|
|
178
160
|
if Utils::Editor::FILE_LINENUMBER_REGEXP =~ a
|
179
|
-
$~.captures * ':'
|
161
|
+
$~.captures.compact * ':'
|
180
162
|
else
|
181
163
|
a
|
182
164
|
end
|
data/bin/search
CHANGED
@@ -109,18 +109,18 @@ the files. PATHS are the directory and file paths that are searched.
|
|
109
109
|
Options are
|
110
110
|
|
111
111
|
-n PATTERN only search files whose names match fuzzy PATTERN
|
112
|
-
-N PATTERN only search files whose names match
|
112
|
+
-N PATTERN only search files whose names match regexp PATTERN
|
113
113
|
-s PATTERN skip lines that match fuzzy PATTERN
|
114
|
-
-S PATTERN skip lines that match
|
114
|
+
-S PATTERN skip lines that match regexp PATTERN
|
115
115
|
-A NUMBER displays NUMBER lines of context after the match
|
116
116
|
-B NUMBER displays NUMBER lines of context before the match
|
117
117
|
-C NUMBER displays NUMBER lines of context around the match
|
118
118
|
-f just list the paths of the files that would be searched
|
119
119
|
-l just list the paths of the files with matches
|
120
120
|
-L list only the path:linenumber of the files with matches
|
121
|
-
-
|
121
|
+
-pX interpret PATTERN argument as X=f fuzzy or X=r for regexp
|
122
122
|
-c disable color output
|
123
|
-
-
|
123
|
+
-iX use case insensitive matches with X=y (default) or not with X=n
|
124
124
|
-I SUFFIX only include files with suffix SUFFIX in search
|
125
125
|
-e open the matching files with edit command
|
126
126
|
-E pick one file to edit
|
@@ -136,7 +136,7 @@ Version is #{File.basename($0)} #{Utils::VERSION}.
|
|
136
136
|
exit 1
|
137
137
|
end
|
138
138
|
|
139
|
-
args = go 'r:I:A:B:C:s:S:n:N:a:
|
139
|
+
args = go 'r:p:I:A:B:C:s:S:n:N:a:i:cflLeEvbgh'
|
140
140
|
args[?h] and usage
|
141
141
|
pattern = ARGV.shift or usage
|
142
142
|
roots = (ARGV.empty? ? [ Dir.pwd ] : ARGV).map { |f| File.expand_path(f) }
|
data/bin/strip_spaces
CHANGED
data/bin/tmproc
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'yaml'
|
4
|
+
require 'tins'
|
5
|
+
|
6
|
+
filename = ARGV.shift || 'Procfile'
|
7
|
+
procfile = YAML.load_file(filename)
|
8
|
+
|
9
|
+
unless ENV['TMUX']
|
10
|
+
name = File.basename(Dir.pwd)
|
11
|
+
exec 'tmux', 'new-session', '-s', name, '-n', ?s, '-A', $0, filename
|
12
|
+
end
|
13
|
+
|
14
|
+
tmux_pane = ENV.fetch('TMUX_PANE')
|
15
|
+
lines = Tins::Terminal.lines
|
16
|
+
|
17
|
+
procfile.each_value do |process|
|
18
|
+
system "(tmux select-pane -t #{tmux_pane} \\; split-window -l #{lines / procfile.size} #{process}) &"
|
19
|
+
end
|
20
|
+
|
21
|
+
exec 'tmux', 'new-window', '-n', 'e', 'edit', ?;, 'split-window', '-h', 'bundle', 'exec', 'probe', '-l'
|
data/bin/vcf2alias
ADDED
@@ -0,0 +1,46 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
require 'tins/xt'
|
4
|
+
require 'set'
|
5
|
+
|
6
|
+
$shortcuts = Set.new
|
7
|
+
|
8
|
+
def shortcut(fn, suffix = nil)
|
9
|
+
shortcut = fn.scan(/([A-ZÄÖÜ])[a-zäöü]/).join.downcase
|
10
|
+
shortcut.empty? and return fn.gsub(' ', ?_)
|
11
|
+
shortcut = "#{shortcut}#{suffix}"
|
12
|
+
while $shortcuts.member?(shortcut)
|
13
|
+
shortcut.sub!(/(\d+)\z/) { $1.to_i + 1 }
|
14
|
+
shortcut.sub!(/\D\z/, '\\&1')
|
15
|
+
end
|
16
|
+
$shortcuts << shortcut
|
17
|
+
shortcut
|
18
|
+
end
|
19
|
+
|
20
|
+
vcf_path = ARGV.shift || '~/Desktop/Contacts.vcf'
|
21
|
+
vcf_path = File.expand_path vcf_path
|
22
|
+
alias_path = ARGV.shift || '~/.muttrc-aliases'
|
23
|
+
alias_path = File.expand_path alias_path
|
24
|
+
begin
|
25
|
+
real_alias_path = File.readlink alias_path
|
26
|
+
alias_path = real_alias_path
|
27
|
+
rescue Errno::ENOENT
|
28
|
+
end
|
29
|
+
|
30
|
+
File.secure_write(alias_path) do |aliases|
|
31
|
+
File.open(vcf_path) do |vcf|
|
32
|
+
until vcf.eof?
|
33
|
+
card = vcf.readline('END:VCARD')
|
34
|
+
fn = card[/^FN:(.*)/, 1] or next
|
35
|
+
fn.chomp!
|
36
|
+
hemail = card[/^EMAIL;.*?type=HOME.*?:(.*)/, 1]
|
37
|
+
hemail and aliases.puts "alias #{shortcut(fn, ?h)} #{fn} <#{hemail.chomp}>"
|
38
|
+
wemail = card[/^EMAIL;.*?type=WORK.*?:(.*)/, 1]
|
39
|
+
wemail and aliases.puts "alias #{shortcut(fn, ?w)} #{fn} <#{wemail.chomp}>"
|
40
|
+
email = card[/^EMAIL;.*?:(.*)/, 1]
|
41
|
+
if email && ! [ hemail, wemail ].include?(email)
|
42
|
+
aliases.puts "alias #{shortcut(fn)} #{fn} <#{email.chomp}>"
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
data/lib/utils/editor.rb
CHANGED
@@ -73,10 +73,15 @@ module Utils
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def edit(*filenames)
|
76
|
+
source_location = nil
|
76
77
|
if filenames.size == 1 and
|
77
78
|
source_location = filenames.first.source_location
|
78
79
|
then
|
79
|
-
|
80
|
+
if source_location.respond_to?(:filename) and source_location.respond_to?(:linenumber)
|
81
|
+
edit_source_location(source_location)
|
82
|
+
else
|
83
|
+
edit_file_linenumber(*source_location)
|
84
|
+
end
|
80
85
|
elsif source_locations = filenames.map(&:source_location).compact.full?
|
81
86
|
filenames = expand_globs(source_locations.map(&:first))
|
82
87
|
edit_file(*filenames)
|
@@ -99,8 +104,16 @@ module Utils
|
|
99
104
|
edit_remote_file(*filenames)
|
100
105
|
end
|
101
106
|
|
102
|
-
def edit_file_linenumber(filename, linenumber)
|
107
|
+
def edit_file_linenumber(filename, linenumber, rangeend = nil)
|
103
108
|
make_dirs filename
|
109
|
+
if rangeend
|
110
|
+
Thread.new do
|
111
|
+
while !started?
|
112
|
+
sleep 1
|
113
|
+
end
|
114
|
+
edit_remote_send("<ESC>:normal #{linenumber}GV#{rangeend}G<CR>")
|
115
|
+
end
|
116
|
+
end
|
104
117
|
if wait?
|
105
118
|
edit_remote_wait("+#{linenumber}", filename)
|
106
119
|
else
|
@@ -109,7 +122,11 @@ module Utils
|
|
109
122
|
end
|
110
123
|
|
111
124
|
def edit_source_location(source_location)
|
112
|
-
edit_file_linenumber(
|
125
|
+
edit_file_linenumber(
|
126
|
+
source_location.filename,
|
127
|
+
source_location.linenumber,
|
128
|
+
source_location.rangeend
|
129
|
+
)
|
113
130
|
end
|
114
131
|
|
115
132
|
def start
|
@@ -140,7 +157,7 @@ module Utils
|
|
140
157
|
end
|
141
158
|
|
142
159
|
def serverlist
|
143
|
-
|
160
|
+
`#{vim.map(&:inspect) * ' '} --serverlist`.split
|
144
161
|
end
|
145
162
|
|
146
163
|
def started?(name = servername)
|
data/lib/utils/finder.rb
CHANGED
@@ -1,5 +1,8 @@
|
|
1
1
|
require 'term/ansicolor'
|
2
2
|
require 'tins/xt'
|
3
|
+
require 'tempfile'
|
4
|
+
require 'digest/md5'
|
5
|
+
require 'fileutils'
|
3
6
|
|
4
7
|
class ::File
|
5
8
|
include Utils::FileXt
|
@@ -16,81 +19,124 @@ class Utils::Finder
|
|
16
19
|
@config = opts[:config] || Utils::ConfigFile.new
|
17
20
|
pattern_opts = opts.subhash(:pattern) | {
|
18
21
|
:cset => @args[?a],
|
19
|
-
:icase => @args
|
22
|
+
:icase => @args[?i] != ?n,
|
20
23
|
}
|
21
|
-
@
|
22
|
-
@pattern = @args[?r] ?
|
23
|
-
RegexpPattern.new(pattern_opts) :
|
24
|
-
FuzzyPattern.new(pattern_opts)
|
24
|
+
@pattern = choose(@args[?p], pattern_opts)
|
25
25
|
@paths = []
|
26
|
+
@args[?r] and reset_index
|
26
27
|
end
|
27
28
|
|
28
29
|
attr_reader :paths
|
29
30
|
|
30
31
|
attr_reader :output
|
31
32
|
|
32
|
-
def
|
33
|
-
|
33
|
+
def search_index
|
34
|
+
paths = load_paths
|
35
|
+
search_paths(paths)
|
34
36
|
end
|
35
37
|
|
36
|
-
|
37
|
-
stat = path.stat
|
38
|
-
stat.symlink? and stat = path.lstat
|
39
|
-
stat.directory? || ascii_file?(stat, path)
|
40
|
-
rescue SystemCallError => e
|
41
|
-
warn "Caught #{e.class}: #{e}"
|
42
|
-
nil
|
43
|
-
end
|
38
|
+
alias search search_index
|
44
39
|
|
45
|
-
def
|
40
|
+
def build_paths
|
46
41
|
paths = []
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
@args[?v] and warn "Skipping #{filename.inspect}."
|
57
|
-
next
|
58
|
-
end
|
59
|
-
paths << filename
|
42
|
+
visit = -> filename {
|
43
|
+
s = filename.stat
|
44
|
+
bn = filename.pathname.basename
|
45
|
+
if !s ||
|
46
|
+
s.directory? && @config.discover.prune?(bn) ||
|
47
|
+
s.file? && @config.discover.skip?(bn)
|
48
|
+
then
|
49
|
+
@args[?v] and warn "Pruning #{filename.inspect}."
|
50
|
+
prune
|
60
51
|
end
|
52
|
+
true
|
53
|
+
}
|
54
|
+
find(*@roots, visit: visit) do |filename|
|
55
|
+
filename.stat.directory? and filename << ?/
|
56
|
+
paths << filename
|
61
57
|
end
|
62
58
|
paths.uniq!
|
63
|
-
paths
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
59
|
+
paths
|
60
|
+
end
|
61
|
+
|
62
|
+
def index_path
|
63
|
+
roots = @roots.map { |r| File.expand_path(r) }.uniq.sort
|
64
|
+
filename = "finder-paths-" +
|
65
|
+
Digest::MD5.new.update(roots.inspect).hexdigest
|
66
|
+
dirname = File.join(Dir.tmpdir, File.basename($0))
|
67
|
+
FileUtils.mkdir_p dirname
|
68
|
+
File.join(dirname, filename)
|
69
|
+
end
|
70
|
+
|
71
|
+
def create_paths
|
72
|
+
paths = build_paths
|
73
|
+
File.secure_write(index_path) do |output|
|
74
|
+
output.puts paths
|
75
|
+
end
|
76
|
+
paths
|
77
|
+
end
|
78
|
+
|
79
|
+
def load_paths
|
80
|
+
lines = File.readlines(index_path)
|
81
|
+
@args[?v] and warn "Loaded index #{index_path.inspect}."
|
82
|
+
lines.empty? and raise Errno::ENOENT
|
83
|
+
@args[?d] or lines = lines.grep_v(%r{/$})
|
84
|
+
lines.map(&:chomp!)
|
85
|
+
rescue Errno::ENOENT
|
86
|
+
return create_paths
|
87
|
+
end
|
88
|
+
|
89
|
+
def reset_index
|
90
|
+
path = index_path
|
91
|
+
@args[?v] and warn "Resetting index #{path.inspect}."
|
92
|
+
FileUtils.rm_f path
|
93
|
+
end
|
94
|
+
|
95
|
+
def search_index
|
96
|
+
search_paths load_paths
|
97
|
+
end
|
98
|
+
|
99
|
+
def search_directly
|
100
|
+
search_paths build_paths
|
101
|
+
end
|
102
|
+
|
103
|
+
def search_paths(paths)
|
104
|
+
suffixes = Array(@args[?I])
|
105
|
+
suffixes.full? do |s|
|
106
|
+
paths.select! { |path| s.include?(File.extname(path)[1..-1]) }
|
107
|
+
end
|
108
|
+
paths = paths.map! do |path|
|
109
|
+
if match = @pattern.match(path)
|
69
110
|
if FuzzyPattern === @pattern
|
70
111
|
current = 0
|
71
|
-
|
72
|
-
score, e =
|
73
|
-
for i in 1...
|
112
|
+
marked_path = ''
|
113
|
+
score, e = path.size, nil
|
114
|
+
for i in 1...match.size
|
74
115
|
match[i] or next
|
75
116
|
b = match.begin(i)
|
76
|
-
|
77
|
-
|
78
|
-
|
117
|
+
e ||= b
|
118
|
+
marked_path << path[current...b]
|
119
|
+
marked_path << red(path[b, 1])
|
120
|
+
score += (b - e) * (path.size - b)
|
79
121
|
e = match.end(i)
|
80
122
|
current = b + 1
|
81
123
|
end
|
82
|
-
|
83
|
-
[ score,
|
124
|
+
marked_path << match.post_match
|
125
|
+
[ score, path, marked_path ]
|
84
126
|
else
|
85
|
-
|
127
|
+
marked_path = path[0...match.begin(0)] <<
|
86
128
|
red(path[match.begin(0)...match.end(0)]) <<
|
87
129
|
path[match.end(0)..-1]
|
88
|
-
[ 0,
|
130
|
+
[ 0, path, marked_path ]
|
89
131
|
end
|
90
132
|
end
|
91
133
|
end
|
92
134
|
paths.compact!
|
93
135
|
@paths, @output = paths.sort.transpose.values_at(-2, -1)
|
136
|
+
if n = @args[?n]&.to_i
|
137
|
+
@paths = @paths.first(n)
|
138
|
+
@output = @output.first(n)
|
139
|
+
end
|
94
140
|
self
|
95
141
|
end
|
96
142
|
|
data/lib/utils/grepper.rb
CHANGED
@@ -43,11 +43,9 @@ class Utils::Grepper
|
|
43
43
|
@paths = []
|
44
44
|
pattern_opts = opts.subhash(:pattern) | {
|
45
45
|
:cset => @args[?a],
|
46
|
-
:icase => @args[?i],
|
46
|
+
:icase => @args[?i] != ?n,
|
47
47
|
}
|
48
|
-
@pattern = @args[?
|
49
|
-
FuzzyPattern.new(pattern_opts) :
|
50
|
-
RegexpPattern.new(pattern_opts)
|
48
|
+
@pattern = choose(@args[?p], pattern_opts, default: ?r)
|
51
49
|
@name_pattern =
|
52
50
|
if name_pattern = @args[?N]
|
53
51
|
RegexpPattern.new(:pattern => name_pattern)
|
@@ -156,8 +154,23 @@ class Utils::Grepper
|
|
156
154
|
end
|
157
155
|
|
158
156
|
def search
|
159
|
-
suffixes = @args[?I]
|
160
|
-
|
157
|
+
suffixes = Array(@args[?I])
|
158
|
+
visit = -> filename {
|
159
|
+
s = filename.stat
|
160
|
+
bn = filename.pathname.basename
|
161
|
+
if !s ||
|
162
|
+
s.directory? && @config.search.prune?(bn) ||
|
163
|
+
s.file? && @config.search.skip?(bn)
|
164
|
+
then
|
165
|
+
@args[?v] and warn "Pruning #{filename.inspect}."
|
166
|
+
prune
|
167
|
+
elsif suffixes.empty?
|
168
|
+
true
|
169
|
+
else
|
170
|
+
suffixes.include?(filename.suffix)
|
171
|
+
end
|
172
|
+
}
|
173
|
+
find(*@roots, visit: visit) do |filename|
|
161
174
|
match(filename)
|
162
175
|
end
|
163
176
|
@paths = @paths.sort_by(&:source_location)
|
data/lib/utils/patterns.rb
CHANGED
@@ -19,9 +19,9 @@ module Utils
|
|
19
19
|
end
|
20
20
|
|
21
21
|
class FuzzyPattern < Pattern
|
22
|
-
def initialize(opts ={})
|
22
|
+
def initialize(opts = {})
|
23
23
|
super
|
24
|
-
r = @pattern.split(//).grep(/[
|
24
|
+
r = @pattern.split(//).grep(/[[:print:]]/).map { |x|
|
25
25
|
"(#{Regexp.quote(x)})"
|
26
26
|
} * '.*?'
|
27
27
|
@matcher = Regexp.new(
|
@@ -36,5 +36,16 @@ module Utils
|
|
36
36
|
@matcher = Regexp.new(@pattern, @icase ? Regexp::IGNORECASE : 0)
|
37
37
|
end
|
38
38
|
end
|
39
|
+
|
40
|
+
def choose(argument, pattern_opts, default: ?f)
|
41
|
+
case argument
|
42
|
+
when /^r/, (default == ?r ? nil : :not)
|
43
|
+
RegexpPattern.new(pattern_opts)
|
44
|
+
when /^f/, (default == ?f ? nil : :not)
|
45
|
+
FuzzyPattern.new(pattern_opts)
|
46
|
+
else
|
47
|
+
raise ArgumentError, 'argument -p has to be f=fuzzy or r=regexp'
|
48
|
+
end
|
49
|
+
end
|
39
50
|
end
|
40
51
|
end
|
data/lib/utils/version.rb
CHANGED
@@ -7,17 +7,19 @@ module Utils
|
|
7
7
|
|
8
8
|
CLASS_METHOD_REGEXP = /\A([A-Z][\w:]+)([#.])([\w!?]+)/
|
9
9
|
|
10
|
-
FILE_LINENUMBER_REGEXP = /\A\s*([^:]+):(\d+)
|
10
|
+
FILE_LINENUMBER_REGEXP = /\A\s*([^:]+):(\d+)-?(\d+)?/
|
11
11
|
|
12
12
|
def source_location
|
13
13
|
filename = nil
|
14
14
|
linenumber = nil
|
15
|
+
rangeend = nil
|
15
16
|
if respond_to?(:to_str)
|
16
17
|
string = to_str
|
17
18
|
case
|
18
19
|
when string =~ FILE_LINENUMBER_REGEXP && File.exist?($1)
|
19
|
-
filename
|
20
|
+
filename = $1
|
20
21
|
linenumber = $2.to_i
|
22
|
+
rangeend = $3&.to_i
|
21
23
|
when string =~ CLASS_METHOD_REGEXP && !File.exist?(string)
|
22
24
|
klassname = $1
|
23
25
|
method_kind = $2 == '#' ? :instance_method : :method
|
@@ -35,7 +37,9 @@ module Utils
|
|
35
37
|
array_singleton_class.instance_eval do
|
36
38
|
define_method(:filename) { filename }
|
37
39
|
define_method(:linenumber) { linenumber }
|
40
|
+
define_method(:rangeend) { rangeend }
|
38
41
|
define_method(:to_s) { [ filename, linenumber ].compact * ':' }
|
42
|
+
define_method(:range) { rangeend ? "#{to_s}-#{rangeend}" : "#{to_s}" }
|
39
43
|
end
|
40
44
|
array
|
41
45
|
end
|
data/utils.gemspec
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.
|
2
|
+
# stub: utils 0.10.0 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "utils".freeze
|
6
|
-
s.version = "0.
|
6
|
+
s.version = "0.10.0"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
9
9
|
s.require_paths = ["lib".freeze]
|
10
10
|
s.authors = ["Florian Frank".freeze]
|
11
|
-
s.date = "
|
11
|
+
s.date = "2018-01-24"
|
12
12
|
s.description = "This ruby gem provides some useful command line utilities".freeze
|
13
13
|
s.email = "flori@ping.de".freeze
|
14
|
-
s.executables = ["ascii7".freeze, "blameline".freeze, "brakeman2err".freeze, "chroot-exec".freeze, "chroot-libs".freeze, "classify".freeze, "create_tags".freeze, "dialog-pick".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "errf".freeze, "git-empty".freeze, "git-versions".freeze, "irb_connect".freeze, "json_check".freeze, "long_lines".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".freeze, "probe".freeze, "remote_copy".freeze, "rssr".freeze, "same_files".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "unquarantine_apps".freeze, "untest".freeze, "utils-utilsrc".freeze, "vacuum_firefox_sqlite".freeze, "xmp".freeze]
|
14
|
+
s.executables = ["ascii7".freeze, "blameline".freeze, "brakeman2err".freeze, "chroot-exec".freeze, "chroot-libs".freeze, "classify".freeze, "create_tags".freeze, "dialog-pick".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "errf".freeze, "git-empty".freeze, "git-versions".freeze, "irb_connect".freeze, "json_check".freeze, "long_lines".freeze, "myex".freeze, "number_files".freeze, "on_change".freeze, "path".freeze, "probe".freeze, "remote_copy".freeze, "rssr".freeze, "same_files".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "tmproc".freeze, "unquarantine_apps".freeze, "untest".freeze, "utils-utilsrc".freeze, "vacuum_firefox_sqlite".freeze, "vcf2alias".freeze, "xmp".freeze]
|
15
15
|
s.extra_rdoc_files = ["README.md".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/irb/service.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze]
|
16
|
-
s.files = [".gitignore".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/brakeman2err".freeze, "bin/chroot-exec".freeze, "bin/chroot-libs".freeze, "bin/classify".freeze, "bin/create_tags".freeze, "bin/dialog-pick".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/errf".freeze, "bin/git-empty".freeze, "bin/git-versions".freeze, "bin/irb_connect".freeze, "bin/json_check".freeze, "bin/long_lines".freeze, "bin/myex".freeze, "bin/number_files".freeze, "bin/on_change".freeze, "bin/path".freeze, "bin/probe".freeze, "bin/remote_copy".freeze, "bin/rssr".freeze, "bin/same_files".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/unquarantine_apps".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vacuum_firefox_sqlite".freeze, "bin/xmp".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/irb/service.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze, "utils.gemspec".freeze]
|
16
|
+
s.files = [".gitignore".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/brakeman2err".freeze, "bin/chroot-exec".freeze, "bin/chroot-libs".freeze, "bin/classify".freeze, "bin/create_tags".freeze, "bin/dialog-pick".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/errf".freeze, "bin/git-empty".freeze, "bin/git-versions".freeze, "bin/irb_connect".freeze, "bin/json_check".freeze, "bin/long_lines".freeze, "bin/myex".freeze, "bin/number_files".freeze, "bin/on_change".freeze, "bin/path".freeze, "bin/probe".freeze, "bin/remote_copy".freeze, "bin/rssr".freeze, "bin/same_files".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/tmproc".freeze, "bin/unquarantine_apps".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vacuum_firefox_sqlite".freeze, "bin/vcf2alias".freeze, "bin/xmp".freeze, "lib/utils.rb".freeze, "lib/utils/config_file.rb".freeze, "lib/utils/editor.rb".freeze, "lib/utils/file_xt.rb".freeze, "lib/utils/finder.rb".freeze, "lib/utils/grepper.rb".freeze, "lib/utils/irb.rb".freeze, "lib/utils/irb/service.rb".freeze, "lib/utils/line_blamer.rb".freeze, "lib/utils/line_formatter.rb".freeze, "lib/utils/md5.rb".freeze, "lib/utils/patterns.rb".freeze, "lib/utils/probe_server.rb".freeze, "lib/utils/ssh_tunnel_specification.rb".freeze, "lib/utils/version.rb".freeze, "lib/utils/xt/source_location_extension.rb".freeze, "utils.gemspec".freeze]
|
17
17
|
s.homepage = "http://github.com/flori/utils".freeze
|
18
18
|
s.rdoc_options = ["--title".freeze, "Utils - Some useful command line utilities".freeze, "--main".freeze, "README.md".freeze]
|
19
|
-
s.rubygems_version = "2.6.
|
19
|
+
s.rubygems_version = "2.6.14".freeze
|
20
20
|
s.summary = "Some useful command line utilities".freeze
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
@@ -24,22 +24,25 @@ Gem::Specification.new do |s|
|
|
24
24
|
|
25
25
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
26
26
|
s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
27
|
-
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.
|
27
|
+
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14"])
|
28
28
|
s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
|
29
29
|
s.add_runtime_dependency(%q<pstree>.freeze, ["~> 0.1"])
|
30
30
|
s.add_runtime_dependency(%q<pry-editline>.freeze, [">= 0"])
|
31
|
+
s.add_runtime_dependency(%q<infobar>.freeze, [">= 0"])
|
31
32
|
else
|
32
33
|
s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
33
|
-
s.add_dependency(%q<tins>.freeze, ["~> 1.
|
34
|
+
s.add_dependency(%q<tins>.freeze, ["~> 1.14"])
|
34
35
|
s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
|
35
36
|
s.add_dependency(%q<pstree>.freeze, ["~> 0.1"])
|
36
37
|
s.add_dependency(%q<pry-editline>.freeze, [">= 0"])
|
38
|
+
s.add_dependency(%q<infobar>.freeze, [">= 0"])
|
37
39
|
end
|
38
40
|
else
|
39
41
|
s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.9.1"])
|
40
|
-
s.add_dependency(%q<tins>.freeze, ["~> 1.
|
42
|
+
s.add_dependency(%q<tins>.freeze, ["~> 1.14"])
|
41
43
|
s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
|
42
44
|
s.add_dependency(%q<pstree>.freeze, ["~> 0.1"])
|
43
45
|
s.add_dependency(%q<pry-editline>.freeze, [">= 0"])
|
46
|
+
s.add_dependency(%q<infobar>.freeze, [">= 0"])
|
44
47
|
end
|
45
48
|
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.
|
4
|
+
version: 0.10.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '1.
|
33
|
+
version: '1.14'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '1.
|
40
|
+
version: '1.14'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: term-ansicolor
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: infobar
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
83
97
|
description: This ruby gem provides some useful command line utilities
|
84
98
|
email: flori@ping.de
|
85
99
|
executables:
|
@@ -114,10 +128,12 @@ executables:
|
|
114
128
|
- serve
|
115
129
|
- ssh-tunnel
|
116
130
|
- strip_spaces
|
131
|
+
- tmproc
|
117
132
|
- unquarantine_apps
|
118
133
|
- untest
|
119
134
|
- utils-utilsrc
|
120
135
|
- vacuum_firefox_sqlite
|
136
|
+
- vcf2alias
|
121
137
|
- xmp
|
122
138
|
extensions: []
|
123
139
|
extra_rdoc_files:
|
@@ -176,10 +192,12 @@ files:
|
|
176
192
|
- bin/serve
|
177
193
|
- bin/ssh-tunnel
|
178
194
|
- bin/strip_spaces
|
195
|
+
- bin/tmproc
|
179
196
|
- bin/unquarantine_apps
|
180
197
|
- bin/untest
|
181
198
|
- bin/utils-utilsrc
|
182
199
|
- bin/vacuum_firefox_sqlite
|
200
|
+
- bin/vcf2alias
|
183
201
|
- bin/xmp
|
184
202
|
- lib/utils.rb
|
185
203
|
- lib/utils/config_file.rb
|
@@ -221,7 +239,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
239
|
version: '0'
|
222
240
|
requirements: []
|
223
241
|
rubyforge_project:
|
224
|
-
rubygems_version: 2.6.
|
242
|
+
rubygems_version: 2.6.14
|
225
243
|
signing_key:
|
226
244
|
specification_version: 4
|
227
245
|
summary: Some useful command line utilities
|