dkdeploy-core 9.0.0 → 9.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. checksums.yaml +5 -5
  2. data/.rubocop.yml +36 -8
  3. data/.travis.yml +7 -5
  4. data/Berksfile +2 -0
  5. data/Berksfile.lock +36 -35
  6. data/CHANGELOG.md +48 -1
  7. data/CONTRIBUTORS.md +3 -0
  8. data/Gemfile +2 -0
  9. data/LICENSE +1 -1
  10. data/README.md +11 -12
  11. data/Rakefile +2 -0
  12. data/Vagrantfile +14 -14
  13. data/config/vm/cookbooks/dkdeploy-core/metadata.rb +4 -4
  14. data/config/vm/cookbooks/dkdeploy-core/recipes/default.rb +11 -13
  15. data/dkdeploy-core.gemspec +13 -11
  16. data/features/assets.feature +0 -1
  17. data/features/file_access.feature +2 -2
  18. data/features/mysql.feature +2 -2
  19. data/features/support/env.rb +4 -2
  20. data/features/utils.feature +3 -3
  21. data/lib/capistrano/dkdeploy/core.rb +14 -17
  22. data/lib/dkdeploy.rb +2 -0
  23. data/lib/dkdeploy/constants.rb +2 -0
  24. data/lib/dkdeploy/core/version.rb +3 -1
  25. data/lib/dkdeploy/dsl.rb +4 -3
  26. data/lib/dkdeploy/helpers/assets.rb +2 -0
  27. data/lib/dkdeploy/helpers/common.rb +2 -0
  28. data/lib/dkdeploy/helpers/db.rb +7 -5
  29. data/lib/dkdeploy/helpers/file_system.rb +7 -12
  30. data/lib/dkdeploy/helpers/mysql.rb +3 -0
  31. data/lib/dkdeploy/i18n.rb +3 -12
  32. data/lib/dkdeploy/interaction_handler/mysql.rb +4 -1
  33. data/lib/dkdeploy/interaction_handler/password.rb +3 -1
  34. data/lib/dkdeploy/rollback_manager.rb +2 -0
  35. data/lib/dkdeploy/scm/copy.rake +39 -12
  36. data/lib/dkdeploy/scm/copy.rb +7 -45
  37. data/lib/dkdeploy/tasks/apache.rake +2 -0
  38. data/lib/dkdeploy/tasks/assets.rake +3 -1
  39. data/lib/dkdeploy/tasks/current_folder.rake +3 -1
  40. data/lib/dkdeploy/tasks/db.rake +138 -154
  41. data/lib/dkdeploy/tasks/deploy.rake +5 -3
  42. data/lib/dkdeploy/tasks/enhanced_symlinks.rake +7 -0
  43. data/lib/dkdeploy/tasks/fail.rake +2 -0
  44. data/lib/dkdeploy/tasks/file_access.rake +2 -0
  45. data/lib/dkdeploy/tasks/maintenance.rake +4 -3
  46. data/lib/dkdeploy/tasks/mysql.rake +5 -0
  47. data/lib/dkdeploy/tasks/project_version.rake +3 -3
  48. data/lib/dkdeploy/tasks/utils.rake +2 -0
  49. data/spec/fixtures/application/Capfile +2 -0
  50. data/spec/fixtures/application/Gemfile +3 -1
  51. data/spec/fixtures/application/config/deploy.rb +25 -23
  52. data/spec/fixtures/application/config/deploy/dev.rb +3 -1
  53. data/spec/fixtures/capistrano/configuration/add_output_after_create_symlink.rb +1 -0
  54. data/spec/fixtures/capistrano/configuration/custom_compass_sources.rb +2 -0
  55. data/spec/fixtures/capistrano/configuration/custom_file_access.rb +2 -0
  56. data/spec/fixtures/capistrano/configuration/default_deployment_behaviour.rb +2 -0
  57. metadata +40 -47
  58. data/features/bower.feature +0 -52
  59. data/lib/capistrano/copy.rb +0 -2
  60. data/lib/dkdeploy/tasks/bower.rake +0 -53
  61. data/spec/fixtures/application/htdocs/bower.json +0 -15
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 0fa351619fa4722337d6fed4eaed15806f9ee10d
4
- data.tar.gz: 49176a8bb577edf5251c4f5cc77bac4e7c11172d
2
+ SHA256:
3
+ metadata.gz: a777b01f3efd02018a09ceb89a51e981812363eb928806454a40686805abd637
4
+ data.tar.gz: a495bab21f8d00b9b65a7d1d41cbd999c621194a844e3029dced0268c6340141
5
5
  SHA512:
6
- metadata.gz: 32be81315488b81b06275168d880499745d74d88d5567e43c4a6dd21ce6e2a53c89fd4ef190e9a9739f454096b949fd38b9969b5b12c66a86a3dfbb2e40a85f0
7
- data.tar.gz: 20786fdcf4fdeaa824a2c3fa18ab91a78030b5ba1c038676e0747010b736076f9f80c6e5dd8175aae4d49cc40892a20a06f3ad35895839cad03df31de295323c
6
+ metadata.gz: cd85e39b2bf80958e0ebb5db6e86637e520e649a2deddc44f0f61b31d4395eb0da460d97331a55e5f337ce480789af37941c3d981686fcc12cd304da2e460b07
7
+ data.tar.gz: bb3de683784e0e600430b5e3100c7024ec42efc11d4dc920adefcd7c500d9102f913a5e51bf21dfac5620a4b3aea1b2fd99ddfefc80992a757640cc774d7086e
@@ -5,23 +5,51 @@ AllCops:
5
5
  - 'config/**/*'
6
6
  - 'Vagrantfile'
7
7
  - 'vendor/**/*'
8
- TargetRubyVersion: 2.2
8
+ TargetRubyVersion: 2.5
9
9
  ExtraDetails: true
10
10
  DisplayStyleGuide: true
11
11
  DisplayCopNames: true
12
- GlobalVars:
12
+ Style/GlobalVars:
13
13
  AllowedVariables: []
14
- MethodLength:
14
+ Metrics/MethodLength:
15
15
  Max: 25
16
- LineLength:
16
+ Layout/LineLength:
17
17
  Max: 200
18
- SpecialGlobalVars:
18
+ Style/SpecialGlobalVars:
19
19
  Enabled: false
20
- BracesAroundHashParameters:
21
- Enabled: false
22
- CyclomaticComplexity:
20
+ Metrics/CyclomaticComplexity:
23
21
  Max: 10
24
22
  Metrics/BlockLength:
25
23
  Enabled: false
26
24
  Style/FormatStringToken:
27
25
  Enabled: false
26
+ Style/MixinUsage:
27
+ Enabled: false
28
+ Layout/EmptyLinesAroundAttributeAccessor:
29
+ Enabled: true
30
+ Layout/SpaceAroundMethodCallOperator:
31
+ Enabled: true
32
+ Lint/DeprecatedOpenSSLConstant:
33
+ Enabled: true
34
+ Lint/MixedRegexpCaptureTypes:
35
+ Enabled: true
36
+ Lint/RaiseException:
37
+ Enabled: true
38
+ Lint/StructNewOverride:
39
+ Enabled: true
40
+ Style/ExponentialNotation:
41
+ Enabled: true
42
+ Style/HashEachMethods:
43
+ Enabled: true
44
+ Style/HashTransformKeys:
45
+ Enabled: true
46
+ Style/HashTransformValues:
47
+ Enabled: true
48
+ Style/RedundantFetchBlock:
49
+ Enabled: true
50
+ Style/RedundantRegexpCharacterClass:
51
+ Enabled: true
52
+ Style/RedundantRegexpEscape:
53
+ Enabled: true
54
+ Style/SlicingWithRange:
55
+ Enabled: true
@@ -2,12 +2,14 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.2
6
- - 2.3
7
- - 2.4
5
+ - 2.5
6
+ - 2.6
7
+ - 2.7
8
8
 
9
9
  before_install:
10
- - gem install bundler --no-document
10
+ - gem install bundler --no-doc
11
+ - gem install bundler-audit --no-doc
11
12
 
12
13
  script:
13
- - bundle exec rubocop
14
+ - bundle-audit check --update
15
+ - bundle exec rubocop --display-cop-names --extra-details
data/Berksfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://supermarket.chef.io'
2
4
 
3
5
  cookbook 'dkdeploy-core', path: 'config/vm/cookbooks/dkdeploy-core'
