koine-db_bkp 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/koine/db_bkp/mysql/dump.rb +7 -3
- data/lib/koine/db_bkp/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 852849262d405071cf41ae71899a802b961486a5033b28c15468997aef0a3518
|
4
|
+
data.tar.gz: 8d91b33215d8698ae096afb266576becee218cff05110501c17f52e88b5c7552
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ac61f6eedd486103f8d7ec3bc544261e4fda8b4b5a4dc90fc3d804bd1a85cf8a80f372402a1c0598ebf874a6132dff8966ae4e7fd97a5699adf0e813a83fc205
|
7
|
+
data.tar.gz: c6795b115045cfc825d966b7ea410d89243912b8ff015237f50bb839cdd272faca06be7dfb7302d5739a138ca47b260f4ed081bc4745bdbdca3f522ae247045a
|
@@ -17,9 +17,9 @@ module Koine
|
|
17
17
|
def to_sql_file(file)
|
18
18
|
parts = ['mysqldump']
|
19
19
|
|
20
|
-
parts.push("-h #{@hostname}") if @hostname
|
21
|
-
parts.push("-u #{@username}") if @username
|
22
|
-
parts.push("-p#{@password}") if @password
|
20
|
+
parts.push("-h #{escape(@hostname)}") if @hostname
|
21
|
+
parts.push("-u #{escape(@username)}") if @username
|
22
|
+
parts.push("-p#{escape(@password)}") if @password
|
23
23
|
|
24
24
|
parts.push(@database)
|
25
25
|
|
@@ -31,6 +31,10 @@ module Koine
|
|
31
31
|
|
32
32
|
private
|
33
33
|
|
34
|
+
def escape(string)
|
35
|
+
Shellwords.escape(string)
|
36
|
+
end
|
37
|
+
|
34
38
|
def normalize_config(config)
|
35
39
|
config = config.reject { |_k, v| ['', nil].include?(v) }
|
36
40
|
merge_url(symbolize_keys(config))
|
data/lib/koine/db_bkp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: koine-db_bkp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcelo Jacobus
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: addressable
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.6
|
143
|
+
rubygems_version: 2.7.6
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: Database backup for rails
|