danger-slather 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module Slather
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
@@ -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.2
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