@@ -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)
@@ -2,7 +2,50 @@
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.0.0]
5
+ ## [9.3.0] - 2020-07-06
6
+ ### Summary
7
+
8
+ - Update gem `capistrano` to 3.14.x
9
+ - Update gem `highline` to 2.0.x
10
+ - Update gem 'aruba' to 1.0.x
11
+ - Test ruby 2.7 via travis
12
+ - Requires Ruby v2.5 or later
13
+
14
+ ## [9.2.3] - 2019-05-29
15
+ ### Summary
16
+
17
+ - Remove frozen string error
18
+ - Update interaction handler for new `htpasswd` versions
19
+ - Use correct test statement for task "remove_unless_symlinked"
20
+
21
+ ## [9.2.2] - 2019-02-18
22
+ ### Summary
23
+
24
+ - run tests and linter against Ruby 2.3
25
+ - fixed bug in clean_up_temporary_sources
26
+
27
+ ## [9.2.1] - 2019-12-06
28
+ ### Summary
29
+
30
+ - removed loading of pry
31
+
32
+ ## [9.2.0] - 2019-12-06 [YANKED]
33
+ ### Summary
34
+
35
+ - supports Ruby 2.5
36
+ - removes Bower support
37
+ - moved test infrastructure to Ubuntu Xenial
38
+ - we no longer remove maintenance_config_file_path forcefully to make failures more apparent
39
+ - improved shell independence
40
+
41
+ ## [9.1.0] - 2018-02-09
42
+ ### Summary
43
+
44
+ - Use correct capistrano context at copy scm
45
+ - Update capistrano 3.10.1
46
+ - Always execute tasks for each server or at rollback
47
+
48
+ ## [9.0.0] 2017-10-16
6
49
  ### Summary
7
50
 
8
51
  - tasks around MySQL slow log
@@ -33,6 +76,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
33
76
  - first public release
34
77
 
35
78
  [Unreleased]: https://github.com/dkdeploy/dkdeploy-core/compare/master...develop
79
+ [9.2.2]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.2.2
80
+ [9.2.1]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.2.1
81
+ [9.2.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.2.0
82
+ [9.1.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.1.0
36
83
  [9.0.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v9.0.0
37
84
  [8.0.1]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v8.0.1
38
85
  [8.0.0]: https://github.com/dkdeploy/dkdeploy-core/releases/tag/v8.0.0
@@ -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/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org/'
2
4
 
3
5
  # Specify your gem's dependencies in dkdeploy-core.gemspec
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.0'
16
+ gem 'dkdeploy-core', '~> 9.2'
17
17
 
18
18
  and then execute
19
19
 
@@ -64,28 +64,27 @@ The complete list of the dkdeploy constants you find in `/lib/capistrano/dkdeplo
64
64
 
65
65
  ### Prerequisite
66
66
 
67
- rvm (v1.29.x) with installed Ruby 2.2.
67
+ rvm (v1.29.x) with installed Ruby 2.2 or newer.
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
 
75
75
  1. Starting the local box (`vagrant up --provision`)
76
76
  2. Checking coding styles (`rubocop`)
77
- 3. Running BDD cucumber tests (`cucumber`)
77
+ 3. Running BDD cucumber tests (`BUNDLER_VERSION=2.1.4 cucumber`)
78
78
 
79
79
  ## Contributing
80
80
 
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 `BUNDLER_VERSION=1.17.3 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/Rakefile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  task default: :spec
2
4
  require 'bundler/gem_tasks'
3
5
 
@@ -5,27 +5,28 @@ 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
 
20
20
  config.vm.define('dkdeploy-core', primary: true) do |master_config|
21
21
  master_config.vm.network 'private_network', ip: ip_address
22
+ master_config.vm.hostname = domain
22
23
 
23
24
  # Chef settings
24
25
  master_config.vm.provision :chef_solo do |chef|
25
26
  chef.install = true
26
27
  chef.channel = 'stable'
27
28
  chef.version = chef_version
28
- chef.log_level = :info
29
+ chef.log_level = :warn
29
30
  chef.add_recipe 'dkdeploy-core'
30
31
  end
31
32
 
@@ -37,17 +38,16 @@ Vagrant.configure(2) do |config|
37
38
  'modifyvm', :id,
38
39
  '--natdnsproxy1', 'off',
39
40
  '--natdnshostresolver1', 'on',
40
- '--memory', '1024'
41
+ '--memory', '1024',
42
+ '--audio', 'none'
41
43
  ]
42
44
  end
43
- end
44
45
 
45
- if Vagrant.has_plugin?('landrush')
46
- config.landrush.enabled = true
47
- config.landrush.guest_redirect_dns = false
48
- config.landrush.tld = 'dev'
49
- config.landrush.host domain, ip_address
50
- else
51
- config.vm.post_up_message = "Either install Vagrant plugin 'landrush' or add this entry to your host file: #{ip_address} #{domain}"
46
+ unless Vagrant.has_plugin?('vagrant-hostsupdater')
47
+ master_config.vm.post_up_message = <<-HEREDOC
48
+ Add following entries to your host file or install vagrant plugin vagrant-hostsupdater ("vagrant plugin install vagrant-hostsupdater") and restart virtual box
49
+ #{ip_address} #{domain}
50
+ HEREDOC
51
+ end
52
52
  end
53
53
  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