Class: Capistrano::Deploy::Strategy::CopyBundled
- Inherits:
-
Copy
- Object
- Copy
- Capistrano::Deploy::Strategy::CopyBundled
- Defined in:
- lib/capistrano/recipes/deploy/strategy/copy_bundled.rb
Instance Method Summary collapse
- #deploy! ⇒ Object
-
#initialize(config = {}) ⇒ CopyBundled
constructor
A new instance of CopyBundled.
Constructor Details
#initialize(config = {}) ⇒ CopyBundled
Returns a new instance of CopyBundled.
11 12 13 14 15 16 17 |
# File 'lib/capistrano/recipes/deploy/strategy/copy_bundled.rb', line 11 def initialize(config = {}) super(config) #Initialize with default bundler/capistrano tasks (bundle:install) configuration.set :rake, lambda { "#{configuration.fetch(:bundle_cmd, "bundle")} exec rake" } unless configuration.exists?(:rake) Bundler::Deployment.define_task(configuration, :task, :except => { :no_release => true }) end |
Instance Method Details
#deploy! ⇒ Object
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
# File 'lib/capistrano/recipes/deploy/strategy/copy_bundled.rb', line 19 def deploy! logger.info "running :copy_bundled strategy" copy_cache ? run_copy_cache_strategy : run_copy_strategy create_revision_file configuration.trigger('strategy:before:bundle') #Bundle all gems bundle! configuration.trigger('strategy:after:bundle') logger.info "compressing repository" configuration.trigger('strategy:before:compression') compress_repository configuration.trigger('strategy:after:compression') logger.info "distributing packaged repository" configuration.trigger('strategy:before:distribute') distribute! configuration.trigger('strategy:after:distribute') ensure rollback_changes end |