bio-gem 1.2.1 → 1.2.2
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.
- data/Gemfile +2 -3
- data/Gemfile.lock +3 -4
- data/LICENSE.txt +1 -1
- data/README.rdoc +27 -10
- data/Rakefile +12 -10
- data/Tutorial.rdoc +4 -5
- data/VERSION +1 -1
- data/bin/biogem +9 -1
- data/bio-gem.gemspec +22 -16
- data/doc/biogem-hacking.md +396 -0
- data/lib/bio-gem.rb +2 -1
- data/lib/bio-gem/application.rb +1 -1
- data/lib/bio-gem/generator/render.rb +144 -0
- data/lib/bio-gem/mod/biogem-rails.rb +14 -0
- data/lib/bio-gem/mod/biogem.rb +107 -0
- data/lib/bio-gem/mod/jeweler.rb +33 -185
- data/lib/bio-gem/mod/jeweler/options.rb +5 -1
- data/lib/bio-gem/templates/README.rdoc +40 -0
- data/lib/bio-gem/templates/{bin → bin/bio-plugin} +1 -3
- data/lib/bio-gem/templates/ffi/ext.c +8 -0
- data/lib/bio-gem/templates/ffi/ext.h +10 -0
- data/lib/bio-gem/templates/gitignore +3 -0
- data/lib/bio-gem/templates/lib/bioruby-plugin.rb +18 -0
- data/lib/bio-gem/templates/lib/plugin.rb +3 -0
- data/test/test_bio-gem.rb +7 -8
- metadata +34 -36
- data/lib/bio-gem/templates/lib +0 -17
@@ -45,6 +45,10 @@ class Jeweler
|
|
45
45
|
self[:biogem_bin] = true
|
46
46
|
end
|
47
47
|
|
48
|
+
o.on('--with-ffi', 'generate a C extension with foreign function interface (FFI)') do
|
49
|
+
self[:biogem_ffi] = true
|
50
|
+
end
|
51
|
+
|
48
52
|
o.on('--with-db', 'create the database directory for a db application-library.') do
|
49
53
|
self[:biogem_db] = true
|
50
54
|
end
|
@@ -190,4 +194,4 @@ class Jeweler
|
|
190
194
|
|
191
195
|
end #Options
|
192
196
|
end #Generator
|
193
|
-
end #Jeweler
|
197
|
+
end #Jeweler
|
@@ -0,0 +1,40 @@
|
|
1
|
+
= <%= project_name %>
|
2
|
+
|
3
|
+
Full description goes here
|
4
|
+
|
5
|
+
Note: this software is under active development!
|
6
|
+
|
7
|
+
== Installation
|
8
|
+
|
9
|
+
gem install <%= project_name %>
|
10
|
+
|
11
|
+
== Usage
|
12
|
+
|
13
|
+
== Developers
|
14
|
+
|
15
|
+
To use the library
|
16
|
+
|
17
|
+
require '<%= project_name %>
|
18
|
+
|
19
|
+
The API doc is online. For more code examples see also the test files in
|
20
|
+
the source tree.
|
21
|
+
|
22
|
+
== Project home page
|
23
|
+
|
24
|
+
Information on the source tree, documentation, issues and how to contribute, see
|
25
|
+
|
26
|
+
<%= homepage %>
|
27
|
+
|
28
|
+
== Cite
|
29
|
+
|
30
|
+
If you use this software, please cite http://dx.doi.org/10.1093/bioinformatics/btq475
|
31
|
+
|
32
|
+
== Biogems.info
|
33
|
+
|
34
|
+
This Biogem is published at http://biogems.info/index.html#<%= project_name %>
|
35
|
+
|
36
|
+
== Copyright
|
37
|
+
|
38
|
+
Copyright (c) <%= Time.now.year %> <%= user_name %>. See LICENSE.txt for further details.
|
39
|
+
|
40
|
+
|
@@ -1,10 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
#
|
3
|
-
# BioRuby <%= project_name %> Plugin
|
4
|
-
# Version 0.0.0
|
3
|
+
# BioRuby <%= project_name %> Plugin <%= constant_name %>
|
5
4
|
# Author:: <%= user_name %>
|
6
5
|
# Copyright:: <%= Time.now.year %>
|
7
|
-
# License:: The Ruby License
|
8
6
|
|
9
7
|
USAGE = "Describe <%= bin_name %>"
|
10
8
|
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# Please require your code below, respecting the naming conventions in the
|
2
|
+
# bioruby directory tree.
|
3
|
+
#
|
4
|
+
# For example, say you have a plugin named bio-plugin, the only uncommented
|
5
|
+
# line in this file would be
|
6
|
+
#
|
7
|
+
# require 'bio/bio-plugin/plugin'
|
8
|
+
#
|
9
|
+
# In this file only require other files. Avoid other source code.
|
10
|
+
|
11
|
+
require '<%= path(project_name,lib_plugin_filename) %>'
|
12
|
+
|
13
|
+
<% if options[:biogem_db] %>
|
14
|
+
require '<%= File.join("bio",sub_module.downcase,"connect") %>'
|
15
|
+
<% unless options[:biogem_engine] %>
|
16
|
+
require '<%= File.join("bio",sub_module.downcase,"example") %>'
|
17
|
+
<% end %>
|
18
|
+
<% end %>
|
data/test/test_bio-gem.rb
CHANGED
@@ -1,22 +1,24 @@
|
|
1
1
|
require 'helper'
|
2
2
|
require 'fileutils'
|
3
3
|
|
4
|
+
$UNITTEST=true # prevents github push
|
5
|
+
|
4
6
|
class TestBiorubyGem < Test::Unit::TestCase
|
5
|
-
TEST_DIR = 'test/
|
7
|
+
TEST_DIR = 'test/bioruby-biogem-test'
|
6
8
|
def setup
|
7
|
-
#check and create test directory
|
9
|
+
# check and create test directory
|
8
10
|
FileUtils.rm_rf(TEST_DIR) if Dir.exist?(TEST_DIR)
|
9
11
|
Dir.mkdir TEST_DIR
|
10
12
|
end
|
11
13
|
|
12
14
|
def teardown
|
13
|
-
#check and remove
|
15
|
+
# check and remove test directory
|
14
16
|
FileUtils.rm_rf TEST_DIR if Dir.exist?(TEST_DIR)
|
15
17
|
end
|
16
|
-
|
17
18
|
|
19
|
+
# This test creates a project named 'bioruby-biogem-test'.
|
18
20
|
def test_create_basic_project
|
19
|
-
project_name = "
|
21
|
+
project_name = "biogem-test"
|
20
22
|
Dir.chdir(TEST_DIR) do
|
21
23
|
application_exit = Bio::Gem::Generator::Application.run!(project_name)
|
22
24
|
files_tested = %W(Gemfile lib lib/bio-#{project_name}.rb LICENSE.txt Rakefile README.rdoc test test/helper.rb test/test_bio-#{project_name}.rb).map do |file_name_to_test|
|
@@ -26,7 +28,4 @@ class TestBiorubyGem < Test::Unit::TestCase
|
|
26
28
|
end
|
27
29
|
|
28
30
|
end
|
29
|
-
# should "probably rename this file and start testing for real" do
|
30
|
-
# flunk "hey buddy, you should probably rename this file and start testing for real"
|
31
|
-
# end
|
32
31
|
end
|
metadata
CHANGED
@@ -1,19 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bio-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Raoul J.P. Bonnal
|
9
|
+
- Pjotr Prins
|
9
10
|
autorequire:
|
10
11
|
bindir: bin
|
11
12
|
cert_chain: []
|
12
|
-
date: 2012-
|
13
|
+
date: 2012-02-16 00:00:00.000000000 Z
|
13
14
|
dependencies:
|
14
15
|
- !ruby/object:Gem::Dependency
|
15
16
|
name: bundler
|
16
|
-
requirement: &
|
17
|
+
requirement: &2164358520 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
19
|
requirements:
|
19
20
|
- - ~>
|
@@ -21,21 +22,21 @@ dependencies:
|
|
21
22
|
version: 1.0.18
|
22
23
|
type: :runtime
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
+
version_requirements: *2164358520
|
25
26
|
- !ruby/object:Gem::Dependency
|
26
27
|
name: jeweler
|
27
|
-
requirement: &
|
28
|
+
requirement: &2164357900 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
30
|
requirements:
|
30
|
-
- -
|
31
|
+
- - ! '>='
|
31
32
|
- !ruby/object:Gem::Version
|
32
|
-
version: 1.
|
33
|
+
version: 1.7.0
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
+
version_requirements: *2164357900
|
36
37
|
- !ruby/object:Gem::Dependency
|
37
38
|
name: rdoc
|
38
|
-
requirement: &
|
39
|
+
requirement: &2164357060 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
41
|
requirements:
|
41
42
|
- - ! '>='
|
@@ -43,10 +44,10 @@ dependencies:
|
|
43
44
|
version: '0'
|
44
45
|
type: :runtime
|
45
46
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
+
version_requirements: *2164357060
|
47
48
|
- !ruby/object:Gem::Dependency
|
48
49
|
name: shoulda
|
49
|
-
requirement: &
|
50
|
+
requirement: &2164355560 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
52
|
requirements:
|
52
53
|
- - ! '>='
|
@@ -54,10 +55,10 @@ dependencies:
|
|
54
55
|
version: '0'
|
55
56
|
type: :development
|
56
57
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
+
version_requirements: *2164355560
|
58
59
|
- !ruby/object:Gem::Dependency
|
59
60
|
name: bundler
|
60
|
-
requirement: &
|
61
|
+
requirement: &2164355000 !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
63
|
requirements:
|
63
64
|
- - ~>
|
@@ -65,32 +66,21 @@ dependencies:
|
|
65
66
|
version: 1.0.18
|
66
67
|
type: :development
|
67
68
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
+
version_requirements: *2164355000
|
69
70
|
- !ruby/object:Gem::Dependency
|
70
71
|
name: jeweler
|
71
|
-
requirement: &
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ~>
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 1.6.4
|
77
|
-
type: :development
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: *2164573360
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: rcov
|
82
|
-
requirement: &2164572440 !ruby/object:Gem::Requirement
|
72
|
+
requirement: &2164354440 !ruby/object:Gem::Requirement
|
83
73
|
none: false
|
84
74
|
requirements:
|
85
75
|
- - ! '>='
|
86
76
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
77
|
+
version: 1.7.0
|
88
78
|
type: :development
|
89
79
|
prerelease: false
|
90
|
-
version_requirements: *
|
80
|
+
version_requirements: *2164354440
|
91
81
|
- !ruby/object:Gem::Dependency
|
92
82
|
name: rdoc
|
93
|
-
requirement: &
|
83
|
+
requirement: &2164353960 !ruby/object:Gem::Requirement
|
94
84
|
none: false
|
95
85
|
requirements:
|
96
86
|
- - ! '>='
|
@@ -98,11 +88,11 @@ dependencies:
|
|
98
88
|
version: '0'
|
99
89
|
type: :development
|
100
90
|
prerelease: false
|
101
|
-
version_requirements: *
|
102
|
-
description: ! "
|
91
|
+
version_requirements: *2164353960
|
92
|
+
description: ! "Biogem is a software generator for those bioinformaticans who want
|
103
93
|
to start coding an application or a library for using/extending BioRuby core library
|
104
94
|
and sharing it through rubygems.org .\n The basic idea is to simplify and promote
|
105
|
-
a modular approach to
|
95
|
+
a modular approach to bioinformatics software development"
|
106
96
|
email: ilpuccio.febo@gmail.com
|
107
97
|
executables:
|
108
98
|
- biogem
|
@@ -122,22 +112,31 @@ files:
|
|
122
112
|
- VERSION
|
123
113
|
- bin/biogem
|
124
114
|
- bio-gem.gemspec
|
115
|
+
- doc/biogem-hacking.md
|
125
116
|
- lib/bio-gem.rb
|
126
117
|
- lib/bio-gem/application.rb
|
118
|
+
- lib/bio-gem/generator/render.rb
|
119
|
+
- lib/bio-gem/mod/biogem-rails.rb
|
120
|
+
- lib/bio-gem/mod/biogem.rb
|
127
121
|
- lib/bio-gem/mod/jeweler.rb
|
128
122
|
- lib/bio-gem/mod/jeweler/github_mixin.rb
|
129
123
|
- lib/bio-gem/mod/jeweler/options.rb
|
130
|
-
- lib/bio-gem/templates/
|
124
|
+
- lib/bio-gem/templates/README.rdoc
|
125
|
+
- lib/bio-gem/templates/bin/bio-plugin
|
131
126
|
- lib/bio-gem/templates/database
|
132
127
|
- lib/bio-gem/templates/db_connection
|
133
128
|
- lib/bio-gem/templates/db_model
|
134
129
|
- lib/bio-gem/templates/engine
|
130
|
+
- lib/bio-gem/templates/ffi/ext.c
|
131
|
+
- lib/bio-gem/templates/ffi/ext.h
|
135
132
|
- lib/bio-gem/templates/foos_controller
|
136
133
|
- lib/bio-gem/templates/foos_view_example
|
137
134
|
- lib/bio-gem/templates/foos_view_index
|
138
135
|
- lib/bio-gem/templates/foos_view_new
|
139
136
|
- lib/bio-gem/templates/foos_view_show
|
140
|
-
- lib/bio-gem/templates/
|
137
|
+
- lib/bio-gem/templates/gitignore
|
138
|
+
- lib/bio-gem/templates/lib/bioruby-plugin.rb
|
139
|
+
- lib/bio-gem/templates/lib/plugin.rb
|
141
140
|
- lib/bio-gem/templates/library
|
142
141
|
- lib/bio-gem/templates/migration
|
143
142
|
- lib/bio-gem/templates/rakefile
|
@@ -172,6 +171,5 @@ rubyforge_project:
|
|
172
171
|
rubygems_version: 1.8.10
|
173
172
|
signing_key:
|
174
173
|
specification_version: 3
|
175
|
-
summary:
|
176
|
-
creating a scaffold and a gem package
|
174
|
+
summary: Biogem is a software generator for Ruby in bioinformatics
|
177
175
|
test_files: []
|
data/lib/bio-gem/templates/lib
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# Please require your code below, respecting the bioruby directory tree.
|
2
|
-
# For instance, perhaps the only uncommented line in this file might
|
3
|
-
# be something like this:
|
4
|
-
#
|
5
|
-
# require 'bio/sequence/awesome_sequence_plugin_thingy'
|
6
|
-
#
|
7
|
-
# and then create the ruby file 'lib/bio/sequence/awesome_sequence_thingy.rb'
|
8
|
-
# and put your plugin's code there. It is bad practice to write other code
|
9
|
-
# directly into this file, because doing so causes confusion if this biogem
|
10
|
-
# was ever to get merged into the main bioruby tree.
|
11
|
-
|
12
|
-
<% if options[:biogem_db] %>
|
13
|
-
require '<%= File.join("bio",sub_module.downcase,"connect") %>'
|
14
|
-
<% unless options[:biogem_engine] %>
|
15
|
-
require '<%= File.join("bio",sub_module.downcase,"example") %>'
|
16
|
-
<% end %>
|
17
|
-
<% end %>
|