capistrano-shortcuts 0.7.0 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 069f3f05499903ac48decabe44d43bbb6139920e
4
- data.tar.gz: 1333bdaee1fcdbca80e2c793bdd536f9d2a0360c
3
+ metadata.gz: 28ffa91db5353ef11d5c177b27e57ab9bf2aba2f
4
+ data.tar.gz: 885a333577df021845ed8ff8b85b9e975766c4ed
5
5
  SHA512:
6
- metadata.gz: 2db7a27dd14a4d08fb6bfc9654ec8c2ddda3b51342f556864c88ba553dfa79c8ca48f8dc9caf805e4a194609cf078b39e1cddd8eb09b34fa82d4eb83088c49e8
7
- data.tar.gz: 07e6463ea9d45919fca6dc0a17359f1729ed283ebae2a06ba14eb9674aacbd33d90cb5d341a37c2c7750e0a40ab372c1d9d6cc3b40dc12e7b174bf091310d126
6
+ metadata.gz: 3f2334c5ebd7192281a1ae1bc19676ea02dd4f4c56e961f621d42035db16c56cbc49f34c408fbd9d2140bb1a3cada8e104fe806054d0ff2796b7c36b1da9097f
7
+ data.tar.gz: 990748390290f0ed99e2bd7f13d9fb1414ae68916aaa91f406da2c301411f4c2027ee7605d575d7282591e1fa9a14cb9544f43ebb66d9fa6217fe30684778442
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capistrano-shortcuts (0.7.0)
4
+ capistrano-shortcuts (0.8.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -58,6 +58,7 @@ namespace :db do
58
58
  "set :production_protected, false'"
59
59
  end
60
60
  end
61
+
61
62
  run_locally do
62
63
  if db_config[fetch(:rails_env)]['host'].nil?
63
64
  domain = fetch(:domain)
@@ -103,11 +104,17 @@ namespace :db do
103
104
  end
104
105
 
105
106
  def load_db(config, input_file)
106
- execute("MYSQL_PWD=#{config['password']} " +
107
- "mysql " +
108
- "-u #{config['username']} " +
109
- "#{config['database']} " +
110
- "< #{input_file}")
107
+ command = "MYSQL_PWD=#{config['password']} " +
108
+ "mysql " +
109
+ "-u #{config['username']} "
110
+
111
+ if config['db_host']
112
+ command += "-h #{config['db_host']} "
113
+ end
114
+
115
+ command += "#{config['database']} " +
116
+ "< #{input_file}"
117
+ execute(command)
111
118
  end
112
119
 
113
120
 
@@ -1,5 +1,5 @@
1
1
  module Capistrano
2
2
  module Shortcuts
3
- VERSION = "0.7.0"
3
+ VERSION = "0.8.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capistrano-shortcuts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Todd Gehman
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-17 00:00:00.000000000 Z
11
+ date: 2017-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler