danger 4.0.0 → 4.0.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: 21f670d087989c2099520be07dd3e1204a9c2eef
4
- data.tar.gz: 3fbfee83973b73b19496f8c8bd74dd2ecbd8e09d
3
+ metadata.gz: c7d4a2f3dba7e7c7716c8bfd06cf69cb3b2fc806
4
+ data.tar.gz: cd388804d6549cb3df870445343ffdff0a008b62
5
5
  SHA512:
6
- metadata.gz: 11595711e242836e3328f7f0b1f4ef3ab54d60b561c2507052ddc74b0209f323f6fe04e5c96a1525026e055745b5f3a3eb86fee550e70bcb0df7cdfafc9a902e
7
- data.tar.gz: 0367b7abdc0e048bc0cbcb7fbb7f324520952ed13b0b4de3e4eea87cc6bafae900ff0bbf3cb97baa9ff7be89d8f0f93910cd840de9e362012c0aa4f3673a95f3
6
+ metadata.gz: 1bbd1d8e01a1d333b806cee6ba786da604306d9f3f20a6ded0fb9c4b203b2e43d155d2df182c32a50ec68c83b0b5c23a88d6a5fe6c951492bbf6bf39f19d80a9
7
+ data.tar.gz: ae645782a231cb94129e93f709e193b055fa453e6b4698973d413230e21bb6a27e755329e022f3d2a6040ccdce07ce0bb6f24ba129f32d70bfba7eec12f88e8b
@@ -52,21 +52,6 @@ module Danger
52
52
  system command
53
53
  end
54
54
 
55
- def ask(question)
56
- answer = ""
57
- loop do
58
- ui.puts "\n#{question}?"
59
-
60
- show_prompt
61
- answer = STDIN.gets.chomp
62
-
63
- break if answer.empty?
64
-
65
- ui.print "\nYou need to provide an answer."
66
- end
67
- answer
68
- end
69
-
70
55
  def ask_with_answers(question, possible_answers)
71
56
  ui.print "\n#{question}? ["
72
57
 
@@ -14,7 +14,7 @@
14
14
  </tr>
15
15
  </thead>
16
16
  <tbody>
17
- <%- max_num_violations = 700 %>
17
+ <%- max_num_violations = 700 -%>
18
18
  <%- table[:content].take(max_num_violations).each do |violation| -%>
19
19
  <tr>
20
20
  <td>:<%= table[:emoji] %>:</td>
@@ -289,17 +289,19 @@ module Danger
289
289
  private
290
290
 
291
291
  def print_list(title, rows)
292
- ui.title(title) do
293
- rows.each do |row|
294
- if row.file && row.line
295
- path = "#{row.file}\#L#{row.line}: "
296
- else
297
- path = ""
298
- end
292
+ unless rows.empty?
293
+ ui.title(title) do
294
+ rows.each do |row|
295
+ if row.file && row.line
296
+ path = "#{row.file}\#L#{row.line}: "
297
+ else
298
+ path = ""
299
+ end
299
300
 
300
- ui.puts("- [ ] #{path}#{row.message}")
301
+ ui.puts("- [ ] #{path}#{row.message}")
302
+ end
301
303
  end
302
- end unless rows.empty?
304
+ end
303
305
  end
304
306
 
305
307
  def wrap_text(text, width = 80)
@@ -62,8 +62,8 @@ module Danger
62
62
  nil
63
63
  end
64
64
 
65
- def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger")
66
- delete_old_comments(danger_id: danger_id)
65
+ def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger", new_comment: false)
66
+ delete_old_comments(danger_id: danger_id) unless new_comment
67
67
 
68
68
  comment = generate_description(warnings: warnings, errors: errors)
69
69
  comment += "\n\n"
@@ -63,8 +63,8 @@ module Danger
63
63
  nil
64
64
  end
65
65
 
66
- def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger")
67
- delete_old_comments(danger_id: danger_id)
66
+ def update_pull_request!(warnings: [], errors: [], messages: [], markdowns: [], danger_id: "danger", new_comment: false)
67
+ delete_old_comments(danger_id: danger_id) unless new_comment
68
68
 
69
69
  comment = generate_description(warnings: warnings, errors: errors)
70
70
  comment += "\n\n"
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "4.0.0".freeze
2
+ VERSION = "4.0.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: 4.0.0
4
+ version: 4.0.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: 2016-10-26 00:00:00.000000000 Z
12
+ date: 2016-11-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide