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
@@ -0,0 +1,52 @@
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, renaming logic, a different directory, and 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 only the matching Rake task
8
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
9
+ And a Capfile with:
10
+ """
11
+ Cape do
12
+ mirror_rake_tasks :load do |recipes|
13
+ recipes.rename do |task_name|
14
+ "do_#{task_name}"
15
+ end
16
+ recipes.cd { release_path }
17
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
18
+ end
19
+ end
20
+ """
21
+ When I run `cap -vT`
22
+ Then the output should contain:
23
+ """
24
+ cap do_load # A task that shadows a Ruby method.
25
+ """
26
+ And the output should not contain "period"
27
+ And the output should not contain "my_namespace"
28
+
29
+ Scenario: mirror the matching Rake task with its implementation
30
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
31
+ And a Capfile with:
32
+ """
33
+ set :release_path, '/release/path'
34
+ set :rails_env, 'rails-env'
35
+
36
+ Cape do
37
+ mirror_rake_tasks :load do |recipes|
38
+ recipes.rename do |task_name|
39
+ "do_#{task_name}"
40
+ end
41
+ recipes.cd { release_path }
42
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
43
+ end
44
+ end
45
+ """
46
+ When I run `cap do_load`
47
+ Then the output should contain:
48
+ """
49
+ * executing `do_load'
50
+ * executing "cd /release/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake load RAILS_ENV=\"rails-env\""
51
+ `do_load' is only run for servers matching {}, but no servers matched
52
+ """
@@ -0,0 +1,50 @@
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, renaming logic, and 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 only the matching Rake task
8
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
9
+ And a Capfile with:
10
+ """
11
+ Cape do
12
+ mirror_rake_tasks :load do |recipes|
13
+ recipes.rename do |task_name|
14
+ "do_#{task_name}"
15
+ end
16
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
17
+ end
18
+ end
19
+ """
20
+ When I run `cap -vT`
21
+ Then the output should contain:
22
+ """
23
+ cap do_load # A task that shadows a Ruby method.
24
+ """
25
+ And the output should not contain "period"
26
+ And the output should not contain "my_namespace"
27
+
28
+ Scenario: mirror the matching Rake task with its implementation
29
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
30
+ And a Capfile with:
31
+ """
32
+ set :current_path, '/current/path'
33
+ set :rails_env, 'rails-env'
34
+
35
+ Cape do
36
+ mirror_rake_tasks :load do |recipes|
37
+ recipes.rename do |task_name|
38
+ "do_#{task_name}"
39
+ end
40
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
41
+ end
42
+ end
43
+ """
44
+ When I run `cap do_load`
45
+ Then the output should contain:
46
+ """
47
+ * executing `do_load'
48
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake load RAILS_ENV=\"rails-env\""
49
+ `do_load' is only run for servers matching {}, but no servers matched
50
+ """
@@ -0,0 +1,49 @@
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, renaming logic, and valid options
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 only the matching Rake task
8
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
9
+ And a Capfile with:
10
+ """
11
+ Cape do
12
+ mirror_rake_tasks :load do |recipes|
13
+ recipes.rename do |task_name|
14
+ "do_#{task_name}"
15
+ end
16
+ recipes.options[:roles] = :app
17
+ end
18
+ end
19
+ """
20
+ When I run `cap -vT`
21
+ Then the output should contain:
22
+ """
23
+ cap do_load # A task that shadows a Ruby method.
24
+ """
25
+ And the output should not contain "period"
26
+ And the output should not contain "my_namespace"
27
+
28
+ Scenario: mirror the matching Rake task with its implementation
29
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
30
+ And a Capfile with:
31
+ """
32
+ set :current_path, '/current/path'
33
+
34
+ Cape do
35
+ mirror_rake_tasks :load do |recipes|
36
+ recipes.rename do |task_name|
37
+ "do_#{task_name}"
38
+ end
39
+ recipes.options[:roles] = :app
40
+ end
41
+ end
42
+ """
43
+ When I run `cap do_load`
44
+ Then the output should contain:
45
+ """
46
+ * executing `do_load'
47
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake load"
48
+ `do_load' is only run for servers matching {:roles=>:app}, but no servers matched
49
+ """
@@ -0,0 +1,51 @@
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, renaming logic, valid options, and a different directory
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 only the matching Rake task
8
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
9
+ And a Capfile with:
10
+ """
11
+ Cape do
12
+ mirror_rake_tasks :load do |recipes|
13
+ recipes.rename do |task_name|
14
+ "do_#{task_name}"
15
+ end
16
+ recipes.options[:roles] = :app
17
+ recipes.cd { release_path }
18
+ end
19
+ end
20
+ """
21
+ When I run `cap -vT`
22
+ Then the output should contain:
23
+ """
24
+ cap do_load # A task that shadows a Ruby method.
25
+ """
26
+ And the output should not contain "period"
27
+ And the output should not contain "my_namespace"
28
+
29
+ Scenario: mirror the matching Rake task with its implementation
30
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
31
+ And a Capfile with:
32
+ """
33
+ set :release_path, '/release/path'
34
+
35
+ Cape do
36
+ mirror_rake_tasks :load do |recipes|
37
+ recipes.rename do |task_name|
38
+ "do_#{task_name}"
39
+ end
40
+ recipes.options[:roles] = :app
41
+ recipes.cd { release_path }
42
+ end
43
+ end
44
+ """
45
+ When I run `cap do_load`
46
+ Then the output should contain:
47
+ """
48
+ * executing `do_load'
49
+ * executing "cd /release/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake load"
50
+ `do_load' is only run for servers matching {:roles=>:app}, but no servers matched
51
+ """
@@ -0,0 +1,54 @@
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, renaming logic, valid options, a different directory, and 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 only the matching Rake task
8
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
9
+ And a Capfile with:
10
+ """
11
+ Cape do
12
+ mirror_rake_tasks :load do |recipes|
13
+ recipes.rename do |task_name|
14
+ "do_#{task_name}"
15
+ end
16
+ recipes.options[:roles] = :app
17
+ recipes.cd { release_path }
18
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
19
+ end
20
+ end
21
+ """
22
+ When I run `cap -vT`
23
+ Then the output should contain:
24
+ """
25
+ cap do_load # A task that shadows a Ruby method.
26
+ """
27
+ And the output should not contain "period"
28
+ And the output should not contain "my_namespace"
29
+
30
+ Scenario: mirror the matching Rake task with its implementation
31
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
32
+ And a Capfile with:
33
+ """
34
+ set :release_path, '/release/path'
35
+ set :rails_env, 'rails-env'
36
+
37
+ Cape do
38
+ mirror_rake_tasks :load do |recipes|
39
+ recipes.rename do |task_name|
40
+ "do_#{task_name}"
41
+ end
42
+ recipes.options[:roles] = :app
43
+ recipes.cd { release_path }
44
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
45
+ end
46
+ end
47
+ """
48
+ When I run `cap do_load`
49
+ Then the output should contain:
50
+ """
51
+ * executing `do_load'
52
+ * executing "cd /release/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake load RAILS_ENV=\"rails-env\""
53
+ `do_load' is only run for servers matching {:roles=>:app}, but no servers matched
54
+ """
@@ -0,0 +1,52 @@
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, renaming logic, valid options, and 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 only the matching Rake task
8
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
9
+ And a Capfile with:
10
+ """
11
+ Cape do
12
+ mirror_rake_tasks :load do |recipes|
13
+ recipes.rename do |task_name|
14
+ "do_#{task_name}"
15
+ end
16
+ recipes.options[:roles] = :app
17
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
18
+ end
19
+ end
20
+ """
21
+ When I run `cap -vT`
22
+ Then the output should contain:
23
+ """
24
+ cap do_load # A task that shadows a Ruby method.
25
+ """
26
+ And the output should not contain "period"
27
+ And the output should not contain "my_namespace"
28
+
29
+ Scenario: mirror the matching Rake task with its implementation
30
+ Given a full-featured Rakefile defining a Ruby-method-shadowing task
31
+ And a Capfile with:
32
+ """
33
+ set :current_path, '/current/path'
34
+ set :rails_env, 'rails-env'
35
+
36
+ Cape do
37
+ mirror_rake_tasks :load do |recipes|
38
+ recipes.rename do |task_name|
39
+ "do_#{task_name}"
40
+ end
41
+ recipes.options[:roles] = :app
42
+ recipes.env['RAILS_ENV'] = lambda { rails_env }
43
+ end
44
+ end
45
+ """
46
+ When I run `cap do_load`
47
+ Then the output should contain:
48
+ """
49
+ * executing `do_load'
50
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake load RAILS_ENV=\"rails-env\""
51
+ `do_load' is only run for servers matching {:roles=>:app}, but no servers matched
52
+ """
@@ -1,10 +1,11 @@
1
- Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and valid options, and with environment variables
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task and valid options
2
2
 
