mspire 0.10.5 → 0.10.6

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
  SHA1:
3
- metadata.gz: b4dcc320a2ee49559d1d64c2c42f1d647a33901c
4
- data.tar.gz: 2562f3e4bcd33b71da96151cb6fc7cae172277a4
3
+ metadata.gz: 727385462205a100b10c44928ad06c5ce6dc527d
4
+ data.tar.gz: 616cb45a4f221cac4885a6eb6e9a76207a97e82b
5
5
  SHA512:
6
- metadata.gz: 7f680070a1151cd563e2ade3b3ced3691f630ea42a67bbef4c866c6edfb163356f249ea519eefebd57149f0a2a4b23f8a16a964274d8df6a141edb6b79c4df29
7
- data.tar.gz: eca1464a336117c98312e71c392761d7d3dd4b3e58528e8da05647319eb516f958bd248ba2a86db702d1010f896329ab5a8513b287da1ba5ef4d014cc0d6f90f
6
+ metadata.gz: 3cc85b9cb00d4eebdc8f9f20c428de8bd4ae1882ce524980b2c1f57be92c9a4a39b4f3096f5088eb2876328d3dc87ebd69c90044b659753aa4e28b1079ceacfb
7
+ data.tar.gz: 6a9b33c7a86b63e91ad330fbc4b76ffc2f66d65755d2c947983c688faef59f47f6eb353a69d01c88d2d2f12ff99885658676d5742438dfdadf1698dde0797670
@@ -43,9 +43,15 @@ module Mspire::Mzml::Reader
43
43
  def get_default_data_processing_ids(io, index_list, lookback=300)
44
44
  hash = {}
45
45
  index_list.each_pair do |name, index|
46
- io.bookmark do |io|
47
- io.pos = index[0] - lookback
48
- hash[name] = io.read(lookback)[/<#{name}List.*defaultDataProcessingRef=['"](.*?)['"]/m, 1]
46
+ if index.size > 0
47
+ # ^ we cannot quickly retrieve a defaultDataProcessingRef unless there
48
+ # is at least one spectrum/chromatogram to start with. However, if
49
+ # there is no spectrum/chromatogram, then the defaultDataProcessingRef
50
+ # will not be needed either.
51
+ io.bookmark do |io|
52
+ io.pos = index[0] - lookback
53
+ hash[name] = io.read(lookback)[/<#{name}List.*defaultDataProcessingRef=['"](.*?)['"]/m, 1]
54
+ end
49
55
  end
50
56
  end
51
57
  hash
@@ -1,3 +1,3 @@
1
1
  module Mspire
2
- VERSION = "0.10.5"
2
+ VERSION = "0.10.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mspire
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.5
4
+ version: 0.10.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - John T. Prince
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-01-14 00:00:00.000000000 Z
12
+ date: 2014-02-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri