removed uneeded config options
This commit is contained in:
parent
30e014a2f5
commit
b16649bdb5
2 changed files with 7 additions and 3 deletions
|
@ -1,13 +1,11 @@
|
|||
module Pastebinner
|
||||
class Configuration
|
||||
attr_accessor :api_key, :api_username, :api_password, :elasticsearch_url, :redis_url
|
||||
attr_accessor :api_key, :api_username, :api_password
|
||||
|
||||
def initialize
|
||||
@api_key = nil
|
||||
@api_username = nil
|
||||
@api_password = nil
|
||||
@elasticsearch_url = nil
|
||||
@redis_url = nil
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -100,11 +100,17 @@ module Pastebinner
|
|||
end
|
||||
|
||||
# will extract just the keys from recent public pastes
|
||||
# i think this can be maybe made into a hash instead
|
||||
def get_unique_paste_keys(public_pastes)
|
||||
pp = JSON.parse(public_pastes)
|
||||
pp.map { |p| p['key'] }
|
||||
end
|
||||
|
||||
def unique_paste_keys(public_pastes)
|
||||
pp = JSON.parse(public_pastes)
|
||||
pp.map { |paste| :url => paste['url'], :key => paste['key'] }
|
||||
end
|
||||
|
||||
def raw_paste_data(unique_paste_key)
|
||||
response = RestClient::Request.execute(
|
||||
method: :get,
|
||||
|
|
Loading…
Add table
Reference in a new issue