2018-08-16 14:54:08 -05:00
|
|
|
#!/usr/bin/env ruby
|
|
|
|
|
2019-02-05 00:30:50 -06:00
|
|
|
require 'sidekiq'
|
|
|
|
require 'sidekiq/api'
|
|
|
|
|
2019-02-07 01:10:20 -06:00
|
|
|
require 'bundler/setup'
|
|
|
|
require 'pastebinner'
|
2018-08-16 14:54:08 -05:00
|
|
|
|
2019-02-01 22:19:36 -06:00
|
|
|
require 'pry'
|
2019-03-19 02:14:03 -05:00
|
|
|
# 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
|
|
|
|
|
2019-03-29 01:00:11 -05:00
|
|
|
# not working yet
|
|
|
|
config = Pastebinner::Configuration.new
|
|
|
|
pb = Pastebinner::ApiClient.new(config.api_key, config.api_username, config.api_password)
|
2019-02-07 01:10:20 -06:00
|
|
|
es = Pastebinner::ElasticSearchHelper.new(ENV['elastic_search_url'], 'pastes')
|
2019-02-05 00:30:50 -06:00
|
|
|
|
2019-03-19 02:14:03 -05:00
|
|
|
# sidekiq worker to send pastes to es
|
|
|
|
paste_to_es_job = Pastebinner::PasteToEs.new
|
|
|
|
|
2019-01-06 19:26:16 -06:00
|
|
|
binding.pry
|