This conversion is done by Transpec 1.13.1 with the following command:
transpec
* 11 conversions
from: obj.should
to: expect(obj).to
* 5 conversions
from: == expected
to: eq(expected)
* 2 conversions
from: expect(collection).to have(n).items
to: expect(collection.size).to eq(n)
* 1 conversion
from: collection.should have(n).items
to: expect(collection.size).to eq(n)
* 1 conversion
from: obj.should_not
to: expect(obj).not_to
For the case where the array may be stored in a variable, for example:
set :my_roles, [:app, :web]
on roles fetch(:my_roles) do
#
end
This will allow https://github.com/capistrano/rails/pull/30 to be
refactored
In order to provide a way for a server to perform tasks as part of a
deploy but without being involved in the standard deploy flow, all
included tasks will now prefer `release_roles` over `roles`. For
example:
on release_roles :all do
#
end
This behaviour is implemented using `exclude`, a new option when
selecting roles. `release_roles` is equivalent to:
on roles :all, exclude: :no_release do
#
end
Any server defined with `no_release: true` will be excluded from these
tasks:
server 'localhost', roles: %w{db}, no_release: true
`exclude` can also be used in user defined tasks against any attribute, for example:
server 'localhost', roles: %w{app web}, inactive: true
on roles :app, exclude: :inactive do
#
end
This commit resolves#686
This change allows both the `deploy_config_path` and `stage_config_path`
to be moved from the default locations of `config/deploy.rb` and
`config/deploy` respectively. These values __must__ be set in the
`Capfile` prior to `capistrano/setup` being called, for example:
set :deploy_config_path, 'app/config/deploy.rb'
set :stage_config_path, 'app/config/deploy'
# Load DSL and Setup Up Stages
require 'capistrano/setup'
Fixes#610
`release_path` will now return the value of `current_path` by default.
Tasks that create a new release (i.e. `deploy`) now explicitly over-ride this
default with a new release path. This change allows tasks that run in both
deploy and non-deploy contexts to use `release_path` to target the latest
release when run in isolation, and the new release (before it is `current`)
when run as part of a deploy.
This commit adds the outlines of a testing framework for Cap tasks.
Currently just the `cap install` and `cap deploy` tasks are covered. For
now, these tests can only be run if it is `ssh localhost` will work for
you and are currently excluded from the suite. It is my intention to
eventually replace the `sshkit` backend with a test backend, but for now
this is good enough to prevent simple regressions.