lib/git/lint/cli/actions/analyze/commit.rb in git-lint-3.3.2 vs lib/git/lint/cli/actions/analyze/commit.rb in git-lint-4.0.0

- old
+ new

@@ -5,16 +5,18 @@ module CLI module Actions module Analyze # Handles analyze action for commit(s) by SHA. class Commit + include Git::Lint::Import[:kernel, :logger] + def initialize analyzer: Analyzer.new, parser: GitPlus::Parsers::Commits::Saved::History.with_show, - container: Container + **dependencies + super(**dependencies) @analyzer = analyzer @parser = parser - @container = container end def call sha = nil process sha rescue Errors::Base => error @@ -22,21 +24,17 @@ kernel.abort end private - attr_reader :analyzer, :parser, :container + attr_reader :analyzer, :parser def process sha analyzer.call commits: parser.call(*sha) do |collector, reporter| kernel.puts reporter kernel.abort if collector.errors? end end - - def kernel = container[__method__] - - def logger = container[__method__] end end end end end