dm-master-slave-adapter 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -59,6 +59,10 @@ module DataMapper
59
59
  super || master.kind_of?(kind)
60
60
  end
61
61
 
62
+ def respond_to?(method)
63
+ super || master.respond_to?(method)
64
+ end
65
+
62
66
  private
63
67
 
64
68
  def reader
@@ -1,5 +1,5 @@
1
1
  module DataMapper
2
2
  module MasterSlaveAdapter
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -64,6 +64,17 @@ describe DataMapper::Adapters::MasterSlaveAdapter do
64
64
  end
65
65
  end
66
66
 
67
+ describe "#respond_to?" do
68
+ it "returns true if self responds to method" do
69
+ @adapter.respond_to?(:bind_to_master).should be_true
70
+ end
71
+
72
+ it "delegates to the master if self does not respond to method" do
73
+ @master.should_receive(:respond_to?).with(:awesomeness).and_return(false)
74
+ @adapter.respond_to?(:awesomeness).should be_false
75
+ end
76
+ end
77
+
67
78
  describe "state" do
68
79
  it "allows binding reads to the master" do
69
80
  @adapter.bind_to_master
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dm-master-slave-adapter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-01 00:00:00.000000000Z
12
+ date: 2012-01-18 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &10139680 !ruby/object:Gem::Requirement
16
+ requirement: &8743180 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *10139680
24
+ version_requirements: *8743180
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: dm-core
27
- requirement: &10138720 !ruby/object:Gem::Requirement
27
+ requirement: &8742060 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *10138720
35
+ version_requirements: *8742060
36
36
  description: ! " Provides the ability to use DataMapper in an environment where\n
37
37
  \ database replication draws the need for using separate connections\n for
38
38
  reading and writing data.\n\n This adapter simply wraps two other \"real\" DataMapper
@@ -83,3 +83,4 @@ signing_key:
83
83
  specification_version: 3
84
84
  summary: Master/Slave Adapter for DataMapper
85
85
  test_files: []
86
+ has_rdoc: