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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3193beb1b7024505d5a238bb6d9caa280ddab034b23431652138697ebc9ac7f0
4
- data.tar.gz: 29ef13d1a7862228eabc8f153f602ba728eda98cf4907b23770a8fb65cb36b98
3
+ metadata.gz: 2ccc931c0ac9a43124ba25f56b1d1e940ee2a00504c37d530df92949bd8a104e
4
+ data.tar.gz: 4fab60400647db1a7ceb761c7e59c5900e22630afacbb2516467483f07dff402
5
5
  SHA512:
6
- metadata.gz: c074200ead16664e4ecdcd262315f389500cd59391b533bcdd1f4a84bdf9ab3fcf96152698f643393d198d9cc1d552707144fd4fbc9c962badbb33d57c79d364
7
- data.tar.gz: 57663384b0258537a626eb867e8dd209c9e84bc477dbc462c6096af539f54b176936b1cd4ace7cd47525b5e791a6b13ac41a000fdf2709a9add3a830eb1a33ab
6
+ metadata.gz: 172b38d8cb18f249f322429df932379c71b4b5067cc92ac26bf26e93c9fba486da6a0e0e51873387d79e0fdc46f6697fc999eaaf6fb93daa99e29b405b19680e
7
+ data.tar.gz: 49ae1f7eca956c1fffd420efc34b2c2b700aaf3f66a780ccb34acabc02f4d598420df64bb5552a6b759fc0451229e77c4c56cd11459b3352965a5f4f663fbfc2
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.8.7
1
+ 1.8.8
@@ -7,11 +7,12 @@ module Misc
7
7
  else
8
8
  case obj
9
9
  when String
10
- if Path.is_filename?(obj) && Open.exists?(obj)
11
- Path.setup(obj).digest_str
12
- else
13
- obj.dup
14
- end
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
@@ -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 => false, :no_wait => true, in: stream
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 => false, :no_wait => true, in: stream
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 => false, :no_wait => true, in: stream
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 => false, :no_wait => true, in: stream
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
- run_rake(path, content, rake_dir)
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)
@@ -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.7 ruby lib
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.7".freeze
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
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scout-essentials
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.7
4
+ version: 1.8.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez