matthuhiggins-foreigner 0.8.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.rdoc +2 -6
  2. data/lib/foreigner.rb +11 -5
  3. metadata +4 -4
@@ -8,17 +8,13 @@ work on databases that do not support foreign keys, such as sqlite3.
8
8
 
9
9
  == Installation
10
10
 
11
- Install as a plugin:
12
-
13
- ruby script/plugin install git://github.com/matthuhiggins/foreigner.git
14
-
15
11
  In Rails 2, install as a gem by adding the following to config/environment.rb:
16
12
 
17
- config.gem "matthuhiggins-foreigner", :lib => "foreigner"
13
+ config.gem 'foreigner'
18
14
 
19
15
  In Rails 3, install as a gem by adding the following to your Gemfile:
20
16
 
21
- gem 'matthuhiggins-foreigner', :require => 'foreigner'
17
+ gem 'foreigner'
22
18
 
23
19
  == API
24
20
 
@@ -3,15 +3,21 @@ require 'foreigner/connection_adapters/abstract/schema_definitions'
3
3
  require 'foreigner/connection_adapters/sql_2003'
4
4
  require 'foreigner/schema_dumper'
5
5
 
6
- module Foreigner
7
- mattr_accessor :adapters
8
- self.adapters = {}
6
+ p "******************************************************************"
7
+ p "The 'matthuhiggins-foreigner' gem has changed names to 'foreigner'"
8
+ p "Install the renamed gem using 'gem install foreigner'"
9
+ p "******************************************************************"
9
10
 
11
+ module Foreigner
10
12
  class << self
13
+ def adapters
14
+ @@adapters ||= {}
15
+ end
16
+
11
17
  def register(adapter_name, file_name)
12
18
  adapters[adapter_name] = file_name
13
19
  end
14
-
20
+
15
21
  def load_adapter!
16
22
  ActiveRecord::ConnectionAdapters.module_eval do
17
23
  include Foreigner::ConnectionAdapters::SchemaStatements
@@ -26,7 +32,7 @@ module Foreigner
26
32
  require adapters[configured_adapter]
27
33
  end
28
34
  end
29
-
35
+
30
36
  def configured_adapter
31
37
  ActiveRecord::Base.connection_pool.spec.config[:adapter]
32
38
  end
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 8
8
- - 1
9
- version: 0.8.1
7
+ - 9
8
+ - 0
9
+ version: 0.9.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matthew Higgins
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-16 00:00:00 -07:00
17
+ date: 2010-09-28 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies: []
20
20