lib/mina/infinum/tasks.rb in mina-infinum-1.7.0 vs lib/mina/infinum/tasks.rb in mina-infinum-1.8.0
- old
+ new
@@ -1,6 +1,7 @@
set :service_manager, :upstart
+set :sidekiq_web_namespace, nil
desc 'Restart application'
task :restart_application do
comment %(Restarting application)
command %(passenger-config restart-app --ignore-app-not-running #{fetch(:deploy_to)})
@@ -11,6 +12,14 @@
desc "#{state.capitalize}ing background workers"
task state do
background_worker(state)
end
end
+end
+
+task :link_sidekiq_assets do
+ custom_assets_path = File.join('./', 'public', fetch(:sidekiq_web_namespace).to_s)
+
+ command "bundle_path=\"$(RAILS_ENV=#{fetch(:rails_env)} #{fetch(:bundle_bin)} show sidekiq)\""
+ command "mkdir -p #{custom_assets_path}"
+ command "ln -nfs $bundle_path/web/assets #{custom_assets_path}/sidekiq"
end