Sha256: 423ce714992a81125f651c4da8f6c87940defb9c041e164f23adc7c3745db6ad
Contents?: true
Size: 521 Bytes
Versions: 13
Compression:
Stored size: 521 Bytes
Contents
require 'shellwords' module RuboCop module Git # ref. https://github.com/thoughtbot/hound/blob/d2f3933/app/models/commit.rb class Commit def initialize(options) @options = options end def file_content(filename) if @options.cached `git show :#{filename.shellescape}` elsif @options.commit_last `git show #{@options.commit_last.shellescape}:#{filename.shellescape}` else File.read(filename) end end end end end
Version data entries
13 entries across 13 versions & 4 rubygems