activerecord-database_comments 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,16 +18,20 @@ module ActiveRecord
18
18
  ActiveRecord::ConnectionAdapters::TableDefinition.send :include, ActiveRecord::DatabaseComments::Definitions::Table
19
19
 
20
20
  # Agregar el módulo a los adapters de BD:
21
- require 'active_record/database_comments/adapters/mysql_adapter'
22
- [
23
- "ActiveRecord::ConnectionAdapters::MysqlAdapter",
24
- "ActiveRecord::ConnectionAdapters::Mysql2Adapter",
25
- "ActiveRecord::ConnectionAdapters::Mysql2SpatialAdapter", # Adapter para rgeo-mysql
26
- "ArJdbc::MySQL" # Adapter para jRuby JDBC
27
- ].each do |mysql_adapter_class|
28
- adapter_class = mysql_adapter_class.safe_constantize
29
- adapter_class.send :include, ActiveRecord::DatabaseComments::Adapters::MysqlAdapter if adapter_class.present?
30
- end
21
+ jdbc_adapter = "ArJdbc::MySQL".safe_constantize
22
+ unless jdbc_adapter.present?
23
+ [
24
+ "ActiveRecord::ConnectionAdapters::MysqlAdapter",
25
+ "ActiveRecord::ConnectionAdapters::Mysql2Adapter",
26
+ ].each do |mysql_adapter_class|
27
+ adapter_class = mysql_adapter_class.safe_constantize
28
+ if adapter_class.present?
29
+ require 'active_record/database_comments/adapters/mysql_adapter'
30
+ adapter_class.send :include, ActiveRecord::DatabaseComments::Adapters::MysqlAdapter
31
+ end
32
+ end
33
+ end
34
+
31
35
 
32
36
  end
33
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activerecord-database_comments
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-03-09 00:00:00.000000000 Z
12
+ date: 2013-03-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activerecord
@@ -34,7 +34,7 @@ dependencies:
34
34
  requirements:
35
35
  - - '='
36
36
  - !ruby/object:Gem::Version
37
- version: 0.0.8
37
+ version: 0.0.9
38
38
  type: :runtime
39
39
  prerelease: false
40
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  requirements:
43
43
  - - '='
44
44
  - !ruby/object:Gem::Version
45
- version: 0.0.8
45
+ version: 0.0.9
46
46
  - !ruby/object:Gem::Dependency
47
47
  name: mysql2
48
48
  requirement: !ruby/object:Gem::Requirement