Sha256: d549370130dc93f05e0b7bcd8fca1dbe0fbecd4e49001b807a35b282cf394bbd
Contents?: true
Size: 1.35 KB
Versions: 2
Compression:
Stored size: 1.35 KB
Contents
namespace :rooftop do namespace :spektrix do task :prepare, [:since, :logger_path] do |task, args| logger_path = args[:logger_path] || STDOUT Rooftop::SpektrixSync.logger = defined?(::Rails) ? Rails.logger : Logger.new(logger_path, 'daily') @since = eval(args[:since]) rescue DateTime.now @options = eval(args[:options]) rescue {} end desc "Synchronise events from Spektrix to Rooftop" task :sync_events, [:since, :logger_path, :options] => [:environment, :prepare] do |task, args| Rooftop::SpektrixSync::SyncTask.run_events_import(@since, nil, @options) end desc "Synchronise events and prices from Spektrix to Rooftop" task :sync_all, [:since, :logger_path, :options] => [:environment, :prepare] do |task, args| Rooftop::SpektrixSync::SyncTask.run_full_import(@since, @options) end desc "Synchronise events and prices from Spektrix to Rooftop" task :sync_prices, [:since, :logger_path, :options] => [:environment, :prepare] do |task, args| Rooftop::SpektrixSync::SyncTask.run_prices_import(@since, @options) end desc "Sync specific event" task :sync_event, [:spektrix_event_id, :since, :logger_path, :options] => [:environment, :prepare] do |task, args| Rooftop::SpektrixSync::SyncTask.run_events_import(@since, args[:spektrix_event_id], @options) end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
rooftop-spektrix_sync-0.0.3.2 | lib/rooftop/spektrix_sync/tasks/import.rake |
rooftop-spektrix_sync-0.0.3 | lib/rooftop/spektrix_sync/tasks/import.rake |