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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 01ebe0cbbfda369f1d1b3de5009566eed0749cdb0a418c19c663a21ec68214c1
4
- data.tar.gz: 2303029301ea7b4ef1f9d7cf44bd906cb8db637b31a5147ae2950e4eb1c6e37e
3
+ metadata.gz: bf656e42e397435083df3e186d615aa4bc4728dcdb84da711b30c901f7fdc14f
4
+ data.tar.gz: 7b5acd1f9afded708fe15e0b2d7745a4b3b292fb3a45938d62a0f7643f1ef168
5
5
  SHA512:
6
- metadata.gz: 707278b8bdd09658049035622021bd822d8b53ecef993f4136b550f2acb47be30cf515a460b07f5c45ed51769d782639b06e128947dab80832a4de3b6b66f574
7
- data.tar.gz: d8a5ce01ca753d159734871447f961a39d48992af934f7ad69a0f95ff708794d00962cd36fbabbcd535a721611f5d0fa9194f87d5662cd8ab66ed80d8abeed38
6
+ metadata.gz: 91bd6fb32f52d8b16c1eaedec79ef982160b5aa4313745b31dc7c5a8a00f35e10f5abe56c90954ae4c085c011da78cab0683553c1ed9c70de1d8180a52bf8501
7
+ data.tar.gz: 12f0b1731cdefadd350c8cc8c9abd993dd392349540bba83421b0f9a6b67e36561376f8369072fcea5f0eb3454f41c014f4e111796c29db528af4f0ee50216dd
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.4.0
1
+ 1.5.0
@@ -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
@@ -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
- @@path_maps[name] = map
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
- @@path_maps[name] = map
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
- @@path_maps[name] = map
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.basic_map_order) + (path_maps.keys - Path.basic_map_order)
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)
@@ -39,7 +39,7 @@ module Resource
39
39
  end
40
40
 
41
41
  def root
42
- Path.setup(subdir, self, self.libdir, @path_maps, @map_order)
42
+ Path.setup(subdir.dup, self, self.libdir, @path_maps, @map_order)
43
43
  end
44
44
 
45
45
  def method_missing(name, prev = nil, *args)
@@ -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.4.0 ruby lib
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.4.0".freeze
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-15"
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.0
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-15 00:00:00.000000000 Z
11
+ date: 2024-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shoulda