Sha256: 187df687c41a8d1e0991a1cdce9257aad4ffeb79a14018821961c54522829221
Contents?: true
Size: 1.01 KB
Versions: 5
Compression:
Stored size: 1.01 KB
Contents
#!/usr/bin/env ruby require 'optparse' require 'mail' require_relative '../src/facebook_connection' require_relative '../src/config' require_relative '../src/initializers/mail_initializer' require_relative '../src/senders' require_relative '../src/args_parser' require_relative '../src/message_sender' require_relative '../src/error_reporter' options = ArgsParser.parse_args facebook_connection = nil begin facebook_connection = FacebookConnection.new(headless: options[:headless]) raise 'Error triggered by --simulate-error flag' if options[:simulate_error] facebook_connection.cookie_handler.clear! if options[:clear_cookies] facebook_connection.login if options[:login] message_sender = MessageSender.new(options[:sender], facebook_connection) message_sender.send_unread_messages if options[:unread_messages] message_sender.send_messages if options[:messages] facebook_connection.close rescue StandardError => e ErrorReporter.report_error(options[:sender], e, facebook_connection: facebook_connection) end
Version data entries
5 entries across 5 versions & 1 rubygems