master_slave_adapter_soundcloud 0.1.7 → 0.1.10

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ # 0.1.10 (March 06, 2012)
2
+
3
+ * Delegate #visitor to master connection
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.7
1
+ 0.1.10
@@ -0,0 +1 @@
1
+ require 'master_slave_adapter'
@@ -42,6 +42,10 @@ module ActiveRecord
42
42
  ConnectionAdapters::MasterSlaveAdapter.new(config, logger)
43
43
  end
44
44
 
45
+ def mysql_master_slave_connection(config)
46
+ master_slave_connection(config)
47
+ end
48
+
45
49
  private
46
50
 
47
51
  def massage(config)
@@ -267,6 +271,9 @@ module ActiveRecord
267
271
  :to => :master_connection
268
272
  delegate *(ActiveRecord::ConnectionAdapters::SchemaStatements.instance_methods + [{
269
273
  :to => :master_connection }])
274
+ # ActiveRecord 3.0
275
+ delegate :visitor,
276
+ :to => :master_connection
270
277
  # no clear interface contract:
271
278
  delegate :tables, # commented in SchemaStatements
272
279
  :truncate_table, # monkeypatching database_cleaner gem
@@ -1,10 +1,9 @@
1
- # -*- encoding: utf-8 -*-
2
1
  $:.push File.expand_path("../lib", __FILE__)
3
2
 
4
3
  Gem::Specification.new do |s|
5
4
  s.name = 'master_slave_adapter_soundcloud'
6
5
  s.version = File.read('VERSION').to_s
7
- s.date = '2011-08-24'
6
+ s.date = '2011-11-15'
8
7
  s.platform = Gem::Platform::RUBY
9
8
  s.authors = [ 'Mauricio Linhares', 'Torsten Curdt', 'Kim Altintop', 'Omid Aladini', 'SoundCloud' ]
10
9
  s.email = %q{kim@soundcloud.com tcurdt@soundcloud.com omid@soundcloud.com}
@@ -21,5 +20,5 @@ Gem::Specification.new do |s|
21
20
  s.required_rubygems_version = '>= 1.3.7'
22
21
  s.add_development_dependency 'rspec'
23
22
 
24
- s.add_dependency 'activerecord', '= 2.3.9'
23
+ s.add_dependency 'activerecord', '~> 2.3.9'
25
24
  end
@@ -84,7 +84,9 @@ describe ActiveRecord::ConnectionAdapters::MasterSlaveAdapter do
84
84
  end
85
85
  end
86
86
 
87
- xit "should call 'columns' on master" do
87
+ it "should call 'columns' on master" do
88
+ master_connection.should_receive(:columns)
89
+ adapter_connection.columns
88
90
  end
89
91
 
90
92
  SelectMethods.each do |method|
@@ -139,6 +141,11 @@ describe ActiveRecord::ConnectionAdapters::MasterSlaveAdapter do
139
141
  end
140
142
  end
141
143
 
144
+ it "should call #visitor on master connection" do
145
+ master_connection.should_receive(:visitor)
146
+ adapter_connection.visitor
147
+ end
148
+
142
149
  it 'should be a master slave connection' do
143
150
  adapter_connection.class.should == ActiveRecord::ConnectionAdapters::MasterSlaveAdapter
144
151
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: master_slave_adapter_soundcloud
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.10
4
5
  prerelease:
5
- version: 0.1.7
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Mauricio Linhares
9
9
  - Torsten Curdt
10
10
  - Kim Altintop
@@ -13,78 +13,70 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
-
17
- date: 2011-08-24 00:00:00 +02:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
16
+ date: 2011-11-15 00:00:00.000000000 Z
17
+ dependencies:
18
+ - !ruby/object:Gem::Dependency
21
19
  name: rspec
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
20
+ requirement: &70148912458220 !ruby/object:Gem::Requirement
24
21
  none: false
25
- requirements:
26
- - - ">="
27
- - !ruby/object:Gem::Version
28
- version: "0"
22
+ requirements:
23
+ - - ! '>='
24
+ - !ruby/object:Gem::Version
25
+ version: '0'
29
26
  type: :development
30
- version_requirements: *id001
31
- - !ruby/object:Gem::Dependency
32
- name: activerecord
33
27
  prerelease: false
34
- requirement: &id002 !ruby/object:Gem::Requirement
28
+ version_requirements: *70148912458220
29
+ - !ruby/object:Gem::Dependency
30
+ name: activerecord
31
+ requirement: &70148912457360 !ruby/object:Gem::Requirement
35
32
  none: false
36
- requirements:
37
- - - "="
38
- - !ruby/object:Gem::Version
33
+ requirements:
34
+ - - ~>
35
+ - !ruby/object:Gem::Version
39
36
  version: 2.3.9
40
37
  type: :runtime
41
- version_requirements: *id002
38
+ prerelease: false
39
+ version_requirements: *70148912457360
42
40
  description: (MySQL) Replication Aware Master/Slave Database Adapter for Rails/ActiveRecord
43
41
  email: kim@soundcloud.com tcurdt@soundcloud.com omid@soundcloud.com
44
42
  executables: []
45
-
46
43
  extensions: []
47
-
48
44
  extra_rdoc_files: []
49
-
50
- files:
45
+ files:
51
46
  - .gitignore
47
+ - CHANGELOG.md
52
48
  - Gemfile
53
49
  - LICENSE
54
50
  - Rakefile
55
51
  - Readme.md
56
52
  - VERSION
57
53
  - lib/active_record/connection_adapters/master_slave_adapter.rb
54
+ - lib/active_record/connection_adapters/mysql_master_slave_adapter.rb
58
55
  - lib/master_slave_adapter.rb
59
56
  - master_slave_adapter.gemspec
60
57
  - specs/specs.rb
61
- has_rdoc: true
62
58
  homepage: http://github.com/soundcloud/master_slave_adapter
63
59
  licenses: []
64
-
65
60
  post_install_message:
66
61
  rdoc_options: []
67
-
68
- require_paths:
62
+ require_paths:
69
63
  - lib
70
- required_ruby_version: !ruby/object:Gem::Requirement
64
+ required_ruby_version: !ruby/object:Gem::Requirement
71
65
  none: false
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
75
69
  version: 1.9.2
76
- required_rubygems_version: !ruby/object:Gem::Requirement
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
77
71
  none: false
78
- requirements:
79
- - - ">="
80
- - !ruby/object:Gem::Version
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
81
75
  version: 1.3.7
82
76
  requirements: []
83
-
84
77
  rubyforge_project:
85
- rubygems_version: 1.5.0
78
+ rubygems_version: 1.8.15
86
79
  signing_key:
87
80
  specification_version: 3
88
81
  summary: Replication Aware Master/Slave Database Adapter for Rails/ActiveRecord
89
82
  test_files: []
90
-