git_diff_parser 2.1.1 → 2.1.2

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: 3664102e3ee20668e7ca33c4de9afea827567a4d
4
- data.tar.gz: 9c9c3cddd1213d2ca06d170ac80fd33fcc764a03
3
+ metadata.gz: 2dbd2e853cc2f2a086d9d7ca049d8d08a2c4ea20
4
+ data.tar.gz: 49457d76b8459a35bb7e4cd2a1ebf75c7a26648d
5
5
  SHA512:
6
- metadata.gz: 12336509fd73f6d3b90153f5a24b529fa3d7227ad3649c7edda01cdf525f1d15290fda51ce52e5d63e55d7f19a1287074fa92266d4ced0bd7053e6c0cc2e4f1b
7
- data.tar.gz: 1ee942cf61121e54bc7a678d51e22bb317bad483e95f57c6a7d6766d6a9726baf29db023b37ea259343962f3e80424eb90b1678f24a37d18e43458de9d1854d5
6
+ metadata.gz: 9e2321ec9eaa16a52fd5f6c554177ed8cd1b3a49033a058c47c48cf4d3744d29cd30b130dc35cea2be204a43ab5e810e2b938f573d614940dcb711c738055d41
7
+ data.tar.gz: 3c4d956af424439d973aaed32f0884374a51bc05378d0d7015fa52c1db9dcd9d674cb7f4220b6116401288f230e41b1aa519320d4bc8c8e92353759f58e0c9fe
@@ -4,12 +4,12 @@ module GitDiffParser
4
4
  MODIFIED_LINE = /^\+(?!\+|\+)/
5
5
  NOT_REMOVED_LINE = /^[^-]/
6
6
 
7
- attr_accessor :file, :body, :hash
7
+ attr_accessor :file, :body, :secure_hash
8
8
 
9
9
  def initialize(body, options = {})
10
10
  @body = body || ''
11
11
  @file = options[:file] || options['file'] if options[:file] || options['file']
12
- @hash = options[:hash] || options['hash'] if options[:hash] || options['hash']
12
+ @secure_hash = options[:secure_hash] || options['secure_hash'] if options[:secure_hash] || options['secure_hash']
13
13
  end
14
14
 
15
15
  def changed_lines
@@ -13,16 +13,16 @@ module GitDiffParser
13
13
  map(&:file)
14
14
  end
15
15
 
16
- def hashes
17
- map(&:hash)
16
+ def secure_hashes
17
+ map(&:secure_hash)
18
18
  end
19
19
 
20
20
  def find_patch_by_file(file)
21
21
  find { |patch| patch.file == file }
22
22
  end
23
23
 
24
- def find_patch_by_hash(hash)
25
- find { |patch| patch.hash == hash }
24
+ def find_patch_by_secure_hash(secure_hash)
25
+ find { |patch| patch.secure_hash == secure_hash }
26
26
  end
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module GitDiffParser
2
- VERSION = '2.1.1'
2
+ VERSION = '2.1.2'
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.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat