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.
- checksums.yaml +5 -5
- data/.rubocop.yml +36 -8
- data/.travis.yml +7 -5
- data/Berksfile +2 -0
- data/Berksfile.lock +36 -35
- data/CHANGELOG.md +48 -1
- data/CONTRIBUTORS.md +3 -0
- data/Gemfile +2 -0
- data/LICENSE +1 -1
- data/README.md +11 -12
- data/Rakefile +2 -0
- data/Vagrantfile +14 -14
- 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 +13 -11
- data/features/assets.feature +0 -1
- data/features/file_access.feature +2 -2
- data/features/mysql.feature +2 -2
- data/features/support/env.rb +4 -2
- data/features/utils.feature +3 -3
- data/lib/capistrano/dkdeploy/core.rb +14 -17
- data/lib/dkdeploy.rb +2 -0
- data/lib/dkdeploy/constants.rb +2 -0
- data/lib/dkdeploy/core/version.rb +3 -1
- data/lib/dkdeploy/dsl.rb +4 -3
- data/lib/dkdeploy/helpers/assets.rb +2 -0
- data/lib/dkdeploy/helpers/common.rb +2 -0
- data/lib/dkdeploy/helpers/db.rb +7 -5
- data/lib/dkdeploy/helpers/file_system.rb +7 -12
- data/lib/dkdeploy/helpers/mysql.rb +3 -0
- data/lib/dkdeploy/i18n.rb +3 -12
- data/lib/dkdeploy/interaction_handler/mysql.rb +4 -1
- data/lib/dkdeploy/interaction_handler/password.rb +3 -1
- data/lib/dkdeploy/rollback_manager.rb +2 -0
- data/lib/dkdeploy/scm/copy.rake +39 -12
- data/lib/dkdeploy/scm/copy.rb +7 -45
- data/lib/dkdeploy/tasks/apache.rake +2 -0
- data/lib/dkdeploy/tasks/assets.rake +3 -1
- data/lib/dkdeploy/tasks/current_folder.rake +3 -1
- data/lib/dkdeploy/tasks/db.rake +138 -154
- data/lib/dkdeploy/tasks/deploy.rake +5 -3
- data/lib/dkdeploy/tasks/enhanced_symlinks.rake +7 -0
- data/lib/dkdeploy/tasks/fail.rake +2 -0
- data/lib/dkdeploy/tasks/file_access.rake +2 -0
- data/lib/dkdeploy/tasks/maintenance.rake +4 -3
- data/lib/dkdeploy/tasks/mysql.rake +5 -0
- data/lib/dkdeploy/tasks/project_version.rake +3 -3
- data/lib/dkdeploy/tasks/utils.rake +2 -0
- data/spec/fixtures/application/Capfile +2 -0
- data/spec/fixtures/application/Gemfile +3 -1
- data/spec/fixtures/application/config/deploy.rb +25 -23
- data/spec/fixtures/application/config/deploy/dev.rb +3 -1
- data/spec/fixtures/capistrano/configuration/add_output_after_create_symlink.rb +1 -0
- data/spec/fixtures/capistrano/configuration/custom_compass_sources.rb +2 -0
- data/spec/fixtures/capistrano/configuration/custom_file_access.rb +2 -0
- data/spec/fixtures/capistrano/configuration/default_deployment_behaviour.rb +2 -0
- metadata +40 -47
- data/features/bower.feature +0 -52
- data/lib/capistrano/copy.rb +0 -2
- data/lib/dkdeploy/tasks/bower.rake +0 -53
- data/spec/fixtures/application/htdocs/bower.json +0 -15
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."
|
data/lib/capistrano/copy.rb
DELETED
@@ -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
|
-
}
|