From 4004a55b0e324c35cbc7d58b831e49efd484ab93 Mon Sep 17 00:00:00 2001 From: mms Date: Wed, 8 Jan 2025 21:24:33 +0100 Subject: feat: rubocop --- new/lib/crys/processors/common_functions.rb | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'new/lib/crys/processors/common_functions.rb') diff --git a/new/lib/crys/processors/common_functions.rb b/new/lib/crys/processors/common_functions.rb index f33c7681..9cf56692 100644 --- a/new/lib/crys/processors/common_functions.rb +++ b/new/lib/crys/processors/common_functions.rb @@ -1,13 +1,15 @@ +# frozen_string_literal: true + require 'rss' module Crys module CommonFunctions def project_root - "#{File.dirname(File.dirname(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__))))))}" + File.dirname(File.dirname(File.dirname(File.dirname(File.dirname(File.expand_path(__FILE__)))))).to_s end def process_image(file:, width: :auto) - full_path = image_dir + "/" + file + full_path = "#{image_dir}/#{file}" image = ::Crys::ImageProcessor.new(path: full_path, filename: file, width: width) assets << image @@ -19,10 +21,13 @@ module Crys if name path = case name when :main - "/public/index.xml" + '/public/index.xml' end rss = File.read(project_root + path) + else + puts url + end RSS::Parser.parse(rss) -- cgit v1.2.3