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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 40014035ddcb6105c9dc3ab7d20888fcb73674e5
4
- data.tar.gz: 8617b2718e3613fd9a0471cde24d6832ab4920f9
2
+ SHA256:
3
+ metadata.gz: 852849262d405071cf41ae71899a802b961486a5033b28c15468997aef0a3518
4
+ data.tar.gz: 8d91b33215d8698ae096afb266576becee218cff05110501c17f52e88b5c7552
5
5
  SHA512:
6
- metadata.gz: 4b161500a9ed971d2e260c2113523020c43992fde6bcc29986dcac2986673a6777e26032b449647303d24f12020c194a2202132ea1b2ee28d01d84b707703859
7
- data.tar.gz: d5c0d0b1cf9be2a85ebb099c5edd465ac6f4732ba96f3b652e2fb319f31cb4b5f4bb7013e972907467b4c0d84e6f30a28812b0b8255b7176c825df96b3934c1e
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))
@@ -1,5 +1,5 @@
1
1
  module Koine
2
2
  module DbBkp
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
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.2
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: 2018-02-02 00:00:00.000000000 Z
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.14
143
+ rubygems_version: 2.7.6
144
144
  signing_key:
145
145
  specification_version: 4
146
146
  summary: Database backup for rails