mspire 0.8.3 → 0.8.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -19,7 +19,7 @@ Jeweler::Tasks.new do |gem|
19
19
  gem.add_dependency "obo", ">= 0.1.0"
20
20
  gem.add_dependency "builder", "~> 3.0.0"
21
21
  gem.add_dependency "bio", "~> 1.4.2"
22
- gem.add_dependency "trollop", "~> 1.16.2"
22
+ gem.add_dependency "trollop", "~> 2.0.0"
23
23
  gem.add_dependency "uuid", ">= 2.3.5"
24
24
  # this should be a real dependency, but need to document getting this
25
25
  # working on windows first!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.3
1
+ 0.8.4
@@ -123,6 +123,10 @@ module Mspire
123
123
  mss
124
124
  end
125
125
 
126
+ def avg_mass
127
+ inject(0.0) {|sum,(el,cnt)| sum + (Mspire::Mass::AVG[el]*cnt) }
128
+ end
129
+
126
130
  # returns nil if the charge == 0
127
131
  def mz(consider_electron_masses = true)
128
132
  if charge == 0
@@ -87,7 +87,9 @@ describe Mspire::Mzml do
87
87
  mzml.write(outfile)
88
88
  end
89
89
  # this output was checked to be accurate with TOPPView
90
- file_check(outfile)
90
+ file_check(outfile) do |string|
91
+ sanitize_mspire_version_xml(string)
92
+ end
91
93
  end
92
94
  end
93
95
 
@@ -69,7 +69,9 @@ describe 'performing what is on the readme' do
69
69
  mzml.run.spectrum_list = Mspire::Mzml::SpectrumList.new(normalize_processing, spectra)
70
70
  mzml.write(outfile)
71
71
  end
72
- file_check(outfile)
72
+ file_check(outfile) do |string|
73
+ sanitize_mspire_version_xml(string)
74
+ end
73
75
  end
74
76
 
75
77
  end
data/spec/spec_helper.rb CHANGED
@@ -45,6 +45,7 @@ end
45
45
 
46
46
  def sanitize_mspire_version_xml(string)
47
47
  string.gsub(/"mspire(_[\d\.]+)?" version="([\.\d]+)"/, %Q{"mspire" version="X.X.X"})
48
+ .gsub(/softwareRef="mspire_[\d\.]+/, 'softwareRef="mspire_X.X.X')
48
49
  end
49
50
 
50
51
  require 'stringio'
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.8.3
4
+ version: 0.8.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-09-18 00:00:00.000000000 Z
13
+ date: 2012-09-20 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -115,7 +115,7 @@ dependencies:
115
115
  requirements:
116
116
  - - ~>
117
117
  - !ruby/object:Gem::Version
118
- version: 1.16.2
118
+ version: 2.0.0
119
119
  type: :runtime
120
120
  prerelease: false
121
121
  version_requirements: !ruby/object:Gem::Requirement
@@ -123,7 +123,7 @@ dependencies:
123
123
  requirements:
124
124
  - - ~>
125
125
  - !ruby/object:Gem::Version
126
- version: 1.16.2
126
+ version: 2.0.0
127
127
  - !ruby/object:Gem::Dependency
128
128
  name: uuid
129
129
  requirement: !ruby/object:Gem::Requirement