|
| 1 | +SimpleCov.configure do |
| 2 | + # ignore this file |
| 3 | + add_filter '.simplecov' |
| 4 | + |
| 5 | + # |
| 6 | + # Changed Files in Git Group |
| 7 | + # @see http://fredwu.me/post/35625566267/simplecov-test-coverage-for-changed-files-only |
| 8 | + # |
| 9 | + |
| 10 | + untracked = `git ls-files --exclude-standard --others` |
| 11 | + unstaged = `git diff --name-only` |
| 12 | + staged = `git diff --name-only --cached` |
| 13 | + all = untracked + unstaged + staged |
| 14 | + changed_filenames = all.split("\n") |
| 15 | + |
| 16 | + add_group 'Changed' do |source_file| |
| 17 | + changed_filenames.detect { |changed_filename| |
| 18 | + source_file.filename.end_with?(changed_filename) |
| 19 | + } |
| 20 | + end |
| 21 | + |
| 22 | + # |
| 23 | + # Framework (msf) related groups |
| 24 | + # |
| 25 | + |
| 26 | + add_group 'Metasploit Framework', 'lib/msf' |
| 27 | + add_group 'Metasploit Framework (Base)', 'lib/msf/base' |
| 28 | + add_group 'Metasploit Framework (Core)', 'lib/msf/core' |
| 29 | + |
| 30 | + # |
| 31 | + # Other library groups |
| 32 | + # |
| 33 | + |
| 34 | + add_group 'Fastlib', 'lib/fastlib' |
| 35 | + add_group 'Metasm', 'lib/metasm' |
| 36 | + add_group 'PacketFu', 'lib/packetfu' |
| 37 | + add_group 'Rex', 'lib/rex' |
| 38 | + add_group 'RKelly', 'lib/rkelly' |
| 39 | + add_group 'Ruby Mysql', 'lib/rbmysql' |
| 40 | + add_group 'Ruby Postgres', 'lib/postgres' |
| 41 | + add_group 'SNMP', 'lib/snmp' |
| 42 | + add_group 'Zip', 'lib/zip' |
| 43 | + |
| 44 | + # |
| 45 | + # Specs are reported on to ensure that all examples are being run and all |
| 46 | + # lets, befores, afters, etc are being used. |
| 47 | + # |
| 48 | + |
| 49 | + add_group 'Specs', 'spec' |
| 50 | +end |
0 commit comments