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.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +2 -0
  3. data/.travis.yml +1 -0
  4. data/Berksfile.lock +36 -35
  5. data/CHANGELOG.md +15 -17
  6. data/CONTRIBUTORS.md +3 -0
  7. data/LICENSE +1 -1
  8. data/README.md +9 -10
  9. data/Vagrantfile +7 -6
  10. data/config/vm/cookbooks/dkdeploy-core/metadata.rb +4 -4
  11. data/config/vm/cookbooks/dkdeploy-core/recipes/default.rb +11 -13
  12. data/dkdeploy-core.gemspec +7 -7
  13. data/features/assets.feature +0 -1
  14. data/features/file_access.feature +2 -2
  15. data/features/mysql.feature +2 -2
  16. data/features/support/env.rb +2 -2
  17. data/features/utils.feature +3 -3
  18. data/lib/capistrano/dkdeploy/core.rb +12 -17
  19. data/lib/dkdeploy/core/version.rb +1 -1
  20. data/lib/dkdeploy/helpers/db.rb +5 -5
  21. data/lib/dkdeploy/helpers/file_system.rb +5 -12
  22. data/lib/dkdeploy/helpers/mysql.rb +1 -0
  23. data/lib/dkdeploy/i18n.rb +1 -12
  24. data/lib/dkdeploy/interaction_handler/mysql.rb +1 -0
  25. data/lib/dkdeploy/interaction_handler/password.rb +1 -1
  26. data/lib/dkdeploy/scm/copy.rb +2 -2
  27. data/lib/dkdeploy/tasks/current_folder.rake +1 -1
  28. data/lib/dkdeploy/tasks/db.rake +5 -8
  29. data/lib/dkdeploy/tasks/deploy.rake +1 -0
  30. data/lib/dkdeploy/tasks/enhanced_symlinks.rake +5 -0
  31. data/lib/dkdeploy/tasks/maintenance.rake +2 -2
  32. data/lib/dkdeploy/tasks/mysql.rake +3 -0
  33. data/lib/dkdeploy/tasks/project_version.rake +1 -3
  34. data/spec/fixtures/application/Gemfile +1 -1
  35. data/spec/fixtures/application/config/deploy/dev.rb +1 -1
  36. data/spec/fixtures/capistrano/configuration/add_output_after_create_symlink.rb +0 -1
  37. metadata +38 -42
  38. data/features/bower.feature +0 -52
  39. data/lib/dkdeploy/tasks/bower.rake +0 -53
  40. data/spec/fixtures/application/htdocs/bower.json +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5aaf7134613ed6a03ffb06ea034fca329a8e888560bda5468c1af23801698b46
4
- data.tar.gz: 6596294604e34ad134194db60f8769da6f3eddb53fb18bcb7364a7e57a60fbc4
3
+ metadata.gz: 7cc314cd065dd6f41c21eae17ef5bfd1f71c68d9b59baaedebb47d0056b08b62
4
+ data.tar.gz: 3103ff9b91275de71bd3e3d389ed8929cb77bdab8abbc62cb17d7b4190391c26
5
5
  SHA512:
6
- metadata.gz: 15181410f26f5268006bd9975fbd58175ce157edba77cb4888dbb0d16c099d210cc84ffc6dae5d2e7cb651f1faca473b7ddbaa6625c0a3c090a76ccac57bb83a
7
- data.tar.gz: e2f8c366a80676c58d2f8662c60a198ed8207d3c06f8ad7f158e233223dc064d82857157e7f85b6df3d2f9a626c7c42eeaf2fb229c9b31a414814cfaf34081b6
6
+ metadata.gz: 76f64a7f35a6666116b06c7357271bfa79b2be9f6f3d9016f01140fd401f18db25a33ea6aec3ed7325d8d133538d98eaf5eebba6573e06b6df2493e8d98354b5
7
+ data.tar.gz: 6d660867553159fb1ca6dc534c8d28e0c81eaaf09848dc3603b4d69ff05acc3daf9cc1a7dc59da3e821f0a1d3daef8876d0705ea2fda740d75862cc187874c7f
data/.rubocop.yml CHANGED
@@ -25,3 +25,5 @@ Metrics/BlockLength:
25
25
  Enabled: false
26
26
  Style/FormatStringToken:
27
27
  Enabled: false
28
+ Style/MixinUsage:
29
+ Enabled: false
data/.travis.yml CHANGED
@@ -5,6 +5,7 @@ rvm:
5
5
  - 2.2
6
6
  - 2.3
7
7
  - 2.4
8
+ - 2.5
8
9
 
9
10
  before_install:
10
11
  - gem install bundler --no-document
data/Berksfile.lock CHANGED
@@ -3,44 +3,45 @@ DEPENDENCIES
3
3
  path: config/vm/cookbooks/dkdeploy-core
4
4
 
5
5
  GRAPH
