bio-gem 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ source "http://rubygems.org"
2
+ # Add dependencies required to use your gem here.
3
+ # Example:
4
+ # gem "activesupport", ">= 2.3.5"
5
+
6
+ # Add dependencies to develop your gem here.
7
+ # Include everything needed to run rake, tests, features, etc.
8
+ group :development do
9
+ gem "shoulda", ">= 0"
10
+ gem "bundler", "~> 1.0.0"
11
+ gem "jeweler", "~> 1.5.1"
12
+ gem "rcov", ">= 0"
13
+ end
@@ -0,0 +1,20 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ git (1.2.5)
5
+ jeweler (1.5.1)
6
+ bundler (~> 1.0.0)
7
+ git (>= 1.2.5)
8
+ rake
9
+ rake (0.8.7)
10
+ rcov (0.9.9)
11
+ shoulda (2.11.3)
12
+
13
+ PLATFORMS
14
+ ruby
15
+
16
+ DEPENDENCIES
17
+ bundler (~> 1.0.0)
18
+ jeweler (~> 1.5.1)
19
+ rcov
20
+ shoulda
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2010 Raoul J.P. Bonnal
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,81 @@
1
+ = bioruby-gem
2
+
3
+ BioGem is a scaffold generator for those Bioinformaticans who want to start coding an application or a library
4
+ for using/extending BioRuby's core library and sharing it through http://rubygems.org .
5
+
6
+ The basic idea is to simplify and promote a modular approach to the BioRuby package.
7
+
8
+ BioGem is not reinventing the wheel just putting together different tools like Jeweler and Bundler modifing their original behaviour when needed. Jeweler is used to create the initial scaffold, setting up git for versioning, releasing it to github.com and/or rubygems.org and packaging. Bundler is used used for setting up a predefined developing environment.
9
+
10
+ Remind that
11
+ * Jeweler is based on rake
12
+ $ rake -T
13
+ in your project directory gives you an overview of the available actions
14
+
15
+ * GitHub.com and RubyGems.org
16
+ are two different services and you need to create different accounts for them
17
+ if you already use GitHub.com you are already all set for using BioGem
18
+
19
+ == Contributing to bioruby-gem
20
+
21
+ * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
22
+ * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
23
+ * Fork the project
24
+ * Start a feature/bugfix branch
25
+ * Commit and push until you are happy with your contribution
26
+ * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
27
+ * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
28
+
29
+ == Step by Step
30
+
31
+ * gem install jeweler
32
+ * jeweler bioruby-mystuff
33
+ * cd bioruby_mysuff
34
+ * bundle install
35
+ * rake version:write
36
+ * rake gemspec
37
+ * rake install
38
+
39
+ Some of these steps have been condensed:
40
+
41
+ * gem install bio-gem (not yet published on rubygems, grab it from github http://github.com/helios/bioruby-gem and build the gem (gem build bioruby-gem.gemspec; gem install bioruby-gem.gem))
42
+ * $ biogem mystuff
43
+ * pass just the simple name, it will add bioruby- for the first level directory and for the github repository
44
+ BUT you'll require the library with bio-mystuff (and this will be the name used on rubygems)
45
+ * creates a basic gem structure with a default dependencies for bioruby (bio) version 1.4.1
46
+ |-- Gemfile
47
+ |-- Gemfile.lock
48
+ |-- LICENSE.txt
49
+ |-- README.rdoc
50
+ |-- Rakefile
51
+ |-- lib
52
+ | `-- bio-mystuff.rb
53
+ |-- data
54
+ | `-- empty but put here your datasets or database(SQLite3?)
55
+ `-- test
56
+ |-- helper.rb
57
+ `-- test_bio-mystuff.rb
58
+
59
+ * $ cd bioruby-mystuff
60
+ * $ rake version:write (Initial Updated version: 0.0.0)
61
+ * $ rake gemspec
62
+ * $ rake install (for local test)
63
+ * hack, git add and commit
64
+ * $ rake git:release (remember to create the project first)
65
+ * WHEN you have finished with the hacking you can release the gem by typing:
66
+ * $ rake release
67
+
68
+ == NoTes For Developers
69
+ * Update your rubygems environment
70
+ * Keep in mind that Jeweler handles everything is under the control of you git repository, so there is no need to modify the Rakefile or the tasks for including some file, directory etc to you project; just git add your_file_or_directory. Remeber to modify .gitignore to exclude files.
71
+ * Explore the rake tasks with
72
+ * $ rake -T
73
+
74
+ == TODO
75
+ * better command line, wrap or reimplement some of the funcionalities provided by Bundler and Jeweler
76
+
77
+ == Copyright
78
+
79
+ Copyright (c) 2010 Raoul J.P. Bonnal. See LICENSE.txt for
80
+ further details.
81
+
@@ -0,0 +1,55 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'rake'
11
+
12
+ require 'jeweler'
13
+ Jeweler::Tasks.new do |gem|
14
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
+ gem.name = "bio-gem"
16
+ gem.homepage = "http://github.com/helios/bioruby-gem"
17
+ gem.license = "MIT"
18
+ gem.summary = %Q{BioGem helps Bioinformaticians start developing plugins/modules for BioRuby creating a scaffold and a gem package}
19
+ gem.description = %Q{BioGem is a scaffold 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 .
20
+ The basic idea is to simplify and promote a modular approach to the BioRuby package.}
21
+ gem.email = "ilpuccio.febo@gmail.com"
22
+ gem.authors = ["Raoul J.P. Bonnal"]
23
+ # Include your dependencies below. Runtime dependencies are required when using your gem,
24
+ # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
25
+ # gem.add_runtime_dependency 'jabber4r', '> 0.1'
26
+ # gem.add_development_dependency 'rspec', '> 1.2.3'
27
+ #gem.version='0.0.1'
28
+ end
29
+ Jeweler::RubygemsDotOrgTasks.new
30
+
31
+ require 'rake/testtask'
32
+ Rake::TestTask.new(:test) do |test|
33
+ test.libs << 'lib' << 'test'
34
+ test.pattern = 'test/**/test_*.rb'
35
+ test.verbose = true
36
+ end
37
+
38
+ require 'rcov/rcovtask'
39
+ Rcov::RcovTask.new do |test|
40
+ test.libs << 'test'
41
+ test.pattern = 'test/**/test_*.rb'
42
+ test.verbose = true
43
+ end
44
+
45
+ task :default => :test
46
+
47
+ require 'rake/rdoctask'
48
+ Rake::RDocTask.new do |rdoc|
49
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
50
+
51
+ rdoc.rdoc_dir = 'rdoc'
52
+ rdoc.title = "bio-gem #{version}"
53
+ rdoc.rdoc_files.include('README*')
54
+ rdoc.rdoc_files.include('lib/**/*.rb')
55
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.2
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+ require 'jeweler/generator'
4
+ require 'bundler'
5
+ require 'bundler/cli'
6
+ require 'fileutils'
7
+ require 'bio-gem'
8
+ require 'rake'
9
+
10
+
11
+ orig_argv = ARGV.clone
12
+ if (Jeweler::Generator::Application.run!(*ARGV)==0)
13
+ pwd = FileUtils.pwd
14
+ FileUtils.cd "bioruby-#{ARGV.shift}"
15
+ ARGV << "install"
16
+ Bundler::CLI.start
17
+ sh "rake version:write"
18
+ sh "rake gemspec"
19
+ end
@@ -0,0 +1,68 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{bio-gem}
8
+ s.version = "0.0.2"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Raoul J.P. Bonnal"]
12
+ s.date = %q{2010-12-21}
13
+ s.default_executable = %q{biogem}
14
+ s.description = %q{BioGem is a scaffold 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 .
15
+ The basic idea is to simplify and promote a modular approach to the BioRuby package.}
16
+ s.email = %q{ilpuccio.febo@gmail.com}
17
+ s.executables = ["biogem"]
18
+ s.extra_rdoc_files = [
19
+ "LICENSE.txt",
20
+ "README.rdoc"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE.txt",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "bin/biogem",
31
+ "bio-gem.gemspec",
32
+ "lib/bio-gem.rb",
33
+ "test/helper.rb",
34
+ "test/test_bio-gem.rb"
35
+ ]
36
+ s.homepage = %q{http://github.com/helios/bioruby-gem}
37
+ s.licenses = ["MIT"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = %q{1.3.7}
40
+ s.summary = %q{BioGem helps Bioinformaticians start developing plugins/modules for BioRuby creating a scaffold and a gem package}
41
+ s.test_files = [
42
+ "test/helper.rb",
43
+ "test/test_bio-gem.rb"
44
+ ]
45
+
46
+ if s.respond_to? :specification_version then
47
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
+ s.specification_version = 3
49
+
50
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
51
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
52
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
53
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
54
+ s.add_development_dependency(%q<rcov>, [">= 0"])
55
+ else
56
+ s.add_dependency(%q<shoulda>, [">= 0"])
57
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
58
+ s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
59
+ s.add_dependency(%q<rcov>, [">= 0"])
60
+ end
61
+ else
62
+ s.add_dependency(%q<shoulda>, [">= 0"])
63
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
64
+ s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
65
+ s.add_dependency(%q<rcov>, [">= 0"])
66
+ end
67
+ end
68
+
@@ -0,0 +1,65 @@
1
+ #Overwrite Jeweler classes for properly configure a BioRuby Development Environment/Layout.
2
+
3
+ class Jeweler
4
+ class Generator
5
+ module GithubMixin
6
+ #class Jeweler::Generator::GithubMixin
7
+ def homepage
8
+ @homepage ||= "http://github.com/#{github_username}/#{github_repo_name}"
9
+ end
10
+
11
+ #class Jeweler::Generator::GithubMixin
12
+ def git_remote
13
+ @git_remote ||= "git@github.com:#{github_username}/#{github_repo_name}.git"
14
+ end
15
+ end
16
+
17
+ alias original_initialize initialize
18
+ def initialize(options = {})
19
+ original_initialize(options)
20
+ development_dependencies << ["bio", ">= 1.4.1"]
21
+ end
22
+
23
+ alias original_project_name project_name
24
+ def project_name
25
+ "bio-#{original_project_name}"
26
+ end
27
+ def lib_filename
28
+ "#{project_name}.rb"
29
+ end
30
+
31
+ def target_dir
32
+ project_name.gsub('bio','bioruby')
33
+ end
34
+ alias github_repo_name target_dir
35
+
36
+ def require_name
37
+ project_name
38
+ end
39
+
40
+ def data_dir
41
+ 'data'
42
+ end
43
+
44
+ alias original_create_files create_files
45
+ # this is the defaul directory for storing library datasets
46
+ # creates a data directory for every needs.
47
+ def create_files
48
+ original_create_files
49
+ mkdir_in_target data_dir
50
+ end
51
+
52
+ def create_and_push_repo
53
+ Net::HTTP.post_form URI.parse('http://github.com/api/v2/yaml/repos/create'),
54
+ 'login' => github_username,
55
+ 'token' => github_token,
56
+ 'description' => summary,
57
+ 'name' => github_repo_name
58
+ # TODO do a HEAD request to see when it's ready?
59
+ @repo.push('origin')
60
+ end
61
+
62
+
63
+ end
64
+ end
65
+
@@ -0,0 +1,18 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+ require 'shoulda'
12
+
13
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
15
+ require 'bioruby-gem'
16
+
17
+ class Test::Unit::TestCase
18
+ end
@@ -0,0 +1,7 @@
1
+ require 'helper'
2
+
3
+ class TestBiorubyGem < Test::Unit::TestCase
4
+ should "probably rename this file and start testing for real" do
5
+ flunk "hey buddy, you should probably rename this file and start testing for real"
6
+ end
7
+ end
metadata ADDED
@@ -0,0 +1,135 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bio-gem
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 2
9
+ version: 0.0.2
10
+ platform: ruby
11
+ authors:
12
+ - Raoul J.P. Bonnal
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2010-12-21 00:00:00 +01:00
18
+ default_executable: biogem
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: shoulda
22
+ requirement: &id001 !ruby/object:Gem::Requirement
23
+ none: false
24
+ requirements:
25
+ - - ">="
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 0
29
+ version: "0"
30
+ type: :development
31
+ prerelease: false
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
34
+ name: bundler
35
+ requirement: &id002 !ruby/object:Gem::Requirement
36
+ none: false
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 1
42
+ - 0
43
+ - 0
44
+ version: 1.0.0
45
+ type: :development
46
+ prerelease: false
47
+ version_requirements: *id002
48
+ - !ruby/object:Gem::Dependency
49
+ name: jeweler
50
+ requirement: &id003 !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ~>
54
+ - !ruby/object:Gem::Version
55
+ segments:
56
+ - 1
57
+ - 5
58
+ - 1
59
+ version: 1.5.1
60
+ type: :development
61
+ prerelease: false
62
+ version_requirements: *id003
63
+ - !ruby/object:Gem::Dependency
64
+ name: rcov
65
+ requirement: &id004 !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ">="
69
+ - !ruby/object:Gem::Version
70
+ segments:
71
+ - 0
72
+ version: "0"
73
+ type: :development
74
+ prerelease: false
75
+ version_requirements: *id004
76
+ description: |-
77
+ BioGem is a scaffold 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 .
78
+ The basic idea is to simplify and promote a modular approach to the BioRuby package.
79
+ email: ilpuccio.febo@gmail.com
80
+ executables:
81
+ - biogem
82
+ extensions: []
83
+
84
+ extra_rdoc_files:
85
+ - LICENSE.txt
86
+ - README.rdoc
87
+ files:
88
+ - .document
89
+ - Gemfile
90
+ - Gemfile.lock
91
+ - LICENSE.txt
92
+ - README.rdoc
93
+ - Rakefile
94
+ - VERSION
95
+ - bin/biogem
96
+ - bio-gem.gemspec
97
+ - lib/bio-gem.rb
98
+ - test/helper.rb
99
+ - test/test_bio-gem.rb
100
+ has_rdoc: true
101
+ homepage: http://github.com/helios/bioruby-gem
102
+ licenses:
103
+ - MIT
104
+ post_install_message:
105
+ rdoc_options: []
106
+
107
+ require_paths:
108
+ - lib
109
+ required_ruby_version: !ruby/object:Gem::Requirement
110
+ none: false
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ hash: -2301648142335089709
115
+ segments:
116
+ - 0
117
+ version: "0"
118
+ required_rubygems_version: !ruby/object:Gem::Requirement
119
+ none: false
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ segments:
124
+ - 0
125
+ version: "0"
126
+ requirements: []
127
+
128
+ rubyforge_project:
129
+ rubygems_version: 1.3.7
130
+ signing_key:
131
+ specification_version: 3
132
+ summary: BioGem helps Bioinformaticians start developing plugins/modules for BioRuby creating a scaffold and a gem package
133
+ test_files:
134
+ - test/helper.rb
135
+ - test/test_bio-gem.rb