toolrack 0.1.0 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +6 -0
- data/README.md +8 -1
- data/Rakefile +2 -0
- data/lib/toolrack.rb +12 -1
- data/lib/toolrack/condition_utils.rb +13 -3
- data/lib/toolrack/exception_utils.rb +12 -9
- data/lib/toolrack/global.rb +35 -0
- data/lib/toolrack/process_utils.rb +151 -0
- data/lib/toolrack/runtime_utils.rb +29 -0
- data/lib/toolrack/utils.rb +23 -0
- data/lib/toolrack/version.rb +2 -2
- data/process_test/backtick_test.rb +2 -0
- data/process_test/pty_test.rb +74 -0
- data/process_test/shell_test.rb +14 -0
- data/process_test/system_test.rb +3 -0
- data/toolrack.gemspec +8 -4
- metadata +47 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b8060cf4deb99cad679a22d0e9d4fd85969e0f332361a3d1bd89c52fda8166f
|
4
|
+
data.tar.gz: 5af17bbfb37aa09f5df3c9c8f02f916357b281a262316a6d3a67a0c0ccc9c613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7fb7969942992c8163decf1d8a98200b7b719f3c6e5c1eda86ad833047b15e185fe9793ecd2876dca56921f9c80760efa08e75ba99e73e8a4af478d9365834f7
|
7
|
+
data.tar.gz: e081ff9358e5e9dabe48f6b41106cb0308f538c20b08753275b90ed54088b0463fe641cf5613ce23858374e6b36c2430329f2477260dc2f69493f1592dd9ed06
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -43,9 +43,10 @@ class EditController
|
|
43
43
|
end
|
44
44
|
```
|
45
45
|
|
46
|
-
Currently it has
|
46
|
+
Currently it has 3 modules:
|
47
47
|
* Condition Utilities
|
48
48
|
* is_empty?(obj) - I find rather effort intensive to call if not (obj.nil? or obj.empty?) for items that I want to check for validity before process. Hence this method shall test for .nil?. If the object also respond to :empty? it shall be called again. For example integer type does not support .empty?
|
49
|
+
* not_empty?(obj) - Reverse of the is\_empty?(obj) above
|
49
50
|
|
50
51
|
* Exception Utilities
|
51
52
|
* raise_if_empty(obj, message, error) - Extension from the is_empty?() above, usually if it is empty, an exception shall be raised. It is just combined the conditions with raise of exception.
|
@@ -55,6 +56,12 @@ Currently it has only 2 modules:
|
|
55
56
|
* raise_if_false(obj, message, error) - As the name implied
|
56
57
|
* raise_if_true(obj, message, error) - As the name implied
|
57
58
|
|
59
|
+
* Process Utilities
|
60
|
+
* exec(command, options = { ), &block) - Passing in the command into the method and result is returned to caller. If options is not given shall go to basic execution which is the backtick (\`). If block empty, result of the command is returned to caller. If block is given, result (true or false of the execution of command and any result from STDOUT is call to block provider(e.g. block.call($?, result)
|
61
|
+
|
62
|
+
# Note on Process Utilities
|
63
|
+
|
64
|
+
The command is passed as it is to the operating system which includes fatal operation such as "rm -rf". Library at current stage made no filtering on system harmful command hence the caller of the library has to take extra precaution on what command is being passed into the library
|
58
65
|
|
59
66
|
|
60
67
|
|
data/Rakefile
CHANGED
data/lib/toolrack.rb
CHANGED
@@ -1,11 +1,22 @@
|
|
1
1
|
require "toolrack/version"
|
2
2
|
|
3
|
+
require 'tlogger'
|
4
|
+
require 'singleton'
|
5
|
+
|
6
|
+
require 'fileutils'
|
7
|
+
|
8
|
+
require_relative 'toolrack/global'
|
3
9
|
require_relative 'toolrack/exception_utils'
|
4
10
|
require_relative 'toolrack/condition_utils'
|
11
|
+
require_relative 'toolrack/process_utils'
|
12
|
+
require_relative 'toolrack/runtime_utils'
|
5
13
|
|
6
14
|
module Antrapol
|
7
|
-
module
|
15
|
+
module ToolRack
|
8
16
|
class Error < StandardError; end
|
9
17
|
# Your code goes here...
|
18
|
+
|
10
19
|
end
|
11
20
|
end
|
21
|
+
|
22
|
+
|
@@ -1,19 +1,29 @@
|
|
1
1
|
|
2
2
|
|
3
3
|
module Antrapol
|
4
|
-
module
|
4
|
+
module ToolRack
|
5
5
|
module ConditionUtils
|
6
6
|
|
7
7
|
def is_empty?(obj)
|
8
|
-
if obj
|
8
|
+
if not defined?(obj)
|
9
|
+
true
|
10
|
+
elsif obj.nil?
|
9
11
|
true
|
10
12
|
elsif obj.respond_to?(:empty?)
|
11
|
-
obj.
|
13
|
+
if obj.respond_to?(:strip)
|
14
|
+
obj.strip.empty?
|
15
|
+
else
|
16
|
+
obj.empty?
|
17
|
+
end
|
12
18
|
else
|
13
19
|
false
|
14
20
|
end
|
15
21
|
end # is_empty?
|
16
22
|
|
23
|
+
def not_empty?(obj)
|
24
|
+
!is_empty?(obj)
|
25
|
+
end # not empty
|
26
|
+
|
17
27
|
end # ConditionUtils
|
18
28
|
end # MyToolRack
|
19
29
|
end # Antrapol
|
@@ -1,41 +1,44 @@
|
|
1
1
|
|
2
|
-
require_relative '
|
2
|
+
require_relative 'condition_utils'
|
3
3
|
|
4
4
|
module Antrapol
|
5
|
-
module
|
5
|
+
module ToolRack
|
6
6
|
module ExceptionUtils
|
7
|
-
include Antrapol::
|
7
|
+
include Antrapol::ToolRack::ConditionUtils
|
8
8
|
|
9
9
|
# raise_if_empty
|
10
10
|
# Raise the given (or default if not given) exception if the val given is empty
|
11
11
|
# val - variable/object that shall be tested for emptiness
|
12
12
|
# message - message to be thrown if it is true
|
13
13
|
# error - exception object to be thrown
|
14
|
-
def raise_if_empty(val, message, error = Antrapol::
|
14
|
+
def raise_if_empty(val, message, error = Antrapol::ToolRack::Error)
|
15
15
|
raise_error(message,error) if is_empty?(val)
|
16
16
|
end # raise_if_empty
|
17
|
+
alias_method :raise_if_empty?, :raise_if_empty
|
17
18
|
|
18
19
|
#
|
19
20
|
# raise_if_false
|
20
21
|
#
|
21
|
-
def raise_if_false(bool, message, error = Antrapol::
|
22
|
+
def raise_if_false(bool, message, error = Antrapol::ToolRack::Error)
|
22
23
|
if not bool
|
23
24
|
raise_error(message,error)
|
24
25
|
end
|
25
26
|
end # raise_if_false
|
27
|
+
alias_method :raise_if_false?, :raise_if_false
|
26
28
|
|
27
29
|
#
|
28
30
|
# raise_if_true
|
29
31
|
#
|
30
|
-
def raise_if_true(bool, message, error = Antrapol::
|
32
|
+
def raise_if_true(bool, message, error = Antrapol::ToolRack::Error)
|
31
33
|
raise_if_false(!bool, message, error)
|
32
34
|
end # raise_if_true
|
35
|
+
alias_method :raise_if_true?, :raise_if_true
|
33
36
|
|
34
37
|
protected
|
35
|
-
def raise_error(message, error = Antrapol::
|
38
|
+
def raise_error(message, error = Antrapol::ToolRack::Error)
|
36
39
|
if error.nil?
|
37
40
|
if @default_exception.nil?
|
38
|
-
raise Antrapol::
|
41
|
+
raise Antrapol::ToolRack::Error, message
|
39
42
|
else
|
40
43
|
raise @default_exception, message
|
41
44
|
end
|
@@ -45,5 +48,5 @@ module Antrapol
|
|
45
48
|
end # raise_error
|
46
49
|
|
47
50
|
end # ExceptionUtils
|
48
|
-
end #
|
51
|
+
end # ToolRack
|
49
52
|
end # Antrapol
|
@@ -0,0 +1,35 @@
|
|
1
|
+
|
2
|
+
require 'singleton'
|
3
|
+
require_relative 'condition_utils'
|
4
|
+
|
5
|
+
module Antrapol
|
6
|
+
module ToolRack
|
7
|
+
|
8
|
+
class Logger
|
9
|
+
include Singleton
|
10
|
+
include Antrapol::ToolRack::ConditionUtils
|
11
|
+
|
12
|
+
attr_reader :glogger
|
13
|
+
def initialize
|
14
|
+
# boolean
|
15
|
+
loggerDebug = ENV['TOOLRACK_DEBUG']
|
16
|
+
logFile = ENV['TOOLRACK_LOGFILE'] || File.join(Dir.home, 'antrapol_logs','toolrack.log')
|
17
|
+
maxLogNo = ENV['TOOLRACK_MAX_LOGFILE'] || 10
|
18
|
+
logFileSize = ENV['TOOLRACK_MAX_LOGFILE_SIZE'] || 10*1024*1024
|
19
|
+
|
20
|
+
logFileDir = File.dirname(logFile)
|
21
|
+
if not File.exist?(logFileDir)
|
22
|
+
FileUtils.mkdir_p(logFileDir)
|
23
|
+
end
|
24
|
+
|
25
|
+
if not_empty?(loggerDebug) and (loggerDebug.downcase == 'true')
|
26
|
+
@glogger = Tlogger.new(STDOUT)
|
27
|
+
else
|
28
|
+
@glogger = Tlogger.new(logFile,maxLogNo,logFileSize)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
@@ -0,0 +1,151 @@
|
|
1
|
+
|
2
|
+
require_relative 'global'
|
3
|
+
require_relative 'runtime_utils'
|
4
|
+
|
5
|
+
if Antrapol::ToolRack::RuntimeUtils.on_windows?
|
6
|
+
# pty causing "function 'openpty' not found in msvcrt.dll" in some
|
7
|
+
# windows platform. Due to patches?
|
8
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "On Windows. Not going to load gem 'pty'"
|
9
|
+
else
|
10
|
+
require 'pty'
|
11
|
+
end
|
12
|
+
require 'expect'
|
13
|
+
require 'io/console'
|
14
|
+
require 'tlogger'
|
15
|
+
require 'open3'
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
module Antrapol
|
20
|
+
module ToolRack
|
21
|
+
module ProcessUtils
|
22
|
+
|
23
|
+
def exec(cmd, opts = { }, &block)
|
24
|
+
type = opts[:exec_type]
|
25
|
+
if not type.nil?
|
26
|
+
instance(type, cmd, opts, &block)
|
27
|
+
else
|
28
|
+
instance(:basic, cmd, opts, &block)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def instance(type, cmd, opts = { }, &block)
|
33
|
+
case type
|
34
|
+
when :basic
|
35
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "Basic execution"
|
36
|
+
basic_exec(cmd, &block)
|
37
|
+
when :system
|
38
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "System execution"
|
39
|
+
system_exec(cmd, opts, &block)
|
40
|
+
when :popen3
|
41
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "Popen3 execution"
|
42
|
+
popen3_exec(cmd, opts, &block)
|
43
|
+
else
|
44
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "Basic (fallback) execution"
|
45
|
+
# basic
|
46
|
+
basic_exec(cmd, &block)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
private
|
51
|
+
# backtick
|
52
|
+
# backtick will only return at the end of the process.
|
53
|
+
# If in the event there is a prompt to user, this should nto be used.
|
54
|
+
def basic_exec(cmd, &block)
|
55
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "Basic shell exec command : #{cmd}"
|
56
|
+
res = `#{cmd}`
|
57
|
+
if block
|
58
|
+
block.call($?, res)
|
59
|
+
else
|
60
|
+
res
|
61
|
+
end
|
62
|
+
end # basic_shell_exec
|
63
|
+
|
64
|
+
# system
|
65
|
+
# System call link the stdout and stdin to the calling process and idea
|
66
|
+
# to call mild interactive process
|
67
|
+
def system_exec(cmd, opts = { }, &block)
|
68
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "System exec command : #{cmd}"
|
69
|
+
system(cmd)
|
70
|
+
$.
|
71
|
+
end # system_exec
|
72
|
+
|
73
|
+
#def popen_exec(cmd, opts = { }, &block)
|
74
|
+
# puts "Cmd : #{cmd}"
|
75
|
+
# IO.popen(cmd, "r+") do |io|
|
76
|
+
# puts io.gets
|
77
|
+
# puts io.gets
|
78
|
+
# puts io.gets
|
79
|
+
# end
|
80
|
+
#end
|
81
|
+
|
82
|
+
def popen3_exec(cmd, opts = { }, &block)
|
83
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "Popen3 exec command : #{cmd}"
|
84
|
+
stdout, stderr, status = Open3.capture3(cmd)
|
85
|
+
block.call(:popen_exec, { output: stdout, error: stderr, status: status })
|
86
|
+
end
|
87
|
+
|
88
|
+
def pty_exec(cmd, opts = { }, &block)
|
89
|
+
|
90
|
+
Antrapol::ToolRack::Logger.instance.glogger.debug "PTY exec command : #{cmd}"
|
91
|
+
|
92
|
+
# pty seems error running on windows + jruby
|
93
|
+
if Antrapol::ToolRack::RuntimeUtils.on_windows?
|
94
|
+
raise Exception, "You're running on Windows. There have been report that error \"function 'openpty' not found in msvcrt.dll\". Probably due to patches. For now pty_exec() shall be halted"
|
95
|
+
end
|
96
|
+
|
97
|
+
logger = opts[:logger] || Tlogger.new(STDOUT)
|
98
|
+
expect = opts[:expect] || { }
|
99
|
+
bufSize = opts[:intBufSize] || 1024000
|
100
|
+
|
101
|
+
if bufSize != nil and bufSize.to_i > 0
|
102
|
+
else
|
103
|
+
bufSize = 1024000
|
104
|
+
end
|
105
|
+
|
106
|
+
logger.debug "Command : #{cmd}"
|
107
|
+
PTY.spawn(cmd[0], *(cmd[1..-1])) do |pout,pin,pid| #, 'env TERM=ansi') do |stdout, stdin, pid|
|
108
|
+
|
109
|
+
pin.sync = true
|
110
|
+
|
111
|
+
begin
|
112
|
+
loop do
|
113
|
+
dat = []
|
114
|
+
loop do
|
115
|
+
d = pout.sysread(bufSize)
|
116
|
+
dat << d
|
117
|
+
break if d.length < bufSize
|
118
|
+
end
|
119
|
+
#dat = dat.join("\r\n")
|
120
|
+
|
121
|
+
if block
|
122
|
+
block.call(:inspect, { data: dat, output: pout, input: pin })
|
123
|
+
end
|
124
|
+
|
125
|
+
end
|
126
|
+
rescue EOFError => ex
|
127
|
+
logger.error "EOF : #{ex}"
|
128
|
+
#clog "EOF reached. Waiting to kill process.", :debug, :os_cmd
|
129
|
+
Process.wait(pid)
|
130
|
+
#clog "Processed killed.", :debug, :os_cmd
|
131
|
+
rescue Exception => ex
|
132
|
+
logger.error ex.message
|
133
|
+
logger.error ex.backtrace.join("\n")
|
134
|
+
#clog ex.message, :error, :os_cmd
|
135
|
+
#clog ex.backtrace.join("\n"), :error, :os_cmd
|
136
|
+
end
|
137
|
+
|
138
|
+
end
|
139
|
+
# end PTY.spawn() method
|
140
|
+
|
141
|
+
$?.exitstatus
|
142
|
+
|
143
|
+
end # pty_exec
|
144
|
+
|
145
|
+
end # module ProcessUtils
|
146
|
+
|
147
|
+
class ProcessUtilsEngine
|
148
|
+
extend ProcessUtils
|
149
|
+
end
|
150
|
+
end # module ToolRack
|
151
|
+
end # module Antrapol
|
@@ -0,0 +1,29 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
module Antrapol
|
4
|
+
module ToolRack
|
5
|
+
module RuntimeUtils
|
6
|
+
|
7
|
+
def RuntimeUtils.on_windows?
|
8
|
+
(RbConfig::CONFIG['host_os'] =~ /cygwin|mswin|mingw|bccwin|wince|emx/) != nil
|
9
|
+
end
|
10
|
+
|
11
|
+
def RuntimeUtils.on_mac?
|
12
|
+
(RbConfig::CONFIG['host_os'] =~ /darwin|mac/) != nil
|
13
|
+
end
|
14
|
+
|
15
|
+
def RuntimeUtils.on_linux?
|
16
|
+
(RbConfig::CONFIG['host_os'] =~ /linux/) != nil
|
17
|
+
end
|
18
|
+
|
19
|
+
def RuntimeUtils.on_ruby?
|
20
|
+
not on_jruby?
|
21
|
+
end
|
22
|
+
|
23
|
+
def RuntimeUtils.on_jruby?
|
24
|
+
(RUBY_PLATFORM =~ /java/) != nil
|
25
|
+
end
|
26
|
+
|
27
|
+
end # RuntimeUtils
|
28
|
+
end # ToolRack
|
29
|
+
end #Antrapol
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
module Antrapol
|
5
|
+
module Utils
|
6
|
+
|
7
|
+
def set_session_exception(exp)
|
8
|
+
if not exp.nil?
|
9
|
+
@sExp = exp
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def session_exception
|
14
|
+
if not @sExp.nil?
|
15
|
+
@sExcp
|
16
|
+
else
|
17
|
+
Antrapol::ToolRack::Error
|
18
|
+
end
|
19
|
+
end
|
20
|
+
alias_method :session_exception, :s_exp
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
data/lib/toolrack/version.rb
CHANGED
@@ -0,0 +1,74 @@
|
|
1
|
+
|
2
|
+
|
3
|
+
|
4
|
+
require 'pty'
|
5
|
+
require 'expect'
|
6
|
+
|
7
|
+
#m, s = PTY.open
|
8
|
+
#r, w = IO.pipe
|
9
|
+
#
|
10
|
+
#pid = spawn("/usr/bin/openvpn --config /home/chris/.openvpn_cli/sg2-ovpn-tcp.ovpn", in: r, out: s)
|
11
|
+
#r.close
|
12
|
+
#s.close
|
13
|
+
#
|
14
|
+
#
|
15
|
+
#ret = begin
|
16
|
+
# p m.gets
|
17
|
+
# rescue Errno::EIO
|
18
|
+
# nil
|
19
|
+
# end
|
20
|
+
#
|
21
|
+
|
22
|
+
|
23
|
+
##PTY.spawn("/usr/bin/sudo /usr/bin/openvpn --config /home/chris/.openvpn_cli/sg2-ovpn-tcp.ovpn") do |read, write, pid|
|
24
|
+
#PTY.spawn("/usr/bin/openvpn --config /home/chris/.openvpn_cli/sg2-ovpn-tcp.ovpn") do |read, write, pid|
|
25
|
+
# #read.expect(/\[sudo\] password for chris:/) { |m|
|
26
|
+
# # p m
|
27
|
+
# # puts "expect"
|
28
|
+
# # write.printf("chr1st0pher1120\n")
|
29
|
+
# #}
|
30
|
+
# #read.expect(/Username:/) { |msg|
|
31
|
+
# # puts "-- #{msg}"
|
32
|
+
# # write.printf("purevpn0s2643230\r\n")
|
33
|
+
# #}
|
34
|
+
#
|
35
|
+
# #read.expect(/no echo\)/) { |msg|
|
36
|
+
# # puts "++ #{msg}"
|
37
|
+
# # write.printf("\t@ntr@p0l.c0m\r\n")
|
38
|
+
# #}
|
39
|
+
#
|
40
|
+
# loop do
|
41
|
+
# read.expect(/\n/) { |l|
|
42
|
+
# p l
|
43
|
+
# @ln = l
|
44
|
+
# }
|
45
|
+
# break if @ln.nil?
|
46
|
+
# end
|
47
|
+
#end
|
48
|
+
|
49
|
+
read, write, pid = PTY.spawn("/usr/bin/openvpn --config /home/chris/.openvpn_cli/sg2-ovpn-tcp.ovpn")
|
50
|
+
|
51
|
+
puts "PID : #{pid}"
|
52
|
+
|
53
|
+
trap "SIGINT" do
|
54
|
+
read.close
|
55
|
+
write.close
|
56
|
+
begin
|
57
|
+
puts "Killing process"
|
58
|
+
Process.kill("HUP",pid)
|
59
|
+
puts "Kill done. Start waiting"
|
60
|
+
Process.wait(pid)
|
61
|
+
STDERR.puts "Cleanup Done!"
|
62
|
+
rescue PTY::ChildExited
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
loop do
|
67
|
+
read.expect(/\n/) do |l|
|
68
|
+
puts l
|
69
|
+
@ln = l
|
70
|
+
end
|
71
|
+
break if @ln.nil?
|
72
|
+
end
|
73
|
+
|
74
|
+
|
data/toolrack.gemspec
CHANGED
@@ -2,19 +2,19 @@ require_relative 'lib/toolrack/version'
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "toolrack"
|
5
|
-
spec.version = Antrapol::
|
5
|
+
spec.version = Antrapol::ToolRack::VERSION
|
6
6
|
spec.authors = ["Chris"]
|
7
7
|
spec.email = ["chrisliaw@antrapol.com"]
|
8
8
|
|
9
9
|
spec.summary = %q{Collection of simple utilities but I find it increase clarity}
|
10
10
|
spec.description = %q{Just collections of utilities}
|
11
|
-
spec.homepage = ""
|
11
|
+
spec.homepage = "https://github.com/chrisliaw/toolrack"
|
12
12
|
spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
|
13
13
|
|
14
14
|
#spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
|
15
15
|
|
16
|
-
|
17
|
-
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/chrisliaw/toolrack"
|
18
18
|
#spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here."
|
19
19
|
|
20
20
|
# Specify which files should be added to the gem when it is released.
|
@@ -25,4 +25,8 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.bindir = "exe"
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
27
|
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_dependency "tlogger", "~> 0.21"
|
30
|
+
|
31
|
+
spec.add_development_dependency "devops_helper", "~> 0.1.0"
|
28
32
|
end
|
metadata
CHANGED
@@ -1,15 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: toolrack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
12
|
-
dependencies:
|
11
|
+
date: 2021-01-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: tlogger
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.21'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.21'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: devops_helper
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.1.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.1.0
|
13
41
|
description: Just collections of utilities
|
14
42
|
email:
|
15
43
|
- chrisliaw@antrapol.com
|
@@ -28,12 +56,22 @@ files:
|
|
28
56
|
- lib/toolrack.rb
|
29
57
|
- lib/toolrack/condition_utils.rb
|
30
58
|
- lib/toolrack/exception_utils.rb
|
59
|
+
- lib/toolrack/global.rb
|
60
|
+
- lib/toolrack/process_utils.rb
|
61
|
+
- lib/toolrack/runtime_utils.rb
|
62
|
+
- lib/toolrack/utils.rb
|
31
63
|
- lib/toolrack/version.rb
|
64
|
+
- process_test/backtick_test.rb
|
65
|
+
- process_test/pty_test.rb
|
66
|
+
- process_test/shell_test.rb
|
67
|
+
- process_test/system_test.rb
|
32
68
|
- toolrack.gemspec
|
33
|
-
homepage:
|
69
|
+
homepage: https://github.com/chrisliaw/toolrack
|
34
70
|
licenses: []
|
35
|
-
metadata:
|
36
|
-
|
71
|
+
metadata:
|
72
|
+
homepage_uri: https://github.com/chrisliaw/toolrack
|
73
|
+
source_code_uri: https://github.com/chrisliaw/toolrack
|
74
|
+
post_install_message:
|
37
75
|
rdoc_options: []
|
38
76
|
require_paths:
|
39
77
|
- lib
|
@@ -48,8 +86,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
48
86
|
- !ruby/object:Gem::Version
|
49
87
|
version: '0'
|
50
88
|
requirements: []
|
51
|
-
rubygems_version: 3.
|
52
|
-
signing_key:
|
89
|
+
rubygems_version: 3.1.4
|
90
|
+
signing_key:
|
53
91
|
specification_version: 4
|
54
92
|
summary: Collection of simple utilities but I find it increase clarity
|
55
93
|
test_files: []
|