db-charmer 1.7.0.pre2 → 1.7.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{db-charmer}
8
- s.version = "1.7.0.pre2"
8
+ s.version = "1.7.0.pre3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexey Kovyrin"]
12
- s.date = %q{2011-05-23}
12
+ s.date = %q{2011-06-20}
13
13
  s.description = %q{ActiveRecord Connections Magic (slaves, multiple connections, etc)}
14
14
  s.email = %q{alexey@kovyrin.net}
15
15
  s.extra_rdoc_files = [
@@ -66,25 +66,25 @@ require 'db_charmer/connection_proxy'
66
66
  require 'db_charmer/force_slave_reads'
67
67
 
68
68
  # Add our custom class-level attributes to AR models
69
- ActiveRecord::Base.extend(DbCharmer::ActiveRecord::ClassAttributes)
69
+ ::ActiveRecord::Base.extend(DbCharmer::ActiveRecord::ClassAttributes)
70
70
 
71
71
  # Enable connections switching in AR
72
- ActiveRecord::Base.extend(DbCharmer::ActiveRecord::ConnectionSwitching)
72
+ ::ActiveRecord::Base.extend(DbCharmer::ActiveRecord::ConnectionSwitching)
73
73
 
74
74
  # Enable misc AR extensions
75
- ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:include, DbCharmer::AbstractAdapter::LogFormatting)
75
+ ::ActiveRecord::ConnectionAdapters::AbstractAdapter.send(:include, DbCharmer::AbstractAdapter::LogFormatting)
76
76
 
77
77
  # Enable connection proxy in AR
78
- ActiveRecord::Base.extend(DbCharmer::ActiveRecord::MultiDbProxy::ClassMethods)
79
- ActiveRecord::Base.extend(DbCharmer::ActiveRecord::MultiDbProxy::MasterSlaveClassMethods)
80
- ActiveRecord::Base.send(:include, DbCharmer::ActiveRecord::MultiDbProxy::InstanceMethods)
78
+ ::ActiveRecord::Base.extend(DbCharmer::ActiveRecord::MultiDbProxy::ClassMethods)
79
+ ::ActiveRecord::Base.extend(DbCharmer::ActiveRecord::MultiDbProxy::MasterSlaveClassMethods)
80
+ ::ActiveRecord::Base.send(:include, DbCharmer::ActiveRecord::MultiDbProxy::InstanceMethods)
81
81
 
82
82
  # Enable connection proxy for scopes
83
- ActiveRecord::NamedScope::Scope.send(:include, DbCharmer::ActiveRecord::NamedScope::ScopeProxy)
83
+ ::ActiveRecord::NamedScope::Scope.send(:include, DbCharmer::ActiveRecord::NamedScope::ScopeProxy)
84
84
 
85
85
  # Enable connection proxy for associations
86
86
  # WARNING: Inject methods to association class right here (they proxy include calls somewhere else, so include does not work)
87
- module ActiveRecord
87
+ module ::ActiveRecord
88
88
  module Associations
89
89
  class AssociationProxy
90
90
  def proxy?
@@ -108,18 +108,18 @@ module ActiveRecord
108
108
  end
109
109
 
110
110
  # Enable multi-db migrations
111
- ActiveRecord::Migration.extend(DbCharmer::ActiveRecord::Migration::MultiDbMigrations)
111
+ ::ActiveRecord::Migration.extend(DbCharmer::ActiveRecord::Migration::MultiDbMigrations)
112
112
 
113
113
  # Enable the magic
114
- ActiveRecord::Base.extend(DbCharmer::ActiveRecord::DbMagic)
114
+ ::ActiveRecord::Base.extend(DbCharmer::ActiveRecord::DbMagic)
115
115
 
116
116
  # Setup association preload magic
117
- ActiveRecord::Base.extend(DbCharmer::ActiveRecord::AssociationPreload)
117
+ ::ActiveRecord::Base.extend(DbCharmer::ActiveRecord::AssociationPreload)
118
118
 
119
119
  # Open up really useful API method
120
- ActiveRecord::AssociationPreload::ClassMethods.send(:public, :preload_associations)
120
+ ::ActiveRecord::AssociationPreload::ClassMethods.send(:public, :preload_associations)
121
121
 
122
- class ActiveRecord::Base
122
+ class ::ActiveRecord::Base
123
123
  class << self
124
124
  def inherited_with_hijacking(subclass)
125
125
  out = inherited_without_hijacking(subclass)
@@ -133,5 +133,5 @@ end
133
133
 
134
134
  #-----------------------------------------------------------------------------------------------------------------------
135
135
  # Extend ActionController to support forcing slave reads
136
- ActionController::Base.extend(DbCharmer::ActionController::ForceSlaveReads::ClassMethods)
137
- ActionController::Base.send(:include, DbCharmer::ActionController::ForceSlaveReads::InstanceMethods)
136
+ ::ActionController::Base.extend(DbCharmer::ActionController::ForceSlaveReads::ClassMethods)
137
+ ::ActionController::Base.send(:include, DbCharmer::ActionController::ForceSlaveReads::InstanceMethods)
@@ -3,7 +3,7 @@ module DbCharmer
3
3
  MAJOR = 1
4
4
  MINOR = 7
5
5
  PATCH = 0
6
- BUILD = 'pre2'
6
+ BUILD = 'pre3'
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, BUILD].compact.join('.')
9
9
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-charmer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1923832061
4
+ hash: 1923832063
5
5
  prerelease: 6
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
9
  - 0
10
10
  - pre
11
- - 2
12
- version: 1.7.0.pre2
11
+ - 3
12
+ version: 1.7.0.pre3
13
13
  platform: ruby
14
14
  authors:
15
15
  - Alexey Kovyrin
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2011-05-23 00:00:00 -04:00
20
+ date: 2011-06-20 00:00:00 -04:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency