1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
Commit graph

12 commits

Author SHA1 Message Date
Berin Larson
ed0a3f08df Adds acceptance test for rollback feature. (#1891)
* #1736 Adds acceptance test for rollback feature.
* Made vagrant_cli_command function return values explicitly over setting instance variables.
2017-07-04 19:02:58 -07:00
William Johnston
410ef1b256 Revert issue introduced by misunderstanding of rescue modifier 2016-03-21 21:30:08 -05:00
William Johnston
e7592dbf9d Fix glitch in autocorrect 2016-03-10 08:01:15 -06:00
William Johnston
91777db59f Enable RescueModifier cop 2016-03-10 08:01:15 -06:00
Matt Brictson
f90f9a03f5 Use %Q instead of bare % for string literals 2016-03-01 20:13:57 -08:00
William Johnston
b53e550fc0 Fix Style/StringLiterals 2016-02-28 17:56:07 -06:00
Chad Shaffer
d6f4499ee8 Address all rubocop lint warnings
* (File, Dir).exists? -> (File, Dir).exist?
* Prepend unused parameter names with an underscore
* Prefer “safe assignment in condition”
* Disambiguate splat operators with parens
* Remove unnecessary assignments (unused variables)
* No longer shadow Vagrant config variable name in Vagrantfile
* Removed some trailing whitespace

Fixes #1404
2015-08-14 14:21:34 -07:00
Lee Hambley
bb2b5f3232 Revert "Issue/1404" 2015-03-30 10:23:29 +02:00
Paul Schreiber
62246c997c fixes most of #1404
remaining:
lib/capistrano/configuration/question.rb:41:7: W: Do not suppress exceptions.
      rescue Errno::EIO
      ^^^^^^^^^^^^^^^^^
spec/support/Vagrantfile:8:47: W: Shadowing outer local variable - config.
    config.vm.define(role, primary: true) do |config|
                                              ^^^^^^
2015-03-29 22:28:21 -04:00
Travis Petticrew
2e13a1319c Cucumber tests will now run on the latest Vagrant
This removes the dependency on the `kuroko` gem and uses the Vagrant
command line application to control the virtual environment. The
`vagrant` command should be in your path, but if it isn't the path can
be set with the `VAGRANT_BIN` environment variable. This may even work
on older versions of Vagrant, but they are untested.

The `VagrantHelpers` module was added to mimic some of the API that was
provided by `kuroko`. The `RemoteCommandHelpers` module was modified to
accommodate those changes. Any non-zero exit status on a remote command
will raise a `VagrantHelpers::VagrantSSHCommandError` and should be
expected by any tests using the command helpers. All existing tests
work as expected.

In addition, a couple of minor changes were made. The TestApp utilizes
the Pathname library but does not require it. This was causing the suite
to fail for me so I added an explicit require. Also, the test for the
existence of a release directory would give a false positive on
subsequent runs if the `KEEP_RUNNING` option was used. I added an
`at_exit` that removes the test deployment directory to clean up the
box for the next run.

Documentation was also added to the README for how to run the test
suites.
2014-04-23 10:19:20 -05:00
seenmyfate
7432c710b0 Add hook for deploy failure
If an error is raised during a deploy, the task `deploy:failed` will be
triggered.  Custom tasks can hook into this using `after`:

    after 'deploy:failed', :send_for_help do
      #
    end

I've also taken the opportunity to provide a marginally more useful
error message before triggering the task.

By default, this 'deploy:failed' will only be triggered when running
`cap <stage> deploy` - to trigger after individual tasks use `set
:deploying, true`

This closes #708 and replaces
https://github.com/capistrano/capistrano/pull/720
2013-11-01 12:24:36 +00:00
seenmyfate
e7399f4692 Integration tests with Vagrant and Cucumber
This commit removes the existing 'local' integration tests and replaces
them with Cucumber features running against VMs.  At this stage,
some of the assertions are pending due to the limited nature of the
response returned when executing commands through Vagrant, but the
framework is there as a starting point to build upon.

To run the suite:

    bundle exec cucumber

During development, avoid scraping the VM between runs:

    bundle exec cucumber KEEPING_RUNNING=1

Ultimately I would like to see the `TestApp` helpers along with the Vagrant
integration packaged and available for use when developing gems that work with
Cap. For now though, this closes #641
2013-09-27 11:45:55 +01:00