danger-slather 0.0.2 → 0.0.3
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 +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +25 -3
- data/doc/Danger.html +117 -0
- data/doc/Danger/DangerSlather.html +1135 -0
- data/doc/Slather.html +117 -0
- data/doc/_index.html +129 -0
- data/doc/class_list.html +51 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +58 -0
- data/doc/css/style.css +481 -0
- data/doc/file.README.html +175 -0
- data/doc/file_list.html +56 -0
- data/doc/frames.html +17 -0
- data/doc/index.html +175 -0
- data/doc/js/app.js +243 -0
- data/doc/js/full_list.js +216 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +123 -0
- data/doc/top-level-namespace.html +112 -0
- data/lib/slather/gem_version.rb +1 -1
- data/lib/slather/plugin.rb +10 -9
- metadata +18 -1
data/lib/slather/gem_version.rb
CHANGED
data/lib/slather/plugin.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
require 'slather'
|
2
|
-
|
3
1
|
module Danger
|
4
2
|
# Show code coverage of the project and by file. Add warnings or fail the
|
5
3
|
# Build if a minimum coverage are not achieved. It uses Slather Framework for
|
@@ -80,9 +78,6 @@ module Danger
|
|
80
78
|
minimum_coverage = options[:minimum_coverage]
|
81
79
|
notify_level = options[:notify_level] || :fail
|
82
80
|
|
83
|
-
modified_files_coverage = @project.coverage_files.select do |file|
|
84
|
-
git.modified_files.include? file.source_file_pathname_relative_to_repo_root.to_s
|
85
|
-
end
|
86
81
|
if modified_files_coverage.count > 0
|
87
82
|
files_to_notify = modified_files_coverage.select do |file|
|
88
83
|
file.percentage_lines_tested < minimum_coverage
|
@@ -113,10 +108,6 @@ module Danger
|
|
113
108
|
# @return [String]
|
114
109
|
def modified_files_coverage_table
|
115
110
|
unless @project.nil?
|
116
|
-
|
117
|
-
modified_files_coverage = @project.coverage_files.select do |file|
|
118
|
-
git.modified_files.include? file.source_file_pathname_relative_to_repo_root.to_s
|
119
|
-
end
|
120
111
|
line = ''
|
121
112
|
if modified_files_coverage.count > 0
|
122
113
|
line << "File | Coverage\n"
|
@@ -150,5 +141,15 @@ module Danger
|
|
150
141
|
markdown line
|
151
142
|
end
|
152
143
|
end
|
144
|
+
|
145
|
+
# Array of files that we have coverage information and was modified
|
146
|
+
# @return [Array<File>]
|
147
|
+
def modified_files_coverage
|
148
|
+
unless @project.nil?
|
149
|
+
@project.coverage_files.select do |file|
|
150
|
+
git.modified_files.include? file.source_file_pathname_relative_to_repo_root.to_s
|
151
|
+
end
|
152
|
+
end
|
153
|
+
end
|
153
154
|
end
|
154
155
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-slather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno Mazzo
|
@@ -195,6 +195,23 @@ files:
|
|
195
195
|
- README.md
|
196
196
|
- Rakefile
|
197
197
|
- danger-slather.gemspec
|
198
|
+
- doc/Danger.html
|
199
|
+
- doc/Danger/DangerSlather.html
|
200
|
+
- doc/Slather.html
|
201
|
+
- doc/_index.html
|
202
|
+
- doc/class_list.html
|
203
|
+
- doc/css/common.css
|
204
|
+
- doc/css/full_list.css
|
205
|
+
- doc/css/style.css
|
206
|
+
- doc/file.README.html
|
207
|
+
- doc/file_list.html
|
208
|
+
- doc/frames.html
|
209
|
+
- doc/index.html
|
210
|
+
- doc/js/app.js
|
211
|
+
- doc/js/full_list.js
|
212
|
+
- doc/js/jquery.js
|
213
|
+
- doc/method_list.html
|
214
|
+
- doc/top-level-namespace.html
|
198
215
|
- lib/danger_plugin.rb
|
199
216
|
- lib/danger_slather.rb
|
200
217
|
- lib/slather/gem_version.rb
|