danger 4.1.1 → 4.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/danger.rb +1 -1
- data/lib/danger/comment_generators/github.md.erb +7 -1
- data/lib/danger/core_ext/string.rb +5 -0
- data/lib/danger/helpers/comments_helper.rb +9 -0
- data/lib/danger/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39f7e0e319a1ff47514b465c8b6af97f7efa451a
|
4
|
+
data.tar.gz: 8df633306a3819e57789498649890ba1865b9dc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b6382beb8f067502934f803a008a06b8348e23da486672ee887592e6516d11cc9d18de738e3e05138173a64d0f50e241ac616c6c8a3994e293dc9616d07cdac1
|
7
|
+
data.tar.gz: f6e34348e7da47556d61ac7d50f4eeed2732fa7b6bf2ad6fb10db42482b2424001d946f8c7eba3aac429c930d58d6ab1bd76a69521740ae0e04563c0b995921c
|
data/lib/danger.rb
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
<!--
|
2
|
+
<%- @tables.each do |table| -%>
|
3
|
+
<%= pluralize(table[:name], table[:count]) %><%= ": #{truncate(table[:content].first.message)}" if table[:count] > 0 %>
|
4
|
+
<%- end -%>
|
5
|
+
<%= pluralize("Markdown", @markdowns.size) %>
|
6
|
+
--!>
|
1
7
|
<%- @tables.each do |table| -%>
|
2
8
|
<%- if table[:content].any? || table[:resolved].any? -%>
|
3
9
|
<table>
|
@@ -6,7 +12,7 @@
|
|
6
12
|
<th width="50"></th>
|
7
13
|
<th width="100%" data-danger-table="true" data-kind="<%= table[:name] %>">
|
8
14
|
<%- if table[:count] > 0 -%>
|
9
|
-
<%= table[:
|
15
|
+
<%= pluralize(table[:name], table[:count]) %>
|
10
16
|
<%- else -%>
|
11
17
|
:white_check_mark: <%= random_compliment %>
|
12
18
|
<%- end -%>
|
@@ -171,6 +171,15 @@ module Danger
|
|
171
171
|
|
172
172
|
return NEW_REGEX.match(table)
|
173
173
|
end
|
174
|
+
|
175
|
+
def pluralize(string, count)
|
176
|
+
string.danger_pluralize(count)
|
177
|
+
end
|
178
|
+
|
179
|
+
def truncate(string)
|
180
|
+
max_message_length = 30
|
181
|
+
string.danger_truncate(max_message_length)
|
182
|
+
end
|
174
183
|
end
|
175
184
|
end
|
176
185
|
end
|
data/lib/danger/version.rb
CHANGED
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.
|
4
|
+
version: 4.2.0
|
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-
|
12
|
+
date: 2017-02-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|
@@ -54,19 +54,19 @@ dependencies:
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '1'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
|
-
name:
|
57
|
+
name: colored2
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
60
|
- - "~>"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1
|
62
|
+
version: '3.1'
|
63
63
|
type: :runtime
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
67
|
- - "~>"
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version: '1
|
69
|
+
version: '3.1'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: faraday
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
@@ -462,7 +462,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
462
462
|
version: '0'
|
463
463
|
requirements: []
|
464
464
|
rubyforge_project:
|
465
|
-
rubygems_version: 2.
|
465
|
+
rubygems_version: 2.2.2
|
466
466
|
signing_key:
|
467
467
|
specification_version: 4
|
468
468
|
summary: Like Unit Tests, but for your Team Culture.
|