26 lines
625 B
Ruby
Executable file
26 lines
625 B
Ruby
Executable file
#!/usr/bin/env ruby
|
|
|
|
require 'sidekiq'
|
|
require 'sidekiq/api'
|
|
|
|
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
|
|
|
|
# not working yet
|
|
config = Pastebinner::Configuration.new
|
|
pb = Pastebinner::ApiClient.new(config.api_key, config.api_username, config.api_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
|