lib/pupa/runner.rb in pupa-0.0.9 vs lib/pupa/runner.rb in pupa-0.0.10

- old
+ new

@@ -71,11 +71,11 @@ options.actions << v end opts.on('-t', '--task TASK', @processor_class.tasks, 'Select a scraping task to run (you may give this switch multiple times)', " (#{@processor_class.tasks.join(', ')})") do |v| options.tasks << v end - opts.on('-o', '--output_dir PATH', 'The directory or Redis address (e.g. redis://localhost:6379) in which to dump JSON documents') do |v| + opts.on('-o', '--output_dir PATH', 'The directory or Redis address (e.g. redis://localhost:6379/0) in which to dump JSON documents') do |v| options.output_dir = v end opts.on('-c', '--cache_dir PATH', 'The directory or Memcached address (e.g. memcached://localhost:11211) in which to cache HTTP requests') do |v| options.cache_dir = v end @@ -176,11 +176,11 @@ exit if options.dry_run report = { plan: { processor: @processor_class, - arguments: options.dup.to_h, - options: rest, + options: Marshal.load(Marshal.dump(options)).to_h, + arguments: rest, }, start: Time.now.utc, } Pupa.session = Moped::Session.new([options.host_with_port], database: options.database)