scout-essentials 1.4.0 → 1.5.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/lib/scout/misc/system.rb +16 -0
- data/lib/scout/path/find.rb +14 -4
- data/lib/scout/path.rb +1 -1
- data/lib/scout/resource.rb +1 -1
- data/scout-essentials.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf656e42e397435083df3e186d615aa4bc4728dcdb84da711b30c901f7fdc14f
|
4
|
+
data.tar.gz: 7b5acd1f9afded708fe15e0b2d7745a4b3b292fb3a45938d62a0f7643f1ef168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91bd6fb32f52d8b16c1eaedec79ef982160b5aa4313745b31dc7c5a8a00f35e10f5abe56c90954ae4c085c011da78cab0683553c1ed9c70de1d8180a52bf8501
|
7
|
+
data.tar.gz: 12f0b1731cdefadd350c8cc8c9abd993dd392349540bba83421b0f9a6b67e36561376f8369072fcea5f0eb3454f41c014f4e111796c29db528af4f0ee50216dd
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.5.0
|
data/lib/scout/misc/system.rb
CHANGED
@@ -13,6 +13,22 @@ module Misc
|
|
13
13
|
Sys::ProcTable.ps.select{ |pe| pe.ppid == ppid }
|
14
14
|
end
|
15
15
|
|
16
|
+
def self.wait_child(pid)
|
17
|
+
begin
|
18
|
+
Process.waitpid2 pid.to_i
|
19
|
+
rescue Errno::ECHILD
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def self.abort_child(pid, wait = true)
|
24
|
+
begin
|
25
|
+
Process.kill("TERM", pid.to_i)
|
26
|
+
wait_child(pid) if wait
|
27
|
+
rescue
|
28
|
+
Log.debug("Process #{pid} was not killed: #{$!.message}")
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
16
32
|
def self.env_add(var, value, sep = ":", prepend = true)
|
17
33
|
if ENV[var].nil?
|
18
34
|
ENV[var] = value
|
data/lib/scout/path/find.rb
CHANGED
@@ -7,7 +7,7 @@ module Path
|
|
7
7
|
caller_dup = caller.dup
|
8
8
|
while file = caller_dup.shift
|
9
9
|
break unless file =~ /(?:scout|rbbt)\/(?:resource\.rb|workflow\.rb)/ or
|
10
|
-
file =~ /(?:scout|rbbt)\/(?:.*\/)?(path|open)\.rb/ or
|
10
|
+
file =~ /(?:scout|rbbt)\/(?:.*\/)?(path|open|tsv|refactor)\.rb/ or
|
11
11
|
file =~ /(?:scout|rbbt)\/(?:.*\/)?path\/(?:find|refactor|util)\.rb/ or
|
12
12
|
file =~ /(?:scout|rbbt)\/persist.rb/ or
|
13
13
|
file =~ /scout\/resource\/produce.rb/ or
|
@@ -90,17 +90,27 @@ module Path
|
|
90
90
|
end
|
91
91
|
|
92
92
|
def self.add_path(name, map)
|
93
|
-
|
93
|
+
path_maps[name] = map
|
94
94
|
@@map_order = nil
|
95
95
|
end
|
96
96
|
|
97
|
+
def self.prepend_path(name, map)
|
98
|
+
path_maps[name] = map
|
99
|
+
map_order.unshift(name.to_sym)
|
100
|
+
end
|
101
|
+
|
102
|
+
def self.append_path(name, map)
|
103
|
+
path_maps[name] = map
|
104
|
+
map_order.push(name.to_sym)
|
105
|
+
end
|
106
|
+
|
97
107
|
def prepend_path(name, map)
|
98
|
-
|
108
|
+
path_maps[name] = map
|
99
109
|
map_order.unshift(name.to_sym)
|
100
110
|
end
|
101
111
|
|
102
112
|
def append_path(name, map)
|
103
|
-
|
113
|
+
path_maps[name] = map
|
104
114
|
map_order.push(name.to_sym)
|
105
115
|
end
|
106
116
|
|
data/lib/scout/path.rb
CHANGED
@@ -28,7 +28,7 @@ module Path
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def map_order
|
31
|
-
@map_order ||= (path_maps.keys & Path.
|
31
|
+
@map_order ||= (path_maps.keys & Path.map_order) + (path_maps.keys - Path.map_order)
|
32
32
|
end
|
33
33
|
|
34
34
|
def join(subpath = nil, prevpath = nil)
|
data/lib/scout/resource.rb
CHANGED
data/scout-essentials.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Juwelier::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: scout-essentials 1.
|
5
|
+
# stub: scout-essentials 1.5.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "scout-essentials".freeze
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.5.0".freeze
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
13
|
s.authors = ["Miguel Vazquez".freeze]
|
14
|
-
s.date = "2024-05-
|
14
|
+
s.date = "2024-05-28"
|
15
15
|
s.description = "Things a scout can use anywhere".freeze
|
16
16
|
s.email = "mikisvaz@gmail.com".freeze
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout-essentials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-05-
|
11
|
+
date: 2024-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|