Skip to content

Commit

Permalink
update to Readme
Browse files Browse the repository at this point in the history
  • Loading branch information
fstrozzi committed Feb 21, 2012
1 parent 60a9df3 commit f325d4d
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 29 deletions.
12 changes: 6 additions & 6 deletions Gemfile
Expand Up @@ -3,9 +3,9 @@ source "http://rubygems.org"
# Example:
# gem "activesupport", ">= 2.3.5"

gem "bio", ">= 1.4.1"
gem "mysql"
gem "activerecord", "= 3.0.0"
gem "bio", ">= 1.4.2"
gem "mysql2"
gem "activerecord"

# Add dependencies to develop your gem here.
# Include everything needed to run rake, tests, features, etc.
Expand All @@ -14,7 +14,7 @@ group :development do
gem "bundler", "~> 1.0.0"
gem "jeweler", "~> 1.5.2"
gem "rcov", ">= 0"
gem "bio", ">= 1.4.1"
gem "mysql"
gem 'activerecord', "= 3.0.0"
gem "bio", ">= 1.4.2"
gem "mysql2"
gem 'activerecord'
end
37 changes: 19 additions & 18 deletions Gemfile.lock
@@ -1,27 +1,28 @@
GEM
remote: http://rubygems.org/
specs:
activemodel (3.0.0)
activesupport (= 3.0.0)
builder (~> 2.1.2)
i18n (~> 0.4.1)
activerecord (3.0.0)
activemodel (= 3.0.0)
activesupport (= 3.0.0)
arel (~> 1.0.0)
tzinfo (~> 0.3.23)
activesupport (3.0.0)
arel (1.0.1)
activesupport (~> 3.0.0)
activemodel (3.1.3)
activesupport (= 3.1.3)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.3)
activemodel (= 3.1.3)
activesupport (= 3.1.3)
arel (~> 2.2.1)
tzinfo (~> 0.3.29)
activesupport (3.1.3)
multi_json (~> 1.0)
arel (2.2.1)
bio (1.4.2)
builder (2.1.2)
builder (3.0.0)
git (1.2.5)
i18n (0.4.2)
i18n (0.6.0)
jeweler (1.5.2)
bundler (~> 1.0.0)
git (>= 1.2.5)
rake
mysql (2.8.1)
multi_json (1.0.4)
mysql2 (0.3.11)
rake (0.9.2.2)
rcov (0.9.11)
shoulda (2.11.3)
Expand All @@ -31,10 +32,10 @@ PLATFORMS
ruby

DEPENDENCIES
activerecord (= 3.0.0)
bio (>= 1.4.1)
activerecord
bio (>= 1.4.2)
bundler (~> 1.0.0)
jeweler (~> 1.5.2)
mysql
mysql2
rcov
shoulda
7 changes: 2 additions & 5 deletions README.rdoc
Expand Up @@ -28,7 +28,7 @@ For additional information you can contact Jan Aerts (jan.aerts@sanger.ac.uk) or
The Ensembl Ruby API is made available as a gem. See the github site for more information (http://github.com/jandot/ruby-ensembl-api/wikis/home).

Basically, it comes down to:
sudo gem install jandot-ruby-ensembl-api --source http://gems.github.com
gem install bio-ensembl

== Code conventions
Several naming conventions are used throughout the API. Learning these conventions will aid in your understanding of the code.
Expand Down Expand Up @@ -104,14 +104,11 @@ To find out what relationships exist for a given class, you can use the reflect_

All data used and created by Ensembl is stored in MySQL relational databases. If you want to access this database the first thing you have to do is to connect to it. This is done behind the scenes using the ActiveRecord module.

First, we need to tell our computer where they can find the API code. This information is contained in the RUBYLIB environment variable. Suppose you have save the API in /usr/local/lib/ruby/ensembl-api (with subdirectories lib/, test/, samples/, ...), you could set the environment variable on a bash shell like this:
export RUBYLIB=$RUBYLIB:/usr/local/lib/ruby/ensembl-api/lib

Next, we need to import all Ruby modules that we will be using. Every Ensembl script that you will write will contain a use statement like the following:

require 'ensembl'

Alternatively, if you installed the API as a gem, you would write:
Alternatively, if you installed the API as a gem, you would write (Ruby 1.8 ONLY):

require 'rubygems'
require_gem 'ensembl-api'
Expand Down
1 change: 1 addition & 0 deletions lib/bio-ensembl/db_connection.rb
Expand Up @@ -95,6 +95,7 @@ def self.get_name_from_db(db_type,species,release,args)
end
warn "WARNING: No connection to database established. Check that the species is in snake_case (was: #{species})." if db_name.nil?
return db_name

end

def self.generic_connect(db_type, species, release, args = {})
Expand Down

0 comments on commit f325d4d

Please sign in to comment.