diff_parser 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/diff_parser/diff_files_collection.rb +1 -0
- data/lib/diff_parser/file.rb +5 -1
- data/lib/diff_parser/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YjU2NDZhMjhlYmRhOGFkZjczOWQ0OWE4NDUwYmY1MTVhNTljNjAxMQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NDk3YjFkNzQ4N2Q4Y2JkNTIzMjYyMmRkNDQyNDQ5YTc2ZGNmMmQxNQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTU2YzgxYjgwOTYxZTUwNmE5YWQwYWFiZTYxMGQ1NjkxZGQ1MTc4M2U5NGNk
|
10
|
+
MjcyYzRhODM2NDZlNWJjYmYxN2ViMWJkODRiN2MzNzlhZTYzNzU3YzBiNzkz
|
11
|
+
ODBiMmZmNDkyYTM5NTliMjAxY2U3N2Q4YzFkYmM2YTFlYjI5Njc=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OThlNDFkY2UxOTI0NjE4NmE3MTQ3ZDM2Y2Q5ZTMxODJlNTAzNmM4NmIxZWEz
|
14
|
+
N2M4OWRjMTQ3Nzk1ZmFjOTJmNzdkY2MwNDhlYmRjNWEyODRmN2Y0ZWQwZDA1
|
15
|
+
YmFlMzJmMTEyODRkN2ZlZDZkOWYzYTU0NWM3OGNlNDRiNDMyY2M=
|
@@ -26,6 +26,7 @@ module DiffParser
|
|
26
26
|
file_number += 1
|
27
27
|
end
|
28
28
|
current_file = DiffParser::File.new(raw_line.full_line, diff, file_number)
|
29
|
+
current_file.type = raw_lines[idx+1].type
|
29
30
|
elsif fold_file?(current_file)
|
30
31
|
if options[:full] == current_file.path || options[:full] == true
|
31
32
|
current_file.push_line(raw_line, idx)
|
data/lib/diff_parser/file.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module DiffParser
|
2
2
|
class File
|
3
3
|
attr_accessor :line_old, :line_new, :lines
|
4
|
-
attr_reader :path, :file_info, :diff, :file_number
|
4
|
+
attr_reader :path, :file_info, :diff, :file_number, :type
|
5
5
|
delegate :additions, :deletions, to: :file_info
|
6
6
|
|
7
7
|
def initialize(path, diff, file_number=0)
|
@@ -36,6 +36,10 @@ module DiffParser
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
def type=(str)
|
40
|
+
@type = str.inquiry
|
41
|
+
end
|
42
|
+
|
39
43
|
def sha
|
40
44
|
diff.sha
|
41
45
|
end
|
data/lib/diff_parser/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: diff_parser
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stevo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-02-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Allows parsing diffs for presentation purposes - extracted from marvelous
|
14
14
|
GitLab project
|