danger 5.3.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 280aa14f35fab7d31eca02ca079f3fd139f3f4ba
4
- data.tar.gz: 356443a6e67ca27bf08cb760b96bfe909d3b40ec
3
+ metadata.gz: e0305fd8d9f84814f1c701d8368e9d64a8f044ed
4
+ data.tar.gz: 95d17dcbd3290b7cc01a51e13f12790f504a7a07
5
5
  SHA512:
6
- metadata.gz: f3fe03e6240ad5b9ef1fd1efe6161b46ce562ca5d851ed5f01719d52679c7f31124e3f920746ee97a5c445e5d751b8dff340b0e7f57cdc4ec441ca8fc896d119
7
- data.tar.gz: d2ce6b122c7727f462aa53ca5b2d1797007bb8e811bbcb59fa1a0deaa722f5368c3d542cdfbd0622407cf38e168617d54f9ec31c35ee6c9afd601b8d3559e421
6
+ metadata.gz: af01026b1e5fef49454ee50c2e63eaefa33fc665b0d3cb5d83862028faa1affdd88741062be71eef74270539e9f380bf32046b1c5f1cc26117e68196ffd255f9
7
+ data.tar.gz: 677908dda67a4ed33ca7a18b3466bdefc805568b756fb7d95f23ed9c82d0a762c23a4cff5ffbc1d5ef596ca4dd6d33ab40f976fd8623a4a9e45d6d353553210e
@@ -25,7 +25,7 @@ module Danger
25
25
  #
26
26
  # @return [String] The Markdown compatible link
27
27
  def markdown_link_to_message(message, _)
28
- "#{messages.file}#L#{message.line}"
28
+ "#{message.file}#L#{message.line}"
29
29
  end
30
30
 
31
31
  # !@group Extension points
@@ -1,5 +1,7 @@
1
1
  # coding: utf-8
2
2
 
3
+ # rubocop:disable Metrics/ClassLength
4
+
3
5
  require "octokit"
4
6
  require "danger/helpers/comments_helper"
5
7
  require "danger/helpers/comment"
@@ -312,13 +314,14 @@ module Danger
312
314
  end
313
315
 
314
316
  matching_comments = danger_comments.select do |comment_data|
315
- if comment_data["path"] == m.file && comment_data["commit_id"] == head_ref && comment_data["position"] == position
317
+ if comment_data["path"] == m.file && comment_data["position"] == position
316
318
  # Parse it to avoid problems with strikethrough
317
319
  violation = violations_from_table(comment_data["body"]).first
318
320
  if violation
319
321
  messages_are_equivalent(violation, m)
320
322
  else
321
- comment_data["body"] == body
323
+ blob_regexp = %r{blob/[0-9a-z]+/}
324
+ comment_data["body"].sub(blob_regexp, "") == body.sub(blob_regexp, "")
322
325
  end
323
326
  else
324
327
  false
@@ -14,9 +14,10 @@ module Danger
14
14
  ensure_commitish_exists!(to)
15
15
 
16
16
  merge_base = find_merge_base(repo, from, to)
17
+ commits_in_branch_count = commits_in_branch_count(from, to)
17
18
 
18
19
  self.diff = repo.diff(merge_base, to)
19
- self.log = repo.log.between(from, to)
20
+ self.log = repo.log(commits_in_branch_count).between(from, to)
20
21
  end
21
22
 
22
23
  def renamed_files
@@ -108,6 +109,10 @@ module Danger
108
109
  def possible_merge_base(repo, from, to)
109
110
  [repo.merge_base(from, to)].find { |base| commit_exists?(base) }
110
111
  end
112
+
113
+ def commits_in_branch_count(from, to)
114
+ exec("rev-list #{from}..#{to} --count").to_i
115
+ end
111
116
  end
112
117
  end
113
118
 
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "5.3.0".freeze
2
+ VERSION = "5.3.1".freeze
3
3
  DESCRIPTION = "Like Unit Tests, but for your Team Culture.".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.0
4
+ version: 5.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-06-09 00:00:00.000000000 Z
12
+ date: 2017-06-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide