cape 1.6.2 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. data/Gemfile +7 -6
  2. data/Guardfile +29 -10
  3. data/History.markdown +4 -0
  4. data/README.markdown +38 -9
  5. data/Rakefile +35 -8
  6. data/features/dsl/each_rake_task/{without_arguments.feature → unqualified.feature} +16 -37
  7. data/features/dsl/each_rake_task/{with_defined_namespace_argument.feature → with_defined_namespace.feature} +2 -13
  8. data/features/dsl/each_rake_task/{with_defined_task_argument.feature → with_defined_task.feature} +2 -6
  9. data/features/dsl/each_rake_task/with_undefined_task_or_namespace.feature +24 -0
  10. data/features/dsl/mirror_rake_tasks/inside_capistrano_namespace.feature +2 -2
  11. data/features/dsl/mirror_rake_tasks/{without_arguments.feature → unqualified.feature} +15 -11
  12. data/features/dsl/mirror_rake_tasks/with_cd.feature +63 -0
  13. data/features/dsl/mirror_rake_tasks/with_cd_and_environment_variables.feature +27 -0
  14. data/features/dsl/mirror_rake_tasks/{with_defined_namespace_argument.feature → with_defined_namespace.feature} +6 -8
  15. data/features/dsl/mirror_rake_tasks/{with_defined_task_argument.feature → with_defined_task.feature} +4 -4
  16. data/features/dsl/mirror_rake_tasks/{with_defined_task_argument_and_environment_variables.feature → with_defined_task_and_cd.feature} +8 -8
  17. data/features/dsl/mirror_rake_tasks/with_defined_task_and_cd_and_environment_variables.feature +46 -0
  18. data/features/dsl/mirror_rake_tasks/with_defined_task_and_environment_variables.feature +92 -0
  19. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename.feature +47 -0
  20. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_cd.feature +49 -0
  21. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_cd_and_environment_variables.feature +52 -0
  22. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_environment_variables.feature +50 -0
  23. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_valid_options.feature +49 -0
  24. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_valid_options_and_cd.feature +51 -0
  25. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_valid_options_and_cd_and_environment_variables.feature +54 -0
  26. data/features/dsl/mirror_rake_tasks/with_defined_task_and_rename_and_valid_options_and_environment_variables.feature +52 -0
  27. data/features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options.feature +53 -6
  28. data/features/dsl/mirror_rake_tasks/{with_defined_task_and_valid_options_arguments_and_environment_variables.feature → with_defined_task_and_valid_options_and_cd.feature} +10 -8
  29. data/features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options_and_cd_and_environment_variables.feature +48 -0
  30. data/features/dsl/mirror_rake_tasks/with_defined_task_and_valid_options_and_environment_variables.feature +98 -0
  31. data/features/dsl/mirror_rake_tasks/with_environment_variables.feature +61 -4
  32. data/features/dsl/mirror_rake_tasks/with_rename.feature +27 -0
  33. data/features/dsl/mirror_rake_tasks/with_rename_and_cd.feature +28 -0
  34. data/features/dsl/mirror_rake_tasks/with_rename_and_cd_and_environment_variables.feature +30 -0
  35. data/features/dsl/mirror_rake_tasks/with_rename_and_environment_variables.feature +29 -0
  36. data/features/dsl/mirror_rake_tasks/with_rename_and_valid_options.feature +28 -0
  37. data/features/dsl/mirror_rake_tasks/with_rename_and_valid_options_and_cd.feature +29 -0
  38. data/features/dsl/mirror_rake_tasks/with_rename_and_valid_options_and_cd_and_environment_variables.feature +31 -0
  39. data/features/dsl/mirror_rake_tasks/with_rename_and_valid_options_and_environment_variables.feature +30 -0
  40. data/features/dsl/mirror_rake_tasks/{with_undefined_argument.feature → with_undefined_task_or_namespace.feature} +3 -4
  41. data/features/dsl/mirror_rake_tasks/with_valid_options.feature +46 -0
  42. data/features/dsl/mirror_rake_tasks/{with_valid_options_argument.feature → with_valid_options_and_cd.feature} +7 -5
  43. data/features/dsl/mirror_rake_tasks/with_valid_options_and_cd_and_environment_variables.feature +28 -0
  44. data/features/dsl/mirror_rake_tasks/with_valid_options_and_environment_variables.feature +51 -0
  45. data/features/dsl/rake_executable.feature +2 -2
  46. data/features/step_definitions.rb +40 -0
  47. data/lib/cape.rb +2 -0
  48. data/lib/cape/capistrano.rb +59 -32
  49. data/lib/cape/capistrano_deprecated.rb +165 -0
  50. data/lib/cape/core_ext.rb +2 -0
  51. data/lib/cape/deprecation.rb +12 -0
  52. data/lib/cape/deprecation/base.rb +59 -0
  53. data/lib/cape/deprecation/capistrano_deprecated_define_rake_wrapper.rb +168 -0
  54. data/lib/cape/deprecation/dsl_deprecated_mirror_rake_tasks.rb +145 -0
  55. data/lib/cape/dsl.rb +49 -60
  56. data/lib/cape/dsl_deprecated.rb +157 -0
  57. data/lib/cape/hash_list.rb +2 -0
  58. data/lib/cape/recipe_definition.rb +103 -0
  59. data/lib/cape/recipe_definition_deprecated.rb +41 -0
  60. data/lib/cape/util.rb +2 -0
  61. data/lib/cape/version.rb +1 -1
  62. data/lib/cape/xterm.rb +326 -0
  63. data/spec/cape/deprecation/base_sharedspec.rb +18 -0
  64. data/spec/cape/deprecation/capistrano_deprecated_define_rake_wrapper_spec.rb +157 -0
  65. data/spec/cape/deprecation/dsl_deprecated_mirror_rake_tasks_spec.rb +153 -0
  66. data/spec/cape/dsl_deprecated_spec.rb +307 -0
  67. data/spec/cape/dsl_spec.rb +10 -43
  68. data/spec/cape/recipe_definition_spec.rb +53 -0
  69. data/spec/cape/xterm_spec.rb +72 -0
  70. metadata +97 -28
  71. data/features/dsl/each_rake_task/with_undefined_argument.feature +0 -53
  72. data/features/dsl/mirror_rake_tasks/with_valid_options_arguments_and_environment_variables.feature +0 -26
@@ -1,26 +0,0 @@
1
- Feature: The #mirror_rake_tasks DSL method with an argument of valid options, and with environment variables
2
-
3
- In order to include Rake tasks with descriptions in my Capistrano recipes,
4
- As a developer using Cape,
5
- I want to use the Cape DSL.
6
-
7
- Scenario: mirror a Rake task with its implementation
8
- Given a full-featured Rakefile
9
- And a Capfile with:
10
- """
11
- set :current_path, '/path/to/current/deployed/application'
12
- set :rails_env, 'production'
13
-
14
- Cape do
15
- mirror_rake_tasks :roles => :app do |env|
16
- env['RAILS_ENV'] = rails_env
17
- end
18
- end
19
- """
20
- When I run `cap with_period`
21
- Then the output should contain:
22
- """
23
- * executing `with_period'
24
- * executing "cd /path/to/current/deployed/application && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period RAILS_ENV=\"production\""
25
- `with_period' is only run for servers matching {:roles=>:app}, but no servers matched
26
- """