mascot-mgf 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -1,4 +1,5 @@
1
1
  pkg/*
2
2
  *.gem
3
3
  .bundle
4
- *.idx
4
+ *.idx
5
+ Gemfile.lock
@@ -1,5 +1,5 @@
1
1
  module Mascot
2
- class MGF
3
- VERSION = "0.2.1"
2
+ class MGF < File
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
data/lib/mascot/mgf.rb CHANGED
@@ -39,6 +39,7 @@ module Mascot
39
39
  # end
40
40
  # end
41
41
 
42
+ # 0-based index
42
43
  def query(n=nil)
43
44
  Mascot::MGF::Query.new(self.readquery(n))
44
45
  end
data/mascot-mgf.gemspec CHANGED
@@ -16,4 +16,5 @@ Gem::Specification.new do |s|
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
18
  s.require_paths = ["lib"]
19
+ s.add_development_dependency "rake"
19
20
  end
@@ -8,12 +8,12 @@ class TestMascotMgf < Test::Unit::TestCase
8
8
  def test_canary
9
9
  assert true, "The canary does not sing"
10
10
  end
11
-
11
+
12
12
  def test_open_file
13
13
  mgf = Mascot::MGF.open(@mgf_file)
14
14
  assert_not_nil mgf
15
15
  end
16
-
16
+
17
17
  def test_get_first_and_second_query_string
18
18
  mgf = Mascot::MGF.open(@mgf_file)
19
19
  assert_not_nil mgf
@@ -53,7 +53,7 @@ class TestMascotMgf < Test::Unit::TestCase
53
53
  assert_equal(tenth_query_pepmass[0], tenth_query.pepmass[0])
54
54
  assert_equal(tenth_query_pepmass[1], tenth_query.pepmass[1])
55
55
  end
56
-
56
+
57
57
  def test_query_count
58
58
  mgf = Mascot::MGF.open(@mgf_file)
59
59
  assert_equal(13, mgf.query_count)
@@ -79,4 +79,11 @@ class TestMascotMgf < Test::Unit::TestCase
79
79
  assert_equal(1,mgf.curr_index)
80
80
  assert_equal(second_query.title, mgf.query().title)
81
81
  end
82
+ # This test is too prone to attribute re-ordering. Taking out for now
83
+ # def test_query_to_s
84
+ # expected_first_query =File.read("test/fixtures/first_query.mgf")
85
+ # mgf = Mascot::MGF.open("test/fixtures/first_query.mgf")
86
+ # actual_first_query = mgf.query(0)
87
+ # assert_equal(expected_first_query, actual_first_query.to_s)
88
+ # end
82
89
  end
metadata CHANGED
@@ -1,28 +1,34 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mascot-mgf
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.2
4
5
  prerelease:
5
- version: 0.2.1
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Angel Pizarro
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-05-13 00:00:00 Z
14
- dependencies: []
15
-
12
+ date: 2012-02-16 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rake
16
+ requirement: &70321602593720 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *70321602593720
16
25
  description: A parser for Mascot Generic Format (MGF) files
17
- email:
26
+ email:
18
27
  - delagoya@gmail.com
19
28
  executables: []
20
-
21
29
  extensions: []
22
-
23
30
  extra_rdoc_files: []
24
-
25
- files:
31
+ files:
26
32
  - .gitignore
27
33
  - Gemfile
28
34
  - README.rdoc
@@ -39,36 +45,38 @@ files:
39
45
  - test/test_mascot-mgf.rb
40
46
  homepage: https://github.com/delagoya/mascot-mgf
41
47
  licenses: []
42
-
43
48
  post_install_message:
44
49
  rdoc_options: []
45
-
46
- require_paths:
50
+ require_paths:
47
51
  - lib
48
- required_ruby_version: !ruby/object:Gem::Requirement
52
+ required_ruby_version: !ruby/object:Gem::Requirement
49
53
  none: false
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: "0"
54
- required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - ! '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ segments:
59
+ - 0
60
+ hash: -3179264156540033479
61
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
62
  none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- version: "0"
63
+ requirements:
64
+ - - ! '>='
65
+ - !ruby/object:Gem::Version
66
+ version: '0'
67
+ segments:
68
+ - 0
69
+ hash: -3179264156540033479
60
70
  requirements: []
61
-
62
71
  rubyforge_project:
63
- rubygems_version: 1.7.2
72
+ rubygems_version: 1.8.11
64
73
  signing_key:
65
74
  specification_version: 3
66
75
  summary: A parser for Mascot Generic Format (MGF) files
67
- test_files:
76
+ test_files:
68
77
  - test/fixtures/example.mgf
69
78
  - test/fixtures/first_query.mgf
70
79
  - test/fixtures/second_query.mgf
71
80
  - test/fixtures/tenth_query.mgf
72
81
  - test/fixtures/titles.yml
73
82
  - test/test_mascot-mgf.rb
74
- has_rdoc: