git_diff_parser 2.1.0 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b8da1f6b3c0c23a9817c03fdb89486c727cf9261
4
- data.tar.gz: f031a844a99b0e1f572a7cdb03c2f616e2f091f2
3
+ metadata.gz: 3664102e3ee20668e7ca33c4de9afea827567a4d
4
+ data.tar.gz: 9c9c3cddd1213d2ca06d170ac80fd33fcc764a03
5
5
  SHA512:
6
- metadata.gz: ba7288316be89ee86b500cae2b8fbad4cb02ad9bad960c1aa8407f009d7807a4c46c5a93caa818e4c5f96410f837ebebd70617bc177aeeef7c1d7db76f228295
7
- data.tar.gz: 21fad9940a4459eee7f0be4741387fdba44a2a7d6522c94a64b07d521c14460edb1c34fa9fa71c299edfd231d5640f22a27a9b084dfd28fe8d6c554d8342e06c
6
+ metadata.gz: 12336509fd73f6d3b90153f5a24b529fa3d7227ad3649c7edda01cdf525f1d15290fda51ce52e5d63e55d7f19a1287074fa92266d4ced0bd7053e6c0cc2e4f1b
7
+ data.tar.gz: 1ee942cf61121e54bc7a678d51e22bb317bad483e95f57c6a7d6766d6a9726baf29db023b37ea259343962f3e80424eb90b1678f24a37d18e43458de9d1854d5
@@ -39,6 +39,12 @@ module GitDiffParser
39
39
  changed_lines.map(&:number)
40
40
  end
41
41
 
42
+ def find_patch_position_by_line_number(line_number)
43
+ target = changed_lines.find { |line| line.number == line_number }
44
+ return nil unless target
45
+ target.patch_position
46
+ end
47
+
42
48
  private
43
49
 
44
50
  def lines
@@ -1,3 +1,3 @@
1
1
  module GitDiffParser
2
- VERSION = '2.1.0'
2
+ VERSION = '2.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git_diff_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat