dkdeploy-core 9.1.1 → 9.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.travis.yml +1 -0
- data/Berksfile.lock +36 -35
- data/CHANGELOG.md +15 -17
- data/CONTRIBUTORS.md +3 -0
- data/LICENSE +1 -1
- data/README.md +9 -10
- data/Vagrantfile +7 -6
- 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 +7 -7
- data/features/assets.feature +0 -1
- data/features/file_access.feature +2 -2
- data/features/mysql.feature +2 -2
- data/features/support/env.rb +2 -2
- data/features/utils.feature +3 -3
- data/lib/capistrano/dkdeploy/core.rb +12 -17
- data/lib/dkdeploy/core/version.rb +1 -1
- data/lib/dkdeploy/helpers/db.rb +5 -5
- data/lib/dkdeploy/helpers/file_system.rb +5 -12
- data/lib/dkdeploy/helpers/mysql.rb +1 -0
- data/lib/dkdeploy/i18n.rb +1 -12
- data/lib/dkdeploy/interaction_handler/mysql.rb +1 -0
- data/lib/dkdeploy/interaction_handler/password.rb +1 -1
- data/lib/dkdeploy/scm/copy.rb +2 -2
- data/lib/dkdeploy/tasks/current_folder.rake +1 -1
- data/lib/dkdeploy/tasks/db.rake +5 -8
- data/lib/dkdeploy/tasks/deploy.rake +1 -0
- data/lib/dkdeploy/tasks/enhanced_symlinks.rake +5 -0
- data/lib/dkdeploy/tasks/maintenance.rake +2 -2
- data/lib/dkdeploy/tasks/mysql.rake +3 -0
- data/lib/dkdeploy/tasks/project_version.rake +1 -3
- data/spec/fixtures/application/Gemfile +1 -1
- data/spec/fixtures/application/config/deploy/dev.rb +1 -1
- data/spec/fixtures/capistrano/configuration/add_output_after_create_symlink.rb +0 -1
- metadata +38 -42
- data/features/bower.feature +0 -52
- data/lib/dkdeploy/tasks/bower.rake +0 -53
- data/spec/fixtures/application/htdocs/bower.json +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7cc314cd065dd6f41c21eae17ef5bfd1f71c68d9b59baaedebb47d0056b08b62
|
4
|
+
data.tar.gz: 3103ff9b91275de71bd3e3d389ed8929cb77bdab8abbc62cb17d7b4190391c26
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 76f64a7f35a6666116b06c7357271bfa79b2be9f6f3d9016f01140fd401f18db25a33ea6aec3ed7325d8d133538d98eaf5eebba6573e06b6df2493e8d98354b5
|
7
|
+
data.tar.gz: 6d660867553159fb1ca6dc534c8d28e0c81eaaf09848dc3603b4d69ff05acc3daf9cc1a7dc59da3e821f0a1d3daef8876d0705ea2fda740d75862cc187874c7f
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/Berksfile.lock
CHANGED
@@ -3,44 +3,45 @@ DEPENDENCIES
|
|
3
3
|
path: config/vm/cookbooks/dkdeploy-core
|
4
4
|
|
5
5
|
GRAPH
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
chef_handler (1.3.0)
|
13
|
-
database (4.0.9)
|
6
|
+
apt (7.0.0)
|
7
|
+
build-essential (8.1.1)
|
8
|
+
mingw (>= 1.1)
|
9
|
+
seven_zip (>= 0.0.0)
|
10
|
+
compat_resource (12.19.1)
|
11
|
+
database (6.1.1)
|
14
12
|
postgresql (>= 1.0.0)
|
15
13
|
dkdeploy-core (1.0.0)
|
16
|
-
apt (~> 2.9)
|
17
|
-
database (~> 4.0)
|
18
|
-
mysql (~> 6.0)
|
19
|
-
mysql2_chef_gem (~> 1.0)
|
20
|
-
mariadb (0.3.1)
|
21
14
|
apt (>= 0.0.0)
|
15
|
+
database (>= 0.0.0)
|
16
|
+
mysql (>= 0.0.0)
|
17
|
+
mysql2_chef_gem (>= 0.0.0)
|
18
|
+
inifile_chef_gem (0.1.0)
|
19
|
+
build-essential (>= 0.0.0)
|
20
|
+
mariadb (1.5.3)
|
21
|
+
apt (>= 0.0.0)
|
22
|
+
build-essential (>= 0.0.0)
|
23
|
+
selinux_policy (~> 2.0)
|
22
24
|
yum (>= 0.0.0)
|
23
25
|
yum-epel (>= 0.0.0)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
yum-scl (>= 0.0.0)
|
27
|
+
mingw (2.0.2)
|
28
|
+
seven_zip (>= 0.0.0)
|
29
|
+
mysql (8.5.1)
|
30
|
+
mysql2_chef_gem (2.1.0)
|
31
|
+
build-essential (>= 2.4.0)
|
29
32
|
mariadb (>= 0.0.0)
|
30
|
-
mysql (
|
31
|
-
openssl (
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
yum (
|
43
|
-
|
44
|
-
yum (
|
45
|
-
yum-mysql-community (0.1.21)
|
46
|
-
yum (>= 3.2)
|
33
|
+
mysql (>= 8.2.0)
|
34
|
+
openssl (8.1.2)
|
35
|
+
postgresql (6.1.4)
|
36
|
+
build-essential (>= 2.0.0)
|
37
|
+
compat_resource (>= 12.16.3)
|
38
|
+
openssl (>= 4.0)
|
39
|
+
selinux_policy (2.1.0)
|
40
|
+
seven_zip (2.0.2)
|
41
|
+
windows (>= 1.2.2)
|
42
|
+
windows (4.2.2)
|
43
|
+
yum (5.1.0)
|
44
|
+
yum-epel (3.1.0)
|
45
|
+
yum-scl (0.2.0)
|
46
|
+
inifile_chef_gem (>= 0.0.0)
|
47
|
+
yum (>= 0.0.0)
|
data/CHANGELOG.md
CHANGED
@@ -2,24 +2,28 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
-
## [9.
|
5
|
+
## [9.2.1] - 2019-12-06
|
6
6
|
### Summary
|
7
7
|
|
8
|
-
-
|
8
|
+
- removed loading of pry
|
9
9
|
|
10
|
-
## [9.
|
10
|
+
## [9.2.0] - 2019-12-06 [YANKED]
|
11
11
|
### Summary
|
12
12
|
|
13
|
-
-
|
14
|
-
-
|
15
|
-
-
|
13
|
+
- supports Ruby 2.5
|
14
|
+
- removes Bower support
|
15
|
+
- moved test infrastructure to Ubuntu Xenial
|
16
|
+
- we no longer remove maintenance_config_file_path forcefully to make failures more apparent
|
17
|
+
- improved shell independence
|
16
18
|
|
17
|
-
## [9.0
|
19
|
+
## [9.1.0] - 2018-02-09
|
18
20
|
### Summary
|
19
21
|
|
20
|
-
-
|
22
|
+
- Use correct capistrano context at copy scm
|
23
|
+
- Update capistrano 3.10.1
|
24
|
+
- Always execute tasks for each server or at rollback
|
21
25
|
|
22
|
-
## [9.0.0]
|
26
|
+
## [9.0.0] 2017-10-16
|
23
27
|
### Summary
|
24
28
|
|
25
29
|
- tasks around MySQL slow log
|
@@ -39,11 +43,6 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
39
43
|
- remove TYPO3 specific configuration
|
40
44
|
- change some SCM roles from app to all
|
41
45
|
|
42
|
-
## [8.0.2] - 2020-08-21
|
43
|
-
### Summary
|
44
|
-
|
45
|
-
- use --no-tablespaces with mysqldump
|
46
|
-
|
47
46
|
## [8.0.1] - 2017-05-15
|
48
47
|
### Summary
|
49
48
|
|
@@ -55,10 +54,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
55
54
|
- first public release
|
56
55
|
|
57
56
|
[Unreleased]: https://github.com/dkdeploy/dkdeploy-core/compare/master...develop
|
58
|
-
[9.
|
57
|
+
[9.2.1]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.2.1
|
58
|
+
[9.2.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.2.0
|
59
59
|
[9.1.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.1.0
|
60
|
-
[9.0.1]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.0.1
|
61
60
|
[9.0.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.0.0
|
62
|
-
[8.0.2]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v8.0.2
|
63
61
|
[8.0.1]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v8.0.1
|
64
62
|
[8.0.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v8.0.0
|
data/CONTRIBUTORS.md
CHANGED
@@ -7,11 +7,14 @@ The dkdeploy core maintainers would like to recognize following contributors (in
|
|
7
7
|
- Sascha Egerer
|
8
8
|
- Christoph Gerold
|
9
9
|
- Johannes Goslar
|
10
|
+
- Kai Harder
|
10
11
|
- Kieran Hayes
|
11
12
|
- Wilfried Irßlinger
|
12
13
|
- Thomas Jahnke
|
14
|
+
- Hannes Leutloff
|
13
15
|
- Gleb Levitin
|
14
16
|
- Luka Lüdicke
|
17
|
+
- Minh-Thien Nhan
|
15
18
|
- Nicolai Reuschling
|
16
19
|
- Lars Tode
|
17
20
|
- Timo Webler
|
data/LICENSE
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2014-
|
1
|
+
Copyright (c) 2014-2018 dkd Internet Service GmbH, Frankfurt am Main (Germany), https://dkd.de/
|
2
2
|
|
3
3
|
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
4
|
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ This Rubygem `dkdeploy-core` represents the extension of [Capistrano](http://cap
|
|
13
13
|
|
14
14
|
Add this line to your application's `Gemfile`
|
15
15
|
|
16
|
-
gem 'dkdeploy-core', '~> 9.
|
16
|
+
gem 'dkdeploy-core', '~> 9.2'
|
17
17
|
|
18
18
|
and then execute
|
19
19
|
|
@@ -68,7 +68,7 @@ rvm (v1.29.x) with installed Ruby 2.2.
|
|
68
68
|
|
69
69
|
Add the virtual box alias to your `hosts` file
|
70
70
|
|
71
|
-
192.168.156.180 dkdeploy-core.
|
71
|
+
192.168.156.180 dkdeploy-core.test
|
72
72
|
|
73
73
|
### Running tests
|
74
74
|
|
@@ -81,11 +81,10 @@ Add the virtual box alias to your `hosts` file
|
|
81
81
|
1. Install [git flow](https://github.com/nvie/gitflow)
|
82
82
|
2. Install [Homebrew](http://brew.sh/) and run `brew install mysql`
|
83
83
|
3. Install [NodeJS](https://nodejs.org) (supported: v0.12.7) via `brew install nodejs`
|
84
|
-
4.
|
85
|
-
5.
|
86
|
-
6.
|
87
|
-
7.
|
88
|
-
8.
|
89
|
-
9.
|
90
|
-
10.
|
91
|
-
11. Commit your changes (`git commit -am 'Add some feature'`)
|
84
|
+
4. If project is not checked out already do git clone `git@github.com:dkdeploy/dkdeploy-core.git`
|
85
|
+
5. Checkout origin develop branch (`git checkout --track -b develop origin/develop`)
|
86
|
+
6. Git flow initialze `git flow init -d`
|
87
|
+
7. Installing gems `bundle install`
|
88
|
+
8. Create new feature branch (`git flow feature start my-new-feature`)
|
89
|
+
9. Run tests (README.md Testing)
|
90
|
+
10. Commit your changes (`git commit -am 'Add some feature'`)
|
data/Vagrantfile
CHANGED
@@ -5,15 +5,15 @@ unless Vagrant.has_plugin?('vagrant-berkshelf')
|
|
5
5
|
abort
|
6
6
|
end
|
7
7
|
|
8
|
-
Vagrant.require_version '~> 2.0
|
9
|
-
chef_version = '12.9.41'
|
8
|
+
Vagrant.require_version '~> 2.0'
|
10
9
|
|
11
10
|
Vagrant.configure(2) do |config|
|
12
|
-
|
11
|
+
chef_version = '13.6.4'
|
12
|
+
domain = 'dkdeploy-core.test'
|
13
13
|
ip_address = '192.168.156.180'
|
14
14
|
|
15
15
|
# Search boxes at https://atlas.hashicorp.com/search.
|
16
|
-
config.vm.box = 'ubuntu
|
16
|
+
config.vm.box = 'bento/ubuntu-16.04'
|
17
17
|
config.vm.box_check_update = false
|
18
18
|
config.berkshelf.enabled = true
|
19
19
|
|
@@ -25,7 +25,7 @@ Vagrant.configure(2) do |config|
|
|
25
25
|
chef.install = true
|
26
26
|
chef.channel = 'stable'
|
27
27
|
chef.version = chef_version
|
28
|
-
chef.log_level = :
|
28
|
+
chef.log_level = :warn
|
29
29
|
chef.add_recipe 'dkdeploy-core'
|
30
30
|
end
|
31
31
|
|
@@ -37,7 +37,8 @@ Vagrant.configure(2) do |config|
|
|
37
37
|
'modifyvm', :id,
|
38
38
|
'--natdnsproxy1', 'off',
|
39
39
|
'--natdnshostresolver1', 'on',
|
40
|
-
'--memory', '1024'
|
40
|
+
'--memory', '1024',
|
41
|
+
'--audio', 'none'
|
41
42
|
]
|
42
43
|
end
|
43
44
|
end
|
@@ -4,7 +4,7 @@ license 'MIT'
|
|
4
4
|
description 'Project cookbook'
|
5
5
|
version '1.0.0'
|
6
6
|
|
7
|
-
depends 'mysql'
|
8
|
-
depends '
|
9
|
-
depends '
|
10
|
-
depends 'apt'
|
7
|
+
depends 'mysql'
|
8
|
+
depends 'database'
|
9
|
+
depends 'mysql2_chef_gem'
|
10
|
+
depends 'apt'
|
@@ -19,17 +19,16 @@ end
|
|
19
19
|
|
20
20
|
mysql_service 'default' do
|
21
21
|
port '3306'
|
22
|
-
# Need for remote connection
|
23
|
-
|
24
|
-
action [:create, :start]
|
22
|
+
bind_address '0.0.0.0' # Need for remote connection
|
23
|
+
initial_root_password 'ilikerandompasswords'
|
25
24
|
run_group 'vagrant'
|
26
25
|
run_user 'vagrant'
|
26
|
+
action [:create, :start]
|
27
27
|
end
|
28
28
|
|
29
29
|
mysql_config 'default' do
|
30
30
|
instance 'default' # necessary in some cases, causes hanging on provisioning https://github.com/chef-cookbooks/mysql/issues/387
|
31
|
-
# use different user to allow capistrano access to log file
|
32
|
-
owner 'vagrant'
|
31
|
+
owner 'vagrant' # use different user to allow capistrano access to log file
|
33
32
|
group 'vagrant'
|
34
33
|
source 'my_extra_settings.erb'
|
35
34
|
notifies :restart, 'mysql_service[default]'
|
@@ -41,23 +40,22 @@ mysql2_chef_gem 'default' do
|
|
41
40
|
end
|
42
41
|
|
43
42
|
mysql_connection_info = {
|
44
|
-
:
|
45
|
-
:
|
46
|
-
:
|
43
|
+
host: '127.0.0.1',
|
44
|
+
username: 'root',
|
45
|
+
password: 'ilikerandompasswords'
|
47
46
|
}
|
48
47
|
|
49
48
|
mysql_database 'dkdeploy_core' do
|
50
49
|
connection mysql_connection_info
|
51
|
-
action
|
50
|
+
action :create
|
52
51
|
end
|
53
52
|
|
54
53
|
mysql_database_user 'root' do
|
55
54
|
connection mysql_connection_info
|
56
|
-
host
|
57
|
-
password
|
58
|
-
action :create
|
55
|
+
host '%'
|
56
|
+
password 'ilikerandompasswords'
|
59
57
|
privileges [:all]
|
60
|
-
action
|
58
|
+
action [:create, :grant]
|
61
59
|
end
|
62
60
|
|
63
61
|
directory '/var/www' do
|
data/dkdeploy-core.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
lib = File.expand_path('
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
2
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
3
|
require 'dkdeploy/core/version'
|
4
4
|
|
@@ -18,16 +18,16 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
|
+
spec.add_development_dependency 'aruba', '~> 0.14.1'
|
21
22
|
spec.add_development_dependency 'bundler'
|
22
|
-
spec.add_development_dependency 'rake'
|
23
|
-
spec.add_development_dependency 'rspec', '~> 3.5'
|
24
23
|
spec.add_development_dependency 'cucumber', '~> 2.4'
|
25
|
-
spec.add_development_dependency '
|
26
|
-
spec.add_development_dependency 'aruba', '~> 0.14.1'
|
24
|
+
spec.add_development_dependency 'dkdeploy-test_environment', '~> 2.0'
|
27
25
|
spec.add_development_dependency 'mysql2', '~> 0.3'
|
28
26
|
spec.add_development_dependency 'pry', '~> 0.10'
|
29
|
-
spec.add_development_dependency '
|
27
|
+
spec.add_development_dependency 'rake'
|
28
|
+
spec.add_development_dependency 'rspec', '~> 3.5'
|
29
|
+
spec.add_development_dependency 'rubocop', '~> 0.60.0'
|
30
30
|
|
31
|
-
spec.add_dependency 'capistrano', '~> 3.
|
31
|
+
spec.add_dependency 'capistrano', '~> 3.11.0'
|
32
32
|
spec.add_dependency 'highline', '~> 1.7.1'
|
33
33
|
end
|
data/features/assets.feature
CHANGED
@@ -37,7 +37,6 @@ Feature: Test tasks for namespace 'assets'
|
|
37
37
|
And I run `cap dev assets:add_htpasswd` interactively
|
38
38
|
And I type "dkd_test_user"
|
39
39
|
And I type "dkd_test_password"
|
40
|
-
And I close the stdin stream
|
41
40
|
Then the exit status should be 0
|
42
41
|
And a remote file named "shared_path/.htpasswd" should exist
|
43
42
|
|
@@ -87,7 +87,7 @@ Feature: Test tasks for namespace 'file_permissions'
|
|
87
87
|
Given I extend the development capistrano configuration variable custom_file_access with value {app: {release_path: {catalog: {mode: 'u+rwx,g+rwx,o-wx'}, not_existing: {mode: 'u+rwx,g+rwx,o-wx'}}}}
|
88
88
|
And a remote directory named "releases_path/not_existing" should not exist
|
89
89
|
When I successfully run `cap dev file_access:set_custom_access`
|
90
|
-
Then the output should contain "The resource /var/www/dkdeploy/current/not_existing does not exist on host dkdeploy-core.
|
90
|
+
Then the output should contain "The resource /var/www/dkdeploy/current/not_existing does not exist on host dkdeploy-core.test"
|
91
91
|
And the output should not contain "sudo chmod u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/not_existing"
|
92
92
|
And the output should contain "sudo chmod u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/catalog"
|
93
93
|
|
@@ -115,6 +115,6 @@ Feature: Test tasks for namespace 'file_permissions'
|
|
115
115
|
And I extend the development capistrano configuration variable selected_custom_file_access with value [:not_existing, :catalog]
|
116
116
|
And a remote directory named "releases_path/not_existing" should not exist
|
117
117
|
When I successfully run `cap dev file_access:set_selected_custom_access`
|
118
|
-
Then the output should contain "The resource /var/www/dkdeploy/current/not_existing does not exist on host dkdeploy-core.
|
118
|
+
Then the output should contain "The resource /var/www/dkdeploy/current/not_existing does not exist on host dkdeploy-core.test"
|
119
119
|
And the output should not contain "sudo chmod -R u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/not_existing"
|
120
120
|
And the output should contain "sudo chmod -R u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/catalog"
|
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
@@ -11,8 +11,8 @@ unless ssh_key_files.empty?
|
|
11
11
|
}
|
12
12
|
end
|
13
13
|
|
14
|
-
TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('
|
15
|
-
TEST_APPLICATION.mysql_connection_settings = { host: 'dkdeploy-core.
|
14
|
+
TEST_APPLICATION = Dkdeploy::TestEnvironment::Application.new(File.expand_path('../..', __dir__), 'dkdeploy-core.test', ssh_config)
|
15
|
+
TEST_APPLICATION.mysql_connection_settings = { host: 'dkdeploy-core.test', username: 'root', password: 'ilikerandompasswords' }
|
16
16
|
|
17
17
|
# this configuration tricks Bundler into executing another Bundler project with clean enviroment
|
18
18
|
# 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
|
|
@@ -7,19 +7,18 @@ require 'dkdeploy/scm/copy'
|
|
7
7
|
install_plugin Dkdeploy::SCM::Copy
|
8
8
|
|
9
9
|
# 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__)
|
10
|
+
load File.expand_path('../../dkdeploy/tasks/deploy.rake', __dir__)
|
11
|
+
load File.expand_path('../../dkdeploy/tasks/fail.rake', __dir__)
|
12
|
+
load File.expand_path('../../dkdeploy/tasks/maintenance.rake', __dir__)
|
13
|
+
load File.expand_path('../../dkdeploy/tasks/utils.rake', __dir__)
|
14
|
+
load File.expand_path('../../dkdeploy/tasks/file_access.rake', __dir__)
|
15
|
+
load File.expand_path('../../dkdeploy/tasks/assets.rake', __dir__)
|
16
|
+
load File.expand_path('../../dkdeploy/tasks/apache.rake', __dir__)
|
17
|
+
load File.expand_path('../../dkdeploy/tasks/project_version.rake', __dir__)
|
18
|
+
load File.expand_path('../../dkdeploy/tasks/db.rake', __dir__)
|
19
|
+
load File.expand_path('../../dkdeploy/tasks/enhanced_symlinks.rake', __dir__)
|
20
|
+
load File.expand_path('../../dkdeploy/tasks/current_folder.rake', __dir__)
|
21
|
+
load File.expand_path('../../dkdeploy/tasks/mysql.rake', __dir__)
|
23
22
|
|
24
23
|
# Hook into symlink related tasks
|
25
24
|
after 'deploy:check:linked_dirs', 'deploy:enhanced_symlinks:check:linked_dirs'
|
@@ -56,10 +55,6 @@ namespace :load do
|
|
56
55
|
# Number of archives to keep around
|
57
56
|
set :keep_rollback_archives, 5
|
58
57
|
|
59
|
-
# List of bower.json files
|
60
|
-
set(:bower_path, -> { fetch(:copy_source) })
|
61
|
-
set(:bower_paths, -> { Array(fetch(:copy_source)) })
|
62
|
-
|
63
58
|
# List of filters for file_access:set_selected_custom_access
|
64
59
|
set :selected_custom_file_access, []
|
65
60
|
|
data/lib/dkdeploy/helpers/db.rb
CHANGED
@@ -7,7 +7,7 @@ module Dkdeploy
|
|
7
7
|
# DB related helpers
|
8
8
|
module DB
|
9
9
|
def db_dump_file(infix = '')
|
10
|
-
date =
|
10
|
+
date = Time.now.strftime(datetime_format)
|
11
11
|
['database', fetch(:stage), infix, date].join('-') << '.sql'
|
12
12
|
end
|
13
13
|
|
@@ -22,12 +22,12 @@ module Dkdeploy
|
|
22
22
|
def db_settings_hash
|
23
23
|
{
|
24
24
|
'database' => {
|
25
|
-
'host'
|
26
|
-
'port'
|
27
|
-
'name'
|
25
|
+
'host' => fetch(:db_host),
|
26
|
+
'port' => fetch(:db_port),
|
27
|
+
'name' => fetch(:db_name),
|
28
28
|
'username' => fetch(:db_username),
|
29
29
|
'password' => fetch(:db_password),
|
30
|
-
'charset'
|
30
|
+
'charset' => fetch(:db_charset)
|
31
31
|
}
|
32
32
|
}
|
33
33
|
end
|
@@ -22,9 +22,8 @@ module Dkdeploy
|
|
22
22
|
# @param path [String] path to resolve
|
23
23
|
# @return [String]
|
24
24
|
def resolve_path_if_symlink(context, path)
|
25
|
-
if context.test " [ -L #{path} ] "
|
26
|
-
|
27
|
-
end
|
25
|
+
return context.capture :readlink, '-f', path if context.test " [ -L #{path} ] "
|
26
|
+
|
28
27
|
path
|
29
28
|
end
|
30
29
|
|
@@ -57,19 +56,13 @@ module Dkdeploy
|
|
57
56
|
resolved_path = resolve_path_if_symlink(context, path)
|
58
57
|
|
59
58
|
# change owner if set
|
60
|
-
if access_properties.key?(:owner)
|
61
|
-
context.execute :chown, recursive, access_properties.fetch(:owner), resolved_path
|
62
|
-
end
|
59
|
+
context.execute :chown, recursive, access_properties.fetch(:owner), resolved_path if access_properties.key?(:owner)
|
63
60
|
|
64
61
|
# change group if set
|
65
|
-
if access_properties.key?(:group)
|
66
|
-
context.execute :chgrp, recursive, access_properties.fetch(:group), resolved_path
|
67
|
-
end
|
62
|
+
context.execute :chgrp, recursive, access_properties.fetch(:group), resolved_path if access_properties.key?(:group)
|
68
63
|
|
69
64
|
# change mode if set
|
70
|
-
if access_properties.key?(:mode)
|
71
|
-
context.execute :chmod, recursive, access_properties.fetch(:mode), resolved_path
|
72
|
-
end
|
65
|
+
context.execute :chmod, recursive, access_properties.fetch(:mode), resolved_path if access_properties.key?(:mode)
|
73
66
|
end
|
74
67
|
end
|
75
68
|
end
|
@@ -9,6 +9,7 @@ module Dkdeploy
|
|
9
9
|
# @return [Boolean]
|
10
10
|
def slow_log_exists?(file_path)
|
11
11
|
return true if !file_path.empty? && test("[ -f #{file_path} ]")
|
12
|
+
|
12
13
|
error I18n.t('file.not_exists_or_not_accessible_on_host', file: file_path, host: server, scope: :dkdeploy)
|
13
14
|
false
|
14
15
|
end
|
data/lib/dkdeploy/i18n.rb
CHANGED
@@ -42,11 +42,6 @@ en = {
|
|
42
42
|
charset: 'Please enter the database character set',
|
43
43
|
zipped_db_file: 'Please enter the name of the zipped SQL script file'
|
44
44
|
},
|
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
45
|
selected_custom_file_access: {
|
51
46
|
paths: 'Please enter a list of paths (entries separated by spaces)'
|
52
47
|
},
|
@@ -94,10 +89,6 @@ en = {
|
|
94
89
|
upload_extract: 'Extracting %{file}',
|
95
90
|
exclude_file_not_found: "No exclude file found. To use set variable 'assets_exclude_file'"
|
96
91
|
},
|
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
92
|
copy: {
|
102
93
|
archive: {
|
103
94
|
generate: 'Generating the tar archive.',
|
@@ -144,6 +135,4 @@ capistrano_i18n_overwritten = {
|
|
144
135
|
I18n.backend.store_translations(:en, dkdeploy: en)
|
145
136
|
I18n.backend.store_translations(:en, capistrano: capistrano_i18n_overwritten)
|
146
137
|
|
147
|
-
if I18n.respond_to?(:enforce_available_locales=)
|
148
|
-
I18n.enforce_available_locales = true
|
149
|
-
end
|
138
|
+
I18n.enforce_available_locales = true if I18n.respond_to?(:enforce_available_locales=)
|
@@ -26,6 +26,7 @@ module Dkdeploy
|
|
26
26
|
else
|
27
27
|
@mysql_error_seen = true if data =~ /.*ERROR.*/i
|
28
28
|
return raise 'Unexpected data from stream. Can not send password to undefined stream' unless @mysql_error_seen
|
29
|
+
|
29
30
|
# combine the multiple lines from error message. The fact that the error message will be shown multiple times is simply ignored
|
30
31
|
@return_message << data
|
31
32
|
message = 'Error on executing MySQL command! Response (error code) is: '
|
@@ -20,7 +20,7 @@ module Dkdeploy
|
|
20
20
|
channel.send_data("#{@password}\n")
|
21
21
|
else
|
22
22
|
channel.close
|
23
|
-
raise 'Unexpected data from stream. Can not send password to undefined stream'
|
23
|
+
raise 'Unexpected data from stream. Can not send password to undefined stream.'
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
data/lib/dkdeploy/scm/copy.rb
CHANGED
@@ -25,7 +25,7 @@ module Dkdeploy
|
|
25
25
|
'Thumbs.db',
|
26
26
|
'composer.lock'
|
27
27
|
]
|
28
|
-
set_if_empty :copy_archive_filename, -> {
|
28
|
+
set_if_empty :copy_archive_filename, -> { [fetch(:application), rand(0x100000000).to_s(36)].join('_') + '.tar.gz' }
|
29
29
|
set_if_empty :copy_local_tmp_dir, Dir.mktmpdir
|
30
30
|
end
|
31
31
|
|
@@ -38,7 +38,7 @@ module Dkdeploy
|
|
38
38
|
def define_tasks
|
39
39
|
# Don not use method "eval_rakefile" to load rake tasks.
|
40
40
|
# "eval_rakefile" defined wrong context and use sskit dsl api instead of capistrano dsl.
|
41
|
-
load File.expand_path('
|
41
|
+
load File.expand_path('copy.rake', __dir__)
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -6,7 +6,7 @@ namespace :current_folder do
|
|
6
6
|
desc "Delete current folder unless it's a symlink"
|
7
7
|
task :remove_unlesss_symlinked do
|
8
8
|
on release_roles :all do
|
9
|
-
if test "[
|
9
|
+
if test "[ -d #{current_path} && ! -L #{current_path} ]"
|
10
10
|
execute :rm, '-rf', current_path
|
11
11
|
else
|
12
12
|
info I18n.t('info.ignoring_current_folder', scope: :dkdeploy)
|
data/lib/dkdeploy/tasks/db.rake
CHANGED
@@ -115,7 +115,7 @@ namespace :db do
|
|
115
115
|
execute :rm, '-f', remote_dump_file
|
116
116
|
execute :rm, '-f', remote_zipped_dump_file
|
117
117
|
execute :mysqldump,
|
118
|
-
'--no-data', '--skip-set-charset',
|
118
|
+
'--no-data', '--skip-set-charset',
|
119
119
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
120
120
|
'-u', db_settings.fetch('username'),
|
121
121
|
'-p',
|
@@ -150,7 +150,6 @@ namespace :db do
|
|
150
150
|
execute :mysqldump,
|
151
151
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
152
152
|
'--skip-set-charset',
|
153
|
-
'--no-tablespaces',
|
154
153
|
'-u', db_settings.fetch('username'),
|
155
154
|
'-p',
|
156
155
|
'-h', db_settings.fetch('host'), '-P', db_settings.fetch('port'), ignore_tables_command_line, db_settings.fetch('name'),
|
@@ -180,7 +179,7 @@ namespace :db do
|
|
180
179
|
execute :rm, '-f', remote_dump_file
|
181
180
|
execute :rm, '-f', remote_zipped_dump_file
|
182
181
|
execute :mysqldump,
|
183
|
-
'--no-data', '--skip-set-charset',
|
182
|
+
'--no-data', '--skip-set-charset',
|
184
183
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
185
184
|
'-u', db_settings.fetch('username'),
|
186
185
|
'-p',
|
@@ -215,7 +214,7 @@ namespace :db do
|
|
215
214
|
execute :rm, '-f', remote_file_name
|
216
215
|
execute :rm, '-f', remote_zipped_file
|
217
216
|
execute :mysqldump,
|
218
|
-
'--no-data', '--skip-set-charset',
|
217
|
+
'--no-data', '--skip-set-charset',
|
219
218
|
'--no-create-info', '--skip-comments',
|
220
219
|
'--skip-extended-insert', '--skip-set-charset',
|
221
220
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
@@ -314,7 +313,7 @@ namespace :db do
|
|
314
313
|
"--default-character-set=#{db_settings.fetch('charset')}",
|
315
314
|
'--no-create-info', '--skip-comments',
|
316
315
|
'--skip-extended-insert', '--skip-set-charset',
|
317
|
-
'--complete-insert',
|
316
|
+
'--complete-insert',
|
318
317
|
'-u', db_settings.fetch('username'),
|
319
318
|
'-p',
|
320
319
|
'-h', db_settings.fetch('host'), '-P', db_settings.fetch('port'),
|
@@ -364,9 +363,7 @@ namespace :db do
|
|
364
363
|
|
365
364
|
remote_md5 = '' # to allow assignment in block and later comparison
|
366
365
|
on primary :backend do
|
367
|
-
if test("[ -f #{remote_dump_md5_file} ]")
|
368
|
-
remote_md5 = capture("cat #{remote_dump_md5_file}")
|
369
|
-
end
|
366
|
+
remote_md5 = capture("cat #{remote_dump_md5_file}") if test("[ -f #{remote_dump_md5_file} ]")
|
370
367
|
end
|
371
368
|
|
372
369
|
run_locally do
|
@@ -6,6 +6,7 @@ namespace :deploy do
|
|
6
6
|
desc "Check directories to be linked exist in shared using the given hash 'enhanced_linked_dirs'"
|
7
7
|
task :linked_dirs do
|
8
8
|
next unless any? :enhanced_linked_dirs
|
9
|
+
|
9
10
|
fetch(:enhanced_linked_dirs).each_key do |source|
|
10
11
|
on release_roles :all do
|
11
12
|
execute :mkdir, '-pv', shared_path.join(source)
|
@@ -16,6 +17,7 @@ namespace :deploy do
|
|
16
17
|
desc "Check directories of files to be linked exist in shared using the given hash 'enhanced_linked_files'"
|
17
18
|
task :make_linked_dirs do
|
18
19
|
next unless any? :enhanced_linked_files
|
20
|
+
|
19
21
|
fetch(:enhanced_linked_files).each_value do |target|
|
20
22
|
on release_roles :all do
|
21
23
|
execute :mkdir, '-pv', shared_path.join(target).dirname
|
@@ -26,6 +28,7 @@ namespace :deploy do
|
|
26
28
|
desc "Check files to be linked exist in shared using the given hash 'enhanced_linked_files'"
|
27
29
|
task :linked_files do
|
28
30
|
next unless any? :enhanced_linked_files
|
31
|
+
|
29
32
|
fetch(:enhanced_linked_files).each_key do |source|
|
30
33
|
on release_roles :all do |host|
|
31
34
|
unless test "[ -f #{shared_path.join source} ]"
|
@@ -41,6 +44,7 @@ namespace :deploy do
|
|
41
44
|
desc "Symlink linked directories using the given hash 'enhanced_linked_dirs'"
|
42
45
|
task :linked_dirs do
|
43
46
|
next unless any? :enhanced_linked_dirs
|
47
|
+
|
44
48
|
fetch(:enhanced_linked_dirs).each do |source, target|
|
45
49
|
target = release_path.join(target)
|
46
50
|
source = shared_path.join(source)
|
@@ -57,6 +61,7 @@ namespace :deploy do
|
|
57
61
|
desc "Symlink linked files using the given hash 'enhanced_linked_files'"
|
58
62
|
task :linked_files do
|
59
63
|
next unless any? :enhanced_linked_files
|
64
|
+
|
60
65
|
fetch(:enhanced_linked_files).each do |source, target|
|
61
66
|
target = release_path.join(target)
|
62
67
|
source = shared_path.join(source)
|
@@ -55,7 +55,7 @@ namespace :maintenance do
|
|
55
55
|
next
|
56
56
|
end
|
57
57
|
end
|
58
|
-
execute :rm,
|
58
|
+
execute :rm, maintenance_config_file_path
|
59
59
|
end
|
60
60
|
info I18n.t('tasks.maintenance.disabled', mode: 'regular', scope: :dkdeploy)
|
61
61
|
end
|
@@ -64,7 +64,7 @@ namespace :maintenance do
|
|
64
64
|
desc "Disables the maintenance permanent mode. The 'maintenance:disable' will work in a regular way again."
|
65
65
|
task :disable_permanent do
|
66
66
|
on release_roles :app, :web do
|
67
|
-
execute :rm,
|
67
|
+
execute :rm, maintenance_config_file_path
|
68
68
|
info I18n.t('tasks.maintenance.disabled', mode: 'permanent', scope: :dkdeploy)
|
69
69
|
end
|
70
70
|
end
|
@@ -13,6 +13,7 @@ namespace :mysql do
|
|
13
13
|
mysql_slow_log = fetch(:mysql_slow_log, '')
|
14
14
|
on roles :db do |server|
|
15
15
|
next unless slow_log_exists? mysql_slow_log
|
16
|
+
|
16
17
|
execute :echo, '', '>', mysql_slow_log
|
17
18
|
info I18n.t('tasks.mysql.clear_slow_log', file: mysql_slow_log, host: server, scope: :dkdeploy)
|
18
19
|
end
|
@@ -23,6 +24,7 @@ namespace :mysql do
|
|
23
24
|
mysql_slow_log = fetch(:mysql_slow_log, '')
|
24
25
|
on roles :db do |server|
|
25
26
|
next unless slow_log_exists? mysql_slow_log
|
27
|
+
|
26
28
|
local_filename = File.join(local_dump_path, "#{File.basename(mysql_slow_log, '.*')}.#{fetch(:stage)}.#{server.hostname}#{File.extname(mysql_slow_log)}")
|
27
29
|
info I18n.t('file.download', file: mysql_slow_log, target: local_filename, host: server)
|
28
30
|
download! mysql_slow_log, local_filename, via: :scp
|
@@ -34,6 +36,7 @@ namespace :mysql do
|
|
34
36
|
mysql_slow_log = fetch(:mysql_slow_log, '')
|
35
37
|
on roles :db do |server|
|
36
38
|
next unless slow_log_exists? mysql_slow_log
|
39
|
+
|
37
40
|
analyze_filename = "mysql_slow_log_analyze.#{fetch(:stage)}.#{server.hostname}.log"
|
38
41
|
remote_filename = File.join(deploy_path, analyze_filename)
|
39
42
|
local_filename = File.join(local_dump_path, analyze_filename)
|
@@ -21,9 +21,7 @@ namespace :project_version do
|
|
21
21
|
on release_roles :app do
|
22
22
|
info I18n.t('tasks.project_version.update.update', scope: :dkdeploy)
|
23
23
|
# remove the to be replaced remote version file
|
24
|
-
if test " [ -f #{remote_version_file} ] "
|
25
|
-
execute :rm, '-f', remote_version_file
|
26
|
-
end
|
24
|
+
execute :rm, '-f', remote_version_file if test " [ -f #{remote_version_file} ] "
|
27
25
|
# upload the current version file
|
28
26
|
upload! local_version_file, remote_version_file
|
29
27
|
end
|
metadata
CHANGED
@@ -1,32 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dkdeploy-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 9.
|
4
|
+
version: 9.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timo Webler
|
8
8
|
- Nicolai Reuschling
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2018-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: aruba
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version:
|
20
|
+
version: 0.14.1
|
21
21
|
type: :development
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version:
|
27
|
+
version: 0.14.1
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
|
-
name:
|
29
|
+
name: bundler
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
@@ -40,117 +40,117 @@ dependencies:
|
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '0'
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
|
-
name:
|
43
|
+
name: cucumber
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
46
|
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '2.4'
|
49
49
|
type: :development
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
53
|
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '2.4'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: dkdeploy-test_environment
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '2.
|
62
|
+
version: '2.0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '2.
|
69
|
+
version: '2.0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
|
-
name:
|
71
|
+
name: mysql2
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
74
|
- - "~>"
|
75
75
|
- !ruby/object:Gem::Version
|
76
|
-
version: 0.
|
76
|
+
version: '0.3'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
81
|
- - "~>"
|
82
82
|
- !ruby/object:Gem::Version
|
83
|
-
version: 0.
|
83
|
+
version: '0.3'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
|
-
name:
|
85
|
+
name: pry
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
88
|
- - "~>"
|
89
89
|
- !ruby/object:Gem::Version
|
90
|
-
version: 0.
|
90
|
+
version: '0.10'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
95
|
- - "~>"
|
96
96
|
- !ruby/object:Gem::Version
|
97
|
-
version: 0.
|
97
|
+
version: '0.10'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
|
-
name:
|
99
|
+
name: rake
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - ">="
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '0
|
104
|
+
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - ">="
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '0
|
111
|
+
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
|
-
name:
|
113
|
+
name: rspec
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
116
|
- - "~>"
|
117
117
|
- !ruby/object:Gem::Version
|
118
|
-
version: '
|
118
|
+
version: '3.5'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
123
|
- - "~>"
|
124
124
|
- !ruby/object:Gem::Version
|
125
|
-
version: '
|
125
|
+
version: '3.5'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
|
-
name:
|
127
|
+
name: rubocop
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
130
|
- - "~>"
|
131
131
|
- !ruby/object:Gem::Version
|
132
|
-
version:
|
132
|
+
version: 0.60.0
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - "~>"
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version:
|
139
|
+
version: 0.60.0
|
140
140
|
- !ruby/object:Gem::Dependency
|
141
141
|
name: capistrano
|
142
142
|
requirement: !ruby/object:Gem::Requirement
|
143
143
|
requirements:
|
144
144
|
- - "~>"
|
145
145
|
- !ruby/object:Gem::Version
|
146
|
-
version: 3.
|
146
|
+
version: 3.11.0
|
147
147
|
type: :runtime
|
148
148
|
prerelease: false
|
149
149
|
version_requirements: !ruby/object:Gem::Requirement
|
150
150
|
requirements:
|
151
151
|
- - "~>"
|
152
152
|
- !ruby/object:Gem::Version
|
153
|
-
version: 3.
|
153
|
+
version: 3.11.0
|
154
154
|
- !ruby/object:Gem::Dependency
|
155
155
|
name: highline
|
156
156
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,7 +192,6 @@ files:
|
|
192
192
|
- dkdeploy-core.gemspec
|
193
193
|
- features/apache.feature
|
194
194
|
- features/assets.feature
|
195
|
-
- features/bower.feature
|
196
195
|
- features/current_folder.feature
|
197
196
|
- features/db.feature
|
198
197
|
- features/deploy.feature
|
@@ -222,7 +221,6 @@ files:
|
|
222
221
|
- lib/dkdeploy/scm/copy.rb
|
223
222
|
- lib/dkdeploy/tasks/apache.rake
|
224
223
|
- lib/dkdeploy/tasks/assets.rake
|
225
|
-
- lib/dkdeploy/tasks/bower.rake
|
226
224
|
- lib/dkdeploy/tasks/current_folder.rake
|
227
225
|
- lib/dkdeploy/tasks/db.rake
|
228
226
|
- lib/dkdeploy/tasks/deploy.rake
|
@@ -246,7 +244,6 @@ files:
|
|
246
244
|
- spec/fixtures/application/config/preseed/download.tar.gz
|
247
245
|
- spec/fixtures/application/htdocs/.hidden/.gitkeep
|
248
246
|
- spec/fixtures/application/htdocs/Gemfile
|
249
|
-
- spec/fixtures/application/htdocs/bower.json
|
250
247
|
- spec/fixtures/application/htdocs/catalog/.hidden/.gitkeep
|
251
248
|
- spec/fixtures/application/htdocs/catalog/index.html
|
252
249
|
- spec/fixtures/application/htdocs/index.html
|
@@ -265,7 +262,7 @@ homepage: https://github.com/dkdeploy/dkdeploy-core
|
|
265
262
|
licenses:
|
266
263
|
- MIT
|
267
264
|
metadata: {}
|
268
|
-
post_install_message:
|
265
|
+
post_install_message:
|
269
266
|
rdoc_options: []
|
270
267
|
require_paths:
|
271
268
|
- lib
|
@@ -280,14 +277,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
277
|
- !ruby/object:Gem::Version
|
281
278
|
version: '0'
|
282
279
|
requirements: []
|
283
|
-
|
284
|
-
|
280
|
+
rubyforge_project:
|
281
|
+
rubygems_version: 2.7.8
|
282
|
+
signing_key:
|
285
283
|
specification_version: 4
|
286
284
|
summary: dkd basic deployment tasks and strategies
|
287
285
|
test_files:
|
288
286
|
- features/apache.feature
|
289
287
|
- features/assets.feature
|
290
|
-
- features/bower.feature
|
291
288
|
- features/current_folder.feature
|
292
289
|
- features/db.feature
|
293
290
|
- features/deploy.feature
|
@@ -312,7 +309,6 @@ test_files:
|
|
312
309
|
- spec/fixtures/application/config/preseed/download.tar.gz
|
313
310
|
- spec/fixtures/application/htdocs/.hidden/.gitkeep
|
314
311
|
- spec/fixtures/application/htdocs/Gemfile
|
315
|
-
- spec/fixtures/application/htdocs/bower.json
|
316
312
|
- spec/fixtures/application/htdocs/catalog/.hidden/.gitkeep
|
317
313
|
- spec/fixtures/application/htdocs/catalog/index.html
|
318
314
|
- spec/fixtures/application/htdocs/index.html
|
data/features/bower.feature
DELETED
@@ -1,52 +0,0 @@
|
|
1
|
-
Feature: Test tasks for namespace 'bower'
|
2
|
-
|
3
|
-
Background:
|
4
|
-
Given a test app with the default configuration
|
5
|
-
|
6
|
-
Scenario: Given a bower.js file, running cap bower:run['install', 'htdocs'] results in Bower (v1.5.2) installing components
|
7
|
-
When I successfully run `cap dev "bower:run[install,htdocs]"`
|
8
|
-
Then the output should contain "bower jquery#2.1.4 install jquery#2.1.4"
|
9
|
-
And a file named "htdocs/bower_components/jquery/dist/jquery.js" should exist
|
10
|
-
|
11
|
-
Scenario: Running arbitrarily Bower commands
|
12
|
-
Given I run `cap dev "bower:run[install,htdocs]"`
|
13
|
-
When I run `cap dev "bower:run[list,htdocs]"`
|
14
|
-
Then the output should contain "dkdeploy-core-bower-fixture-file#0.0.1"
|
15
|
-
And the output should contain "└── jquery#2.1.4"
|
16
|
-
When I successfully run `cap dev "bower:run[lookup bootstrap,htdocs]"`
|
17
|
-
Then the output should contain "bootstrap https://github.com/twbs/bootstrap.git"
|
18
|
-
|
19
|
-
Scenario: Running arbitrarily Bower commands with multiple bower.json files
|
20
|
-
Given the default aruba exit timeout is 120 seconds
|
21
|
-
And a file named "another_directory/bower.json" with:
|
22
|
-
"""
|
23
|
-
{
|
24
|
-
"name": "dkdeploy-core-another-bower-fixture-file",
|
25
|
-
"version": "0.0.1",
|
26
|
-
"authors": [
|
27
|
-
"Random Coder <mail@example.com>"
|
28
|
-
],
|
29
|
-
"description": "This is another fixture bower.js file for dkdeploy-core",
|
30
|
-
"moduleType": [
|
31
|
-
"globals"
|
32
|
-
],
|
33
|
-
"license": "MIT",
|
34
|
-
"dependencies": {
|
35
|
-
"bootstrap": "3.3.5"
|
36
|
-
}
|
37
|
-
}
|
38
|
-
"""
|
39
|
-
When I extend the development capistrano configuration variable bower_paths with value ['htdocs', 'another_directory']
|
40
|
-
And I successfully run `cap dev "bower:run_all[install]"`
|
41
|
-
Then a file named "htdocs/bower_components/jquery/dist/jquery.js" should exist
|
42
|
-
And a file named "another_directory/bower_components/bootstrap/dist/css/bootstrap.css" should exist
|
43
|
-
|
44
|
-
Scenario: Running a Bower command with missing bower.json file
|
45
|
-
Given I successfully run `rm htdocs/bower.json`
|
46
|
-
When I successfully run `cap dev "bower:run[install,htdocs]"`
|
47
|
-
Then the output should contain "Skipping directory htdocs because it does not contain a bower.json file."
|
48
|
-
|
49
|
-
Scenario: Running a Bower command with missing directory configured
|
50
|
-
Given I successfully run `rm htdocs/bower.json`
|
51
|
-
When I successfully run `cap dev "bower:run[install,i_do_not_exist]"`
|
52
|
-
Then the output should contain "Skipping directory i_do_not_exist because it does not exist."
|
@@ -1,53 +0,0 @@
|
|
1
|
-
require 'capistrano/i18n'
|
2
|
-
require 'dkdeploy/i18n'
|
3
|
-
|
4
|
-
include Capistrano::DSL
|
5
|
-
|
6
|
-
namespace :bower do
|
7
|
-
desc 'Runs given Bower command in given path'
|
8
|
-
task :run, :bower_command, :bower_path do |_, args|
|
9
|
-
bower_command = ask_variable(args, :bower_command, 'questions.bower.command') { |question| question.default = 'help' }
|
10
|
-
bower_path = ask_variable(args, :bower_path, 'questions.bower.path') { |question| question.default = 'htdocs' }
|
11
|
-
|
12
|
-
run_locally do
|
13
|
-
if test("[ -d #{bower_path} ]")
|
14
|
-
bower_file_path = File.join(bower_path, 'bower.json')
|
15
|
-
if test("[ -f #{bower_file_path} ]")
|
16
|
-
within bower_path do
|
17
|
-
execute :bower, bower_command
|
18
|
-
end
|
19
|
-
else
|
20
|
-
warn I18n.t('tasks.bower.skipping_directory_with_missing_bower_file', bower_path: bower_path, scope: :dkdeploy)
|
21
|
-
next
|
22
|
-
end
|
23
|
-
else
|
24
|
-
warn I18n.t('tasks.bower.skipping_missing_directory', bower_path: bower_path, scope: :dkdeploy)
|
25
|
-
next
|
26
|
-
end
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
task :run_all, :bower_command, :bower_paths do |_, args|
|
31
|
-
bower_command = ask_variable(args, :bower_command, 'questions.bower.command') { |question| question.default = 'help' }
|
32
|
-
bower_paths = ask_array_variable(args, :bower_paths, 'questions.bower.paths')
|
33
|
-
|
34
|
-
run_locally do
|
35
|
-
bower_paths.each do |bower_path|
|
36
|
-
if test("[ -d #{bower_path} ]")
|
37
|
-
current_bower_file_path = File.join(bower_path, 'bower.json')
|
38
|
-
if test("[ -f #{current_bower_file_path} ]")
|
39
|
-
within bower_path do
|
40
|
-
execute :bower, bower_command
|
41
|
-
end
|
42
|
-
else
|
43
|
-
warn I18n.t('tasks.bower.skipping_directory_with_missing_bower_file', bower_path: bower_path, scope: :dkdeploy)
|
44
|
-
next
|
45
|
-
end
|
46
|
-
else
|
47
|
-
warn I18n.t('tasks.bower.skipping_missing_directory', bower_path: bower_path, scope: :dkdeploy)
|
48
|
-
next
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
@@ -1,15 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "dkdeploy-core-bower-fixture-file",
|
3
|
-
"version": "0.0.1",
|
4
|
-
"authors": [
|
5
|
-
"Random Coder <mail@example.com>"
|
6
|
-
],
|
7
|
-
"description": "This is a fixture bower.js file for dkdeploy-core",
|
8
|
-
"moduleType": [
|
9
|
-
"globals"
|
10
|
-
],
|
11
|
-
"license": "MIT",
|
12
|
-
"dependencies": {
|
13
|
-
"jquery": "2.1.4"
|
14
|
-
}
|
15
|
-
}
|