Sha256: 313b0d9b8db811f6cfc6ad3500e39a5d799707c895417ee1439e1857ac8ac9f8

Contents?: true

Size: 579 Bytes

Versions: 1

Compression:

Stored size: 579 Bytes

Contents

require 'multi_sync'

namespace :assets do
  desc 'Synchronize assets'
  task :sync => :environment do
    ActiveSupport::Notifications.instrument 'multi_sync.run' do
      MultiSync::Extensions::AssetSync.check_and_migrate
      MultiSync.run if MultiSync.run_on_build
    end
  end
end

Rake::Task['assets:precompile'].enhance do
  Rake::Task['assets:sync'].invoke if defined?(MultiSync)
end

if Rake::Task.task_defined?('assets:precompile:nondigest')
  Rake::Task['assets:precompile:nondigest'].enhance do
    Rake::Task['assets:sync'].invoke if defined?(MultiSync)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
multi_sync-0.0.2 lib/tasks/multi_sync_rails.rake