From ef312d12cfa1bfd6bfa2201283ee00c829c2fb2d Mon Sep 17 00:00:00 2001 From: booboy Date: Sat, 10 Nov 2018 04:27:25 -0600 Subject: [PATCH] added a method that we will later use to serialize the raw paste into json so we can ship it to a DB --- bin/pastebinner | 2 +- lib/exceptions.rb | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/bin/pastebinner b/bin/pastebinner index 806ba9c..a6516bb 100755 --- a/bin/pastebinner +++ b/bin/pastebinner @@ -13,7 +13,7 @@ def download_pastes(pb) data_dir = "../data/" filename = "pastebin_paste_key" 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..." else File.write(data_dir + filename + "_#{id[:key]}", pb.raw_paste_data(id[:key])) diff --git a/lib/exceptions.rb b/lib/exceptions.rb index dc79603..4204dae 100644 --- a/lib/exceptions.rb +++ b/lib/exceptions.rb @@ -1,7 +1,9 @@ class PastebinnerError < StandardError + + def ArgumentError + end def ConfigError - end end