Repository is archived
No commit activity in last 3 years
No release in over 3 years
Hanami tasks for Capistrano
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.13
~> 10.0
~> 3.0

Runtime

 Project Readme

🌸 Capistrano::Hanami

Hanami tasks for Capistrano v3:

  • cap deploy:migrate
  • cap deploy:compile_assets

Installation

Add this line to your application's Gemfile:

group :development do
  gem 'capistrano', '~> 3.7'
  gem 'capistrano-hanami', require: false
end

And then execute:

$ bundle

Then run the generator to create a basic set of configuration files:

$ bundle exec cap install

Usage

# Capfile
require 'capistrano/hanami' # It also requires bundler

You can tweak some Hanami-specific options in config/deploy.rb:

# If the environment differs from the stage name
set :hanami_env, 'staging'

# Defaults to :app role
set :migration_role, :db

# Defaults to the primary :app server
set :migration_servers, -> { primary(fetch(:migration_role)) }

# Defaults to false
# Skip migration if files in db/migrations were not modified
set :conditionally_migrate, true

# Defaults to [:web]
set :assets_roles, [:web, :app]

Development

After checking out the repo, run bin/setup to install dependencies. Then, run rake spec to run the tests. You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/mgrachev/capistrano-hanami.