6
- 7-zip (1.0.2)
7
- windows (>= 1.2.2)
8
- apt (2.9.2)
9
- build-essential (2.3.1)
10
- 7-zip (>= 0.0.0)
11
- chef-sugar (3.3.0)
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
- mysql (6.1.2)
25
- smf (>= 0.0.0)
26
- yum-mysql-community (>= 0.0.0)
27
- mysql2_chef_gem (1.0.2)
28
- build-essential (>= 0.0.0)
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 (~> 6.0)
31
- openssl (4.4.0)
32
- chef-sugar (>= 3.1.1)
33
- postgresql (4.0.0)
34
- apt (>= 1.9.0)
35
- build-essential (>= 0.0.0)
36
- openssl (~> 4.0)
37
- rbac (1.0.3)
38
- smf (2.2.8)
39
- rbac (>= 1.0.1)
40
- windows (1.39.1)
41
- chef_handler (>= 0.0.0)
42
- yum (3.10.0)
43
- yum-epel (0.6.5)
44
- yum (~> 3.2)
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.1.1]
5
+ ## [9.2.1] - 2019-12-06
6
6
  ### Summary
7
7
 
8
- - use --no-tablespaces with mysqldump
8
+ - removed loading of pry
9
9
 
10
- ## [9.1.0]
10
+ ## [9.2.0] - 2019-12-06 [YANKED]
11
11
  ### Summary
12
12
 
13
- - Use correct capistrano context at copy scm
14
- - Update capistrano 3.10.1
15
- - Always execute tasks for each server or at rollback
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.1]
19
+ ## [9.1.0] - 2018-02-09
18
20
  ### Summary
19
21
 
20
- - use --no-tablespaces with mysqldump
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.1.1]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.1.1
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-2017 dkd Internet Service GmbH, Frankfurt am Main (Germany), https://dkd.de/
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.1'
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.dev
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. Install [Bower](http://bower.io) (supported: v1.7.9) via `npm install -g bower@1.7.9`
85
- 5. If project is not checked out already do git clone `git@github.com:dkdeploy/dkdeploy-core.git`
86
- 6. Checkout origin develop branch (`git checkout --track -b develop origin/develop`)
87
- 7. Git flow initialze `git flow init -d`
88
- 8. Installing gems `bundle install`
89
- 9. Create new feature branch (`git flow feature start my-new-feature`)
90
- 10. Run tests (README.md Testing)
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.0'
9
- chef_version = '12.9.41'
8
+ Vagrant.require_version '~> 2.0'
10
9
 
11
10
  Vagrant.configure(2) do |config|
12
- domain = 'dkdeploy-core.dev'
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/trusty64'
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 = :info
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', '~> 6.0'
8
- depends 'mysql2_chef_gem', '~> 1.0'
9
- depends 'database', '~> 4.0'
10
- depends 'apt', '~> 2.9'
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
- bind_address '0.0.0.0'
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
- :host => '127.0.0.1',
45
- :username => 'root',
46
- :password => 'ilikerandompasswords'
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 :create
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 'ilikerandompasswords'
58
- action :create
55
+ host '%'
56
+ password 'ilikerandompasswords'
59
57
  privileges [:all]
60
- action :grant
58
+ action [:create, :grant]
61
59
  end
62
60
 
63
61
  directory '/var/www' do
@@ -1,4 +1,4 @@
1
- lib = File.expand_path('../lib', __FILE__)
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 'rubocop', '~> 0.50.0'
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 'dkdeploy-test_environment', '~> 2.0'
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.10.1'
31
+ spec.add_dependency 'capistrano', '~> 3.11.0'
32
32
  spec.add_dependency 'highline', '~> 1.7.1'
33
33
  end
@@ -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.dev"
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.dev"
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"
@@ -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.dev.log" should exist
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.dev.log" should exist
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]"`
@@ -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('../../../', __FILE__), 'dkdeploy-core.dev', ssh_config)
15
- TEST_APPLICATION.mysql_connection_settings = { host: 'dkdeploy-core.dev', username: 'root', password: 'ilikerandompasswords' }
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
@@ -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.dev.txt" should exist
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.dev.txt" with:
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.dev.txt" should contain exactly:
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('../../../dkdeploy/tasks/deploy.rake', __FILE__)
11
- load File.expand_path('../../../dkdeploy/tasks/fail.rake', __FILE__)
12
- load File.expand_path('../../../dkdeploy/tasks/maintenance.rake', __FILE__)
13
- load File.expand_path('../../../dkdeploy/tasks/utils.rake', __FILE__)
14
- load File.expand_path('../../../dkdeploy/tasks/file_access.rake', __FILE__)
15
- load File.expand_path('../../../dkdeploy/tasks/assets.rake', __FILE__)
16
- load File.expand_path('../../../dkdeploy/tasks/apache.rake', __FILE__)
17
- load File.expand_path('../../../dkdeploy/tasks/project_version.rake', __FILE__)
18
- load File.expand_path('../../../dkdeploy/tasks/db.rake', __FILE__)
19
- load File.expand_path('../../../dkdeploy/tasks/enhanced_symlinks.rake', __FILE__)
20
- load File.expand_path('../../../dkdeploy/tasks/current_folder.rake', __FILE__)
21
- load File.expand_path('../../../dkdeploy/tasks/bower.rake', __FILE__)
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
 