3
3
  In order to include Rake tasks with descriptions in my Capistrano recipes,
4
4
  As a developer using Cape,
5
5
  I want to use the Cape DSL.
6
6
 
7
- Scenario: mirror only the matching Rake task
7
+ @deprecated
8
+ Scenario: mirror only the matching Rake task (deprecated)
8
9
  Given a full-featured Rakefile
9
10
  And a Capfile with:
10
11
  """
@@ -18,22 +19,68 @@ Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and
18
19
  cap with_period # Ends with period.
19
20
  """
20
21
  And the output should not contain "without_period"
22
+ And the output should not contain "my_namespace"
23
+ And the output should contain:
24
+ """
25
+ *** DEPRECATED: `mirror_rake_tasks :with_period, :roles => :app`. Use this instead: `mirror_rake_tasks(:with_period) { |recipes| recipes.options[:roles] = :app }`
26
+ """
21
27
 
22
- Scenario: mirror the matching Rake task with its implementation
28
+ Scenario: mirror only the matching Rake task
23
29
  Given a full-featured Rakefile
24
30
  And a Capfile with:
25
31
  """
26
- set :current_path, '/path/to/current/deployed/application'
27
- set :rails_env, 'production'
32
+ Cape do
33
+ mirror_rake_tasks :with_period do |recipes|
34
+ recipes.options[:roles] = :app
35
+ end
36
+ end
37
+ """
38
+ When I run `cap -vT`
39
+ Then the output should contain:
40
+ """
41
+ cap with_period # Ends with period.
42
+ """
43
+ And the output should not contain "without_period"
44
+ And the output should not contain "my_namespace"
45
+ And the output should not contain "DEPRECATED"
46
+
47
+ @deprecated
48
+ Scenario: mirror the matching Rake task with its implementation (deprecated)
49
+ Given a full-featured Rakefile
50
+ And a Capfile with:
51
+ """
52
+ set :current_path, '/current/path'
28
53
 
29
54
  Cape do
30
55
  mirror_rake_tasks 'with_period', :roles => :app
31
56
  end
32
57
  """
33
58
  When I run `cap with_period`
59
+ Then the output should contain:
60
+ """
61
+ *** DEPRECATED: `mirror_rake_tasks "with_period", :roles => :app`. Use this instead: `mirror_rake_tasks("with_period") { |recipes| recipes.options[:roles] = :app }`
62
+ * executing `with_period'
63
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
64
+ `with_period' is only run for servers matching {:roles=>:app}, but no servers matched
65
+ """
66
+
67
+ Scenario: mirror the matching Rake task with its implementation
68
+ Given a full-featured Rakefile
69
+ And a Capfile with:
70
+ """
71
+ set :current_path, '/current/path'
72
+
73
+ Cape do
74
+ mirror_rake_tasks 'with_period' do |recipes|
75
+ recipes.options[:roles] = :app
76
+ end
77
+ end
78
+ """
79
+ When I run `cap with_period`
34
80
  Then the output should contain:
35
81
  """
36
82
  * executing `with_period'
37
- * 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"
83
+ * executing "cd /current/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
38
84
  `with_period' is only run for servers matching {:roles=>:app}, but no servers matched
39
85
  """
86
+ And the output should not contain "DEPRECATED"
@@ -1,4 +1,4 @@
1
- Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and valid options, and with environment variables
1
+ Feature: The #mirror_rake_tasks DSL method with a defined task, valid options, and a different directory
2
2
 
3
3
  In order to include Rake tasks with descriptions in my Capistrano recipes,
4
4
  As a developer using Cape,
@@ -9,8 +9,9 @@ Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and
9
9
  And a Capfile with:
10
10
  """
11
11
  Cape do
12
- mirror_rake_tasks :with_period, :roles => :app do |env|
13
- env['RAILS_ENV'] = rails_env
12
+ mirror_rake_tasks :with_period do |recipes|
13
+ recipes.options[:roles] = :app
14
+ recipes.cd { release_path }
14
15
  end
15
16
  end
16
17
  """
@@ -20,17 +21,18 @@ Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and
20
21
  cap with_period # Ends with period.
21
22
  """
22
23
  And the output should not contain "without_period"
24
+ And the output should not contain "my_namespace"
23
25
 
24
26
  Scenario: mirror the matching Rake task with its implementation
25
27
  Given a full-featured Rakefile
26
28
  And a Capfile with:
27
29
  """
28
- set :current_path, '/path/to/current/deployed/application'
29
- set :rails_env, 'production'
30
+ set :release_path, '/release/path'
30
31
 
31
32
  Cape do
32
- mirror_rake_tasks 'with_period', :roles => :app do |env|
33
- env['RAILS_ENV'] = rails_env
33
+ mirror_rake_tasks :with_period do |recipes|
34
+ recipes.options[:roles] = :app
35
+ recipes.cd { release_path }
34
36
  end
35
37
  end
36
38
  """
@@ -38,6 +40,6 @@ Feature: The #mirror_rake_tasks DSL method with arguments of a defined task and
38
40
  Then the output should contain:
39
41
  """
40
42
  * executing `with_period'
41
- * 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\""
43
+ * executing "cd /release/path && /usr/bin/env `/usr/bin/env bundle check >/dev/null 2>&1; case $? in 0|1 ) echo bundle exec ;; esac` rake with_period"
42
44
  `with_period' is only run for servers matching {:roles=>:app}, but no servers matched
43
45
  """