Sha256: 476480135f8c4bb45894892a79278492d14f4677bf4a3ac9c05790ee26d92955

Contents?: true

Size: 430 Bytes

Versions: 5

Compression:

Stored size: 430 Bytes

Contents

require 'git'

# TestDiff module
module TestDiff
  # Class used to calculate the tests than need to be run
  class TrackBuild
    def initialize(sha, git_dir)
      @git_dir = git_dir
      @sha = sha
    end

    def run
      git = Git.open(@git_dir || '.')
      sha = git.object(@sha || 'HEAD').sha
      File.open('test_diff_coverage/sha', 'w+') { |f| f << sha }
      puts 'updated test_diff_coverage/sha'
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
test_diff-0.6.0 lib/test_diff/track_build.rb
test_diff-0.5.0 lib/test_diff/track_build.rb
test_diff-0.4.2 lib/test_diff/track_build.rb
test_diff-0.4.1 lib/test_diff/track_build.rb
test_diff-0.4.0 lib/test_diff/track_build.rb