Run rubocop on all files

This commit is contained in:
2023-06-08 21:57:54 +10:00
parent 6a2bc82e3b
commit 9d9d8ccf6d
65 changed files with 114 additions and 158 deletions

View File

@@ -9,25 +9,24 @@ namespace :blog do
Dotenv.load("/home/blog/current/.env.production")
end
task :load_from_letterboxd => ["blog:load_environment"] do
task load_from_letterboxd: ["blog:load_environment"] do
require "hanami/prepare"
require "scraperd"
client = Scraperd::Base.new
activities = client.fetch('dnitza')
activities = client.fetch("dnitza")
create_command = Admin::Container["commands.movies.create"]
activities.each do |activity|
title = CGI.unescapeHTML(activity.title)
create_command.({
title: title,
year: activity.year,
url: activity.film_link,
watched_at: activity.watched_at
})
create_command.call({
title: title,
year: activity.year,
url: activity.film_link,
watched_at: activity.watched_at
})
end
end
end
end