diff_parser 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- NjE3OTU3NGU5MzNhZTIzODQ3NWRiOTU0ZmNlNDU2OTNhZmU2ZWU4Yg==
5
- data.tar.gz: !binary |-
6
- MzcxNmQwN2I0ZGI2ZGFjMzY3MmRjOTY3ZjUxYWI0Njg2ZmZmNDMwYg==
2
+ SHA1:
3
+ metadata.gz: 6739b861806b3e0724339c56e067bf596adf5f3f
4
+ data.tar.gz: a8562a06f029e18846c589f7da282a825424eb29
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- NGMxYzcwM2E4YjMyYWY1NDRlYjBhNzNkZDEzMGMwYzg2NDI3NjY2NzRiOTQ4
10
- NjY3Y2QyNmNlMjJiZjkyZWYzNjJlZGU4ZGRiMjljOGM0NWVkOWRmMzhhMTJm
11
- NjRiN2MyM2NhMWQzMTUzZmIxNjkzYTlhYThhZWRhMDUxNzUzNDc=
12
- data.tar.gz: !binary |-
13
- Mjk5MTMzZTMyMGU1Y2FlYzlmYjAxNzlhMDhkN2E5MWFhYmQxNmM4NGUzNGEz
14
- MmZiNGYyNzBhMmRmODJkNDk0ZmRkNmFlYWIxYTBmODA5ZGNjYjQyNzFjNzI4
15
- ODJmNzk5YTBmMTAwZmQxYTJiMjNlYjA4NjlmNjY5MmJmYjI1ODc=
6
+ metadata.gz: e2cf656f5b93dc215e6067512e88f0d57b249c1423d772c8f6e1d1c8d8773ca251c28c9c255bfc6fae2163a960009dc327328800f3ef24c94da80eed7eaf22c9
7
+ data.tar.gz: bda144b33f3bf2c893b86fdb9ea91fb4d6a55a622163d845448df3b16370af845cae74a5b837d6400f3c5dbdb525dfecb6ef66e060eec9278f3fa0e932dd08e4
@@ -11,7 +11,7 @@ module DiffParser
11
11
  @sha = sha
12
12
  end
13
13
 
14
- def diff(options={})
14
+ def diff(options = {})
15
15
  DiffParser::Diff.new(self, options)
16
16
  end
17
17
  end
@@ -26,7 +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
+ current_file.type = raw_lines[idx + 1].type
30
30
  elsif fold_file?(current_file)
31
31
  if options[:full] == current_file.path || options[:full] == true
32
32
  current_file.push_line(raw_line, idx)
@@ -6,7 +6,7 @@ module DiffParser
6
6
  attr_reader :path, :file_info, :diff, :file_number
7
7
  delegate [:additions, :deletions] => :file_info
8
8
 
9
- def initialize(path, diff, file_number=0)
9
+ def initialize(path, diff, file_number = 0)
10
10
  @path = preprocess_path(path)
11
11
  @diff = diff
12
12
  @lines = []
@@ -48,7 +48,7 @@ module DiffParser
48
48
  end
49
49
 
50
50
  def skip_line?
51
- summary? or %w(file_update_removed file_update_created).include?(type)
51
+ summary? or %w(file_update_removed file_update_created).include?(type)
52
52
  end
53
53
 
54
54
  def type
@@ -70,7 +70,7 @@ module DiffParser
70
70
  'warning'
71
71
  elsif stripped_line.start_with? GIT_CODE_ADDED
72
72
  'new'
73
- elsif stripped_line[0] == GIT_CODE_REMOVED
73
+ elsif line[0] == GIT_CODE_REMOVED
74
74
  'old'
75
75
  else
76
76
  'default'
@@ -79,7 +79,7 @@ module DiffParser
79
79
 
80
80
  private
81
81
 
82
- def html_escape str
82
+ def html_escape(str)
83
83
  replacements = {'&' => '&amp;', '>' => '&gt;', '<' => '&lt;', '"' => '&quot;', "'" => '&#39;'}
84
84
  str.gsub(/[&"'><]/, replacements)
85
85
  end
@@ -1,3 +1,3 @@
1
1
  module DiffParser
2
- VERSION = '1.3.4'
2
+ VERSION = '1.3.5'
3
3
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: diff_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - stevo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-19 00:00:00.000000000 Z
11
+ date: 2014-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ! '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ! '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Allows parsing diffs for presentation purposes - extracted from marvelous
@@ -49,17 +49,17 @@ require_paths:
49
49
  - lib
50
50
  required_ruby_version: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ! '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ! '>='
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
59
  version: '0'
60
60
  requirements: []
61
- rubyforge_project: ! '[none]'
62
- rubygems_version: 2.1.10
61
+ rubyforge_project: "[none]"
62
+ rubygems_version: 2.2.2
63
63
  signing_key:
64
64
  specification_version: 4
65
65
  summary: GitLab Diff Parser