simplecov-patched 0.14.2

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.
Files changed (126) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +31 -0
  3. data/.rspec +3 -0
  4. data/.rubocop.yml +88 -0
  5. data/.travis.yml +29 -0
  6. data/.yardopts +1 -0
  7. data/CHANGELOG.md +435 -0
  8. data/CONTRIBUTING.md +48 -0
  9. data/Gemfile +38 -0
  10. data/MIT-LICENSE +20 -0
  11. data/README.md +646 -0
  12. data/Rakefile +41 -0
  13. data/cucumber.yml +13 -0
  14. data/doc/alternate-formatters.md +36 -0
  15. data/doc/commercial-services.md +20 -0
  16. data/doc/editor-integration.md +13 -0
  17. data/features/config_autoload.feature +46 -0
  18. data/features/config_command_name.feature +45 -0
  19. data/features/config_coverage_dir.feature +33 -0
  20. data/features/config_deactivate_merging.feature +42 -0
  21. data/features/config_formatters.feature +77 -0
  22. data/features/config_merge_timeout.feature +39 -0
  23. data/features/config_nocov_token.feature +79 -0
  24. data/features/config_profiles.feature +44 -0
  25. data/features/config_project_name.feature +27 -0
  26. data/features/config_styles.feature +121 -0
  27. data/features/config_tracked_files.feature +29 -0
  28. data/features/cucumber_basic.feature +29 -0
  29. data/features/maximum_coverage_drop.feature +89 -0
  30. data/features/merging_test_unit_and_rspec.feature +44 -0
  31. data/features/minimum_coverage.feature +59 -0
  32. data/features/refuse_coverage_drop.feature +95 -0
  33. data/features/rspec_basic.feature +32 -0
  34. data/features/rspec_fails_on_initialization.feature +14 -0
  35. data/features/rspec_groups_and_filters_basic.feature +29 -0
  36. data/features/rspec_groups_and_filters_complex.feature +37 -0
  37. data/features/rspec_groups_using_filter_class.feature +41 -0
  38. data/features/rspec_without_simplecov.feature +20 -0
  39. data/features/skipping_code_blocks_manually.feature +70 -0
  40. data/features/step_definitions/html_steps.rb +44 -0
  41. data/features/step_definitions/simplecov_steps.rb +68 -0
  42. data/features/step_definitions/transformers.rb +13 -0
  43. data/features/step_definitions/web_steps.rb +64 -0
  44. data/features/support/env.rb +50 -0
  45. data/features/test_unit_basic.feature +34 -0
  46. data/features/test_unit_groups_and_filters_basic.feature +29 -0
  47. data/features/test_unit_groups_and_filters_complex.feature +35 -0
  48. data/features/test_unit_groups_using_filter_class.feature +40 -0
  49. data/features/test_unit_without_simplecov.feature +20 -0
  50. data/features/unicode_compatiblity.feature +67 -0
  51. data/lib/simplecov.rb +189 -0
  52. data/lib/simplecov/command_guesser.rb +59 -0
  53. data/lib/simplecov/configuration.rb +307 -0
  54. data/lib/simplecov/defaults.rb +121 -0
  55. data/lib/simplecov/exit_codes.rb +8 -0
  56. data/lib/simplecov/file_list.rb +59 -0
  57. data/lib/simplecov/filter.rb +54 -0
  58. data/lib/simplecov/formatter.rb +8 -0
  59. data/lib/simplecov/formatter/multi_formatter.rb +32 -0
  60. data/lib/simplecov/formatter/simple_formatter.rb +23 -0
  61. data/lib/simplecov/jruby_fix.rb +42 -0
  62. data/lib/simplecov/last_run.rb +24 -0
  63. data/lib/simplecov/load_global_config.rb +6 -0
  64. data/lib/simplecov/no_defaults.rb +2 -0
  65. data/lib/simplecov/profiles.rb +31 -0
  66. data/lib/simplecov/railtie.rb +7 -0
  67. data/lib/simplecov/railties/tasks.rake +11 -0
  68. data/lib/simplecov/raw_coverage.rb +39 -0
  69. data/lib/simplecov/result.rb +86 -0
  70. data/lib/simplecov/result_merger.rb +95 -0
  71. data/lib/simplecov/source_file.rb +196 -0
  72. data/lib/simplecov/version.rb +25 -0
  73. data/spec/1_8_fallbacks_spec.rb +31 -0
  74. data/spec/command_guesser_spec.rb +48 -0
  75. data/spec/config_loader_spec.rb +14 -0
  76. data/spec/configuration_spec.rb +35 -0
  77. data/spec/deleted_source_spec.rb +12 -0
  78. data/spec/faked_project/Gemfile +6 -0
  79. data/spec/faked_project/Rakefile +8 -0
  80. data/spec/faked_project/cucumber.yml +13 -0
  81. data/spec/faked_project/features/step_definitions/my_steps.rb +22 -0
  82. data/spec/faked_project/features/support/env.rb +12 -0
  83. data/spec/faked_project/features/test_stuff.feature +6 -0
  84. data/spec/faked_project/lib/faked_project.rb +11 -0
  85. data/spec/faked_project/lib/faked_project/framework_specific.rb +18 -0
  86. data/spec/faked_project/lib/faked_project/meta_magic.rb +24 -0
  87. data/spec/faked_project/lib/faked_project/some_class.rb +28 -0
  88. data/spec/faked_project/lib/faked_project/untested_class.rb +11 -0
  89. data/spec/faked_project/spec/faked_spec.rb +11 -0
  90. data/spec/faked_project/spec/forking_spec.rb +8 -0
  91. data/spec/faked_project/spec/meta_magic_spec.rb +15 -0
  92. data/spec/faked_project/spec/some_class_spec.rb +13 -0
  93. data/spec/faked_project/spec/spec_helper.rb +11 -0
  94. data/spec/faked_project/test/faked_test.rb +11 -0
  95. data/spec/faked_project/test/meta_magic_test.rb +13 -0
  96. data/spec/faked_project/test/some_class_test.rb +15 -0
  97. data/spec/faked_project/test/test_helper.rb +12 -0
  98. data/spec/file_list_spec.rb +50 -0
  99. data/spec/filters_spec.rb +98 -0
  100. data/spec/fixtures/app/controllers/sample_controller.rb +10 -0
  101. data/spec/fixtures/app/models/user.rb +10 -0
  102. data/spec/fixtures/deleted_source_sample.rb +15 -0
  103. data/spec/fixtures/frameworks/rspec_bad.rb +9 -0
  104. data/spec/fixtures/frameworks/rspec_good.rb +9 -0
  105. data/spec/fixtures/frameworks/testunit_bad.rb +9 -0
  106. data/spec/fixtures/frameworks/testunit_good.rb +9 -0
  107. data/spec/fixtures/iso-8859.rb +3 -0
  108. data/spec/fixtures/never.rb +2 -0
  109. data/spec/fixtures/resultset1.rb +4 -0
  110. data/spec/fixtures/resultset2.rb +4 -0
  111. data/spec/fixtures/sample.rb +16 -0
  112. data/spec/fixtures/skipped.rb +4 -0
  113. data/spec/fixtures/skipped_and_executed.rb +8 -0
  114. data/spec/fixtures/utf-8.rb +3 -0
  115. data/spec/helper.rb +26 -0
  116. data/spec/last_run_spec.rb +48 -0
  117. data/spec/multi_formatter_spec.rb +20 -0
  118. data/spec/raw_coverage_spec.rb +92 -0
  119. data/spec/result_merger_spec.rb +96 -0
  120. data/spec/result_spec.rb +209 -0
  121. data/spec/return_codes_spec.rb +34 -0
  122. data/spec/simplecov_spec.rb +110 -0
  123. data/spec/source_file_line_spec.rb +155 -0
  124. data/spec/source_file_spec.rb +141 -0
  125. data/spec/support/fail_rspec_on_ruby_warning.rb +75 -0
  126. metadata +320 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 37e1eb107f307c4f392152238f00eb7cf63e1e3a
