Skip to content
This repository was archived by the owner on Jan 30, 2024. It is now read-only.

Commit dcc692c

Browse files
authored
Merge pull request #51 from ncreuschling/ng
updated dependencies, updated RuboCop and fixed reported issues
2 parents af4afa3 + 7d6462d commit dcc692c

33 files changed

+135
-263
lines changed

.rubocop.yml

+2
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ Metrics/BlockLength:
2525
Enabled: false
2626
Style/FormatStringToken:
2727
Enabled: false
28+
Style/MixinUsage:
29+
Enabled: false

Berksfile.lock

+36-35
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,45 @@ DEPENDENCIES
33
path: config/vm/cookbooks/dkdeploy-core
44

55
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)
1412
postgresql (>= 1.0.0)
1513
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)
2114
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)
2224
yum (>= 0.0.0)
2325
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)
2932
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)

CHANGELOG.md

+7
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [Next Version]
6+
### Summary
7+
8+
- supports Ruby 2.5
9+
- removes Bower support
10+
- moved test infrastructure to Ubuntu Xenial
11+
512
## [9.1.0]
613
### Summary
714

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -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/
22

33
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:
44

README.md

+8-9
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ rvm (v1.29.x) with installed Ruby 2.2.
6868

6969
Add the virtual box alias to your `hosts` file
7070

71-
192.168.156.180 dkdeploy-core.dev
71+
192.168.156.180 dkdeploy-core.test
7272

7373
### Running tests
7474

@@ -81,11 +81,10 @@ Add the virtual box alias to your `hosts` file
8181
1. Install [git flow](https://github.com/nvie/gitflow)
8282
2. Install [Homebrew](http://brew.sh/) and run `brew install mysql`
8383
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 [email protected]`
85-
5. If project is not checked out already do git clone `[email protected]: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 `[email protected]: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'`)

Vagrantfile

+7-6
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,15 @@ unless Vagrant.has_plugin?('vagrant-berkshelf')
55
abort
66
end
77

8-
Vagrant.require_version '~> 2.0.0'
9-
chef_version = '12.9.41'
8+
Vagrant.require_version '~> 2.0'
109

1110
Vagrant.configure(2) do |config|
12-
domain = 'dkdeploy-core.dev'
11+
chef_version = '13.6.4'
12+
domain = 'dkdeploy-core.test'
1313
ip_address = '192.168.156.180'
1414

1515
# Search boxes at https://atlas.hashicorp.com/search.
16-
config.vm.box = 'ubuntu/trusty64'
16+
config.vm.box = 'bento/ubuntu-16.04'
1717
config.vm.box_check_update = false
1818
config.berkshelf.enabled = true
1919

@@ -25,7 +25,7 @@ Vagrant.configure(2) do |config|
2525
chef.install = true
2626
chef.channel = 'stable'
2727
chef.version = chef_version
28-
chef.log_level = :info
28+
chef.log_level = :warn
2929
chef.add_recipe 'dkdeploy-core'
3030
end
3131

@@ -37,7 +37,8 @@ Vagrant.configure(2) do |config|
3737
'modifyvm', :id,
3838
'--natdnsproxy1', 'off',
3939
'--natdnshostresolver1', 'on',
40-
'--memory', '1024'
40+
'--memory', '1024',
41+
'--audio', 'none'
4142
]
4243
end
4344
end

config/vm/cookbooks/dkdeploy-core/metadata.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
description 'Project cookbook'
55
version '1.0.0'
66

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'

config/vm/cookbooks/dkdeploy-core/recipes/default.rb

+11-13
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919

2020
mysql_service 'default' do
2121
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'
2524
run_group 'vagrant'
2625
run_user 'vagrant'
26+
action [:create, :start]
2727
end
2828

2929
mysql_config 'default' do
3030
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
3332
group 'vagrant'
3433
source 'my_extra_settings.erb'
3534
notifies :restart, 'mysql_service[default]'
@@ -41,23 +40,22 @@
4140
end
4241

4342
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'
4746
}
4847

4948
mysql_database 'dkdeploy_core' do
5049
connection mysql_connection_info
51-
action :create
50+
action :create
5251
end
5352

