Commit Graph

17 Commits

Author SHA1 Message Date
William Johnston b53e550fc0 Fix Style/StringLiterals 2016-02-28 17:56:07 -06:00
Matt Brictson d6a3b3efa6 Make Airbrussh the default format; add format opts
To accommodate Airbrussh, this commit makes the following changes:

1. Adds the airbrussh gem as a dependency
2. Bumps the sshkit dependency to 1.8.0 (for the new `use_format` method)
3. Introduces a `:format_options` setting

Out of the box, Capistrano now defaults to the following:

set :format, :airbussh

It also requires the airbrussh gem at the appropriate point in the Capistrano
boot process, which allows Airbrussh to register its `deploy:failed` hook.

We also change the default Airbrussh settings slightly, to acknowledge the fact
that Airbrussh will now be the first impression new Capistrano users have of the
tool.

Specifically:

* Enable command output (hiding the command output is tidy but probably will
  confuse new users who will not know what their deploy script is doing)
* Disable the "using airbrussh format" banner at startup

Finally, this commit adds an official mechanism for sending a hash of options to
the formatter initializer. This lets users easily change Airbrussh's settings.

set :format_options, color: false, truncate: false, ...

If `:format_options` are set, Capistrano will send them to the formatter object
using SSHKit's `use_format` factory method. As of the latest SSHKit, all
formatters inheriting from `Formatter::Abstract` now accept an options hash
(although currently only Airbrussh does anything with them).
2016-02-24 09:03:54 -08:00
Matt Brictson 52b0d489d7 Prevent enhance of load:defaults after invoke
Print a warning and abort if "load:defaults" is erroneously invoked after
capistrano is already loaded, e.g. when a plugin is loaded in `deploy.rb`
instead of `Capfile`.
2015-07-05 11:27:28 -07:00
Bryan Ricker 6a378200c5 ✂️ trailing whitespace 2013-12-25 02:40:46 -08:00
seenmyfate f056c0e4ec Merge branch 'master' into 3.1.x 2013-10-18 11:41:15 +01:00
Kir Shatrov a9e71c8040 Set stage at the beginning to be able to use it from config/deploy.rb 2013-10-17 12:14:32 +02:00
seenmyfate d8b9b695bb Allow configuration location to be configurable
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
2013-10-14 12:44:38 +01:00
seenmyfate f040f12353 Fix default configuration load order
Ensure application specific configuration is loaded after
`load:defaults`.  This closes #640 and
https://github.com/capistrano/bundler/issues/5
2013-09-08 10:51:51 +01:00
seenmyfate 7a85ddcdd1 Add a task to load defaults
Now gems can implement a 'load:defaults' task in order to set any
defaults that may rely on other varibles set in stage configuration.

    namespace :load do
      task :defaults do
        set :my_file, release_path.join('my_file')
      end
    end
2013-08-09 16:54:42 +01:00
seenmyfate 4ece2f9a78 move text into translation, allow setting of locale 2013-05-24 19:27:33 +01:00
seenmyfate 6b51d9a50b Adds support for `~/.capfile`, closes #445
Any tasks specified in `~/.capfile` will be loaded when including
`capistrano/setup`.  Given the default nature of these tasks, it may be
that this load order is not ideal, but for the simple use case of having
a number of default tasks available to all applications I think this is
sufficient.  It would however be preferable to encourage the packaging
of shared tasks in gem format.
2013-05-24 12:02:01 +01:00
seenmyfate 1c65d210ad auto load scm tasks based on :scm value 2013-03-24 17:51:36 +00:00
seenmyfate 033bf8ee49 set defaults in a single place, call as part of setup task 2013-03-22 11:25:26 +00:00
seenmyfate 49a075427d basic deployment - done 2013-03-12 21:22:49 +00:00
seenmyfate 454f46b829 better encapsulate configuration, support current format 2013-03-10 20:44:50 +00:00
seenmyfate 5e4fe624b5 reduce dsl, prefer fetch/set 2013-03-03 16:27:33 +00:00
seenmyfate 83f7dd8e96 move stage and DSL to setup 2013-03-01 09:46:53 +00:00