4
+ data.tar.gz: 04be361eed2365e403a68464a47ebf8e728f6a1a
5
+ SHA512:
6
+ metadata.gz: 58376180f17d3239ac8d077359bd6c311ccbd9722d1de35e7ea7a1905c34a4d37eb1adf1678a1d2094220ed615cbd4eead688386ff0375727cc6968c495f85d7
7
+ data.tar.gz: 5305b853d16e8fa749e18e4a02cde1d8f28bd5ecf4b81e6dc75902c3dd25b52e541c5038af72e1d2cf8ef834ac0656cf45155490bba4400fbae3f0f068845168
data/.gitignore ADDED
@@ -0,0 +1,31 @@
1
+ .bundle
2
+ Gemfile.lock
3
+ gemfiles/*.lock
4
+
5
+ ## MAC OS
6
+ .DS_Store
7
+ .document
8
+
9
+ ## TEXTMATE
10
+ *.tmproj
11
+ tmtags
12
+
13
+ ## EMACS
14
+ *~
15
+ \#*
16
+ .\#*
17
+
18
+ ## VIM
19
+ *.swp
20
+
21
+ ## PROJECT::GENERAL
22
+ coverage
23
+ rdoc
24
+ pkg
25
+ tmp
26
+ capybara*.html
27
+ .rvmrc
28
+
29
+ ## PROJECT::SPECIFIC
30
+
31
+ .yardoc
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --color
2
+ --order random
3
+ --warning
data/.rubocop.yml ADDED
@@ -0,0 +1,88 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'spec/fixtures/iso-8859.rb'
4
+ - 'tmp/**/*'
5
+ - 'vendor/bundle/**/*'
6
+ TargetRubyVersion: 1.9
7
+
8
+ Bundler/OrderedGems:
9
+ Enabled: false
10
+
11
+ Lint/AmbiguousRegexpLiteral:
12
+ Exclude:
13
+ - 'features/**/*_steps.rb'
14
+ - 'spec/**/*_steps.rb'
15
+ - 'tmp/**/*_steps.rb'
16
+
17
+ Metrics/AbcSize:
18
+ Max: 25 # TODO: Lower to 15
19
+
20
+ Metrics/BlockLength:
21
+ Exclude:
22
+ - 'spec/**/*.rb'
23
+
24
+ Metrics/BlockNesting:
25
+ Max: 2
26
+
27
+ Metrics/LineLength:
28
+ AllowURI: true
29
+ Enabled: false
30
+
31
+ Metrics/MethodLength:
32
+ CountComments: false
33
+ Max: 12 # TODO: Lower to 10
34
+
35
+ Metrics/ParameterLists:
36
+ Max: 4
37
+ CountKeywordArgs: true
38
+
39
+ Style/AccessModifierIndentation:
40
+ EnforcedStyle: outdent
41
+
42
+ Style/CollectionMethods:
43
+ PreferredMethods:
44
+ map: 'collect'
45
+ reduce: 'inject'
46
+ find: 'detect'
47
+ find_all: 'select'
48
+
49
+ Style/Documentation:
50
+ Enabled: false
51
+
52
+ Style/DoubleNegation:
53
+ Enabled: false
54
+
55
+ Style/HashSyntax:
56
+ EnforcedStyle: hash_rockets
57
+
58
+ Style/IndentHeredoc:
59
+ Enabled: false
60
+
61
+ Style/RegexpLiteral:
62
+ Enabled: false
63
+
64
+ Style/SpaceInsideHashLiteralBraces:
65
+ EnforcedStyle: no_space
66
+
67
+ Style/SpecialGlobalVars:
68
+ Exclude:
69
+ - 'spec/deleted_source_spec.rb'
70
+ - 'spec/return_codes_spec.rb'
71
+ - 'lib/simplecov/defaults.rb'
72
+
73
+ Style/StringLiterals:
74
+ EnforcedStyle: double_quotes
75
+
76
+ Style/FileName:
77
+ Exclude:
78
+ - 'spec/fixtures/utf-8.rb'
79
+
80
+ Style/TrailingCommaInLiteral:
81
+ EnforcedStyleForMultiline: comma
82
+
83
+ Style/GuardClause:
84
+ Enabled: false
85
+
86
+ Style/MutableConstant:
87
+ Exclude:
88
+ - 'lib/simplecov/version.rb' # required for older versions of rubygems
data/.travis.yml ADDED
@@ -0,0 +1,29 @@
1
+ language: ruby
2
+
3
+ before_install:
4
+ - gem update --system
5
+ - gem install bundler
6
+
7
+ bundler_args: --without development --jobs=3 --retry=3
8
+
9
+ cache: bundler
10
+
11
+ sudo: false
12
+
13
+ rvm:
14
+ - 1.8.7
15
+ - 1.9.3
16
+ - 2.0.0
17
+ - 2.1.10
18
+ - 2.2.6
19
+ - 2.3.3
20
+ - 2.4.0
21
+ - ruby-head
22
+ - jruby-head
23
+ - jruby-9.1.8.0
24
+
25
+ matrix:
26
+ allow_failures:
27
+ - rvm: ruby-head
28
+ - rvm: jruby-head
29
+ fast_finish: true
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ - **/*.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,435 @@
1
+ 0.14.1 2017-03-18 ([changes](https://github.com/colszowka/simplecov/compare/v0.14.0...v0.14.1))
2
+ ========
3
+
4
+ ## Bugfixes
5
+
6
+ * Files that were skipped as a whole/had no relevant coverage could lead to Float errors. See [#564](https://github.com/colszowka/simplecov/pull/564) (thanks to @stevehanson for the report in [#563](https://github.com/colszowka/simplecov/issues/563))
7
+
8
+ 0.14.0 2017-03-15 ([changes](https://github.com/colszowka/simplecov/compare/v0.13.0...v0.14.0))
9
+ ==========
10
+
11
+ ## Enhancements
12
+
13
+ * Officially support JRuby 9.1+ going forward (should also work with previous releases). See [#547](https://github.com/colszowka/simplecov/pull/547) (ping @PragTob when encountering issues)
14
+ * Add Channel group to Rails profile, when `ActionCable` is loaded. See [#492](https://github.com/colszowka/simplecov/pull/492) (thanks @BenMorganIO)
15
+ * Stop `extend`ing instances of `Array` and `Hash` during merging results avoiding problems frozen results while manually merging results. See [#558](https://github.com/colszowka/simplecov/pull/558) (thanks @aroben)
16
+
17
+ ## Bugfixes
18
+
19
+ * Fix parallel_tests when a thread ends up running no tests. See [#533](https://github.com/colszowka/simplecov/pull/533) (thanks @cshaffer)
20
+ * Skip the `:nocov:` comments along with the code that they skip. See [#551](https://github.com/colszowka/simplecov/pull/551) (thanks @ebiven)
21
+ * Fix crash when Home environment variable is unset. See [#482](https://github.com/colszowka/simplecov/pull/482) (thanks @waldyr)
22
+ * Make track_files work again when explicitly setting it to nil. See [#463](https://github.com/colszowka/simplecov/pull/463) (thanks @craiglittle)
23
+ * Do not overwrite .last_run.json file when refuse_coverage_drop option is enabled and the coverage has dropped (lead to you being able to just rerun tests and everything was _fine_). See [#553](https://github.com/colszowka/simplecov/pull/553) (thanks @Miloshes)
24
+
25
+ 0.13.0 2017-01-25 ([changes](https://github.com/colszowka/simplecov/compare/v0.12.0...v0.13.0))
26
+ ==========
27
+
28
+ ## Enhancements
29
+
30
+ * Faster run times when a very large number of files is loaded into SimpleCov. See [#520](https://github.com/colszowka/simplecov/pull/520) (thanks @alyssais)
31
+ * Only read in source code files that are actually used (faster when files are ignored etc.). See [#540](https://github.com/colszowka/simplecov/pull/540) (thanks @yui-knk)
32
+
33
+ ## Bugfixes
34
+
35
+ * Fix merging of resultsets if a file is missing on one side. See [#513](https://github.com/colszowka/simplecov/pull/513) (thanks @hanazuki)
36
+ * Fix Ruby 2.4 deprecation warnings by using Integer instead of Fixnum. See [#523](https://github.com/colszowka/simplecov/pull/523) (thanks @nobu)
37
+ * Force Ruby 2 to json 2. See [dc7417d50](https://github.com/colszowka/simplecov/commit/dc7417d5049b1809cea214314c15dd93a5dd964f) (thanks @amatsuda)
38
+ * Various other gem dependency fixes for different gems on different ruby versions. (thanks @amatsuda)
39
+
40
+ 0.12.0 2016-07-02 ([changes](https://github.com/colszowka/simplecov/compare/v0.11.2...v0.12.0))
41
+ =================
42
+
43
+ ## Enhancements
44
+
45
+ * Add support for JSON versions 2.x
46
+
47
+ ## Bugfixes
48
+
49
+ * Fix coverage rate of the parallel_tests. See [#441](https://github.com/colszowka/simplecov/pull/441) (thanks @sinsoku)
50
+ * Fix a regression on old rubies that failed to work with the recently introduced frozen VERSION string. See [#461](https://github.com/colszowka/simplecov/pull/461) (thanks @leafle)
51
+
52
+ 0.11.2 2016-02-03 ([changes](https://github.com/colszowka/simplecov/compare/v0.11.1...v0.11.2))
53
+ =================
54
+
55
+ ## Enhancements
56
+
57
+ * Do not globally pollute Array and Hash with `merge_resultset` utility methods. See [#449](https://github.com/colszowka/simplecov/pull/449) (thanks @amatsuda)
58
+ * Do not `mkdir_p` the `coverage_path` on every access of the method (See [#453](https://github.com/colszowka/simplecov/pull/453) (thanks @paddor)
59
+ * Fixes a Ruby warning related to the `track_files` configuration. See [#447](https://github.com/colszowka/simplecov/pull/447) (thanks @craiglittle)
60
+ * Add a group for background jobs to default Rails profile. See [#442](https://github.com/colszowka/simplecov/pull/442) (thanks @stve)
61
+
62
+ ## Bugfixes
63
+
64
+ * Fix root_filter evaluates SimpleCov.root before initialization. See [#437](https://github.com/colszowka/simplecov/pull/437) (thanks @tmtm)
65
+
66
+ 0.11.1 2015-12-01 ([changes](https://github.com/colszowka/simplecov/compare/v0.11.0...v0.11.1))
67
+ =================
68
+
69
+ ## Enhancements
70
+
71
+ ## Bugfixes
72
+
73
+ * Fixed regression in `MultiFormatter.[]` with multiple arguments. See [#431](https://github.com/colszowka/simplecov/pull/431) (thanks @dillondrobena)
74
+
75
+ 0.11.0 2015-11-29 ([changes](https://github.com/colszowka/simplecov/compare/v0.10.0...v0.11.0))
76
+ =================
77
+
78
+ ## Enhancements
79
+
80
+ * Added `SimpleCov.minimum_coverage_by_file` for per-file coverage thresholds. See [#392](https://github.com/colszowka/simplecov/pull/392) (thanks @ptashman)
81
+ * Added `track_files` configuration option to specify a glob to always include in coverage results, whether or not those files are required. By default, this is enabled in the Rails profile for common Rails directories. See [#422](https://github.com/colszowka/simplecov/pull/422) (thanks @hugopeixoto)
82
+ * Speed up `root_filter` by an order of magnitude. See [#396](https://github.com/colszowka/simplecov/pull/396) (thanks @raszi)
83
+
84
+ ## Bugfixes
85
+
86
+ * Fix warning about global variable `$ERROR_INFO`. See [#400](https://github.com/colszowka/simplecov/pull/400) (thanks @amatsuda)
87
+ * Actually recurse upward looking for `.simplecov`, as claimed by the documentation, rather than only the working directory. See [#423](https://github.com/colszowka/simplecov/pull/423) (thanks @alexdowad)
88
+
89
+ 0.10.0 2015-04-18 ([changes](https://github.com/colszowka/simplecov/compare/v0.9.2...v0.10.0))
90
+ =================
91
+
92
+ ## Enhancements
93
+
94
+ * Add writeup about using with Spring to README. See [#341](https://github.com/colszowka/simplecov/issues/341) (thanks @swrobel and @onebree)
95
+ * Add support to pass in an Array when creating filter groups (original PR #104)
96
+ * Filter `/vendor/bundle` by default. See [#331](https://github.com/colszowka/simplecov/pull/331) (thanks @andyw8)
97
+ * Add some helpful singleton methods to the version string.
98
+ * Allow array to be passed in a filter. See [375](https://github.com/colszowka/simplecov/pull/375) (thanks @JanStevens)
99
+ * Enforce consistent code formatting with RuboCop.
100
+
101
+ ## Bugfixes
102
+
103
+ * Fix order dependencies in unit tests. See [#376](https://github.com/colszowka/simplecov/pull/376) (thanks @hugopeixoto)
104
+ * Only run the at_exit behaviors if the current PID matches the PID that called SimpleCov.start. See [#377](https://github.com/colszowka/simplecov/pull/377) (thanks @coderanger)
105
+
106
+ 0.9.2, 2015-02-18 ([changes](https://github.com/colszowka/simplecov/compare/v0.9.1...v0.9.2))
107
+ =================
108
+
109
+ This is a minor bugfix release for simplecov-html, released as `0.9.0`. Due to the tight version constraint in the gemspec
110
+ a new release of simplecov had to be shipped to allow using simplecov-html `~> 0.9.0`.
111
+
112
+ * The browser back / forward button should now work again. See [#36](https://github.com/colszowka/simplecov-html/pull/36) and
113
+ [#35](https://github.com/colszowka/simplecov-html/pull/35). Thanks @whatasunnyday and @justinsteele for submitting PRs to fix this.
114
+ * Fix "warning: possibly useless use of a variable in void context" See [#31](https://github.com/colszowka/simplecov-html/pull/31). Thanks @cbandy
115
+ * Always use binary file format. See [#32](https://github.com/colszowka/simplecov-html/pull/32). Thanks @andy128k
116
+ * Avoid slow file output with JRuby/Windows. See [#16](https://github.com/colszowka/simplecov-html/pull/16). Thanks @pschambacher
117
+
118
+ Other than the release includes a bunch of mostly documentation improvements:
119
+
120
+ * Update Rails path for Rails 4+. See [#336](https://github.com/colszowka/simplecov/pull/336). Thanks @yazinsai
121
+ * Encourage use of .simplecov to avoid lost files. See [#338](https://github.com/colszowka/simplecov/pull/338). thanks @dankohn
122
+ * Specified in the gemspec that simplecov needs ruby 1.8.7. See [#343](https://github.com/colszowka/simplecov/pull/343). thanks @iainbeeston
123
+ * Fix mispointed link in CHANGELOG.md. See [#353](https://github.com/colszowka/simplecov/pull/353). Thanks @dleve123
124
+ * Improve command name docs. See [#356](https://github.com/colszowka/simplecov/pull/356). Thanks @gtd
125
+
126
+
127
+
128
+ 0.9.1, 2014-09-21 ([changes](https://github.com/colszowka/simplecov/compare/v0.9.0...v0.9.1))
129
+ =================
130
+
131
+ ## Bugfixes
132
+
133
+ * In 0.9.0, we introduced a regression that made SimpleCov no-op mode fail on Ruby 1.8, while
134
+ dropping 1.8 support altogether is announced only for v1.0. This has been fixed.
135
+ See [#333](https://github.com/colszowka/simplecov/issues/333) (thanks (@sferik)
136
+
137
+
138
+ 0.9.0, 2014-07-17 ([changes](https://github.com/colszowka/simplecov/compare/v0.8.2...v0.9.0))
139
+ =================
140
+
141
+ **A warm welcome and big thank you to the new contributors [@xaviershay](https://github.com/xaviershay), [@sferik](https://github.com/sferik) and especially [@bf4](https://github.com/bf4) for tackling a whole lot of issues and pull requests for this release!**
142
+
143
+ ## Enhancements
144
+
145
+ * New interface to specify multiple formatters.
146
+ See [#317](https://github.com/colszowka/simplecov/pull/317) (thanks @sferik)
147
+ * Document in the README how to exclude code from coverage reports,
148
+ and that the feature shouldn't be abused for skipping untested
149
+ private code.
150
+ See [#304](https://github.com/colszowka/simplecov/issues/304)
151
+ * Clarify Ruby version support.
152
+ See [#279](https://github.com/colszowka/simplecov/pull/279) (thanks @deivid-rodriguez)
153
+
154
+ ## Bugfixes
155
+
156
+ * Ensure calculations return Floats, not Fixnum or Rational. Fixes segfaults with mathn.
157
+ See [#245](https://github.com/colszowka/simplecov/pull/245) (thanks to @bf4)
158
+ * Using `Kernel.exit` instead of exit to avoid uncaught throw :IRB_EXIT when
159
+ exiting irb sessions.
160
+ See [#287](https://github.com/colszowka/simplecov/pull/287) (thanks @wless1)
161
+ See [#285](https://github.com/colszowka/simplecov/issues/285)
162
+ * Does not look for .simplecov in ~/ when $HOME is not set.
163
+ See [#311](https://github.com/colszowka/simplecov/pull/311) (thanks @lasseebert)
164
+ * Exit with code only if it's Numeric > 0.
165
+ See [#302](https://github.com/colszowka/simplecov/pull/302) (thanks @hajder)
166
+ * Make default filter case insensitive.
167
+ See [#280](https://github.com/colszowka/simplecov/pull/280) (thanks @ryanatball)
168
+ * Improve regexp that matches functional tests.
169
+ See [#276](https://github.com/colszowka/simplecov/pull/276) (thanks @sferik)
170
+ * Fix TravisCI [#272](https://github.com/colszowka/simplecov/pull/272) [#278](https://github.com/colszowka/simplecov/pull/278), [#302](https://github.com/colszowka/simplecov/pull/302)
171
+ * Fix global config load.
172
+ See [#311](https://github.com/colszowka/simplecov/pull/311) (thanks @lasseebert)
173
+
174
+ v0.8.2, 2013-11-20 ([changes](https://github.com/colszowka/simplecov/compare/v0.8.1...v0.8.2))
175
+ ==================
176
+
177
+ ## Bugfixes
178
+
179
+ * Replaced the locking behaviour [via lockfile gem](https://github.com/colszowka/simplecov/pull/185) with
180
+ plain Ruby explicit file locking when merging results. This should make simplecov merging to behave well
181
+ on Windows again.
182
+ See [#258](https://github.com/colszowka/simplecov/issues/258) and
183
+ [#223](https://github.com/colszowka/simplecov/pull/223) (thanks to @tomykaira)
184
+
185
+ v0.8.1, 2013-11-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.8.0...v0.8.1))
186
+ ==================
187
+
188
+ ## Bugfixes
189
+
190
+ * Fixed a regression introduced in 0.8.0 - the Forwardable STDLIB module is now required explicitly.
191
+ See [#256](https://github.com/colszowka/simplecov/pull/256) (thanks to @kylev)
192
+
193
+ v0.8.0, 2013-11-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.7.1...v0.8.0))
194
+ ==================
195
+
196
+ **Note: Yanked the same day because of the regression that 0.8.1 fixes, see above**
197
+
198
+ ## TL;DR
199
+
200
+ It's been way too long since the last official release 0.7.1, but this was partly due to it proving itself
201
+ quite stable in most circumstances. This release brings various further stability improvements to result set merging
202
+ (especially when working with parallel_tests), the configuration, source file encodings, and command name guessing.
203
+
204
+ The 0.8 line is the last one to cooperate with Ruby < 1.9. Starting with 0.9, SimpleCov will assume to be running in
205
+ Ruby 1.9+, and will not try to detect or bail silently on older Ruby versions. An appropriate deprecation warning
206
+ has been added.
207
+
208
+ ## Features
209
+
210
+ * Configuration blocks now have access to variables and methods outside of the block's scope.
211
+ See [#238](https://github.com/colszowka/simplecov/pull/238) (thanks to @ms-tg)
212
+ * You can now have a global `~/.simplecov` configuration file.
213
+ See [#195](https://github.com/colszowka/simplecov/pull/195) (thanks to @spagalloco)
214
+ * simplecov-html now uses the MIT-licensed colorbox plugin. Some adjustments when viewing source files,
215
+ including retaining the currently open file on refresh have been added.
216
+ See [simplecov-html #15](https://github.com/colszowka/simplecov-html/pull/15) (thanks to @chetan)
217
+ * Adds support for Rails 4 command guessing, removes default group `vendor/plugins`.
218
+ See [#181](https://github.com/colszowka/simplecov/pull/181) and
219
+ [#203](https://github.com/colszowka/simplecov/pull/203) (thanks to @semanticart and @phallstrom)
220
+ * You can now load simplecov without the default settings by doing `require 'simplecov/no_defaults'`
221
+ or setting `ENV['SIMPLECOV_NO_DEFAULTS']`. Check `simplecov/defaults` to see what preconfigurations are getting
222
+ dropped by using this. See [#209](https://github.com/colszowka/simplecov/pull/209) (thanks to @ileitch)
223
+ * The result set merging now uses the `lockfile` gem to avoid race conditions.
224
+ See [#185](https://github.com/colszowka/simplecov/pull/185) (thanks to @jshraibman-mdsol).
225
+ * Automatically detect the usage of parallel_tests and adjust the command name with the test env number accordingly,
226
+ See [#64](https://github.com/colszowka/simplecov/issues/64) and
227
+ [#185](https://github.com/colszowka/simplecov/pull/185) (thanks to @jshraibman-mdsol).
228
+
229
+ ## Enhancements
230
+
231
+ * Rename adapters to "profiles" given that they are bundles of settings. The old adapter methods are
232
+ deprecated, but remain available for now.
233
+ See [#207](https://github.com/colszowka/simplecov/pull/207) (thanks to @mikerobe)
234
+ * Tweaks to the automatic test suite naming. In particular, `rspec/features` should now
235
+ be correctly attributed to RSpec, not Cucumber.
236
+ See [#212](https://github.com/colszowka/simplecov/pull/212) (thanks to @ersatzryan and @betelgeuse)
237
+ * MiniTest should now be identified correctly by the command name guesser.
238
+ See [#244](https://github.com/colszowka/simplecov/pull/244) (thanks to @envygeeks)
239
+ * Makes SimpleCov resilient to inclusion of mathn library.
240
+ See [#175](https://github.com/colszowka/simplecov/pull/175) and
241
+ [#140](https://github.com/colszowka/simplecov/issues/140) (thanks to @scotje)
242
+ * Allow coverage_dir to be an absolute path.
243
+ * See [#190](https://github.com/colszowka/simplecov/pull/190) (thanks to @jshraibman-mdsol)
244
+ * The internal cucumber test suite now uses Capybara 2.
245
+ See [#206](https://github.com/colszowka/simplecov/pull/206) (thanks to @infertux)
246
+ * Work-arounds for the Coverage library shipped in JRuby 1.6 to behave in line with MRI.
247
+ See [#174](https://github.com/colszowka/simplecov/pull/174) (thanks to @grddev)
248
+ * Fix warning: instance variable @exit_status not initialized.
249
+ See [#242](https://github.com/colszowka/simplecov/pull/242) and
250
+ [#213](https://github.com/colszowka/simplecov/pull/213) (thanks to @sferik and @infertux)
251
+
252
+ ## Bugfixes
253
+
254
+ * Correct result calculations for people using :nocov: tags.
255
+ See [#215](https://github.com/colszowka/simplecov/pull/215) (thanks to @aokolish)
256
+ * Average hits per line for groups of files is now computed correctly.
257
+ See [#192](http://github.com/colszowka/simplecov/pull/192) and
258
+ [#179](http://github.com/colszowka/simplecov/issues/179) (thanks to @graysonwright)
259
+ * Compatability with BINARY internal encoding.
260
+ See [#194](https://github.com/colszowka/simplecov/pull/194) and
261
+ [#127](https://github.com/colszowka/simplecov/issues/127) (thanks to @justfalter)
262
+ * Special characters in `SimpleCov.root` are now correctly escaped before being used as a RegExp.
263
+ See [#204](https://github.com/colszowka/simplecov/issues/204) and
264
+ [#237](https://github.com/colszowka/simplecov/pull/237) (thanks to @rli9)
265
+
266
+ v0.7.1, 2012-10-12 ([changes](https://github.com/colszowka/simplecov/compare/v0.7.0...v0.7.1))
267
+ ==================
268
+
269
+ * [BUGFIX] The gem packages of 0.7.0 (both simplecov and simplecov-html) pushed to Rubygems had some file
270
+ permission issues, leading to problems when installing SimpleCov in a root/system Rubygems install and then
271
+ trying to use it as a normal user (see https://github.com/colszowka/simplecov/issues/171, thanks @envygeeks
272
+ for bringing it up). The gem build process has been changed to always enforce proper permissions before packaging
273
+ to avoid this issue in the future.
274
+
275
+
276
+ v0.7.0, 2012-10-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.6.4...v0.7.0))
277
+ ==================
278
+
279
+ * [FEATURE] The new `maximum_coverage_drop` and `minimum_coverage` now allow you to fail your build when the
280
+ coverage dropped by more than what you allowed or is below a minimum value required. Also, `refuse_coverage_drop` disallows
281
+ any coverage drops between test runs.
282
+ See https://github.com/colszowka/simplecov/pull/151, https://github.com/colszowka/simplecov/issues/11,
283
+ https://github.com/colszowka/simplecov/issues/90, and https://github.com/colszowka/simplecov/issues/96 (thanks to @infertux)
284
+ * [FEATURE] SimpleCov now ships with a built-in MultiFormatter which allows the easy usage of multiple result formatters at
285
+ the same time without the need to write custom wrapper code.
286
+ See https://github.com/colszowka/simplecov/pull/158 (thanks to @nikitug)
287
+ * [BUGFIX] The usage of digits, hyphens and underscores in group names could lead to broken tab navigation
288
+ in the default simplecov-html reports. See https://github.com/colszowka/simplecov-html/pull/14 (thanks to @ebelgarts)
289
+ * [REFACTORING] A few more ruby warnings removed. See https://github.com/colszowka/simplecov/issues/106 and
290
+ https://github.com/colszowka/simplecov/pull/139. (thanks to @lukejahnke)
291
+ * A [Pledgie button](https://github.com/colszowka/simplecov/commit/63cfa99f8658fa5cc66a38c83b3195fdf71b9e93) for those that
292
+ feel generous :)
293
+ * The usual bunch of README fixes and documentation tweaks. Thanks to everyone who contributed those!
294
+
295
+ v0.6.4, 2012-05-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.6.3...v0.6.4))
296
+ ==================
297
+
298
+ * [BUGFIX] Encoding issues with ISO-8859-encoded source files fixed.
299
+ See https://github.com/colszowka/simplecov/pull/117. (thanks to @Deradon)
300
+ * [BUGFIX] Ensure ZeroDivisionErrors won't occur when calculating the coverage result, which previously
301
+ could happen in certain cases. See https://github.com/colszowka/simplecov/pull/128. (thanks to @japgolly)
302
+ * [REFACTORING] Changed a couple instance variable lookups so SimpleCov does not cause a lot of warnings when
303
+ running ruby at a higher warning level. See https://github.com/colszowka/simplecov/issues/106 and
304
+ https://github.com/colszowka/simplecov/pull/119. (thanks to @mvz and @gioele)
305
+
306
+
307
+ v0.6.3, 2012-05-10 ([changes](https://github.com/colszowka/simplecov/compare/v0.6.2...v0.6.3))
308
+ ==================
309
+
310
+ * [BUGFIX] Modified the API-changes for newer multi_json versions introduced with #122 and v0.6.2 so
311
+ they are backwards-compatible with older multi_json gems in order to avoid simplecov polluting
312
+ the multi_json minimum version requirement for entire applications.
313
+ See https://github.com/colszowka/simplecov/issues/132
314
+ * Added appraisal gem to the test setup in order to run the test suite against both 1.0 and 1.3
315
+ multi_json gems and ensure the above actually works :)
316
+
317
+ v0.6.2, 2012-04-20 ([changes](https://github.com/colszowka/simplecov/compare/v0.6.1...v0.6.2))
318
+ ==================
319
+
320
+ * [Updated to latest version of MultiJSON and its new API (thanks to @sferik and @ronen).
321
+ See https://github.com/colszowka/simplecov/pull/122
322
+
323
+ v0.6.1, 2012-02-24 ([changes](https://github.com/colszowka/simplecov/compare/v0.6.0...v0.6.1))
324
+ ==================
325
+
326
+ * [BUGFIX] Don't force-load Railtie on Rails < 3. Fixes regression introduced with
327
+ #83. See https://github.com/colszowka/simplecov/issues/113
328
+
329
+ v0.6.0, 2012-02-22 ([changes](https://github.com/colszowka/simplecov/compare/v0.5.4...v0.6.0))
330
+ ==================
331
+
332
+ * [FEATURE] Auto-magic `rake simplecov` task for rails
333
+ (see https://github.com/colszowka/simplecov/pull/83, thanks @sunaku)
334
+ * [BUGFIX] Treat source files as UTF-8 to avoid encoding errors
335
+ (see https://github.com/colszowka/simplecov/pull/103, thanks @joeyates)
336
+ * [BUGFIX] Store the invoking terminal command right after loading so they are safe from
337
+ other libraries tampering with ARGV. Among other makes automatic Rails test suite splitting
338
+ (Unit/Functional/Integration) work with recent rake versions again
339
+ (see https://github.com/colszowka/simplecov/issues/110)
340
+ * [FEATURE] If guessing command name from the terminal command fails, try guessing from defined constants
341
+ (see https://github.com/colszowka/simplecov/commit/37afca54ef503c33d888e910f950b3b943cb9a6c)
342
+ * Some refactorings and cleanups as usual. Please refer to the github compare view for a full
343
+ list of changes: https://github.com/colszowka/simplecov/compare/v0.5.4...v0.6.0
344
+
345
+ v0.5.4, 2011-10-12 ([changes](https://github.com/colszowka/simplecov/compare/v0.5.3...v0.5.4))
346
+ ==================
347
+
348
+ * Do not give exit code 0 when there are exceptions prior to tests
349
+ (see https://github.com/colszowka/simplecov/issues/41, thanks @nbogie)
350
+ * The API for building custom filter classes is now more obvious, using #matches? instead of #passes? too.
351
+ (see https://github.com/colszowka/simplecov/issues/85, thanks @robinroestenburg)
352
+ * Mailers are now part of the Rails adapter as their own group (see
353
+ https://github.com/colszowka/simplecov/issues/79, thanks @geetarista)
354
+ * Removed fix for JRuby 1.6 RC1 float bug because it's been fixed
355
+ (see https://github.com/colszowka/simplecov/issues/86)
356
+ * Readme formatted in Markdown :)
357
+
358
+ v0.5.3, 2011-09-13 ([changes](https://github.com/colszowka/simplecov/compare/v0.5.2...v0.5.3))
359
+ ==================
360
+
361
+ * Fix for encoding issues that came from the nocov processing mechanism
362
+ (see https://github.com/colszowka/simplecov/issues/71)
363
+ * :nocov: lines are now actually being reflected in the HTML report and are marked in yellow.
364
+
365
+ * The Favicon in the HTML report is now determined by the overall coverage and will have the color
366
+ that the coverage percentage gets as a css class to immediately indicate coverage status on first sight.
367
+
368
+ * Introduced SimpleCov::SourceFile::Line#status method that returns the coverage status
369
+ as a string for this line - made SimpleCov::HTML use that.
370
+ * Refactored nocov processing and made it configurable using SimpleCov.ncov_token (or it's
371
+ alias SimpleCov.skip_token)
372
+
373
+ v0.5.2, 2011-09-12 ([changes](https://github.com/colszowka/simplecov/compare/v0.5.1...v0.5.2))
374
+ ==================
375
+
376
+ * Another fix for a bug in JSON processing introduced with MultiJSON in 0.5.1
377
+ (see https://github.com/colszowka/simplecov/pull/75, thanks @sferik)
378
+
379
+ v0.5.1, 2011-09-12 ([changes](https://github.com/colszowka/simplecov/compare/v0.5.0...v0.5.1))
380
+ ==================
381
+ **Note: Yanked 2011-09-12 because the MultiJSON-patch had a crucial bug**
382
+
383
+ * Fix for invalid gemspec dependency string (see https://github.com/colszowka/simplecov/pull/70,
384
+ http://blog.rubygems.org/2011/08/31/shaving-the-yaml-yacc.html, thanks @jspradlin)
385
+
386
+ * Added JSON in the form of the multi_json gem as dependency for those cases when built-in JSON
387
+ is unavailable (see https://github.com/colszowka/simplecov/issues/72
388
+ and https://github.com/colszowka/simplecov/pull/74, thanks @sferik)
389
+
390
+ v0.5.0, 2011-09-09 ([changes](https://github.com/colszowka/simplecov/compare/v0.4.2...v0.5.4))
391
+ ==================
392
+ **Note: Yanked 2011-09-09 because of trouble with the gemspec.**
393
+
394
+ * JSON is now used instead of YAML for resultset caching (used for merging). Should resolve
395
+ a lot of problems people used to have because of YAML parser errors.
396
+
397
+ * There's a new adapter 'test_frameworks'. Use it outside of Rails to remove `test/`,
398
+ `spec/`, `features/` and `autotest/` dirs from your coverage reports, either directly
399
+ with `SimpleCov.start 'test_frameworks'` or with `SimpleCov.load_adapter 'test_frameworks'`
400
+
401
+ * SimpleCov configuration can now be placed centrally in a text file `.simplecov`, which will
402
+ be automatically read on `require 'simplecov'`. This makes using custom configuration like
403
+ groups and filters across your test suites much easier as you only have to specify your config
404
+ once. Just put the whole `SimpleCov.start (...)` code into `APP_ROOT/.simplecov`
405
+
406
+ * Lines can now be skipped by using the :nocov: flag in comments that wrap the code that should be
407
+ skipped, like in this example (thanks @phillipkoebbe)
408
+
409
+ <pre>
410
+ #:nocov:
411
+ def skipped
412
+ @foo * 2
413
+ end
414
+ #:nocov:
415
+ </pre>
416
+
417
+ * Moved file set coverage analytics from simplecov-html to SimpleCov::FileList, a new subclass
418
+ of Array that is always returned for SourceFile lists (i.e. in groups) and can now be used
419
+ in all formatters without the need to roll your own.
420
+
421
+ * The exceptions you used to get after removing some code and re-running your tests because SimpleCov
422
+ couldn't find the cached source lines should be resolved (thanks @goneflyin)
423
+
424
+ * Coverage strength metric: Average hits/line per source file and result group (thanks @trans)
425
+
426
+ * Finally, SimpleCov has an extensive Cucumber test suite
427
+
428
+ * Full compatibility with Ruby 1.9.3.preview1
429
+
430
+ ### HTML Formatter:
431
+
432
+ * The display of source files has been improved a lot. Weird scrolling trouble, out-of-scope line hit counts
433
+ and such should be a thing of the past. Also, it is prettier now.
434
+ * Source files are now syntax highlighted
435
+ * File paths no longer have that annoying './' in front of them