bio-gem 1.2.2 → 1.3.0

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.
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby-19mode # JRuby in 1.9 mode
6
+ - rbx-19mode
7
+ # - 1.8.7
8
+ # - jruby-18mode # JRuby in 1.8 mode
9
+ # - rbx-18mode
10
+
11
+ # uncomment this line if your project needs to run something other than `rake`:
12
+ # script: bundle exec rspec spec
data/Rakefile CHANGED
@@ -42,7 +42,8 @@ Jeweler::RubygemsDotOrgTasks.new
42
42
  require 'rake/testtask'
43
43
  Rake::TestTask.new(:test) do |test|
44
44
  test.libs << 'lib' << 'test'
45
- test.pattern = 'test/**/test_*.rb'
45
+ # test.pattern = 'test/**/test_*.rb' breaks in Ruby 1.9.3
46
+ test.test_files = Dir.glob("test/**/test_*.rb")
46
47
  test.verbose = true
47
48
  end
48
49
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.2
1
+ 1.3.0
data/bin/biogem CHANGED
@@ -19,7 +19,7 @@ if (application_exit[:exit]==0)
19
19
 
20
20
  Bundler::CLI.start
21
21
  #TODO: call rake directly not from shell
22
- # print "Note: if rake gives an error try running biogem from an installed gem\n"
22
+ # print "Note: if rake gives an error try running biogem from an installed gem instead\n"
23
23
  print "\trake version:write\n"
24
24
  sh "rake version:write"
25
25
  print "\trake gemspec\n"
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "bio-gem"
8
- s.version = "1.2.2"
8
+ s.version = "1.3.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Raoul J.P. Bonnal", "Pjotr Prins"]
12
- s.date = "2012-02-16"
12
+ s.date = "2012-02-28"
13
13
  s.description = "Biogem is a software generator for those bioinformaticans who want to start coding an application or a library for using/extending BioRuby core library and sharing it through rubygems.org .\n The basic idea is to simplify and promote a modular approach to bioinformatics software development"
14
14
  s.email = "ilpuccio.febo@gmail.com"
15
15
  s.executables = ["biogem"]
@@ -20,6 +20,7 @@ Gem::Specification.new do |s|
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
+ ".travis.yml",
23
24
  "Gemfile",
24
25
  "Gemfile.lock",
25
26
  "LICENSE.txt",
@@ -30,6 +31,7 @@ Gem::Specification.new do |s|
30
31
  "bin/biogem",
31
32
  "bio-gem.gemspec",
32
33
  "doc/biogem-hacking.md",
34
+ "doc/integration-testing.md",
33
35
  "lib/bio-gem.rb",
34
36
  "lib/bio-gem/application.rb",
35
37
  "lib/bio-gem/generator/render.rb",
@@ -59,6 +61,7 @@ Gem::Specification.new do |s|
59
61
  "lib/bio-gem/templates/rakefile",
60
62
  "lib/bio-gem/templates/routes",
61
63
  "lib/bio-gem/templates/seeds",
64
+ "lib/bio-gem/templates/travis.yml",
62
65
  "test/helper.rb",
63
66
  "test/test_bio-gem.rb"
64
67
  ]