@@ -4,7 +4,7 @@ module Dkdeploy
4
4
  #
5
5
  class Version
6
6
  MAJOR = 9
7
- MINOR = 1
7
+ MINOR = 2
8
8
  PATCH = 1
9
9
 
10
10
  def self.to_s
@@ -7,7 +7,7 @@ module Dkdeploy
7
7
  # DB related helpers
8
8
  module DB
9
9
  def db_dump_file(infix = '')
10
- date = DateTime.now.strftime(datetime_format)
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' => fetch(:db_host),
26
- 'port' => fetch(:db_port),
27
- 'name' => fetch(:db_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' => fetch(:db_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
- return context.capture :readlink, '-f', path
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) # rubocop:disable Style/GuardClause
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
@@ -25,7 +25,7 @@ module Dkdeploy
25
25
  'Thumbs.db',
26
26
  'composer.lock'
27
27
  ]
28
- set_if_empty :copy_archive_filename, -> { Dir::Tmpname.make_tmpname([fetch(:application) + '_', '.tar.gz'], nil) }
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('../copy.rake', __FILE__)
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 "[[ -d #{current_path} && ! -L #{current_path} ]]"
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)
@@ -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', '--no-tablespaces',
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', '--no-tablespaces',
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', '--no-tablespaces',
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', '--no-tablespaces',
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
@@ -52,6 +52,7 @@ namespace :deploy do
52
52
  end
53
53
 
54
54
  next if rollback_archives.count <= fetch(:keep_rollback_archives)
55
+
55
56
  info I18n.t('keep_rollback_archives',
56
57
  scope: :dkdeploy,
57
58
  host: host.to_s,
@@ -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, '-f', maintenance_config_file_path
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, '-f', maintenance_config_file_path
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
@@ -6,6 +6,6 @@ gem 'dkdeploy-core', path: '../../'
6
6
  gem 'compass', '~> 1.0.3'
7
7
 
8
8
  # for debugging only
9
- gem 'pry', '~> 0.10.0'
9
+ gem 'pry', '~> 0.10'
10
10
 
11
11
  gem 'bundler'
@@ -1,5 +1,5 @@
1
1
  set :deploy_to, '/var/www/dkdeploy'
2
- server 'dkdeploy-core.dev', roles: %w[web app backend db], primary: true
2
+ server 'dkdeploy-core.test', roles: %w[web app backend db], primary: true
3
3
 
4
4
  # no ssh compression on the dev stage
5
5
  set :ssh_options, {
@@ -1,4 +1,3 @@
1
-
2
1
  after 'deploy:symlink:release', '--dummy-task-name' do
3
2
  run_locally do
4
3
  info "Task 'deploy:symlink:release' executed"
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.1.1
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: 2020-08-21 00:00:00.000000000 Z
12
+ date: 2018-12-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: bundler
15
+ name: aruba
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '0'
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: '0'
27
+ version: 0.14.1
28
28
  - !ruby/object:Gem::Dependency
29
- name: rake
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: rspec
43
+ name: cucumber
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
46
  - - "~>"
47
47
  - !ruby/object:Gem::Version
48
- version: '3.5'
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: '3.5'
55
+ version: '2.4'
56
56
  - !ruby/object:Gem::Dependency
57
- name: cucumber
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.4'
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.4'
69
+ version: '2.0'
70
70
  - !ruby/object:Gem::Dependency
71
- name: rubocop
71
+ name: mysql2
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
74
  - - "~>"
75
75
  - !ruby/object:Gem::Version
76
- version: 0.50.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.50.0
83
+ version: '0.3'
84
84
  - !ruby/object:Gem::Dependency
85
- name: aruba
85
+ name: pry
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
88
  - - "~>"
89
89
  - !ruby/object:Gem::Version
90
- version: 0.14.1
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.14.1
97
+ version: '0.10'
98
98
  - !ruby/object:Gem::Dependency
99
- name: mysql2
99
+ name: rake
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - "~>"
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: '0.3'
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.3'
111
+ version: '0'
112
112
  - !ruby/object:Gem::Dependency
113
- name: pry
113
+ name: rspec
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
116
  - - "~>"
117
117
  - !ruby/object:Gem::Version
118
- version: '0.10'
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: '0.10'
125
+ version: '3.5'
126
126
  - !ruby/object:Gem::Dependency
127
- name: dkdeploy-test_environment
127
+ name: rubocop
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
130
  - - "~>"
131
131
  - !ruby/object:Gem::Version
132
- version: '2.0'
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: '2.0'
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.10.1
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.10.1
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
- rubygems_version: 3.1.4
284
- signing_key:
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
@@ -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
- }