added a method that we will later use to serialize the raw paste into json so we can ship it to a DB
This commit is contained in:
parent
879a897770
commit
ef312d12cf
2 changed files with 4 additions and 2 deletions
|
@ -13,7 +13,7 @@ def download_pastes(pb)
|
||||||
data_dir = "../data/"
|
data_dir = "../data/"
|
||||||
filename = "pastebin_paste_key"
|
filename = "pastebin_paste_key"
|
||||||
keys.map do |id|
|
keys.map do |id|
|
||||||
if File.exist?(data_dir + filename)
|
if File.exist?(data_dir + filename + "_#{id[:keu]}")
|
||||||
puts "#{id[:key]} already exists on your filesystem, skipping..."
|
puts "#{id[:key]} already exists on your filesystem, skipping..."
|
||||||
else
|
else
|
||||||
File.write(data_dir + filename + "_#{id[:key]}", pb.raw_paste_data(id[:key]))
|
File.write(data_dir + filename + "_#{id[:key]}", pb.raw_paste_data(id[:key]))
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
class PastebinnerError < StandardError
|
class PastebinnerError < StandardError
|
||||||
|
|
||||||
def ConfigError
|
def ArgumentError
|
||||||
|
end
|
||||||
|
|
||||||
|
def ConfigError
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Reference in a new issue