forked from rapid7/metasploit-framework
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Changed group that will show the coverage for any untracked, unstaged, or staged file so developers can more easily see if that their changes are covered. Other groups added for different libraries under lib.
- Loading branch information
1 parent
7510911
commit e2ed4f2
Showing
1 changed file
with
50 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
SimpleCov.configure do | ||
# ignore this file | ||
add_filter '.simplecov' | ||
|
||
# | ||
# Changed Files in Git Group | ||
# @see http://fredwu.me/post/35625566267/simplecov-test-coverage-for-changed-files-only | ||
# | ||
|
||
untracked = `git ls-files --exclude-standard --others` | ||
unstaged = `git diff --name-only` | ||
staged = `git diff --name-only --cached` | ||
all = untracked + unstaged + staged | ||
changed_filenames = all.split("\n") | ||
|
||
add_group 'Changed' do |source_file| | ||
changed_filenames.detect { |changed_filename| | ||
source_file.filename.end_with?(changed_filename) | ||
} | ||
end | ||
|
||
# | ||
# Framework (msf) related groups | ||
# | ||
|
||
add_group 'Metasploit Framework', 'lib/msf' | ||
add_group 'Metasploit Framework (Base)', 'lib/msf/base' | ||
add_group 'Metasploit Framework (Core)', 'lib/msf/core' | ||
|
||
# | ||
# Other library groups | ||
# | ||
|
||
add_group 'Fastlib', 'lib/fastlib' | ||
add_group 'Metasm', 'lib/metasm' | ||
add_group 'PacketFu', 'lib/packetfu' | ||
add_group 'Rex', 'lib/rex' | ||
add_group 'RKelly', 'lib/rkelly' | ||
add_group 'Ruby Mysql', 'lib/rbmysql' | ||
add_group 'Ruby Postgres', 'lib/postgres' | ||
add_group 'SNMP', 'lib/snmp' | ||
add_group 'Zip', 'lib/zip' | ||
|
||
# | ||
# Specs are reported on to ensure that all examples are being run and all | ||
# lets, befores, afters, etc are being used. | ||
# | ||
|
||
add_group 'Specs', 'spec' | ||
end |