scout-essentials 1.8.7 → 1.8.8
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/VERSION +1 -1
- data/lib/scout/misc/digest.rb +6 -5
- data/lib/scout/open/util.rb +4 -4
- data/lib/scout/open.rb +3 -3
- data/lib/scout/resource/produce.rb +9 -1
- data/scout-essentials.gemspec +2 -2
- data/test/scout/open/test_remote.rb +1 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2ccc931c0ac9a43124ba25f56b1d1e940ee2a00504c37d530df92949bd8a104e
|
|
4
|
+
data.tar.gz: 4fab60400647db1a7ceb761c7e59c5900e22630afacbb2516467483f07dff402
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 172b38d8cb18f249f322429df932379c71b4b5067cc92ac26bf26e93c9fba486da6a0e0e51873387d79e0fdc46f6697fc999eaaf6fb93daa99e29b405b19680e
|
|
7
|
+
data.tar.gz: 49ae1f7eca956c1fffd420efc34b2c2b700aaf3f66a780ccb34acabc02f4d598420df64bb5552a6b759fc0451229e77c4c56cd11459b3352965a5f4f663fbfc2
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.8.
|
|
1
|
+
1.8.8
|
data/lib/scout/misc/digest.rb
CHANGED
|
@@ -7,11 +7,12 @@ module Misc
|
|
|
7
7
|
else
|
|
8
8
|
case obj
|
|
9
9
|
when String
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
if Path.is_filename?(obj) && Open.exists?(obj)
|
|
11
|
+
@@digest_str_cache ||= {}
|
|
12
|
+
@@digest_str_cache[obj] ||= Path.setup(obj).digest_str
|
|
13
|
+
else
|
|
14
|
+
obj.dup
|
|
15
|
+
end
|
|
15
16
|
when Integer, Symbol
|
|
16
17
|
obj.to_s
|
|
17
18
|
when Array
|
data/lib/scout/open/util.rb
CHANGED
|
@@ -36,22 +36,22 @@ module Open
|
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def self.gunzip(stream, options = {})
|
|
39
|
-
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail =>
|
|
39
|
+
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail => true, :no_wait => true, in: stream
|
|
40
40
|
CMD.cmd('zcat', options)
|
|
41
41
|
end
|
|
42
42
|
|
|
43
43
|
def self.gzip(stream, options = {})
|
|
44
|
-
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail =>
|
|
44
|
+
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail => true, :no_wait => true, in: stream
|
|
45
45
|
CMD.cmd('gzip', options)
|
|
46
46
|
end
|
|
47
47
|
|
|
48
48
|
def self.bgzip(stream, options = {})
|
|
49
|
-
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail =>
|
|
49
|
+
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail => true, :no_wait => true, in: stream
|
|
50
50
|
CMD.cmd('bgzip', options)
|
|
51
51
|
end
|
|
52
52
|
|
|
53
53
|
def self.unzip(stream, options = {})
|
|
54
|
-
options = IndiferentHash.add_defaults options, :pipe => true, :no_fail =>
|
|
54
|
+
options = IndiferentHash.add_defaults options, "-p" => true, :pipe => true, :no_fail => true, :no_wait => true, in: stream
|
|
55
55
|
TmpFile.with_file(stream.read) do |filename|
|
|
56
56
|
StringIO.new(CMD.cmd("unzip '{opt}' #{filename}", options))
|
|
57
57
|
end
|
data/lib/scout/open.rb
CHANGED
|
@@ -52,9 +52,9 @@ module Open
|
|
|
52
52
|
|
|
53
53
|
io = file_open(file, grep, mode, invert_grep, fixed_grep, options)
|
|
54
54
|
|
|
55
|
-
io = unzip(io, options) if ((String === file and zip?(file)) and not options[:noz]) or options[:zip]
|
|
56
|
-
io = gunzip(io, options) if ((String === file and gzip?(file)) and not options[:noz]) or options[:gzip]
|
|
57
|
-
io = bgunzip(io, options) if ((String === file and bgzip?(file)) and not options[:noz]) or options[:bgzip]
|
|
55
|
+
io = unzip(io, options.dup) if ((String === file and zip?(file)) and not options[:noz]) or options[:zip]
|
|
56
|
+
io = gunzip(io, options.dup) if ((String === file and gzip?(file)) and not options[:noz]) or options[:gzip]
|
|
57
|
+
io = bgunzip(io, options.dup) if ((String === file and bgzip?(file)) and not options[:noz]) or options[:bgzip]
|
|
58
58
|
|
|
59
59
|
io.extend NamedStream
|
|
60
60
|
io.filename = file
|
|
@@ -125,7 +125,15 @@ module Resource
|
|
|
125
125
|
raise "Unkown object produced: #{Log.fingerprint data}"
|
|
126
126
|
end
|
|
127
127
|
when :rake
|
|
128
|
-
|
|
128
|
+
begin
|
|
129
|
+
run_rake(path, content, rake_dir)
|
|
130
|
+
rescue
|
|
131
|
+
if $!.message.include?("Don't know how to build task")
|
|
132
|
+
raise ResourceNotFound, "Resource is missing and does not seem to be claimed: #{ self } -- #{ path } "
|
|
133
|
+
else
|
|
134
|
+
raise $!
|
|
135
|
+
end
|
|
136
|
+
end
|
|
129
137
|
when :install
|
|
130
138
|
software_dir = self.root.software
|
|
131
139
|
name = File.basename(path)
|
data/scout-essentials.gemspec
CHANGED
|
@@ -2,11 +2,11 @@
|
|
|
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.8.
|
|
5
|
+
# stub: scout-essentials 1.8.8 ruby lib
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |s|
|
|
8
8
|
s.name = "scout-essentials".freeze
|
|
9
|
-
s.version = "1.8.
|
|
9
|
+
s.version = "1.8.8".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]
|
|
@@ -26,10 +26,9 @@ class TestOpenRemote < Test::Unit::TestCase
|
|
|
26
26
|
teardown
|
|
27
27
|
sss 0
|
|
28
28
|
assert_raises ConcurrentStreamProcessFailed do
|
|
29
|
-
stream = Open.open("ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/SOFT/GDS/GDS3148.soft.gz", nocache: true)
|
|
29
|
+
stream = Open.open("ftp://ftp.ncbi.nlm.nih.gov/pub/geo/DATA/SOFT/GDS/GDS3148.soft.gz", nocache: true, no_fail: false)
|
|
30
30
|
stream.read
|
|
31
31
|
end
|
|
32
32
|
end
|
|
33
|
-
|
|
34
33
|
end
|
|
35
34
|
|