added a method to toggle restclient log to stdout in console
This commit is contained in:
parent
238d770d5e
commit
3ec18f5851
1 changed files with 11 additions and 0 deletions
11
bin/console
11
bin/console
|
@ -7,7 +7,18 @@ require 'bundler/setup'
|
||||||
require 'pastebinner'
|
require 'pastebinner'
|
||||||
|
|
||||||
require 'pry'
|
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'])
|
pb = Pastebinner::ApiClient.new(ENV['pastebin_api_key'], ENV['pastebin_username'], ENV['pastebin_password'])
|
||||||
es = Pastebinner::ElasticSearchHelper.new(ENV['elastic_search_url'], 'pastes')
|
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
|
binding.pry
|
||||||
|
|
Loading…
Add table
Reference in a new issue