dumpdb 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -2
- data/Gemfile +3 -3
- data/{LICENSE → LICENSE.txt} +1 -1
- data/README.md +14 -14
- data/Rakefile +1 -8
- data/dumpdb.gemspec +10 -8
- data/lib/dumpdb/db.rb +0 -2
- data/lib/dumpdb/settings.rb +1 -0
- data/lib/dumpdb/version.rb +1 -1
- data/lib/dumpdb.rb +1 -1
- data/log/.gitkeep +0 -0
- data/test/helper.rb +8 -5
- data/test/support/test_scripts.rb +2 -2
- data/test/{db_tests.rb → unit/db_tests.rb} +2 -2
- data/test/{runner_tests.rb → unit/runner_tests.rb} +1 -1
- data/test/{script_tests.rb → unit/script_tests.rb} +2 -0
- data/test/{settings_tests.rb → unit/settings_tests.rb} +2 -2
- data/tmp/.gitkeep +0 -0
- metadata +28 -27
- data/test/irb.rb +0 -9
data/.gitignore
CHANGED
data/Gemfile
CHANGED
data/{LICENSE → LICENSE.txt}
RENAMED
data/README.md
CHANGED
@@ -2,20 +2,6 @@
|
|
2
2
|
|
3
3
|
Dump and restore your databases.
|
4
4
|
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'dumpdb'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install dumpdb
|
18
|
-
|
19
5
|
## Usage
|
20
6
|
|
21
7
|
```ruby
|
@@ -254,6 +240,20 @@ end
|
|
254
240
|
|
255
241
|
See `examples/` dir. (TODO)
|
256
242
|
|
243
|
+
## Installation
|
244
|
+
|
245
|
+
Add this line to your application's Gemfile:
|
246
|
+
|
247
|
+
gem 'dumpdb'
|
248
|
+
|
249
|
+
And then execute:
|
250
|
+
|
251
|
+
$ bundle
|
252
|
+
|
253
|
+
Or install it yourself as:
|
254
|
+
|
255
|
+
$ gem install dumpdb
|
256
|
+
|
257
257
|
## Contributing
|
258
258
|
|
259
259
|
1. Fork it
|
data/Rakefile
CHANGED
data/dumpdb.gemspec
CHANGED
@@ -1,22 +1,24 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "dumpdb/version"
|
3
5
|
|
4
6
|
Gem::Specification.new do |gem|
|
5
7
|
gem.name = "dumpdb"
|
6
8
|
gem.version = Dumpdb::VERSION
|
7
|
-
gem.description = %q{Dump and restore your databases.}
|
8
|
-
gem.summary = %q{Dump and restore your databases.}
|
9
|
-
|
10
9
|
gem.authors = ["Kelly Redding", "Collin Redding"]
|
11
10
|
gem.email = ["kelly@kellyredding.com", "collin.redding@me.com"]
|
11
|
+
gem.description = %q{Dump and restore your databases.}
|
12
|
+
gem.summary = %q{Dump and restore your databases.}
|
12
13
|
gem.homepage = "http://github.com/redding/dumpdb"
|
13
14
|
|
14
|
-
gem.files = `git ls-files`.split(
|
15
|
-
gem.
|
16
|
-
gem.
|
15
|
+
gem.files = `git ls-files`.split($/)
|
16
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
17
18
|
gem.require_paths = ["lib"]
|
18
19
|
|
19
|
-
gem.
|
20
|
+
gem.add_dependency("assert", ["~> 2.0"])
|
21
|
+
|
20
22
|
gem.add_dependency("scmd", ["~> 2.0"])
|
21
23
|
gem.add_dependency("ns-options", ["~> 1.1", ">= 1.1.1"])
|
22
24
|
end
|
data/lib/dumpdb/db.rb
CHANGED
data/lib/dumpdb/settings.rb
CHANGED
data/lib/dumpdb/version.rb
CHANGED
data/lib/dumpdb.rb
CHANGED
data/log/.gitkeep
ADDED
File without changes
|
data/test/helper.rb
CHANGED
@@ -1,7 +1,10 @@
|
|
1
|
-
# this file is automatically required
|
2
|
-
# put test helpers here
|
1
|
+
# this file is automatically required when you run `assert`
|
2
|
+
# put any test helpers here
|
3
3
|
|
4
|
-
# add root dir to the load path
|
5
|
-
|
4
|
+
# add the root dir to the load path
|
5
|
+
ROOT_PATH = File.expand_path("../..", __FILE__)
|
6
|
+
$LOAD_PATH.unshift(ROOT_PATH)
|
7
|
+
|
8
|
+
# require pry for debugging (`binding.pry`)
|
9
|
+
require 'pry'
|
6
10
|
|
7
|
-
require 'test/support/test_scripts'
|
@@ -3,7 +3,7 @@ require 'dumpdb'
|
|
3
3
|
class LocalScript
|
4
4
|
include Dumpdb
|
5
5
|
|
6
|
-
databases { 'test/support/database.yaml' }
|
6
|
+
databases { File.join(ROOT_PATH, 'test/support/database.yaml') }
|
7
7
|
dump_file { "dump.#{type}" }
|
8
8
|
source { db('development', :another => 'value') }
|
9
9
|
target { db('test') }
|
@@ -15,7 +15,7 @@ class RemoteScript
|
|
15
15
|
include Dumpdb
|
16
16
|
|
17
17
|
ssh { 'user@example.com' }
|
18
|
-
databases { 'test/support/database.yaml' }
|
18
|
+
databases { File.join(ROOT_PATH, 'test/support/database.yaml') }
|
19
19
|
dump_file { "dump.#{type}" }
|
20
20
|
source { db('development') }
|
21
21
|
target { db('test') }
|
@@ -1,12 +1,12 @@
|
|
1
1
|
require 'assert'
|
2
|
-
require '
|
2
|
+
require 'dumpdb/db'
|
3
3
|
|
4
4
|
module Dumpdb
|
5
5
|
|
6
6
|
class DbTests < Assert::Context
|
7
7
|
desc "the Db helper class"
|
8
8
|
setup do
|
9
|
-
@db = Db.new(nil)
|
9
|
+
@db = Db.new(nil)
|
10
10
|
end
|
11
11
|
subject { @db }
|
12
12
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'assert'
|
2
|
-
|
2
|
+
require 'test/support/test_scripts'
|
3
3
|
require 'dumpdb/settings'
|
4
4
|
|
5
5
|
module Dumpdb
|
@@ -57,7 +57,7 @@ module Dumpdb
|
|
57
57
|
end
|
58
58
|
|
59
59
|
should "come from a yaml file" do
|
60
|
-
databases = Settings::Databases.new('test/support/test.yaml')
|
60
|
+
databases = Settings::Databases.new(File.join(ROOT_PATH, 'test/support/test.yaml'))
|
61
61
|
assert_equal({
|
62
62
|
'db-one' => {'db' => 1},
|
63
63
|
'db-two' => {'db' => 2},
|
data/tmp/.gitkeep
ADDED
File without changes
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dumpdb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|
@@ -16,25 +16,27 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date:
|
19
|
+
date: 2013-03-25 00:00:00 Z
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
22
|
name: assert
|
23
|
-
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
26
|
requirements:
|
26
|
-
- -
|
27
|
+
- - ~>
|
27
28
|
- !ruby/object:Gem::Version
|
28
29
|
hash: 3
|
29
30
|
segments:
|
31
|
+
- 2
|
30
32
|
- 0
|
31
|
-
version: "0"
|
32
|
-
type: :
|
33
|
-
|
34
|
-
prerelease: false
|
33
|
+
version: "2.0"
|
34
|
+
type: :runtime
|
35
|
+
version_requirements: *id001
|
35
36
|
- !ruby/object:Gem::Dependency
|
36
37
|
name: scmd
|
37
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
40
|
none: false
|
39
41
|
requirements:
|
40
42
|
- - ~>
|
@@ -45,11 +47,11 @@ dependencies:
|
|
45
47
|
- 0
|
46
48
|
version: "2.0"
|
47
49
|
type: :runtime
|
48
|
-
|
49
|
-
prerelease: false
|
50
|
+
version_requirements: *id002
|
50
51
|
- !ruby/object:Gem::Dependency
|
51
52
|
name: ns-options
|
52
|
-
|
53
|
+
prerelease: false
|
54
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
53
55
|
none: false
|
54
56
|
requirements:
|
55
57
|
- - ~>
|
@@ -68,8 +70,7 @@ dependencies:
|
|
68
70
|
- 1
|
69
71
|
version: 1.1.1
|
70
72
|
type: :runtime
|
71
|
-
|
72
|
-
prerelease: false
|
73
|
+
version_requirements: *id003
|
73
74
|
description: Dump and restore your databases.
|
74
75
|
email:
|
75
76
|
- kelly@kellyredding.com
|
@@ -83,7 +84,7 @@ extra_rdoc_files: []
|
|
83
84
|
files:
|
84
85
|
- .gitignore
|
85
86
|
- Gemfile
|
86
|
-
- LICENSE
|
87
|
+
- LICENSE.txt
|
87
88
|
- README.md
|
88
89
|
- Rakefile
|
89
90
|
- dumpdb.gemspec
|
@@ -92,16 +93,17 @@ files:
|
|
92
93
|
- lib/dumpdb/runner.rb
|
93
94
|
- lib/dumpdb/settings.rb
|
94
95
|
- lib/dumpdb/version.rb
|
95
|
-
-
|
96
|
+
- log/.gitkeep
|
96
97
|
- test/helper.rb
|
97
|
-
- test/irb.rb
|
98
|
-
- test/runner_tests.rb
|
99
|
-
- test/script_tests.rb
|
100
|
-
- test/settings_tests.rb
|
101
98
|
- test/support/database.yaml
|
102
99
|
- test/support/fake_cmd_runner.rb
|
103
100
|
- test/support/test.yaml
|
104
101
|
- test/support/test_scripts.rb
|
102
|
+
- test/unit/db_tests.rb
|
103
|
+
- test/unit/runner_tests.rb
|
104
|
+
- test/unit/script_tests.rb
|
105
|
+
- test/unit/settings_tests.rb
|
106
|
+
- tmp/.gitkeep
|
105
107
|
homepage: http://github.com/redding/dumpdb
|
106
108
|
licenses: []
|
107
109
|
|
@@ -136,13 +138,12 @@ signing_key:
|
|
136
138
|
specification_version: 3
|
137
139
|
summary: Dump and restore your databases.
|
138
140
|
test_files:
|
139
|
-
- test/db_tests.rb
|
140
141
|
- test/helper.rb
|
141
|
-
- test/irb.rb
|
142
|
-
- test/runner_tests.rb
|
143
|
-
- test/script_tests.rb
|
144
|
-
- test/settings_tests.rb
|
145
142
|
- test/support/database.yaml
|
146
143
|
- test/support/fake_cmd_runner.rb
|
147
144
|
- test/support/test.yaml
|
148
145
|
- test/support/test_scripts.rb
|
146
|
+
- test/unit/db_tests.rb
|
147
|
+
- test/unit/runner_tests.rb
|
148
|
+
- test/unit/script_tests.rb
|
149
|
+
- test/unit/settings_tests.rb
|