dkdeploy-core 9.1.0 → 9.2.4
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 +4 -4
- data/.rubocop.yml +3 -1
- data/.travis.yml +2 -1
- data/Berksfile +2 -0
- data/Berksfile.lock +36 -35
- data/CHANGELOG.md +55 -0
- data/CONTRIBUTORS.md +3 -0
- data/Gemfile +2 -0
- data/LICENSE +1 -1
- data/README.md +9 -10
- data/Rakefile +2 -0
- data/Vagrantfile +8 -7
- data/config/vm/cookbooks/dkdeploy-core/metadata.rb +4 -4
- data/config/vm/cookbooks/dkdeploy-core/recipes/default.rb +11 -13
- data/dkdeploy-core.gemspec +10 -8
- data/features/assets.feature +0 -1
- data/features/file_access.feature +2 -2
- data/features/mysql.feature +2 -2
- data/features/support/env.rb +4 -2
- data/features/utils.feature +3 -3
- data/lib/capistrano/dkdeploy/core.rb +14 -17
- data/lib/dkdeploy.rb +2 -0
- data/lib/dkdeploy/constants.rb +2 -0
- data/lib/dkdeploy/core/version.rb +4 -2
- data/lib/dkdeploy/dsl.rb +2 -0
- data/lib/dkdeploy/helpers/assets.rb +2 -0
- data/lib/dkdeploy/helpers/common.rb +2 -0
- data/lib/dkdeploy/helpers/db.rb +7 -5
- data/lib/dkdeploy/helpers/file_system.rb +7 -12
- data/lib/dkdeploy/helpers/mysql.rb +3 -0
- data/lib/dkdeploy/i18n.rb +3 -12
- data/lib/dkdeploy/interaction_handler/mysql.rb +4 -1
- data/lib/dkdeploy/interaction_handler/password.rb +3 -1
- data/lib/dkdeploy/rollback_manager.rb +2 -0
- data/lib/dkdeploy/scm/copy.rake +3 -1
- data/lib/dkdeploy/scm/copy.rb +4 -2
- data/lib/dkdeploy/tasks/apache.rake +2 -0
- data/lib/dkdeploy/tasks/assets.rake +3 -1
- data/lib/dkdeploy/tasks/current_folder.rake +3 -1
- data/lib/dkdeploy/tasks/db.rake +9 -8
- data/lib/dkdeploy/tasks/deploy.rake +3 -0
- data/lib/dkdeploy/tasks/enhanced_symlinks.rake +7 -0
- data/lib/dkdeploy/tasks/fail.rake +2 -0
- data/lib/dkdeploy/tasks/file_access.rake +2 -0
- data/lib/dkdeploy/tasks/maintenance.rake +4 -2
- data/lib/dkdeploy/tasks/mysql.rake +5 -0
- data/lib/dkdeploy/tasks/project_version.rake +3 -3
- data/lib/dkdeploy/tasks/utils.rake +2 -0
- data/spec/fixtures/application/Capfile +2 -0
- data/spec/fixtures/application/Gemfile +3 -1
- data/spec/fixtures/application/config/deploy.rb +4 -0
- data/spec/fixtures/application/config/deploy/dev.rb +3 -1
- data/spec/fixtures/capistrano/configuration/add_output_after_create_symlink.rb +1 -0
- data/spec/fixtures/capistrano/configuration/custom_compass_sources.rb +2 -0
- data/spec/fixtures/capistrano/configuration/custom_file_access.rb +2 -0
- data/spec/fixtures/capistrano/configuration/default_deployment_behaviour.rb +2 -0
- metadata +38 -44
- data/features/bower.feature +0 -52
- data/lib/dkdeploy/tasks/bower.rake +0 -53
- data/spec/fixtures/application/htdocs/bower.json +0 -15
data/features/mysql.feature
CHANGED
@@ -10,14 +10,14 @@ Feature: Test tasks for namespace 'mysql'
|
|
10
10
|
And I successfully run `cap dev "db:update[temp,dkdeploy_core.sql.gz]"`
|
11
11
|
And I successfully run `cap dev db:download_content`
|
12
12
|
And I successfully run `cap dev mysql:download_slow_log`
|
13
|
-
Then a file named "temp/slow-queries.dev.dkdeploy-core.
|
13
|
+
Then a file named "temp/slow-queries.dev.dkdeploy-core.test.log" should exist
|
14
14
|
|
15
15
|
Scenario: Downloading the MYSQL slow log analyze file
|
16
16
|
When I successfully run `cap dev "db:upload_settings[127.0.0.1,3306,dkdeploy_core,root,ilikerandompasswords,utf8]"`
|
17
17
|
And I successfully run `cap dev "db:update[temp,dkdeploy_core.sql.gz]"`
|
18
18
|
And I successfully run `cap dev db:download_content`
|
19
19
|
And I successfully run `cap dev mysql:analyze_download_slow_log`
|
20
|
-
Then a file named "temp/mysql_slow_log_analyze.dev.dkdeploy-core.
|
20
|
+
Then a file named "temp/mysql_slow_log_analyze.dev.dkdeploy-core.test.log" should exist
|
21
21
|
|
22
22
|
Scenario: Clearing the MySQL slow log file
|
23
23
|
When I successfully run `cap dev "db:upload_settings[127.0.0.1,3306,dkdeploy_core,root,ilikerandompasswords,utf8]"`
|
data/features/support/env.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'dkdeploy/test_environment/application'
|
2
4
|
|
3
5
|
ssh_config = {}
|
@@ -11,8 +13,8 @@ unless ssh_key_files.empty?
|
|
11
13
|
}
|
12
14
|
end
|
13
15
|
|
14
|
-
TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('
|
15
|
-
TEST_APPLICATION.mysql_connection_settings = { host: 'dkdeploy-core.
|
16
|
+
TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('../..', __dir__), 'dkdeploy-core.test', ssh_config)
|
17
|
+
TEST_APPLICATION.mysql_connection_settings = { host: 'dkdeploy-core.test', username: 'root', password: 'ilikerandompasswords' }
|
16
18
|
|
17
19
|
# this configuration tricks Bundler into executing another Bundler project with clean enviroment
|
18
20
|
# The official way via Bundler.with_clean_env did not work properly here
|
data/features/utils.feature
CHANGED
@@ -28,10 +28,10 @@ Feature: Test tasks for namespace 'utils'
|
|
28
28
|
Remote file content
|
29
29
|
"""
|
30
30
|
When I successfully run `cap dev utils:download_file['download_file.txt']`
|
31
|
-
Then a file named "temp/download_file.dkdeploy-core.
|
31
|
+
Then a file named "temp/download_file.dkdeploy-core.test.txt" should exist
|
32
32
|
|
33
33
|
Scenario: Download a file from server which does exist locally
|
34
|
-
Given a file named "temp/download_file.dkdeploy-core.
|
34
|
+
Given a file named "temp/download_file.dkdeploy-core.test.txt" with:
|
35
35
|
"""
|
36
36
|
Local file content
|
37
37
|
"""
|
@@ -41,7 +41,7 @@ Local file content
|
|
41
41
|
Remote file content
|
42
42
|
"""
|
43
43
|
When I successfully run `cap dev utils:download_file['download_file.txt']`
|
44
|
-
Then the file "temp/download_file.dkdeploy-core.
|
44
|
+
Then the file "temp/download_file.dkdeploy-core.test.txt" should contain exactly:
|
45
45
|
"""
|
46
46
|
Remote file content
|
47
47
|
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
include Capistrano::DSL
|
2
4
|
|
3
5
|
require 'dkdeploy/rollback_manager'
|
@@ -7,19 +9,18 @@ require 'dkdeploy/scm/copy'
|
|
7
9
|
install_plugin Dkdeploy::SCM::Copy
|
8
10
|
|
9
11
|
# Load dkdeploy tasks
|
10
|
-
load File.expand_path('
|
11
|
-
load File.expand_path('
|
12
|
-
load File.expand_path('
|
13
|
-
load File.expand_path('
|
14
|
-
load File.expand_path('
|
15
|
-
load File.expand_path('
|
16
|
-
load File.expand_path('
|
17
|
-
load File.expand_path('
|
18
|
-
load File.expand_path('
|
19
|
-
load File.expand_path('
|
20
|
-
load File.expand_path('
|
21
|
-
load File.expand_path('
|
22
|
-
load File.expand_path('../../../dkdeploy/tasks/mysql.rake', __FILE__)
|
12
|
+
load File.expand_path('../../dkdeploy/tasks/deploy.rake', __dir__)
|
13
|
+
load File.expand_path('../../dkdeploy/tasks/fail.rake', __dir__)
|
14
|
+
load File.expand_path('../../dkdeploy/tasks/maintenance.rake', __dir__)
|
15
|
+
load File.expand_path('../../dkdeploy/tasks/utils.rake', __dir__)
|
16
|
+
load File.expand_path('../../dkdeploy/tasks/file_access.rake', __dir__)
|
17
|
+
load File.expand_path('../../dkdeploy/tasks/assets.rake', __dir__)
|
18
|
+
load File.expand_path('../../dkdeploy/tasks/apache.rake', __dir__)
|
19
|
+
load File.expand_path('../../dkdeploy/tasks/project_version.rake', __dir__)
|
20
|
+
load File.expand_path('../../dkdeploy/tasks/db.rake', __dir__)
|
21
|
+
load File.expand_path('../../dkdeploy/tasks/enhanced_symlinks.rake', __dir__)
|
22
|
+
load File.expand_path('../../dkdeploy/tasks/current_folder.rake', __dir__)
|
23
|
+
load File.expand_path('../../dkdeploy/tasks/mysql.rake', __dir__)
|
23
24
|
|
24
25
|
# Hook into symlink related tasks
|
25
26
|
after 'deploy:check:linked_dirs', 'deploy:enhanced_symlinks:check:linked_dirs'
|
@@ -56,10 +57,6 @@ namespace :load do
|
|
56
57
|
# Number of archives to keep around
|
57
58
|
set :keep_rollback_archives, 5
|
58
59
|
|
59
|
-
# List of bower.json files
|
60
|
-
set(:bower_path, -> { fetch(:copy_source) })
|
61
|
-
set(:bower_paths, -> { Array(fetch(:copy_source)) })
|
62
|
-
|
63
60
|
# List of filters for file_access:set_selected_custom_access
|
64
61
|
set :selected_custom_file_access, []
|
65
62
|
|
data/lib/dkdeploy.rb
CHANGED
data/lib/dkdeploy/constants.rb
CHANGED
data/lib/dkdeploy/dsl.rb
CHANGED
data/lib/dkdeploy/helpers/db.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'yaml'
|
2
4
|
|
3
5
|
include Capistrano::DSL
|
@@ -7,7 +9,7 @@ module Dkdeploy
|
|
7
9
|
# DB related helpers
|
8
10
|
module DB
|
9
11
|
def db_dump_file(infix = '')
|
10
|
-
date =
|
12
|
+
date = Time.now.strftime(datetime_format)
|
11
13
|
['database', fetch(:stage), infix, date].join('-') << '.sql'
|
12
14
|
end
|
13
15
|
|
@@ -22,12 +24,12 @@ module Dkdeploy
|
|
22
24
|
def db_settings_hash
|
23
25
|
{
|
24
26
|
'database' => {
|
25
|
-
'host'
|
26
|
-
'port'
|
27
|
-
'name'
|
27
|
+
'host' => fetch(:db_host),
|
28
|
+
'port' => fetch(:db_port),
|
29
|
+
'name' => fetch(:db_name),
|
28
30
|
'username' => fetch(:db_username),
|
29
31
|
'password' => fetch(:db_password),
|
30
|
-
'charset'
|
32
|
+
'charset' => fetch(:db_charset)
|
31
33
|
}
|
32
34
|
}
|
33
35
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
include Capistrano::DSL
|
2
4
|
|
3
5
|
module Dkdeploy
|
@@ -22,9 +24,8 @@ module Dkdeploy
|
|
22
24
|
# @param path [String] path to resolve
|
23
25
|
# @return [String]
|
24
26
|
def resolve_path_if_symlink(context, path)
|
25
|
-
if context.test " [ -L #{path} ] "
|
26
|
-
|
27
|
-
end
|
27
|
+
return context.capture :readlink, '-f', path if context.test " [ -L #{path} ] "
|
28
|
+
|
28
29
|
path
|
29
30
|
end
|
30
31
|
|
@@ -57,19 +58,13 @@ module Dkdeploy
|
|
57
58
|
resolved_path = resolve_path_if_symlink(context, path)
|
58
59
|
|
59
60
|
# change owner if set
|
60
|
-
if access_properties.key?(:owner)
|
61
|
-
context.execute :chown, recursive, access_properties.fetch(:owner), resolved_path
|
62
|
-
end
|
61
|
+
context.execute :chown, recursive, access_properties.fetch(:owner), resolved_path if access_properties.key?(:owner)
|
63
62
|
|
64
63
|
# change group if set
|
65
|
-
if access_properties.key?(:group)
|
66
|
-
context.execute :chgrp, recursive, access_properties.fetch(:group), resolved_path
|
67
|
-
end
|
64
|
+
context.execute :chgrp, recursive, access_properties.fetch(:group), resolved_path if access_properties.key?(:group)
|
68
65
|
|
69
66
|
# change mode if set
|
70
|
-
if access_properties.key?(:mode)
|
71
|
-
context.execute :chmod, recursive, access_properties.fetch(:mode), resolved_path
|
72
|
-
end
|
67
|
+
context.execute :chmod, recursive, access_properties.fetch(:mode), resolved_path if access_properties.key?(:mode)
|
73
68
|
end
|
74
69
|
end
|
75
70
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
include Capistrano::DSL
|
2
4
|
|
3
5
|
module Dkdeploy
|
@@ -9,6 +11,7 @@ module Dkdeploy
|
|
9
11
|
# @return [Boolean]
|
10
12
|
def slow_log_exists?(file_path)
|
11
13
|
return true if !file_path.empty? && test("[ -f #{file_path} ]")
|
14
|
+
|
12
15
|
error I18n.t('file.not_exists_or_not_accessible_on_host', file: file_path, host: server, scope: :dkdeploy)
|
13
16
|
false
|
14
17
|
end
|
data/lib/dkdeploy/i18n.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'i18n'
|
2
4
|
|
3
5
|
en = {
|
@@ -42,11 +44,6 @@ en = {
|
|
42
44
|
charset: 'Please enter the database character set',
|
43
45
|
zipped_db_file: 'Please enter the name of the zipped SQL script file'
|
44
46
|
},
|
45
|
-
bower: {
|
46
|
-
command: 'Please enter the command you want to run',
|
47
|
-
path: 'Please enter the path to the bower.json file',
|
48
|
-
paths: 'Please enter the paths bower.json files (separated by spaces)'
|
49
|
-
},
|
50
47
|
selected_custom_file_access: {
|
51
48
|
paths: 'Please enter a list of paths (entries separated by spaces)'
|
52
49
|
},
|
@@ -94,10 +91,6 @@ en = {
|
|
94
91
|
upload_extract: 'Extracting %{file}',
|
95
92
|
exclude_file_not_found: "No exclude file found. To use set variable 'assets_exclude_file'"
|
96
93
|
},
|
97
|
-
bower: {
|
98
|
-
skipping_missing_directory: 'Skipping directory %{bower_path} because it does not exist.',
|
99
|
-
skipping_directory_with_missing_bower_file: 'Skipping directory %{bower_path} because it does not contain a bower.json file.'
|
100
|
-
},
|
101
94
|
copy: {
|
102
95
|
archive: {
|
103
96
|
generate: 'Generating the tar archive.',
|
@@ -144,6 +137,4 @@ capistrano_i18n_overwritten = {
|
|
144
137
|
I18n.backend.store_translations(:en, dkdeploy: en)
|
145
138
|
I18n.backend.store_translations(:en, capistrano: capistrano_i18n_overwritten)
|
146
139
|
|
147
|
-
if I18n.respond_to?(:enforce_available_locales=)
|
148
|
-
I18n.enforce_available_locales = true
|
149
|
-
end
|
140
|
+
I18n.enforce_available_locales = true if I18n.respond_to?(:enforce_available_locales=)
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Dkdeploy
|
2
4
|
module InteractionHandler
|
3
5
|
# Interaction handler for mysql
|
@@ -26,8 +28,9 @@ module Dkdeploy
|
|
26
28
|
else
|
27
29
|
@mysql_error_seen = true if data =~ /.*ERROR.*/i
|
28
30
|
return raise 'Unexpected data from stream. Can not send password to undefined stream' unless @mysql_error_seen
|
31
|
+
|
29
32
|
# combine the multiple lines from error message. The fact that the error message will be shown multiple times is simply ignored
|
30
|
-
@return_message
|
33
|
+
@return_message += data
|
31
34
|
message = 'Error on executing MySQL command! Response (error code) is: '
|
32
35
|
SSHKit.config.output.send(:error, "#{message}\n #{@return_message}")
|
33
36
|
raise 'InteractionHandler caught a MySQL error'
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
module Dkdeploy
|
2
4
|
module InteractionHandler
|
3
5
|
# Interaction handler for password
|
@@ -20,7 +22,7 @@ module Dkdeploy
|
|
20
22
|
channel.send_data("#{@password}\n")
|
21
23
|
else
|
22
24
|
channel.close
|
23
|
-
raise 'Unexpected data from stream. Can not send password to undefined stream'
|
25
|
+
raise 'Unexpected data from stream. Can not send password to undefined stream.'
|
24
26
|
end
|
25
27
|
end
|
26
28
|
end
|
data/lib/dkdeploy/scm/copy.rake
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
namespace :copy do
|
2
4
|
desc 'Check if all configuration variables and copy sources exist'
|
3
5
|
task :check do
|
@@ -62,7 +64,7 @@ namespace :copy do
|
|
62
64
|
# removes the remote temp path including the uploaded archive
|
63
65
|
on release_roles :all do
|
64
66
|
info I18n.t('file.remove', path: remote_archive_path, scope: :dkdeploy)
|
65
|
-
execute :rm, '-rf',
|
67
|
+
execute :rm, '-rf', remote_archive_path
|
66
68
|
end
|
67
69
|
end
|
68
70
|
|
data/lib/dkdeploy/scm/copy.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'tmpdir'
|
2
4
|
require 'capistrano/scm/plugin'
|
3
5
|
require 'capistrano/i18n'
|
@@ -25,7 +27,7 @@ module Dkdeploy
|
|
25
27
|
'Thumbs.db',
|
26
28
|
'composer.lock'
|
27
29
|
]
|
28
|
-
set_if_empty :copy_archive_filename, -> {
|
30
|
+
set_if_empty :copy_archive_filename, -> { [fetch(:application), rand(0x100000000).to_s(36)].join('_') + '.tar.gz' }
|
29
31
|
set_if_empty :copy_local_tmp_dir, Dir.mktmpdir
|
30
32
|
end
|
31
33
|
|
@@ -38,7 +40,7 @@ module Dkdeploy
|
|
38
40
|
def define_tasks
|
39
41
|
# Don not use method "eval_rakefile" to load rake tasks.
|
40
42
|
# "eval_rakefile" defined wrong context and use sskit dsl api instead of capistrano dsl.
|
41
|
-
load File.expand_path('
|
43
|
+
load File.expand_path('copy.rake', __dir__)
|
42
44
|
end
|
43
45
|
end
|
44
46
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'i18n'
|
2
4
|
require 'dkdeploy/i18n'
|
3
5
|
require 'dkdeploy/helpers/common'
|
@@ -44,7 +46,7 @@ namespace :assets do
|
|
44
46
|
on release_roles :web do
|
45
47
|
info I18n.t('directory.create', scope: :dkdeploy)
|
46
48
|
execute :mkdir, '-p', shared_path
|
47
|
-
execute :htpasswd, '-c', htpasswd_path, username, interaction_handler:
|
49
|
+
execute :htpasswd, '-c', htpasswd_path, username, interaction_handler: { /.*password.*/i => "#{password}\n" }
|
48
50
|
info I18n.t('tasks.assets.add_htpasswd.successfully_created', scope: :dkdeploy)
|
49
51
|
end
|
50
52
|
end
|
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
include Capistrano::DSL
|
2
4
|
|
3
5
|
require 'dkdeploy/i18n'
|
@@ -6,7 +8,7 @@ namespace :current_folder do
|
|
6
8
|
desc "Delete current folder unless it's a symlink"
|
7
9
|
task :remove_unlesss_symlinked do
|
8
10
|
on release_roles :all do
|
9
|
-
if test "[
|
11
|
+
if test "[ -d #{current_path} ] && [ ! -L #{current_path} ]"
|
10
12
|
execute :rm, '-rf', current_path
|
11
13
|
else
|
12
14
|
info I18n.t('info.ignoring_current_folder', scope: :dkdeploy)
|
data/lib/dkdeploy/tasks/db.rake
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'dkdeploy/constants'
|
2
4
|
require 'dkdeploy/helpers/common'
|
3
5
|
require 'dkdeploy/helpers/db'
|
@@ -115,7 +117,7 @@ namespace :db do
|
|
115
117
|
execute :rm, '-f', remote_dump_file
|
116
118
|
execute :rm, '-f', remote_zipped_dump_file
|
117
119
|
execute :mysqldump,
|
118
|
-
'--no-data', '--skip-set-charset',
|
120
|
+
'--no-data', '--skip-set-charset', '--no-tablespaces',
|
119
121
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
120
122
|
'-u', db_settings.fetch('username'),
|
121
123
|
'-p',
|
@@ -144,12 +146,13 @@ namespace :db do
|
|
144
146
|
execute :rm, '-f', remote_zipped_dump_file
|
145
147
|
|
146
148
|
ignore_tables_command_line = ignore_tables.inject('') do |command_line, table|
|
147
|
-
command_line
|
149
|
+
command_line + " --ignore-table=#{db_settings.fetch('name')}.#{table}"
|
148
150
|
end
|
149
151
|
|
150
152
|
execute :mysqldump,
|
151
153
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
152
154
|
'--skip-set-charset',
|
155
|
+
'--no-tablespaces',
|
153
156
|
'-u', db_settings.fetch('username'),
|
154
157
|
'-p',
|
155
158
|
'-h', db_settings.fetch('host'), '-P', db_settings.fetch('port'), ignore_tables_command_line, db_settings.fetch('name'),
|
@@ -179,7 +182,7 @@ namespace :db do
|
|
179
182
|
execute :rm, '-f', remote_dump_file
|
180
183
|
execute :rm, '-f', remote_zipped_dump_file
|
181
184
|
execute :mysqldump,
|
182
|
-
'--no-data', '--skip-set-charset',
|
185
|
+
'--no-data', '--skip-set-charset', '--no-tablespaces',
|
183
186
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
184
187
|
'-u', db_settings.fetch('username'),
|
185
188
|
'-p',
|
@@ -214,7 +217,7 @@ namespace :db do
|
|
214
217
|
execute :rm, '-f', remote_file_name
|
215
218
|
execute :rm, '-f', remote_zipped_file
|
216
219
|
execute :mysqldump,
|
217
|
-
'--no-data', '--skip-set-charset',
|
220
|
+
'--no-data', '--skip-set-charset', '--no-tablespaces',
|
218
221
|
'--no-create-info', '--skip-comments',
|
219
222
|
'--skip-extended-insert', '--skip-set-charset',
|
220
223
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
@@ -313,7 +316,7 @@ namespace :db do
|
|
313
316
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
314
317
|
'--no-create-info', '--skip-comments',
|
315
318
|
'--skip-extended-insert', '--skip-set-charset',
|
316
|
-
'--complete-insert',
|
319
|
+
'--complete-insert', '--no-tablespaces',
|
317
320
|
'-u', db_settings.fetch('username'),
|
318
321
|
'-p',
|
319
322
|
'-h', db_settings.fetch('host'), '-P', db_settings.fetch('port'),
|
@@ -363,9 +366,7 @@ namespace :db do
|
|
363
366
|
|
364
367
|
remote_md5 = '' # to allow assignment in block and later comparison
|
365
368
|
on primary :backend do
|
366
|
-
if test("[ -f #{remote_dump_md5_file} ]")
|
367
|
-
remote_md5 = capture("cat #{remote_dump_md5_file}")
|
368
|
-
end
|
369
|
+
remote_md5 = capture("cat #{remote_dump_md5_file}") if test("[ -f #{remote_dump_md5_file} ]")
|
369
370
|
end
|
370
371
|
|
371
372
|
run_locally do
|