1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00
capistrano/features
Matt Brictson b5e4aa6d5e Add doctor:variables, :environment, and :gems
This adds various "doctor" tasks that can be used for troubleshooting. To see
all the doctor output, run e.g. `cap production doctor`. This will print a
report like this:

```
Environment

    Ruby     ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin14]
    Rubygems 2.6.2
    Bundler  1.11.2
    Command  cap production doctor

Gems

    capistrano         3.4.0
    airbrussh          1.0.1
    rake               10.5.0 (update available)
    sshkit             1.9.0
    capistrano-bundler 1.1.4
    capistrano-rails   1.1.6

Variables

    :application                         "myapp"
    :assets_prefix                       "assets"
    :assets_roles                        [:web]
    :branch                              "master"

... etc.
```

To obtain the variables information in particular, code has been added to audit
the setting and fetching of variables. Variables set by Capistrano itself and
its plugins are whitelisted, but others are "untrusted". If a variable is
untrusted and it seems like it is never used, then `doctor:variables` will print
a warning (include source location) for that variable name, like this:

```
:copy_strategy is not a recognized Capistrano setting (config/deploy.rb:14)
```

Finally, the RubyGems API is used to check the remote gem repository to see if
any newer versions of Capistrano gems are available (this is gracefully skipped
if there is no network connection). Any outdated gems will be indicated in the
`doctor:gems` output.
2016-04-25 17:14:55 +02:00
..
step_definitions Enable RescueModifier cop 2016-03-10 08:01:15 -06:00
support Revert issue introduced by misunderstanding of rescue modifier 2016-03-21 21:30:08 -05:00
configuration.feature Fix cucumber spec for loading tasks from stage configs 2014-12-10 01:13:19 +03:00
deploy.feature Update 'symlink linked files' cucumber scenario 2014-11-17 13:47:24 +01:00
deploy_failure.feature Add hook for deploy failure 2013-11-01 12:24:36 +00:00
doctor.feature Add doctor:variables, :environment, and :gems 2016-04-25 17:14:55 +02:00
installation.feature Integration tests with Vagrant and Cucumber 2013-09-27 11:45:55 +01:00
remote_file_task.feature Integration tests with Vagrant and Cucumber 2013-09-27 11:45:55 +01:00
sshconnect.feature Improve Cucumber tests 2015-02-14 11:32:45 -08:00