Run rubocop on all files
This commit is contained in:
@@ -10,10 +10,10 @@ require "dry/matcher/result_matcher"
|
||||
module Adamantium
|
||||
class Action < Hanami::Action
|
||||
include Deps["logger",
|
||||
"settings",
|
||||
not_found_view: "views.not_found",
|
||||
error_view: "views.error",
|
||||
sentry: "sentry.client"]
|
||||
"settings",
|
||||
not_found_view: "views.not_found",
|
||||
error_view: "views.error",
|
||||
sentry: "sentry.client"]
|
||||
|
||||
include Dry::Matcher.for(:handle, with: Dry::Matcher::ResultMatcher)
|
||||
include Dry::Monads[:result]
|
||||
|
@@ -4,7 +4,6 @@ module Adamantium
|
||||
module Actions
|
||||
module Trips
|
||||
class Show < Adamantium::Action
|
||||
|
||||
include Deps["views.trips.show"]
|
||||
|
||||
def handle(req, res)
|
||||
|
@@ -5,9 +5,9 @@ module Adamantium
|
||||
include Deps["geo.gpx_parser", "commands.workouts.create"]
|
||||
|
||||
def handle(req, res)
|
||||
tempfile = Tempfile.new(%w/path .gpx/)
|
||||
tempfile = Tempfile.new(%w[path .gpx])
|
||||
|
||||
if req.params.to_h.dig(:file, :tempfile) != nil
|
||||
if !req.params.to_h.dig(:file, :tempfile).nil?
|
||||
tempfile.write req.params[:file][:tempfile].read
|
||||
else
|
||||
tempfile.write req.params[:file]
|
||||
@@ -15,7 +15,6 @@ module Adamantium
|
||||
|
||||
tempfile.rewind
|
||||
|
||||
|
||||
gpxfile = gpx_parser.call(path: tempfile.path)
|
||||
|
||||
if gpxfile.success?
|
||||
|
@@ -7,10 +7,10 @@ module Adamantium
|
||||
|
||||
def call(auto_tag_id: nil)
|
||||
auto_taggings = if auto_tag_id
|
||||
auto_tagging_repo.find(auto_tag_id)
|
||||
else
|
||||
auto_tagging_repo.all
|
||||
end
|
||||
auto_tagging_repo.find(auto_tag_id)
|
||||
else
|
||||
auto_tagging_repo.all
|
||||
end
|
||||
|
||||
auto_taggings.each do |auto_tagging|
|
||||
posts = auto_tagging.title_only? ?
|
||||
@@ -19,7 +19,7 @@ module Adamantium
|
||||
|
||||
posts.each do |post|
|
||||
post_repo.auto_tag_post(post_id: post.id,
|
||||
tag_id: auto_tagging.tag_id)
|
||||
tag_id: auto_tagging.tag_id)
|
||||
end
|
||||
end
|
||||
|
||||
|
@@ -1,4 +1,3 @@
|
||||
|
||||
require "securerandom"
|
||||
require "dry/monads"
|
||||
require "filemagic"
|
||||
|
@@ -6,7 +6,6 @@ module Adamantium
|
||||
module Decorators
|
||||
module Movies
|
||||
class Decorator < SimpleDelegator
|
||||
|
||||
include Deps["clients.omdb"]
|
||||
|
||||
def poster
|
||||
|
@@ -30,4 +30,4 @@ module Adamantium
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -48,13 +48,12 @@ module Adamantium
|
||||
end
|
||||
|
||||
def auto_tag_post(post_id:, tag_id:)
|
||||
|
||||
return if posts
|
||||
.post_tags
|
||||
.where(
|
||||
post_id: post_id,
|
||||
tag_id: tag_id
|
||||
).count > 0
|
||||
.post_tags
|
||||
.where(
|
||||
post_id: post_id,
|
||||
tag_id: tag_id
|
||||
).count > 0
|
||||
|
||||
posts
|
||||
.post_tags
|
||||
|
@@ -8,4 +8,4 @@ module Adamantium
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@@ -2,7 +2,6 @@ module Adamantium
|
||||
module Views
|
||||
module Movies
|
||||
class Index < View
|
||||
|
||||
include Deps["repos.movie_repo"]
|
||||
|
||||
expose :movies do
|
||||
|
Reference in New Issue
Block a user