diff options
Diffstat (limited to 'helpers.rb')
-rw-r--r-- | helpers.rb | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -46,7 +46,7 @@ helpers do tag_path = File.join(TAGS[:dir], tag['name'].sub('#', '')) + '.json' tag_collection = if File.exist? tag_path - JSON.parse(File.read(tag_path)) + JSON.load_file(tag_path) else { '@context' => 'https://www.w3.org/ns/activitystreams', @@ -92,8 +92,7 @@ helpers do begin uri = URI(url) rescue StandardError => e - p url - p e + p url, e return nil end httpdate = Time.now.utc.httpdate @@ -112,8 +111,7 @@ helpers do if $CHILD_STATUS.success? response else - p url - p response + p url, response nil end end @@ -172,7 +170,7 @@ helpers do def find_file(id) Dir[File.join('*', 'object', '*', '*.json')].find do |f| - JSON.parse(File.read(f))['id'] == id + JSON.load_file(f)['id'] == id end end end |