capistrano-mysqldump 1.0.8 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/capistrano-mysqldump.gemspec +55 -0
- data/lib/capistrano/mysqldump.rb +4 -4
- metadata +61 -73
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0
|
1
|
+
1.1.0
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = "capistrano-mysqldump"
|
8
|
+
s.version = "1.1.0"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Alex Farrill"]
|
12
|
+
s.date = "2013-06-01"
|
13
|
+
s.description = ""
|
14
|
+
s.email = "alex.farrill@gmail.com"
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE.txt",
|
17
|
+
"README"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
"Gemfile",
|
21
|
+
"Gemfile.lock",
|
22
|
+
"LICENSE.txt",
|
23
|
+
"README",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"capistrano-mysqldump.gemspec",
|
27
|
+
"lib/capistrano/mysqldump.rb",
|
28
|
+
"test/helper.rb",
|
29
|
+
"test/test_capistrano-mysqldump.rb"
|
30
|
+
]
|
31
|
+
s.homepage = "http://github.com/alexfarrill/capistrano-mysqldump"
|
32
|
+
s.licenses = ["MIT"]
|
33
|
+
s.require_paths = ["lib"]
|
34
|
+
s.rubygems_version = "1.8.25"
|
35
|
+
s.summary = "Capistrano extension to run mysqldump remotely, download, and import into your local Rails development database"
|
36
|
+
|
37
|
+
if s.respond_to? :specification_version then
|
38
|
+
s.specification_version = 3
|
39
|
+
|
40
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
41
|
+
s.add_runtime_dependency(%q<capistrano>, [">= 1.0.0"])
|
42
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
43
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.4"])
|
44
|
+
else
|
45
|
+
s.add_dependency(%q<capistrano>, [">= 1.0.0"])
|
46
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
47
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
48
|
+
end
|
49
|
+
else
|
50
|
+
s.add_dependency(%q<capistrano>, [">= 1.0.0"])
|
51
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
52
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.4"])
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
data/lib/capistrano/mysqldump.rb
CHANGED
@@ -13,7 +13,7 @@ Capistrano::Configuration.instance.load do
|
|
13
13
|
set :mysqldump_bin, "/usr/local/mysql/bin/mysqldump" unless exists?(:mysqldump_bin)
|
14
14
|
set :mysqldump_remote_tmp_dir, "/tmp" unless exists?(:mysqldump_remote_tmp_dir)
|
15
15
|
set :mysqldump_local_tmp_dir, "/tmp" unless exists?(:mysqldump_local_tmp_dir)
|
16
|
-
set :mysqldump_location, host && host.
|
16
|
+
set :mysqldump_location, host && !host.empty? && host != "localhost" ? :local : :remote unless exists?(:mysqldump_location)
|
17
17
|
|
18
18
|
# for convenience
|
19
19
|
set :mysqldump_filename, "%s-%s.sql" % [application, Time.now.to_i]
|
@@ -28,7 +28,7 @@ Capistrano::Configuration.instance.load do
|
|
28
28
|
username, password, database, host = mysqldump_config.values_at *%w( username password database host )
|
29
29
|
|
30
30
|
mysqldump_cmd = "%s --quick --single-transaction" % mysqldump_bin
|
31
|
-
mysqldump_cmd += " -h #{host}" if host && host.
|
31
|
+
mysqldump_cmd += " -h #{host}" if host && !host.empty?
|
32
32
|
|
33
33
|
case mysqldump_location
|
34
34
|
when :remote
|
@@ -45,7 +45,7 @@ Capistrano::Configuration.instance.load do
|
|
45
45
|
`gunzip #{mysqldump_local_filename_gz}`
|
46
46
|
when :local
|
47
47
|
mysqldump_cmd += " -u %s" % username
|
48
|
-
mysqldump_cmd += " -p#{password}" if password && password.
|
48
|
+
mysqldump_cmd += " -p#{password}" if password && !password.empty?
|
49
49
|
mysqldump_cmd += " %s > %s" % [ database, mysqldump_local_filename]
|
50
50
|
|
51
51
|
`#{mysqldump_cmd}`
|
@@ -57,7 +57,7 @@ Capistrano::Configuration.instance.load do
|
|
57
57
|
username, password, database = config.values_at *%w( username password database )
|
58
58
|
|
59
59
|
mysql_cmd = "mysql -u#{username}"
|
60
|
-
mysql_cmd += " -p#{password}" if password && password.
|
60
|
+
mysql_cmd += " -p#{password}" if password && !password.empty?
|
61
61
|
`#{mysql_cmd} -e "drop database #{database}; create database #{database}"`
|
62
62
|
`#{mysql_cmd} #{database} < #{mysqldump_local_filename}`
|
63
63
|
`rm #{mysqldump_local_filename}`
|
metadata
CHANGED
@@ -1,121 +1,109 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-mysqldump
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 8
|
10
|
-
version: 1.0.8
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Alex Farrill
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
12
|
+
date: 2013-06-01 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: capistrano
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 1.0.0
|
21
22
|
type: :runtime
|
22
23
|
prerelease: false
|
23
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
24
25
|
none: false
|
25
|
-
requirements:
|
26
|
-
- -
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 1.0.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: bundler
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ~>
|
36
|
+
- !ruby/object:Gem::Version
|
33
37
|
version: 1.0.0
|
34
|
-
version_requirements: *id001
|
35
|
-
name: capistrano
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
38
|
type: :development
|
38
39
|
prerelease: false
|
39
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
41
|
none: false
|
41
|
-
requirements:
|
42
|
+
requirements:
|
42
43
|
- - ~>
|
43
|
-
- !ruby/object:Gem::Version
|
44
|
-
hash: 23
|
45
|
-
segments:
|
46
|
-
- 1
|
47
|
-
- 0
|
48
|
-
- 0
|
44
|
+
- !ruby/object:Gem::Version
|
49
45
|
version: 1.0.0
|
50
|
-
|
51
|
-
name:
|
52
|
-
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: jeweler
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - ~>
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 1.6.4
|
53
54
|
type: :development
|
54
55
|
prerelease: false
|
55
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
56
57
|
none: false
|
57
|
-
requirements:
|
58
|
+
requirements:
|
58
59
|
- - ~>
|
59
|
-
- !ruby/object:Gem::Version
|
60
|
-
hash: 7
|
61
|
-
segments:
|
62
|
-
- 1
|
63
|
-
- 6
|
64
|
-
- 4
|
60
|
+
- !ruby/object:Gem::Version
|
65
61
|
version: 1.6.4
|
66
|
-
|
67
|
-
name: jeweler
|
68
|
-
description: ""
|
62
|
+
description: ''
|
69
63
|
email: alex.farrill@gmail.com
|
70
64
|
executables: []
|
71
|
-
|
72
65
|
extensions: []
|
73
|
-
|
74
|
-
extra_rdoc_files:
|
66
|
+
extra_rdoc_files:
|
75
67
|
- LICENSE.txt
|
76
68
|
- README
|
77
|
-
files:
|
69
|
+
files:
|
78
70
|
- Gemfile
|
79
71
|
- Gemfile.lock
|
80
72
|
- LICENSE.txt
|
81
73
|
- README
|
82
74
|
- Rakefile
|
83
75
|
- VERSION
|
76
|
+
- capistrano-mysqldump.gemspec
|
84
77
|
- lib/capistrano/mysqldump.rb
|
85
78
|
- test/helper.rb
|
86
79
|
- test/test_capistrano-mysqldump.rb
|
87
80
|
homepage: http://github.com/alexfarrill/capistrano-mysqldump
|
88
|
-
licenses:
|
81
|
+
licenses:
|
89
82
|
- MIT
|
90
83
|
post_install_message:
|
91
84
|
rdoc_options: []
|
92
|
-
|
93
|
-
require_paths:
|
85
|
+
require_paths:
|
94
86
|
- lib
|
95
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
87
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
96
88
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
|
101
|
-
segments:
|
89
|
+
requirements:
|
90
|
+
- - ! '>='
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
segments:
|
102
94
|
- 0
|
103
|
-
|
104
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
95
|
+
hash: 665240339890504472
|
96
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
97
|
none: false
|
106
|
-
requirements:
|
107
|
-
- -
|
108
|
-
- !ruby/object:Gem::Version
|
109
|
-
|
110
|
-
segments:
|
111
|
-
- 0
|
112
|
-
version: "0"
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: '0'
|
113
102
|
requirements: []
|
114
|
-
|
115
103
|
rubyforge_project:
|
116
|
-
rubygems_version: 1.8.
|
104
|
+
rubygems_version: 1.8.25
|
117
105
|
signing_key:
|
118
106
|
specification_version: 3
|
119
|
-
summary: Capistrano extension to run mysqldump remotely, download, and import into
|
107
|
+
summary: Capistrano extension to run mysqldump remotely, download, and import into
|
108
|
+
your local Rails development database
|
120
109
|
test_files: []
|
121
|
-
|