dkdeploy-core 9.1.0 → 9.2.4

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 (60) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +3 -1
  3. data/.travis.yml +2 -1
  4. data/Berksfile +2 -0
  5. data/Berksfile.lock +36 -35
  6. data/CHANGELOG.md +55 -0
  7. data/CONTRIBUTORS.md +3 -0
  8. data/Gemfile +2 -0
  9. data/LICENSE +1 -1
  10. data/README.md +9 -10
  11. data/Rakefile +2 -0
  12. data/Vagrantfile +8 -7
  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 +10 -8
  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 +4 -2
  25. data/lib/dkdeploy/dsl.rb +2 -0
  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 +3 -1
  36. data/lib/dkdeploy/scm/copy.rb +4 -2
  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 +9 -8
  41. data/lib/dkdeploy/tasks/deploy.rake +3 -0
  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 -2
  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 +4 -0
  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 +38 -44
  58. data/features/bower.feature +0 -52
  59. data/lib/dkdeploy/tasks/bower.rake +0 -53
  60. data/spec/fixtures/application/htdocs/bower.json +0 -15
@@ -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
- }