lib/rubocop/git/pseudo_pull_request.rb in rubocop-git2-0.1.4 vs lib/rubocop/git/pseudo_pull_request.rb in rubocop-git2-0.1.5

- old
+ new

@@ -1,36 +1,33 @@ -module RuboCop - module Git - # ref. https://github.com/thoughtbot/hound/blob/d2f3933/app/models/pull_request.rb - class PseudoPullRequest - HOUND_CONFIG_FILE = '.hound.yml' +# ref. https://github.com/thoughtbot/hound/blob/d2f3933/app/models/pull_request.rb +class RuboCop::Git::PseudoPullRequest + HOUND_CONFIG_FILE = '.hound.yml'.freeze - def initialize(files, options) - @files = files - @options = options - end + def initialize(files, options) + @files = files + @options = options + end - def pull_request_files - @files.map do |file| - build_commit_file(file) - end - end + def pull_request_files + @files.map do |file| + build_commit_file(file) + end + end - def config - return unless @options.hound - File.read(HOUND_CONFIG_FILE) - rescue Errno::ENOENT - nil - end + def config + return unless @options.hound - private + File.read(HOUND_CONFIG_FILE) + rescue Errno::ENOENT + nil + end - def build_commit_file(file) - CommitFile.new(file, head_commit) - end + private - def head_commit - @head_commit ||= Commit.new(@options) - end - end + def build_commit_file(file) + RuboCop::Git::CommitFile.new(file, head_commit) + end + + def head_commit + @head_commit ||= RuboCop::Git::Commit.new(@options) end end