
Product
Announcing Precomputed Reachability Analysis in Socket
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
capistrano-multiconfig
Advanced tools
Capistrano extension that allows to use multiple configurations.
Multiconfig extension is similar to multistage extenstion. But it's not only about 'stage' configurations. It's about any configuration that you may need. Extension recursively builds configuration list from configuration root directory. Each configuration loads recursively configuration from it namespace files and own configuration file.
Extension was specially created to implement Caphub concept. Read more.
Install gem
$ gem install capistrano-multiconfig
Use multiconfig v3.x.x
Replace capistrano/setup
with capistrano/multiconfig
in your Capfile
:
# set :stages_root, 'config/deploy'
require 'capistrano/multiconfig'
Optionally you may set another path to your multistages configurations with :stages_root.
For legacy capistrano v2.x.x use multiconfig gem v0.0.x
Add to Capfile
set :config_root, 'path/to/your/configurations'
require 'capistrano/multiconfig'
Assume we need next configurations:
Choose configuration root directory for example config/deploy
Create configuration files:
config/deploy/services/billing/production.rb
config/deploy/services/billing/qa.rb
config/deploy/blog/production.rb
config/deploy/blog/staging.rb
config/deploy/dev/wiki.rb
Add to Capfile
:
require 'capistrano/multiconfig'
Put related capistrano configuration to each file according to file meaning.
Check tasks:
$ cap -T
cap services:billing:production # Load services:billing:production configuration
cap services:billing:qa # Load services:billing:qa configuration
cap blog:production # Load blog:production configuration
cap blog:staging # Load blog:staging configuration
cap wiki # Load wiki configuration
cap invoke # Invoke a single command on the remote servers.
cap shell # Begin an interactive Capistrano session.
Let's try to run task without specified configuration:
$ cap shell
triggering start callbacks for `shell'
* executing `multiconfig:ensure'
No configuration specified. Please specify one of:
* wiki:production
* wiki:staging
* blog:production
* blog:staging
(e.g. `cap wiki:production shell')
So we must provide configuration as first task:
$ cap services:billing:qa shell
Configuration task loads not only configuration associated with it filename. It also recursively load configurations from all namespaces.
For example task cap apps/blog/qa.rb
loads with order next configuration files (if they exist):
So it's easy to put shared configuration.
Specify in Capfile
:
set :stages_root, 'deployment'
require 'capistrano/multiconfig'
$ bundle install
$ rspec -fs spec
FAQs
Unknown package
We found that capistrano-multiconfig demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket’s precomputed reachability slashes false positives by flagging up to 80% of vulnerabilities as irrelevant, with no setup and instant results.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.