@@ -0,0 +1,81 @@
1
+ # Integration testing
2
+
3
+ Continuous integration testing is very useful for biogems/plugins. The Ruby
4
+ community has come up with [travis-ci](http://about.travis-ci.org/), which is
5
+ integrated into github! Any time code is submitted to github, the automated
6
+ testing on different platforms kicks in.
7
+
8
+ Here we set out to set up travis-ci with a biogem. I chose my bio-gff3 gem
9
+ for integrated testing.
10
+
11
+ ## Setting up Travis-CI
12
+
13
+ The online documentation is rather complete. Here we just list the steps needed
14
+ for a biogem.
15
+
16
+ First set up an account using Github OAuth. Click the sign-in with github button in the top
17
+ right corner of the travis-ci website. Choose the github projects you want to test for.
18
+
19
+ Next add a .travis.yml configuration file to the repository. It lists the Rubies to
20
+ test against. Lets test all versions:
21
+
22
+ ```yaml
23
+ language: ruby
24
+ rvm:
25
+ - 1.8.7
26
+ - 1.9.2
27
+ - 1.9.3
28
+ - jruby-18mode # JRuby in 1.8 mode
29
+ - jruby-19mode # JRuby in 1.9 mode
30
+ - rbx-18mode
31
+ - rbx-19mode
32
+ # uncomment this line if your project needs to run something other than `rake`:
33
+ # script: bundle exec rspec spec
34
+ ```
35
+
36
+ Test the file with
37
+
38
+ ```bash
39
+ gem install travis-lint
40
+ travis-lint
41
+ Hooray, .travis.yml at /export/local/users/pjotr/git/opensource/ruby/bioruby-gff3/.travis.yml seems to be solid!
42
+ ```
43
+
44
+ Pushing any changes to github should kick in all testing!
45
+
46
+ You know what? Tests failed. Rubinius did lot like the rcov native extension,
47
+ which got installed by older editions of biogem. So time to remove that. JRuby
48
+ was fussy about 'NameError: uninitialized constant BIN', which was actually
49
+ correct, and should not have passed in MRI.
50
+
51
+ Ruby 1.9.3 complained about
52
+
53
+ ```bash
54
+ /home/vagrant/.rvm/rubies/ruby-1.9.3-p125/lib/ruby/1.9.1/test/unit.rb:167:in 'block in non_options': file not found: test/**/test_*.rb (ArgumentError)
55
+ ```
56
+
57
+ Funny that. On my machine all tests passed. On travis all builds failed, even on the same
58
+ Ruby interpreter. I had to disable my regression tests because Travis does not like resolving
59
+ paths to external programs (surprise!).
60
+
61
+ Anyway, fixing these bugs/issues made it a better gem!
62
+
63
+ To add a status button on github, add the following to your README.md
64
+
65
+ ```
66
+ [![Build Status](https://secure.travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME].png)](http://travis-ci.org/[YOUR_GITHUB_USERNAME]/[YOUR_PROJECT_NAME])
67
+ ```
68
+
69
+ If you check the README of
70
+
71
+ https://github.com/pjotrp/bioruby-gff3-plugin
72
+
73
+ You can see 'build status: passing' (as of 27/2/2012).
74
+
75
+ Clicking on the button takes the viewer directly to the test results!
76
+
77
+ Ready to run for all Ruby editions. We will add these buttons to
78
+ http://biogems.info/. Also, we would like to achieve that any time a gem is
79
+ tagged for release, the automated testing on different platforms kicks in.
80
+
81
+ This is amazing functionality.
@@ -1,3 +1,6 @@
1
+ # Biogem::Render contains all the logic to render Biogem specific
2
+ # templates
3
+
1
4
  module Biogem
2
5
  module Render
3
6
  # new hook for removing stuff
@@ -60,6 +63,7 @@ module Biogem
60
63
  # Always do these
61
64
  output_template_in_target_generic 'README.rdoc'
62
65
  output_template_in_target_generic_append 'gitignore', '.gitignore'
66
+ output_template_in_target_generic_append 'travis.yml', '.travis.yml'
63
67
  end
64
68
 
65
69
  def create_meta
@@ -17,9 +17,12 @@ class Jeweler
17
17
  alias original_initialize initialize
18
18
  def initialize(options = {})
19
19
  original_initialize(options)
20
- development_dependencies << ["bio", ">= 1.4.2"]
21
- # RCov is not properly supported for Ruby 1.9.2, so we remove it
20
+ # RCov is not properly supported in Ruby 1.9.2, so we remove it
22
21
  development_dependencies.delete_if { |k,v| k == "rcov" }
22
+ # development_dependencies << ["bio-logger"]
23
+ development_dependencies << ["bio", ">= 1.4.2"]
24
+ # we add rdoc because of an upgrade of rake RDocTask causing errors
25
+ development_dependencies << ["rdoc", ">= 2.4.2"]
23
26
  if options[:biogem_db]
24
27
  development_dependencies << ["activerecord", ">= 3.0.7"]
25
28
  development_dependencies << ["activesupport", ">= 3.0.7"]
@@ -0,0 +1,12 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.2
4
+ - 1.9.3
5
+ - jruby-19mode # JRuby in 1.9 mode
6
+ - rbx-19mode
7
+ # - 1.8.7
8
+ # - jruby-18mode # JRuby in 1.8 mode
9
+ # - rbx-18mode
10
+
11
+ # uncomment this line if your project needs to run something other than `rake`:
12
+ # script: bundle exec rspec spec
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bio-gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-02-16 00:00:00.000000000 Z
13
+ date: 2012-02-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: bundler
17
- requirement: &2164358520 !ruby/object:Gem::Requirement
17
+ requirement: &2152477800 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.0.18
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2164358520
25
+ version_requirements: *2152477800
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: jeweler
28
- requirement: &2164357900 !ruby/object:Gem::Requirement
28
+ requirement: &2152476940 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 1.7.0
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2164357900
36
+ version_requirements: *2152476940
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rdoc
39
- requirement: &2164357060 !ruby/object:Gem::Requirement
39
+ requirement: &2152476160 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: '0'
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *2164357060
47
+ version_requirements: *2152476160
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: shoulda
50
- requirement: &2164355560 !ruby/object:Gem::Requirement
50
+ requirement: &2152490840 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: '0'
56
56
  type: :development
57
57
  prerelease: false
58
- version_requirements: *2164355560
58
+ version_requirements: *2152490840
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: bundler
61
- requirement: &2164355000 !ruby/object:Gem::Requirement
61
+ requirement: &2152488740 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ~>
@@ -66,10 +66,10 @@ dependencies:
66
66
  version: 1.0.18
67
67
  type: :development
68
68
  prerelease: false
69
- version_requirements: *2164355000
69
+ version_requirements: *2152488740
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: jeweler
72
- requirement: &2164354440 !ruby/object:Gem::Requirement
72
+ requirement: &2152486560 !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
75
75
  - - ! '>='
@@ -77,10 +77,10 @@ dependencies:
77
77
  version: 1.7.0
78
78
  type: :development
79
79
  prerelease: false
80
- version_requirements: *2164354440
80
+ version_requirements: *2152486560
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: rdoc
83
- requirement: &2164353960 !ruby/object:Gem::Requirement
83
+ requirement: &2152485000 !ruby/object:Gem::Requirement
84
84
  none: false
85
85
  requirements:
86
86
  - - ! '>='
@@ -88,7 +88,7 @@ dependencies:
88
88
  version: '0'
89
89
  type: :development
90
90
  prerelease: false
91
- version_requirements: *2164353960
91
+ version_requirements: *2152485000
92
92
  description: ! "Biogem is a software generator for those bioinformaticans who want
93
93
  to start coding an application or a library for using/extending BioRuby core library
94
94
  and sharing it through rubygems.org .\n The basic idea is to simplify and promote
@@ -103,6 +103,7 @@ extra_rdoc_files:
103
103
  - Tutorial.rdoc
104
104
  files:
105
105
  - .document
106
+ - .travis.yml
106
107
  - Gemfile
107
108
  - Gemfile.lock
108
109
  - LICENSE.txt
@@ -113,6 +114,7 @@ files:
113
114
  - bin/biogem
114
115
  - bio-gem.gemspec
115
116
  - doc/biogem-hacking.md
117
+ - doc/integration-testing.md
116
118
  - lib/bio-gem.rb
117
119
  - lib/bio-gem/application.rb
118
120
  - lib/bio-gem/generator/render.rb
@@ -142,6 +144,7 @@ files:
142
144
  - lib/bio-gem/templates/rakefile
143
145
  - lib/bio-gem/templates/routes
144
146
  - lib/bio-gem/templates/seeds
147
+ - lib/bio-gem/templates/travis.yml
145
148
  - test/helper.rb
146
149
  - test/test_bio-gem.rb
147
150
  homepage: http://github.com/helios/bioruby-gem