From 3ec18f585126f1ef333c67aac2ad2c6312f095aa Mon Sep 17 00:00:00 2001 From: booboy Date: Tue, 19 Mar 2019 02:14:03 -0500 Subject: [PATCH] added a method to toggle restclient log to stdout in console --- bin/console | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bin/console b/bin/console index 069d4bd..8c59b0f 100755 --- a/bin/console +++ b/bin/console @@ -7,7 +7,18 @@ require 'bundler/setup' require 'pastebinner' require 'pry' +# setup restclient log to the console +# make it into a method to toggle on or off +def rest_client_toggle_log(default=false) + if default + RestClient.log = 'stdout' + end +end + pb = Pastebinner::ApiClient.new(ENV['pastebin_api_key'], ENV['pastebin_username'], ENV['pastebin_password']) es = Pastebinner::ElasticSearchHelper.new(ENV['elastic_search_url'], 'pastes') +# sidekiq worker to send pastes to es +paste_to_es_job = Pastebinner::PasteToEs.new + binding.pry