utils 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/bin/create_cstags +30 -0
- data/bin/discover +1 -0
- data/lib/utils/config_file.rb +15 -0
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +5 -5
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7b8dd9e8d8a23b0e49726137020d13853285176efa445f563e30017db56c9a68
|
4
|
+
data.tar.gz: b06a079a66510cbe89ba2591749bcddb44bb015b28cacc1b7c1bddb51badb607
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26cfa536b669fb196626f68c338c10db2e7d128a91bbfdb747b7b970968e240733ff115000eb550284080d15ef2dd84ea3ee66c0108bce5c9e53c7a1a148720a
|
7
|
+
data.tar.gz: 5cc7b8367261c6e3a975c69274e39e250dc03f4041a26fab7d3042df72c1148af25f9741788ec49e4921da2a91202005e81413b445e284065da01a1fcc449273
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.14.0
|
data/bin/create_cstags
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require 'utils'
|
4
|
+
require 'infobar'
|
5
|
+
|
6
|
+
config = Utils::ConfigFile.new
|
7
|
+
config.configure_from_paths
|
8
|
+
|
9
|
+
roots = %w[ . ] + `bundle list --paths`.lines.map(&:chomp)
|
10
|
+
|
11
|
+
IO.popen('cscope 2>/dev/null -R -b -i - -f cscope.out', 'w') do |scope|
|
12
|
+
finder = Utils::Finder.new(
|
13
|
+
pattern: '',
|
14
|
+
roots: roots,
|
15
|
+
config: config,
|
16
|
+
)
|
17
|
+
finder.search.paths.with_infobar(label: 'Collecting files') do |path|
|
18
|
+
scope.puts path
|
19
|
+
+infobar
|
20
|
+
end
|
21
|
+
|
22
|
+
infobar.newline
|
23
|
+
Infobar.busy(label: 'Creating cstags') do
|
24
|
+
scope.close
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
if megabytes = File.size('cscope.out').to_f / 1024 ** 2 rescue nil
|
29
|
+
infobar.puts 'Created %.3fM of cstags.' % megabytes
|
30
|
+
end
|
data/bin/discover
CHANGED
@@ -40,6 +40,7 @@ Options are
|
|
40
40
|
-iX use case insensitive matches with X=y (default) or not with X=n
|
41
41
|
-I SUFFIX only include files with suffix SUFFIX during finding
|
42
42
|
-d match also directories
|
43
|
+
-D list all search leaf directories
|
43
44
|
-v be verbose
|
44
45
|
-n NUMBER the first NUMBER of matches is returned
|
45
46
|
-s search by interactively inputting PATTERN
|
data/lib/utils/config_file.rb
CHANGED
@@ -144,6 +144,21 @@ class Utils::ConfigFile
|
|
144
144
|
@discover ||= Discover.new
|
145
145
|
end
|
146
146
|
|
147
|
+
class Scope < FileFinder
|
148
|
+
config :prune_dirs, /\A(\.svn|\.git|CVS|tmp)\z/
|
149
|
+
|
150
|
+
config :skip_files, /(\A\.|\.sw[pon]\z|\.log\z|~\z)/
|
151
|
+
|
152
|
+
config :binary, false
|
153
|
+
end
|
154
|
+
|
155
|
+
def scope(&block)
|
156
|
+
if block
|
157
|
+
@scope = Scope.new(&block)
|
158
|
+
end
|
159
|
+
@scope ||= Scope.new
|
160
|
+
end
|
161
|
+
|
147
162
|
class StripSpaces < FileFinder
|
148
163
|
config :prune_dirs, /\A(\..*|CVS)\z/
|
149
164
|
|
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -1,19 +1,19 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.
|
2
|
+
# stub: utils 0.14.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.14.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 = "2019-04-
|
11
|
+
s.date = "2019-04-09"
|
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 = ["discover".freeze, "classify".freeze, "sedit".freeze, "irb_connect".freeze, "ascii7".freeze, "path".freeze, "enum".freeze, "unquarantine_apps".freeze, "ssh-tunnel".freeze, "xmp".freeze, "brakeman2err".freeze, "search".freeze, "chroot-exec".freeze, "edit".freeze, "tmproc".freeze, "json_check".freeze, "edit_wait".freeze, "errf".freeze, "untest".freeze, "blameline".freeze, "remote_copy".freeze, "git-empty".freeze, "vacuum_firefox_sqlite".freeze, "same_files".freeze, "chroot-libs".freeze, "git-versions".freeze, "strip_spaces".freeze, "number_files".freeze, "rssr".freeze, "serve".freeze, "vcf2alias".freeze, "on_change".freeze, "utils-utilsrc".freeze, "myex".freeze, "long_lines".freeze, "dialog-pick".freeze, "probe".freeze, "create_tags".freeze]
|
14
|
+
s.executables = ["discover".freeze, "classify".freeze, "sedit".freeze, "irb_connect".freeze, "ascii7".freeze, "path".freeze, "enum".freeze, "unquarantine_apps".freeze, "ssh-tunnel".freeze, "xmp".freeze, "brakeman2err".freeze, "search".freeze, "chroot-exec".freeze, "edit".freeze, "tmproc".freeze, "json_check".freeze, "edit_wait".freeze, "errf".freeze, "untest".freeze, "blameline".freeze, "remote_copy".freeze, "git-empty".freeze, "create_cstags".freeze, "vacuum_firefox_sqlite".freeze, "same_files".freeze, "chroot-libs".freeze, "git-versions".freeze, "strip_spaces".freeze, "number_files".freeze, "rssr".freeze, "serve".freeze, "vcf2alias".freeze, "on_change".freeze, "utils-utilsrc".freeze, "myex".freeze, "long_lines".freeze, "dialog-pick".freeze, "probe".freeze, "create_tags".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/interactive_search.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/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/interactive_search.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_cstags".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/interactive_search.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
19
|
s.rubygems_version = "3.0.3".freeze
|
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.14.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: 2019-04-
|
11
|
+
date: 2019-04-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -133,6 +133,7 @@ executables:
|
|
133
133
|
- blameline
|
134
134
|
- remote_copy
|
135
135
|
- git-empty
|
136
|
+
- create_cstags
|
136
137
|
- vacuum_firefox_sqlite
|
137
138
|
- same_files
|
138
139
|
- chroot-libs
|
@@ -182,6 +183,7 @@ files:
|
|
182
183
|
- bin/chroot-exec
|
183
184
|
- bin/chroot-libs
|
184
185
|
- bin/classify
|
186
|
+
- bin/create_cstags
|
185
187
|
- bin/create_tags
|
186
188
|
- bin/dialog-pick
|
187
189
|
- bin/discover
|