scout-essentials 1.4.0 → 1.6.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/annotation/array.rb +2 -2
- 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: 24500b0c2c21f23844c3eb87ce87ed1ea4fd6f0e9ee635ef474b29d919baffdf
|
4
|
+
data.tar.gz: b54836819a0a394bf3b2907d641b6ae34b7b4c4b9ced9b2dd0b78b3d22d30cc9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12c4740363f2e5d64e3c3f691dfa0ca6086617d84a82b666d25d683e0d0e36c3fe062bcc3f210b3c38358a0a36f0b1a2ab6b3c7c6628a9b74fa4ebb2b92afb1e
|
7
|
+
data.tar.gz: 86df3be0b64051d8aa0007d061f181f281835a241c1cbeeb113dd53d0595b0c52adf7bfa269b91c70bdf2233c0fef7b0ca3064c3763fb2a49e5ca3f6e7e0d5ad
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.6.0
|
@@ -62,8 +62,8 @@ module AnnotatedArray
|
|
62
62
|
|
63
63
|
%w(compact uniq flatten reverse sort_by).each do |method|
|
64
64
|
|
65
|
-
self.define_method(method) do |*args|
|
66
|
-
res = super(*args)
|
65
|
+
self.define_method(method) do |*args,&block|
|
66
|
+
res = super(*args, &block)
|
67
67
|
|
68
68
|
annotate(res)
|
69
69
|
res.extend AnnotatedArray
|
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.6.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.6.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-06-05"
|
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.6.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-06-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: shoulda
|