put files in pastebinner dir
This commit is contained in:
parent
cac1352895
commit
c72f8c9a5f
4 changed files with 24 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/env ruby
|
||||
require '../lib/pastebinner'
|
||||
require '../lib/option_parser'
|
||||
require '../lib/pastebinner/option_parser'
|
||||
require 'pry'
|
||||
|
||||
# setup our object and grab a session key
|
||||
|
|
|
@ -135,7 +135,7 @@ class Pastebinner
|
|||
end
|
||||
|
||||
def hash_metadata(raw_paste_metadata)
|
||||
hash_metadata = { "paste_metadata": raw_paste_metadata }
|
||||
hash_metadata = { "paste_metadata": "#{raw_paste_metadata}" }
|
||||
end
|
||||
|
||||
def hash_doc_type(doc_type)
|
||||
|
@ -171,6 +171,19 @@ class Pastebinner
|
|||
payload: payload)
|
||||
end
|
||||
|
||||
def text_and_metadata(keys)
|
||||
# keys = self.get_unique_keys
|
||||
raw_pastes = keys.map do |key|
|
||||
self.raw_paste_data(key)
|
||||
end
|
||||
|
||||
raw_paste_metadata = keys.map do |key|
|
||||
self.raw_paste_metadata(key)
|
||||
end
|
||||
|
||||
|
||||
end
|
||||
|
||||
# keep this method private so we are not letting anyone run any method in our program
|
||||
private
|
||||
# this will be the main way to execute any of these methods. this has the exception handling taken care of.
|
||||
|
|
9
lib/pastebinner/exceptions.rb
Normal file
9
lib/pastebinner/exceptions.rb
Normal file
|
@ -0,0 +1,9 @@
|
|||
class PastebinnerError < StandardError
|
||||
|
||||
def InvalidArgument
|
||||
end
|
||||
|
||||
def ConfigError
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Reference in a new issue