-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
jeweler to bundler and adding badges
- Loading branch information
Showing
11 changed files
with
87 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ doc/output/* | |
.*.swp | ||
*.gemspec | ||
playing_around_with | ||
coverage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
language: ruby | ||
rvm: | ||
- 2.0.0 | ||
- 1.9.3 | ||
- jruby-19mode # JRuby in 1.9 mode | ||
- rbx-19mode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
source 'https://rubygems.org' | ||
|
||
# Specify your gem's dependencies in mspire.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
|
||
require 'mspire/mass/aa' # requires mspire/mass & therefore mspire/molecular_formula | ||
require 'mspire/version' | ||
|
||
module Mspire | ||
VERSION = IO.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).chomp | ||
CITE = "Prince JT, Marcotte EM. mspire: mass spectrometry proteomics in Ruby. Bioinformatics. 2008. 24(23):2796-7." | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module Mspire | ||
VERSION = "0.8.6.2" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
def benchmark(*args, &block) | ||
if ENV['BENCHMARK'] | ||
Benchmark.bmbm(*args, &block) | ||
end | ||
end | ||
|
||
# given "filename.ext" returns "filename.CHECK.ext | ||
# block can be given to sanitize each string | ||
def file_check(filename, delete=true, &block) | ||
ext = File.extname(filename) | ||
base = filename.chomp(ext) | ||
checkfile = base + ".CHECK" + ext | ||
File.exist?(filename).should be_true | ||
fstring = IO.read(filename) | ||
cstring = IO.read(checkfile) | ||
if block | ||
(fstring, cstring) = [fstring, cstring].map do |string| | ||
block.call(string) | ||
end | ||
end | ||
fstring.should == cstring | ||
File.unlink(filename) if delete | ||
end | ||
|
||
def sanitize_mspire_version_xml(string) | ||
string.gsub(/"mspire(_[\d\.]+)?" version="([\.\d]+)"/, %Q{"mspire" version="X.X.X"}) | ||
.gsub(/softwareRef="mspire_[\d\.]+/, 'softwareRef="mspire_X.X.X') | ||
end | ||
|
||
require 'stringio' | ||
|
||
module Kernel | ||
|
||
def capture_stdout | ||
out = StringIO.new | ||
$stdout = out | ||
yield | ||
out.string | ||
ensure | ||
$stdout = STDOUT | ||
end | ||
|
||
end | ||
|