scout-essentials 1.7.0 → 1.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.vimproject +1 -0
- data/VERSION +1 -1
- data/lib/scout/misc/matching.rb +4 -1
- data/lib/scout/open/final.rb +2 -2
- data/lib/scout/path/find.rb +7 -4
- data/lib/scout/path/util.rb +1 -1
- data/lib/scout/simple_opt/doc.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: b525f579cb1dfea91f74e339b0cefcc9713567e0555da3e8943cbf5e05a3a8fa
|
4
|
+
data.tar.gz: 75ebc6504a1aa544134f6cd83f472f4cc056d86f093eb96eea450d96e3220603
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e21bc777bae26f177ecad2aa4bcee2cd2d4b3b715b9d5fa509def84ed17ab007ff63b1f09734f506242b31d350e47f8600cbcc1a0dd544fd9932331c53572c3f
|
7
|
+
data.tar.gz: 3caf9cce8f443aaf892815e9ef0930490956ef53c26800b49dd12175a59ac01c34fd77bc82a492e6e64b17f6acb3e633bd95a4cf4b9ca11575b3851baf8e6169
|
data/.vimproject
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.7.
|
1
|
+
1.7.1
|
data/lib/scout/misc/matching.rb
CHANGED
@@ -2,7 +2,7 @@ module Misc
|
|
2
2
|
def self._convert_match_condition(condition)
|
3
3
|
return true if condition == 'true'
|
4
4
|
return false if condition == 'false'
|
5
|
-
return condition
|
5
|
+
return Regexp.new(condition[1..-2]) if condition[0] == "/"
|
6
6
|
return [:cmp, $1, $2.to_f] if condition =~ /^([<>]=?)(.*)/
|
7
7
|
return [:invert, _convert_match_condition(condition[1..-1].strip)] if condition[0] == "!"
|
8
8
|
#return {$1 => $2.to_f} if condition =~ /^([<>]=?)(.*)/
|
@@ -13,6 +13,9 @@ module Misc
|
|
13
13
|
def self.match_value(value, condition)
|
14
14
|
condition = _convert_match_condition(condition.strip) if String === condition
|
15
15
|
|
16
|
+
return true if value.nil? && condition.nil?
|
17
|
+
return false if value.nil?
|
18
|
+
|
16
19
|
case condition
|
17
20
|
when Regexp
|
18
21
|
!! value.match(condition)
|
data/lib/scout/open/final.rb
CHANGED
@@ -8,7 +8,7 @@ module Open
|
|
8
8
|
return Open.ssh(file, options) if Open.ssh?(file)
|
9
9
|
return Open.wget(file, options) if Open.remote?(file)
|
10
10
|
|
11
|
-
File.open(file, mode)
|
11
|
+
File.open(File.expand_path(file), mode)
|
12
12
|
end
|
13
13
|
|
14
14
|
def self.file_write(file, content, mode = 'w')
|
@@ -117,7 +117,7 @@ module Open
|
|
117
117
|
|
118
118
|
def self.exists?(file)
|
119
119
|
file = file.find if Path === file
|
120
|
-
File.exist?(file)
|
120
|
+
File.exist?(File.expand_path(file))
|
121
121
|
end
|
122
122
|
|
123
123
|
def self.ctime(file)
|
data/lib/scout/path/find.rb
CHANGED
@@ -181,11 +181,14 @@ module Path
|
|
181
181
|
@toplevel ||= _parts[0]
|
182
182
|
end
|
183
183
|
|
184
|
+
HOME = "~"[0]
|
184
185
|
SLASH = "/"[0]
|
185
186
|
DOT = "."[0]
|
186
187
|
def self.located?(path)
|
187
188
|
# OPEN RESOURCE
|
188
|
-
path.slice(0,1) == SLASH ||
|
189
|
+
path.slice(0,1) == SLASH ||
|
190
|
+
(path.slice(0,1) == HOME && path.slice(1,1) == SLASH) ||
|
191
|
+
(path.slice(0,1) == DOT && path.slice(1,1) == SLASH)
|
189
192
|
end
|
190
193
|
|
191
194
|
def located?
|
@@ -237,14 +240,14 @@ module Path
|
|
237
240
|
|
238
241
|
def find(where = nil)
|
239
242
|
if located?
|
240
|
-
if File.exist?(self)
|
241
|
-
return self
|
243
|
+
if File.exist?(File.expand_path(self))
|
244
|
+
return self.annotate(File.expand_path(self))
|
242
245
|
else
|
243
246
|
found = Path.exists_file_or_alternatives(self)
|
244
247
|
if found
|
245
248
|
return self.annotate(found)
|
246
249
|
else
|
247
|
-
return self
|
250
|
+
return self
|
248
251
|
end
|
249
252
|
end
|
250
253
|
end
|
data/lib/scout/path/util.rb
CHANGED
@@ -23,7 +23,7 @@ module Path
|
|
23
23
|
extension = ''
|
24
24
|
end
|
25
25
|
|
26
|
-
post_fix = "--#{filename.length}
|
26
|
+
post_fix = "--#{filename.length}--#{Misc.digest(filename)[0..4]}" + extension
|
27
27
|
|
28
28
|
filename = filename[0..(length - post_fix.length - 1)] << post_fix
|
29
29
|
else
|
data/lib/scout/simple_opt/doc.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.7.
|
5
|
+
# stub: scout-essentials 1.7.1 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "scout-essentials".freeze
|
9
|
-
s.version = "1.7.
|
9
|
+
s.version = "1.7.1".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 = "2025-06-
|
14
|
+
s.date = "2025-06-12"
|
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,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scout-essentials
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-06-
|
10
|
+
date: 2025-06-12 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: shoulda
|