lib/dsu/subcommands/export.rb in dsu-2.4.4 vs lib/dsu/subcommands/export.rb in dsu-3.0.0.alpha.0
- old
+ new
@@ -21,11 +21,12 @@
desc I18n.t('subcommands.export.all.desc'), I18n.t('subcommands.export.all.usage')
long_desc I18n.t('subcommands.export.all.long_desc')
option :prompts, type: :hash, default: {}, hide: true, aliases: '-p'
def all
- Views::Export.new(presenter: all_presenter(options: options)).render
+ options = configuration.to_h.merge(self.options).with_indifferent_access
+ Views::Export.new(presenter: all_presenter(options: options), options: options).render
end
desc I18n.t('subcommands.export.dates.desc'), I18n.t('subcommands.export.dates.usage')
long_desc I18n.t('subcommands.export.dates.long_desc',
date_option_description: date_option_description,
@@ -39,10 +40,11 @@
if errors.any?
Views::Shared::Error.new(messages: errors).render
return
end
- Views::Export.new(presenter: dates_presenter_for(from: times.min, to: times.max, options: options)).render
+ Views::Export.new(presenter:
+ dates_presenter_for(from: times.min, to: times.max, options: options), options: options).render
rescue ArgumentError => e
Views::Shared::Error.new(messages: e.message).render
end
private