utils 0.24.0 → 0.25.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/all_images +19 -31
- data/bin/ssl_cert_info +35 -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: e5e6aaef5b9e79a9cf124718507ba0f9c626f9978e00fe8d3e5a65ef22b18f56
|
4
|
+
data.tar.gz: 8f5200637c19a37dadddfa85a90fa80ab0d0730613d7c4170261e7473f4cf83b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63ff5b909a214bf4cc0f0f97b8ad9efe2d4277cafcb88d36a3a10da3de4b2d39b7bb93b94fb97ccbd49ab216d441d517c2beab652bed18fbe4d201d7b6f27ad9
|
7
|
+
data.tar.gz: d6d9ea947a13cdaffe47ae27fe7ba8a62e06e60f0255b743a889157f88b1c533a2734d7c7a1ad0a409c3e1aecbb45f49d69a445f5b48b37eeb7a73df97b74558
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.25.0
|
data/bin/all_images
CHANGED
@@ -1,20 +1,23 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# Configure like so:
|
3
|
-
#
|
4
|
-
#
|
5
|
-
#
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
9
|
-
#
|
10
|
-
#
|
11
|
-
#
|
12
|
-
#
|
13
|
-
#
|
14
|
-
#
|
15
|
-
#
|
16
|
-
#
|
17
|
-
#
|
3
|
+
#dockerfile: |-
|
4
|
+
# RUN apk add --no-cache build-base git
|
5
|
+
# RUN gem install gem_hadar bundler
|
6
|
+
#
|
7
|
+
#script: &script |-
|
8
|
+
# echo -e "\e[1m"
|
9
|
+
# ruby -v
|
10
|
+
# bundle
|
11
|
+
# echo -e "\e[0m"
|
12
|
+
# if rake test
|
13
|
+
#
|
14
|
+
#images:
|
15
|
+
# ruby:3.0-alpine: *script
|
16
|
+
# ruby:2.7-alpine: *script
|
17
|
+
# ruby:2.6-alpine: *script
|
18
|
+
# ruby:2.5-alpine: *script
|
19
|
+
# ruby:2.4-alpine: *script
|
20
|
+
# ruby:2.3-alpine: *script
|
18
21
|
|
19
22
|
require 'yaml'
|
20
23
|
require 'tmpdir'
|
@@ -22,21 +25,6 @@ require 'fileutils'
|
|
22
25
|
include FileUtils
|
23
26
|
|
24
27
|
alias sh system
|
25
|
-
dockerfile: |-
|
26
|
-
RUN apk add --no-cache build-base git
|
27
|
-
RUN gem install gem_hadar bundler
|
28
|
-
|
29
|
-
script: &script |-
|
30
|
-
ruby -v
|
31
|
-
rake test
|
32
|
-
|
33
|
-
images:
|
34
|
-
ruby:3.0-alpine: *script
|
35
|
-
ruby:2.7-alpine: *script
|
36
|
-
ruby:2.6-alpine: *script
|
37
|
-
ruby:2.5-alpine: *script
|
38
|
-
ruby:2.4-alpine: *script
|
39
|
-
ruby:2.3-alpine: *script
|
40
28
|
|
41
29
|
def provide_image(image, dockerfile)
|
42
30
|
tag = "all_images/#{image}"
|
@@ -53,7 +41,7 @@ def provide_image(image, dockerfile)
|
|
53
41
|
#{dockerfile}
|
54
42
|
end
|
55
43
|
end
|
56
|
-
sh "docker build -t '#{tag}' ."
|
44
|
+
sh "docker build --pull -t '#{tag}' ."
|
57
45
|
end
|
58
46
|
tag
|
59
47
|
ensure
|
data/bin/ssl_cert_info
ADDED
@@ -0,0 +1,35 @@
|
|
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
|
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.25.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.25.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 = "2022-02-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 = ["all_images".freeze, "ascii7".freeze, "blameline".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, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "strip_spaces".freeze, "untest".freeze, "utils-utilsrc".freeze, "vcf2alias".freeze]
|
14
|
+
s.executables = ["all_images".freeze, "ascii7".freeze, "blameline".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, "search".freeze, "sedit".freeze, "serve".freeze, "ssh-tunnel".freeze, "ssl_cert_info".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 = [".gitignore".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/all_images".freeze, "bin/ascii7".freeze, "bin/blameline".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/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]
|
16
|
+
s.files = [".gitignore".freeze, "COPYING".freeze, "Gemfile".freeze, "README.md".freeze, "Rakefile".freeze, "VERSION".freeze, "bin/all_images".freeze, "bin/ascii7".freeze, "bin/blameline".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/search".freeze, "bin/sedit".freeze, "bin/serve".freeze, "bin/ssh-tunnel".freeze, "bin/ssl_cert_info".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.rdoc_options = ["--title".freeze, "Utils - Some useful command line utilities".freeze, "--main".freeze, "README.md".freeze]
|
19
19
|
s.rubygems_version = "3.2.22".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.25.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: 2022-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -136,6 +136,7 @@ executables:
|
|
136
136
|
- sedit
|
137
137
|
- serve
|
138
138
|
- ssh-tunnel
|
139
|
+
- ssl_cert_info
|
139
140
|
- strip_spaces
|
140
141
|
- untest
|
141
142
|
- utils-utilsrc
|
@@ -191,6 +192,7 @@ files:
|
|
191
192
|
- bin/sedit
|
192
193
|
- bin/serve
|
193
194
|
- bin/ssh-tunnel
|
195
|
+
- bin/ssl_cert_info
|
194
196
|
- bin/strip_spaces
|
195
197
|
- bin/untest
|
196
198
|
- bin/utils-utilsrc
|