5453
mysql_database_user 'root' do
5554
connection mysql_connection_info
56-
host '%'
57-
password 'ilikerandompasswords'
58-
action :create
55+
host '%'
56+
password 'ilikerandompasswords'
5957
privileges [:all]
60-
action :grant
58+
action [:create, :grant]
6159
end
6260

6361
directory '/var/www' do

dkdeploy-core.gemspec

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
lib = File.expand_path('../lib', __FILE__)
1+
lib = File.expand_path('lib', __dir__)
22
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
33
require 'dkdeploy/core/version'
44

@@ -18,16 +18,16 @@ Gem::Specification.new do |spec|
1818
spec.test_files = spec.files.grep(%r{^(test|spec|features)\/})
1919
spec.require_paths = ['lib']
2020

21+
spec.add_development_dependency 'aruba', '~> 0.14.1'
2122
spec.add_development_dependency 'bundler'
22-
spec.add_development_dependency 'rake'
23-
spec.add_development_dependency 'rspec', '~> 3.5'
2423
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'
2725
spec.add_development_dependency 'mysql2', '~> 0.3'
2826
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'
3030

31-
spec.add_dependency 'capistrano', '~> 3.10.1'
31+
spec.add_dependency 'capistrano', '~> 3.11.0'
3232
spec.add_dependency 'highline', '~> 1.7.1'
3333
end

features/assets.feature

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Feature: Test tasks for namespace 'assets'
3737
And I run `cap dev assets:add_htpasswd` interactively
3838
And I type "dkd_test_user"
3939
And I type "dkd_test_password"
40-
And I close the stdin stream
4140
Then the exit status should be 0
4241
And a remote file named "shared_path/.htpasswd" should exist
4342

features/bower.feature

-52
This file was deleted.

features/file_access.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ Feature: Test tasks for namespace 'file_permissions'
8787
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'}}}}
8888
And a remote directory named "releases_path/not_existing" should not exist
8989
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"
9191
And the output should not contain "sudo chmod u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/not_existing"
9292
And the output should contain "sudo chmod u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/catalog"
9393

@@ -115,6 +115,6 @@ Feature: Test tasks for namespace 'file_permissions'
115115
And I extend the development capistrano configuration variable selected_custom_file_access with value [:not_existing, :catalog]
116116
And a remote directory named "releases_path/not_existing" should not exist
117117
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"
119119
And the output should not contain "sudo chmod -R u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/not_existing"
120120
And the output should contain "sudo chmod -R u+rwx,g+rwx,o-wx /var/www/dkdeploy/current/catalog"

features/mysql.feature

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@ Feature: Test tasks for namespace 'mysql'
1010
And I successfully run `cap dev "db:update[temp,dkdeploy_core.sql.gz]"`
1111
And I successfully run `cap dev db:download_content`
1212
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
1414

1515
Scenario: Downloading the MYSQL slow log analyze file
1616
When I successfully run `cap dev "db:upload_settings[127.0.0.1,3306,dkdeploy_core,root,ilikerandompasswords,utf8]"`
1717
And I successfully run `cap dev "db:update[temp,dkdeploy_core.sql.gz]"`
1818
And I successfully run `cap dev db:download_content`
1919
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
2121

2222
Scenario: Clearing the MySQL slow log file
2323
When I successfully run `cap dev "db:upload_settings[127.0.0.1,3306,dkdeploy_core,root,ilikerandompasswords,utf8]"`

features/support/env.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
}
1212
end
1313

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' }
1616

1717
# this configuration tricks Bundler into executing another Bundler project with clean enviroment
1818
# The official way via Bundler.with_clean_env did not work properly here

features/utils.feature

+3-3
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ Feature: Test tasks for namespace 'utils'
2828
Remote file content
2929
"""
3030
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
3232

3333
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:
3535
"""
3636
Local file content
3737
"""
@@ -41,7 +41,7 @@ Local file content
4141
Remote file content
4242
"""
4343
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:
4545
"""
4646
Remote file content
4747

0 commit comments

Comments
 (0)