utils 0.32.0 → 0.33.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +11 -0
- data/Gemfile +0 -1
- data/Rakefile +1 -0
- data/bin/probe +8 -3
- data/lib/utils/irb.rb +1 -1
- data/lib/utils/probe_server.rb +1 -1
- data/lib/utils/version.rb +1 -1
- data/utils.gemspec +8 -6
- metadata +18 -5
- data/bin/ssl_cert_info +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50ec7fbc2ce6a3e39c4a2ef629e37232bf60ddf491bf3adfcc1ec29d18358f2f
|
4
|
+
data.tar.gz: e5a8b2edef42e1e00a91a88e46078696ec216c0a25032ff6ac17d030e9e75495
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f4648b04e39732a399a49c581aec427178ac17ae6ca3d48e84a76bed45301f61f108848ec08bcdcedb650613406de569173333e0aa8f49711062775f8ee0b70
|
7
|
+
data.tar.gz: bca088a6c8cd4226358a70563eff3f5febd7c80057bb277fa97404a0ef3992e2e9be1d8ec63d24093e8de1a85eb0ad1bf4f2607f38f07ecca2be8501fbcf10a7
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# To get started with Dependabot version updates, you'll need to specify which
|
2
|
+
# package ecosystems to update and where the package manifests are located.
|
3
|
+
# Please see the documentation for all configuration options:
|
4
|
+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
5
|
+
|
6
|
+
version: 2
|
7
|
+
updates:
|
8
|
+
- package-ecosystem: "bundler" # See documentation for possible values
|
9
|
+
directory: "/" # Location of package manifests
|
10
|
+
schedule:
|
11
|
+
interval: "weekly"
|
data/Gemfile
CHANGED
data/Rakefile
CHANGED
data/bin/probe
CHANGED
@@ -20,6 +20,7 @@ Options are
|
|
20
20
|
-C FOO[=BAR] set/get env variable on probe server
|
21
21
|
-l start probe as a server
|
22
22
|
-u URI use this DRb URI communication
|
23
|
+
-f FORMATTER use FORMATTER to display rspec output
|
23
24
|
-h display this help
|
24
25
|
|
25
26
|
Version is #{File.basename($0)} #{Utils::VERSION}.
|
@@ -31,6 +32,7 @@ def cmd(*args)
|
|
31
32
|
if ENV.key?('BUNDLE_GEMFILE')
|
32
33
|
args.unshift 'bundle', 'exec'
|
33
34
|
end
|
35
|
+
p args
|
34
36
|
puts args * ' '
|
35
37
|
system(*args) or exit $?.exitstatus
|
36
38
|
end
|
@@ -76,7 +78,7 @@ def connect_server
|
|
76
78
|
end
|
77
79
|
end
|
78
80
|
if $opts[?c]
|
79
|
-
opts = $opts.subhash(
|
81
|
+
opts = $opts.subhash(*%w[n t f]).each_with_object([]) { |(k, v), a|
|
80
82
|
v.full? and a.concat [ "-#{k}", v ]
|
81
83
|
}
|
82
84
|
probe_server.enqueue opts + $args
|
@@ -93,7 +95,7 @@ if i = ARGV.index('--')
|
|
93
95
|
else
|
94
96
|
$args = ARGV.dup
|
95
97
|
end
|
96
|
-
$opts = go 'lct:n:u:C:h', $args
|
98
|
+
$opts = go 'lct:n:u:C:f:h', $args
|
97
99
|
$opts[?h] and usage
|
98
100
|
|
99
101
|
$uri = $opts[?u] || 'drbunix:probe.socket'
|
@@ -117,7 +119,10 @@ when :rspec
|
|
117
119
|
else
|
118
120
|
rspec = [ find_cmd('rspec', 'spec') ]
|
119
121
|
end
|
120
|
-
rspec << '-rutils'
|
122
|
+
rspec << '-rutils'
|
123
|
+
unless $args.any? { |a| a.start_with?('-f') }
|
124
|
+
rspec << '-f' << ($opts[?f] || 'Utils::LineFormatter')
|
125
|
+
end
|
121
126
|
$args = $args.map do |a|
|
122
127
|
if Utils::Editor::FILE_LINENUMBER_REGEXP =~ a
|
123
128
|
$~.captures.compact * ':'
|
data/lib/utils/irb.rb
CHANGED
data/lib/utils/probe_server.rb
CHANGED
data/lib/utils/version.rb
CHANGED
data/utils.gemspec
CHANGED
@@ -1,23 +1,23 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: utils 0.
|
2
|
+
# stub: utils 0.33.1 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.33.1"
|
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 = "2022-
|
11
|
+
s.date = "2022-12-17"
|
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, "check-yaml".freeze, "classify".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "fix-brew".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, "rd2md".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "
|
14
|
+
s.executables = ["ascii7".freeze, "blameline".freeze, "check-yaml".freeze, "classify".freeze, "create_cstags".freeze, "create_tags".freeze, "discover".freeze, "edit".freeze, "edit_wait".freeze, "enum".freeze, "fix-brew".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, "rd2md".freeze, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "untest".freeze, "utils-utilsrc".freeze, "vcf2alias".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 = [".github/workflows/codeql-analysis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/check-yaml".freeze, "bin/classify".freeze, "bin/create_cstags".freeze, "bin/create_tags".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/fix-brew".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/rd2md".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/
|
16
|
+
s.files = [".github/dependabot.yml".freeze, ".github/workflows/codeql-analysis.yml".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "bin/ascii7".freeze, "bin/blameline".freeze, "bin/check-yaml".freeze, "bin/classify".freeze, "bin/create_cstags".freeze, "bin/create_tags".freeze, "bin/discover".freeze, "bin/edit".freeze, "bin/edit_wait".freeze, "bin/enum".freeze, "bin/fix-brew".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/rd2md".freeze, "bin/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/strip_spaces".freeze, "bin/untest".freeze, "bin/utils-utilsrc".freeze, "bin/vcf2alias".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.licenses = ["GPL-2.0".freeze]
|
19
19
|
s.rdoc_options = ["--title".freeze, "Utils - Some useful command line utilities".freeze, "--main".freeze, "README.md".freeze]
|
20
|
-
s.rubygems_version = "3.3.
|
20
|
+
s.rubygems_version = "3.3.26".freeze
|
21
21
|
s.summary = "Some useful command line utilities".freeze
|
22
22
|
|
23
23
|
if s.respond_to? :specification_version then
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
|
27
27
|
if s.respond_to? :add_runtime_dependency then
|
28
28
|
s.add_development_dependency(%q<gem_hadar>.freeze, ["~> 1.12.0"])
|
29
|
+
s.add_development_dependency(%q<debug>.freeze, [">= 0"])
|
29
30
|
s.add_runtime_dependency(%q<tins>.freeze, ["~> 1.14"])
|
30
31
|
s.add_runtime_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
|
31
32
|
s.add_runtime_dependency(%q<pstree>.freeze, ["~> 0.3"])
|
@@ -35,6 +36,7 @@ Gem::Specification.new do |s|
|
|
35
36
|
s.add_runtime_dependency(%q<all_images>.freeze, [">= 0.0.2"])
|
36
37
|
else
|
37
38
|
s.add_dependency(%q<gem_hadar>.freeze, ["~> 1.12.0"])
|
39
|
+
s.add_dependency(%q<debug>.freeze, [">= 0"])
|
38
40
|
s.add_dependency(%q<tins>.freeze, ["~> 1.14"])
|
39
41
|
s.add_dependency(%q<term-ansicolor>.freeze, ["~> 1.3"])
|
40
42
|
s.add_dependency(%q<pstree>.freeze, ["~> 0.3"])
|
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.33.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: 1.12.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: debug
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: tins
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -151,7 +165,6 @@ executables:
|
|
151
165
|
- sedit
|
152
166
|
- serve
|
153
167
|
- ssh-tunnel
|
154
|
-
- ssl_cert_info
|
155
168
|
- strip_spaces
|
156
169
|
- untest
|
157
170
|
- utils-utilsrc
|
@@ -176,6 +189,7 @@ extra_rdoc_files:
|
|
176
189
|
- lib/utils/version.rb
|
177
190
|
- lib/utils/xt/source_location_extension.rb
|
178
191
|
files:
|
192
|
+
- ".github/dependabot.yml"
|
179
193
|
- ".github/workflows/codeql-analysis.yml"
|
180
194
|
- COPYING
|
181
195
|
- Gemfile
|
@@ -207,7 +221,6 @@ files:
|
|
207
221
|
- bin/sedit
|
208
222
|
- bin/serve
|
209
223
|
- bin/ssh-tunnel
|
210
|
-
- bin/ssl_cert_info
|
211
224
|
- bin/strip_spaces
|
212
225
|
- bin/untest
|
213
226
|
- bin/utils-utilsrc
|
@@ -252,7 +265,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
265
|
- !ruby/object:Gem::Version
|
253
266
|
version: '0'
|
254
267
|
requirements: []
|
255
|
-
rubygems_version: 3.3.
|
268
|
+
rubygems_version: 3.3.26
|
256
269
|
signing_key:
|
257
270
|
specification_version: 4
|
258
271
|
summary: Some useful command line utilities
|
data/bin/ssl_cert_info
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
def cert_info(crt)
|
4
|
-
check_cmd = 'openssl x509 -inform pem -subject -fingerprint -issuer -sha256 -dates'
|
5
|
-
IO.popen(check_cmd, 'w+') do |process|
|
6
|
-
process.write crt
|
7
|
-
process.close_write
|
8
|
-
return process.read
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
|
-
def split_certs(input)
|
13
|
-
inside_cert = false
|
14
|
-
certs = []
|
15
|
-
input.each do |line|
|
16
|
-
case line
|
17
|
-
when /^-+BEGIN\s+CERTIFICATE-+$/
|
18
|
-
certs << line
|
19
|
-
inside_cert = true
|
20
|
-
next
|
21
|
-
when /^-+END\s+CERTIFICATE-+$/
|
22
|
-
certs.last << line
|
23
|
-
inside_cert = false
|
24
|
-
next
|
25
|
-
end
|
26
|
-
if inside_cert
|
27
|
-
certs.last << line
|
28
|
-
end
|
29
|
-
end
|
30
|
-
certs
|
31
|
-
end
|
32
|
-
|
33
|
-
split_certs(ARGF).each do |c|
|
34
|
-
puts "", cert_info(c)
|
35
|
-
end
|