mysql-slaver 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +14 -10
- data/README.md +4 -0
- data/lib/mysql_slaver/exception.rb +4 -0
- data/spec/mysql_slaver/slaver_spec.rb +2 -2
- data/spec/mysql_slaver/status_fetcher_spec.rb +3 -3
- metadata +5 -4
data/Gemfile.lock
CHANGED
@@ -1,27 +1,31 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
columnize (0.
|
4
|
+
columnize (0.8.9)
|
5
5
|
diff-lcs (1.2.5)
|
6
6
|
gem-this (0.3.7)
|
7
7
|
gemcutter (0.7.1)
|
8
8
|
json (1.8.1)
|
9
9
|
linecache (0.46)
|
10
10
|
rbx-require-relative (> 0.0.4)
|
11
|
-
rake (10.3.
|
11
|
+
rake (10.3.2)
|
12
12
|
rbx-require-relative (0.0.9)
|
13
13
|
rdoc (4.1.1)
|
14
14
|
json (~> 1.4)
|
15
15
|
rdoc-data (4.0.1)
|
16
16
|
rdoc (~> 4.0)
|
17
|
-
rspec (
|
18
|
-
rspec-core (~>
|
19
|
-
rspec-expectations (~>
|
20
|
-
rspec-mocks (~>
|
21
|
-
rspec-core (
|
22
|
-
|
23
|
-
|
24
|
-
|
17
|
+
rspec (3.0.0)
|
18
|
+
rspec-core (~> 3.0.0)
|
19
|
+
rspec-expectations (~> 3.0.0)
|
20
|
+
rspec-mocks (~> 3.0.0)
|
21
|
+
rspec-core (3.0.0)
|
22
|
+
rspec-support (~> 3.0.0)
|
23
|
+
rspec-expectations (3.0.0)
|
24
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
25
|
+
rspec-support (~> 3.0.0)
|
26
|
+
rspec-mocks (3.0.0)
|
27
|
+
rspec-support (~> 3.0.0)
|
28
|
+
rspec-support (3.0.0)
|
25
29
|
ruby-debug (0.10.4)
|
26
30
|
columnize (>= 0.1)
|
27
31
|
ruby-debug-base (~> 0.10.4.0)
|
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
Tool to setup a mysql replication slave by copying data and master status from a remote mysql master over ssh.
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/mysql-slaver.svg)](http://badge.fury.io/rb/mysql-slaver)
|
4
|
+
[![Build Status](https://travis-ci.org/digitalronin/mysql-slaver.svg?branch=master)](https://travis-ci.org/digitalronin/mysql-slaver)
|
5
|
+
[![Dependency Status](https://gemnasium.com/digitalronin/mysql-slaver.svg)](https://gemnasium.com/digitalronin/mysql-slaver)
|
6
|
+
|
3
7
|
USAGE
|
4
8
|
|
5
9
|
mysql_slaver help enslave
|
@@ -18,12 +18,12 @@ module MysqlSlaver
|
|
18
18
|
}
|
19
19
|
|
20
20
|
before do
|
21
|
-
slaver.
|
21
|
+
allow(slaver).to receive(:log)
|
22
22
|
end
|
23
23
|
|
24
24
|
context "when status_fetcher fails" do
|
25
25
|
before do
|
26
|
-
status_fetcher.
|
26
|
+
allow(status_fetcher).to receive(:status) { raise Exception.new("fail!") }
|
27
27
|
end
|
28
28
|
|
29
29
|
it "does not try to copy data" do
|
@@ -14,13 +14,13 @@ module MysqlSlaver
|
|
14
14
|
subject(:fetcher) { described_class.new(params) }
|
15
15
|
|
16
16
|
before do
|
17
|
-
fetcher.
|
17
|
+
allow(fetcher).to receive(:log)
|
18
18
|
end
|
19
19
|
|
20
20
|
describe "#status" do
|
21
21
|
context "when ssh connection fails" do
|
22
22
|
before do
|
23
|
-
executor.
|
23
|
+
allow(executor).to receive(:execute)
|
24
24
|
end
|
25
25
|
|
26
26
|
it "raises an error" do
|
@@ -42,7 +42,7 @@ EOF
|
|
42
42
|
}
|
43
43
|
|
44
44
|
before do
|
45
|
-
executor.
|
45
|
+
allow(executor).to receive(:execute).and_return(output)
|
46
46
|
end
|
47
47
|
|
48
48
|
it "executes show master command over ssh" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mysql-slaver
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 12
|
10
|
+
version: 0.1.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Salgado
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2014-
|
18
|
+
date: 2014-06-10 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rspec
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- spec/spec_helper.rb
|
69
69
|
- lib/mysql_slaver/cli.rb
|
70
70
|
- lib/mysql_slaver/db_copier.rb
|
71
|
+
- lib/mysql_slaver/exception.rb
|
71
72
|
- lib/mysql_slaver/executor.rb
|
72
73
|
- lib/mysql_slaver/logger.rb
|
73
74
|
- lib/mysql_slaver/master_changer.rb
|