matthuhiggins-foreigner 0.6.2 → 0.6.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -44,18 +44,11 @@ module Foreigner
44
44
  end
45
45
  end
46
46
 
47
- module ActiveRecord
48
- module ConnectionAdapters
49
- if defined? MysqlAdapter
50
- MysqlAdapter.class_eval do
51
- include Foreigner::ConnectionAdapters::MysqlAdapter
52
- end
53
- end
54
-
55
- if defined? JdbcAdapter
56
- JdbcAdapter.class_eval do
57
- include Foreigner::ConnectionAdapters::MysqlAdapter
58
- end
47
+ [:MysqlAdapter, :Mysql2Adapter, :JdbcAdapter].each do |adapter|
48
+ begin
49
+ ActiveRecord::ConnectionAdapters.const_get(adapter).class_eval do
50
+ include Foreigner::ConnectionAdapters::MysqlAdapter
59
51
  end
52
+ rescue
60
53
  end
61
- end
54
+ end
@@ -47,18 +47,11 @@ module Foreigner
47
47
  end
48
48
  end
49
49
 
50
- module ActiveRecord
51
- module ConnectionAdapters
52
- if defined? PostgreSQLAdapter
53
- PostgreSQLAdapter.class_eval do
54
- include Foreigner::ConnectionAdapters::PostgreSQLAdapter
55
- end
56
- end
57
-
58
- if defined? JdbcAdapter
59
- JdbcAdapter.class_eval do
60
- include Foreigner::ConnectionAdapters::PostgreSQLAdapter
61
- end
50
+ [:PostgreSQLAdapter, :JdbcAdapter].each do |adapter|
51
+ begin
52
+ ActiveRecord::ConnectionAdapters.const_get(adapter).class_eval do
53
+ include Foreigner::ConnectionAdapters::MysqlAdapter
62
54
  end
55
+ rescue
63
56
  end
64
57
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matthuhiggins-foreigner
3
3
  version: !ruby/object:Gem::Version
4
- hash: 3
5
4
  prerelease: false
6
5
  segments:
7
6
  - 0
8
7
  - 6
9
- - 2
10
- version: 0.6.2
8
+ - 3
9
+ version: 0.6.3
11
10
  platform: ruby
12
11
  authors:
13
12
  - Matthew Higgins
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2010-08-21 00:00:00 -07:00
17
+ date: 2010-08-22 00:00:00 -07:00
19
18
  default_executable:
20
19
  dependencies: []
21
20
 
@@ -54,7 +53,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
53
  requirements:
55
54
  - - ">="
56
55
  - !ruby/object:Gem::Version
57
- hash: 59
58
56
  segments:
59
57
  - 1
60
58
  - 8
@@ -65,7 +63,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
65
63
  requirements:
66
64
  - - ">="
67
65
  - !ruby/object:Gem::Version
68
- hash: 17
69
66
  segments:
70
67
  - 1
71
68
  - 3