Sha256: 95d91e2630416971f82082bed33b17200259aa498ca8f4d0068ba1ec2b3b3eed

Contents?: true

Size: 838 Bytes

Versions: 7

Compression:

Stored size: 838 Bytes

Contents

# To load this capistrano configuration, require 'easy/deployment/dbreference' from deploy.rb
Capistrano::Configuration.instance(:must_exist).load do
  namespace :easy do
    namespace :reference_data do
      desc "Refresh reference data"
      task :refresh, :roles => :db, :only => { :primary => true } do
        migrate_target = fetch(:migrate_target, :latest)

        directory = case migrate_target.to_sym
                    when :current then current_path
                    when :latest  then latest_release
                    else raise ArgumentError, "unknown migration target #{migrate_target.inspect}"
                    end
        
        run "cd #{directory} && RAILS_ENV=#{rails_env} bundle exec rake easy:reference_data:refresh"
      end
    end
  end

  after 'deploy:migrate', 'easy:reference_data:refresh'
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
easy_reference_data-1.2.1 lib/easy/reference_data/capistrano.rb
easy_reference_data-1.2.0 lib/easy/reference_data/capistrano.rb
easy_reference_data-1.1.0 lib/easy/reference_data/capistrano.rb
easy_reference_data-1.0.0 lib/easy/reference_data/capistrano.rb
easy_reference_data-0.1.2 lib/easy/reference_data/capistrano.rb
easy_reference_data-0.1.1 lib/easy/reference_data/capistrano.rb
easy_reference_data-0.1.0 lib/easy/reference_data/capistrano.rb