coverband 4.2.7.rc.1 → 5.0.0.rc.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.standard.yml +26 -0
  3. data/.travis.yml +2 -1
  4. data/Gemfile +5 -7
  5. data/Gemfile.rails4 +0 -3
  6. data/Gemfile.rails6 +0 -3
  7. data/README.md +8 -77
  8. data/Rakefile +17 -17
  9. data/changes.md +30 -28
  10. data/config.ru +1 -1
  11. data/coverband.gemspec +31 -34
  12. data/lib/coverband.rb +68 -44
  13. data/lib/coverband/adapters/base.rb +17 -18
  14. data/lib/coverband/adapters/file_store.rb +38 -6
  15. data/lib/coverband/adapters/hash_redis_store.rb +24 -21
  16. data/lib/coverband/adapters/redis_store.rb +12 -12
  17. data/lib/coverband/adapters/stdout_store.rb +41 -0
  18. data/lib/coverband/adapters/web_service_store.rb +155 -0
  19. data/lib/coverband/at_exit.rb +1 -1
  20. data/lib/coverband/collectors/coverage.rb +15 -27
  21. data/lib/coverband/collectors/delta.rb +29 -9
  22. data/lib/coverband/collectors/view_tracker.rb +10 -10
  23. data/lib/coverband/collectors/view_tracker_service.rb +59 -0
  24. data/lib/coverband/configuration.rb +149 -112
  25. data/lib/coverband/integrations/background.rb +6 -6
  26. data/lib/coverband/integrations/rack_server_check.rb +3 -3
  27. data/lib/coverband/integrations/resque.rb +2 -2
  28. data/lib/coverband/reporters/base.rb +11 -12
  29. data/lib/coverband/reporters/console_report.rb +1 -1
  30. data/lib/coverband/reporters/html_report.rb +10 -30
  31. data/lib/coverband/reporters/web.rb +55 -50
  32. data/lib/coverband/utils/absolute_file_converter.rb +6 -6
  33. data/lib/coverband/utils/html_formatter.rb +32 -61
  34. data/lib/coverband/utils/railtie.rb +23 -6
  35. data/lib/coverband/utils/relative_file_converter.rb +2 -2
  36. data/lib/coverband/utils/result.rb +6 -11
  37. data/lib/coverband/utils/results.rb +0 -10
  38. data/lib/coverband/utils/source_file.rb +21 -30
  39. data/lib/coverband/utils/tasks.rb +8 -11
  40. data/lib/coverband/version.rb +1 -1
  41. data/public/application.js +0 -30
  42. data/test/benchmarks/benchmark.rake +97 -92
  43. data/test/benchmarks/dog.rb +1 -1
  44. data/test/benchmarks/init_rails.rake +4 -4
  45. data/test/coverband/adapters/base_test.rb +29 -30
  46. data/test/coverband/adapters/file_store_test.rb +19 -20
  47. data/test/coverband/adapters/hash_redis_store_test.rb +57 -57
  48. data/test/coverband/adapters/redis_store_test.rb +26 -26
  49. data/test/coverband/adapters/web_service_store_test.rb +56 -0
  50. data/test/coverband/at_exit_test.rb +2 -2
  51. data/test/coverband/collectors/coverage_test.rb +33 -47
  52. data/test/coverband/collectors/delta_test.rb +52 -23
  53. data/test/coverband/collectors/view_tracker_test.rb +35 -35
  54. data/test/coverband/configuration_test.rb +49 -36
  55. data/test/coverband/coverband_test.rb +11 -11
  56. data/test/coverband/integrations/background_middleware_test.rb +10 -10
  57. data/test/coverband/integrations/background_test.rb +17 -5
  58. data/test/coverband/integrations/rack_server_check_test.rb +7 -7
  59. data/test/coverband/integrations/report_middleware_test.rb +9 -9
  60. data/test/coverband/integrations/resque_worker_test.rb +9 -9
  61. data/test/coverband/integrations/test_resque_job.rb +1 -1
  62. data/test/coverband/reporters/base_test.rb +9 -9
  63. data/test/coverband/reporters/console_test.rb +6 -6
  64. data/test/coverband/reporters/html_test.rb +36 -48
  65. data/test/coverband/reporters/web_test.rb +16 -18
  66. data/test/coverband/utils/absolute_file_converter_test.rb +22 -22
  67. data/test/coverband/utils/file_hasher_test.rb +6 -12
  68. data/test/coverband/utils/file_list_test.rb +13 -13
  69. data/test/coverband/utils/html_formatter_test.rb +9 -23
  70. data/test/coverband/utils/lines_classifier_test.rb +29 -29
  71. data/test/coverband/utils/relative_file_converter_test.rb +13 -13
  72. data/test/coverband/utils/result_test.rb +18 -18
  73. data/test/coverband/utils/results_test.rb +17 -17
  74. data/test/coverband/utils/source_file_line_test.rb +46 -46
  75. data/test/coverband/utils/source_file_test.rb +38 -88
  76. data/test/dog.rb +1 -1
  77. data/test/fake_app/basic_rack.rb +2 -2
  78. data/test/fixtures/app/controllers/sample_controller.rb +1 -1
  79. data/test/fixtures/app/models/user.rb +1 -1
  80. data/test/fixtures/sample.rb +1 -1
  81. data/test/fixtures/utf-8.rb +0 -2
  82. data/test/forked/rails_full_stack_test.rb +24 -27
  83. data/test/forked/rails_rake_full_stack_test.rb +7 -26
  84. data/test/integration/full_stack_test.rb +11 -22
  85. data/test/jruby_check.rb +2 -3
  86. data/test/rails4_dummy/Rakefile +1 -1
  87. data/test/rails4_dummy/config.ru +1 -1
  88. data/test/rails4_dummy/config/application.rb +4 -4
  89. data/test/rails4_dummy/config/boot.rb +2 -2
  90. data/test/rails4_dummy/config/coverband.rb +1 -1
  91. data/test/rails4_dummy/config/coverband_missing_redis.rb +1 -1
  92. data/test/rails4_dummy/config/environment.rb +1 -1
  93. data/test/rails4_dummy/config/routes.rb +2 -2
  94. data/test/rails5_dummy/Rakefile +1 -1
  95. data/test/rails5_dummy/config.ru +1 -1
  96. data/test/rails5_dummy/config/application.rb +3 -3
  97. data/test/rails5_dummy/config/coverband.rb +8 -8
  98. data/test/rails5_dummy/config/coverband_missing_redis.rb +8 -8
  99. data/test/rails5_dummy/config/environment.rb +1 -1
  100. data/test/rails5_dummy/config/routes.rb +2 -2
  101. data/test/rails6_dummy/Rakefile +1 -1
  102. data/test/rails6_dummy/config.ru +1 -1
  103. data/test/rails6_dummy/config/application.rb +4 -4
  104. data/test/rails6_dummy/config/boot.rb +2 -2
  105. data/test/rails6_dummy/config/coverband.rb +1 -1
  106. data/test/rails6_dummy/config/coverband_missing_redis.rb +1 -1
  107. data/test/rails6_dummy/config/environment.rb +1 -1
  108. data/test/rails6_dummy/config/routes.rb +2 -2
  109. data/test/rails_test_helper.rb +11 -11
  110. data/test/test_helper.rb +44 -34
  111. data/test/unique_files.rb +10 -10
  112. data/views/layout.erb +2 -12
  113. metadata +27 -33
  114. data/.rubocop.yml +0 -84
  115. data/lib/coverband/integrations/bundler.rb +0 -8
  116. data/lib/coverband/utils/file_groups.rb +0 -53
  117. data/lib/coverband/utils/gem_list.rb +0 -31
  118. data/lib/coverband/utils/s3_report.rb +0 -105
  119. data/test/coverband/utils/file_groups_test.rb +0 -61
  120. data/test/coverband/utils/gem_list_test.rb +0 -48
  121. data/test/coverband/utils/s3_report_test.rb +0 -44
  122. data/views/gem_list.erb +0 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 68ea5d4222b92fe692d530b929c52d6da5b1c01d710f06bf92d53ea5515e6cba
4
- data.tar.gz: 29eb1a2764bd507c7da2376e8566270f581f16ff22d79cb645a5075f59ccdda0
3
+ metadata.gz: c21f1b570030f2e8d3199ce170a95d24e2191cb36e3675e63f8d0d226b798a87
4
+ data.tar.gz: 9f7788c6545f9cdc9bd4939aae262c71a11bd6efda81adaf08b15adfc3df8fa4
5
5
  SHA512:
6
- metadata.gz: '07931a21e9b83879d81936059173ea3c5c64671d2fafddefa7d0cee8aca02b319352a6ea3cf8786322977581a37a52be95775091bab9367265d4d82502ad5fcf'
7
- data.tar.gz: 9d77db00ad0f025b620969840747b7c3774d636ea23c0caf47789a06c1e2c72762a5a2aee53c73c4602840504eacd1d47f6261938b652ef7ed055882cf463869
6
+ metadata.gz: '032594e2650af6ad12a8602ac1a610f6e5d3307d0a9ae3b1bf780537be45d919af2508bc9e5a87da53ac9bd0dd7b59949d83723a91c84616fbb516cbb490296a'
7
+ data.tar.gz: 281798ba980ecfc48d9f41553d5fe3da646480eb050fbb4c67c901d32eae9f017cd7567bbfad0d44a812dbcf32b0458cd829c9ae4218429c175ddbcc62abdaa0
@@ -0,0 +1,26 @@
1
+ ruby_version: 2.3
2
+ fix: false # default: false
3
+ parallel: true # default: false
4
+ format: progress # default: Standard::Formatter
5
+ default_ignores: false # default: true
6
+
7
+ ignore: # default: []
8
+ - "lib/**/*":
9
+ - Style/IdenticalConditionalBranches # these are just easier to read sometimes
10
+ - Style/IfInsideElse # these are just easier to read sometimes
11
+ - Standard/SemanticBlocks # not valid in older Ruby
12
+ - Style/Alias # This isn't always right and alias and alias_method can have different usage
13
+ - Style/RedundantRegexpEscape # fix later, enforcement changed
14
+ - Layout/ArrayAlignment # WTF all of master broken from a few changes in rubo
15
+ - Performance/RegexpMatch # Rubocop / standardrb have this WRONG for Ruby 2.3/2.4 not compatiable
16
+ - Style/GlobalStdStream # Rubocop / standardrb have this WRONG for Ruby 2.3/2.4 not compatiable
17
+ - "vendor/**/*"
18
+ - "pkg/**/*"
19
+ - "test/**/*":
20
+ - Layout/AlignHash
21
+ - Style/GlobalVars
22
+ - Lint/InterpolationCheck # a test is verifying comments
23
+ - Standard/SemanticBlocks # not valid in older Ruby
24
+ - Layout/ArrayAlignment # ruby 2.3 / modern seem to dissagree on rubocop/standardrb
25
+ - "test/benchmarks/benchmark.rake":
26
+ - Lint/UselessAssignment # oddity of memory benchmarking
@@ -15,6 +15,7 @@ env:
15
15
  # --dev improves JRuby startup time
16
16
  # See https://github.com/jruby/jruby/wiki/Improving-startup-time
17
17
  - JRUBY_OPTS="--dev"
18
+ - JAVA_OPTS="--add-opens java.base/{java.security.cert=ALL-UNNAMED --add-opens java.base/java.security=ALL-UNNAMED --add-opens java.base/java.util.zip=ALL-UNNAMED"
18
19
 
19
20
  jobs:
20
21
  exclude:
@@ -36,7 +37,7 @@ services:
36
37
  script:
37
38
  - sudo ./lua/install.sh
38
39
  - $HOME/lua51/bin/busted lua/test/*
39
- - bundle exec rake rubocop
40
+ - bundle exec standardrb
40
41
  - COVERBAND_HASH_REDIS_STORE=t bundle exec rake
41
42
  - COVERBAND_HASH_REDIS_STORE=t bundle exec rake forked_tests
42
43
  - bundle exec rake
data/Gemfile CHANGED
@@ -1,21 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  # Specify your gem's dependencies in coverband.gemspec
6
6
  gemspec
7
7
 
8
8
  # add when debugging
9
9
  # require 'byebug'; byebug
10
- if ENV['CI']
10
+ if ENV["CI"]
11
11
  # skipping pry-byebug as it has issues on Ruby 2.3 on travis
12
12
  # and we don't really need it on CI
13
13
  else
14
- gem 'pry-byebug', platforms: [:mri, :mingw, :x64_mingw]
14
+ gem "pry-byebug", platforms: [:mri, :mingw, :x64_mingw]
15
15
  end
16
16
 
17
- gem 'rails', '~>5'
17
+ gem "rails", "~>5"
18
18
  # these gems are used for testing gem tracking
19
- gem 'irb', require: false
20
- gem 'pundit'
21
- gem 'rainbow', require: false
19
+ gem "irb", require: false
@@ -5,6 +5,3 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in coverband.gemspec
6
6
  gemspec
7
7
  gem 'rails', '~>4'
8
- # this is used for testing gem tracking
9
- gem 'rainbow', require: false
10
- gem 'pundit'
@@ -5,6 +5,3 @@ source 'https://rubygems.org'
5
5
  # Specify your gem's dependencies in coverband.gemspec
6
6
  gemspec
7
7
  gem 'rails', '~>6'
8
- # this is used for testing gem tracking
9
- gem 'rainbow', require: false
10
- gem 'pundit'
data/README.md CHANGED
@@ -30,7 +30,6 @@ The primary goal of Coverband is giving deep insight into your production runtim
30
30
  - Out of the box support for all standard code execution paths (web, cron, background jobs, rake tasks, etc)
31
31
  - Splits load time (Rails eager load) and Run time metrics
32
32
  - Easy to understand actionable insights from the report
33
- - Tracks Gem usage (still in experimental stages and not recommended for production)
34
33
  - Development mode, offers deep insight of code usage details (number of LOC execution during single request, etc) during development.
35
34
  - Mountable web interface to easily share reports
36
35
 
@@ -54,8 +53,6 @@ Add this line to your application's `Gemfile`, remember to `bundle install` afte
54
53
  gem 'coverband'
55
54
  ```
56
55
 
57
- If [tracking gem usage](#collecting-gem--library-usage), be sure to include coverband before other gems you would like to track.
58
-
59
56
  ## Upgrading to Latest
60
57
 
61
58
  ### No custom code or middleware required
@@ -66,7 +63,7 @@ See [changelog](https://github.com/danmayer/coverband/blob/master/changes.md).
66
63
 
67
64
  ## Rails
68
65
 
69
- The Railtie integration means you shouldn't need to do anything else other than ensure coverband is required after rails within your Gemfile. The only exception to this is gem tracking of `Bundle.require` which depends on requiring coverband within the application.rb. See [Collecting Gem / Library Usage](https://github.com/danmayer/coverband#collecting-gem--library-usage).
66
+ The Railtie integration means you shouldn't need to do anything else other than ensure Coverband is required after Rails within your Gemfile.
70
67
 
71
68
  ## Sinatra
72
69
 
@@ -117,14 +114,14 @@ The web endpoint is a barebones endpoint that you can either expose direct (afte
117
114
 
118
115
  ### JRuby Support
119
116
 
120
- Coverband is compatible with JRuby. If you want to run on JRuby note that I haven't benchmarked and I believe the perf impact on oldre versions of JRuby could be significant, improved Coverage support is in [JRuby master](https://github.com/jruby/jruby/pull/6180), and will be in the next release.
117
+ Coverband is compatible with JRuby. If you want to run on JRuby note that I haven't benchmarked and I believe the perf impact on older versions of JRuby could be significant, improved Coverage support is in [JRuby master](https://github.com/jruby/jruby/pull/6180), and will be in the next release.
121
118
 
122
- * older versions of JRuby need tracing enabled to work (and this could cause bad performance)
123
- * run Jruby with the `--debug` option
124
- * add into your `.jrubyrc` the `debug.fullTrace=true` setting
125
- * For best performance the `oneshot_lines` is recommended, and in the latest releases should have very low overhead
126
- * See JRuby support in a Rails app configured to run via JRuby, in [Coverband Demo](https://github.com/coverband-service/coverband_demo)
127
- * JRuby is tested via CI against Rails 5 and 6
119
+ - older versions of JRuby need tracing enabled to work (and this could cause bad performance)
120
+ - run Jruby with the `--debug` option
121
+ - add into your `.jrubyrc` the `debug.fullTrace=true` setting
122
+ - For best performance the `oneshot_lines` is recommended, and in the latest releases should have very low overhead
123
+ - See JRuby support in a Rails app configured to run via JRuby, in [Coverband Demo](https://github.com/coverband-service/coverband_demo)
124
+ - JRuby is tested via CI against Rails 5 and 6
128
125
 
129
126
  ### Rake Tasks
130
127
 
@@ -168,11 +165,6 @@ Below is an example config file for a Rails 5 app:
168
165
  Coverband.configure do |config|
169
166
  config.store = Coverband::Adapters::RedisStore.new(Redis.new(url: ENV['MY_REDIS_URL']))
170
167
  config.logger = Rails.logger
171
- # configure S3 integration
172
- config.s3_bucket = 'coverband-demo'
173
- config.s3_region = 'us-east-1'
174
- config.s3_access_key_id = ENV['AWS_ACCESS_KEY_ID']
175
- config.s3_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
176
168
 
177
169
  # config options false, true. (defaults to false)
178
170
  # true and debug can give helpful and interesting code usage information
@@ -228,27 +220,6 @@ To opt-in to this feature... enable the feature in your Coverband config.
228
220
 
229
221
  ![image](https://raw.github.com/danmayer/coverband/master/docs/coverband_view_tracker.png)
230
222
 
231
- ### Writing Coverband Results to S3
232
-
233
- If you add some additional Coverband configuration your coverage html report will be written directly to S3, update `config/coverband.rb` like below.
234
-
235
- ```
236
- # configure S3 integration
237
- config.s3_bucket = 'coverband-demo'
238
- config.s3_region = 'us-east-1'
239
- config.s3_access_key_id = ENV['AWS_ACCESS_KEY_ID']
240
- config.s3_secret_access_key = ENV['AWS_SECRET_ACCESS_KEY']
241
- ```
242
-
243
- Alternatively, Coverband if you don't set via the `config.s3_*` accessor methods will look for the standard S3 environment variables.
244
-
245
- ```
246
- ENV['AWS_BUCKET']
247
- ENV['AWS_REGION']
248
- ENV['AWS_ACCESS_KEY_ID']
249
- ENV['AWS_SECRET_ACCESS_KEY']
250
- ```
251
-
252
223
  ### Fixing Coverage Only Shows Loading Hits
253
224
 
254
225
  If all your coverage is being counted as loading or eager_loading coverage, and nothing is showing as runtime Coverage the initialization hook failed for some reason. The most likely reason for this issue is manually calling `eager_load!` on some Plugin/Gem. If you or a plugin is altering the Rails initialization process, you can manually flip Coverband to runtime coverage by calling these two lines, in an `after_initialize` block, in `application.rb`.
@@ -322,46 +293,6 @@ rake coverband:clear # reset coverband coverage data
322
293
  rake coverband:coverage # report runtime coverband code coverage
323
294
  ```
324
295
 
325
- ### Collecting Gem / Library Usage
326
-
327
- **WARNING:** Gem Tracking is still in experimental stages and not recommended for production. We have some performance issues when view reports on large applications. Gem tracing also during background thread data collection has HIGH memory requirements, during report merging (seemingly around 128mb of extra memory, which is crazy). We recommend deploying WITHOUT `track_gems` first and only enabling it after confirming that Coverband is working and performing well.
328
-
329
- Gem usage can be tracked by enabling the `track_gems` config.
330
-
331
- ```
332
- Coverband.configure do |config|
333
- config.track_gems = true
334
- end
335
- ```
336
-
337
- The `track_gems` feature exposes a Gems tab in the report which prints out the percentage usage of each Gem. See demo [here](https://coverband-demo.herokuapp.com/coverage?#_Gems).
338
-
339
- When tracking gems, it is important that `Coverband#start` is called before the gems to be tracked are required. The best way to do this is to require coverband before Bundle.require is called. Within rails, require coverband within the application.rb like so:
340
-
341
- ```ruby
342
- require 'coverband'
343
- Bundler.require(*Rails.groups)
344
- ```
345
-
346
- If you are using the resque integration, resque needs to be required before coverband since the integration will not run unless resque is loaded. Within the application.rb just require resque before coverband.
347
-
348
- ```ruby
349
- require 'resque'
350
- require 'coverband'
351
- Bundler.require(*Rails.groups)
352
- ```
353
-
354
- The track_gems config only exposes the overall usage of a gem. In order to see the detail of each file, enable the `gem_details` flag.
355
-
356
- ```
357
- Coverband.configure do |config|
358
- config.track_gems = true
359
- config.gem_details = true
360
- end
361
- ```
362
-
363
- This flag exposes line by line usage of gem files. Unfortunately due to the way the coverband report is currently rendered, enabling `gem_details` slows down viewing of the coverage report in the browser and is not yet recommended.
364
-
365
296
  ### Manually Starting Coverband
366
297
 
367
298
  Coverband starts on require of the the library which is usually done within the Gemfile. This can be disabled by setting the `COVERBAND_DISABLE_AUTO_START` environment variable. This environment variable can be useful to toggle coverband on and off in certain environments.
data/Rakefile CHANGED
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
- import 'test/benchmarks/benchmark.rake'
5
- require 'rubocop/rake_task'
3
+ require "bundler/gem_tasks"
4
+ import "test/benchmarks/benchmark.rake"
5
+ require "rubocop/rake_task"
6
6
 
7
7
  RuboCop::RakeTask.new
8
8
 
@@ -11,40 +11,40 @@ task default: %i[test]
11
11
  task 'test:all': %i[rubocop test forked_tests benchmarks:memory benchmarks]
12
12
 
13
13
  task :test
14
- require 'rake/testtask'
14
+ require "rake/testtask"
15
15
  Rake::TestTask.new(:test) do |test|
16
- test.libs << 'lib' << 'test'
16
+ test.libs << "lib" << "test"
17
17
  # exclude benchmark from the tests as the way it functions resets code coverage during executions
18
18
  # test.pattern = 'test/unit/*_test.rb'
19
19
  # using test files opposed to pattern as it outputs which files are run
20
- test.test_files = FileList['test/integration/**/*_test.rb', 'test/coverband/**/*_test.rb']
20
+ test.test_files = FileList["test/integration/**/*_test.rb", "test/coverband/**/*_test.rb"]
21
21
  test.verbose = true
22
22
  end
23
23
 
24
24
  Rake::TestTask.new(:forked_tests) do |test|
25
- if RUBY_PLATFORM == 'java'
26
- puts 'forked tests not supported on JRuby'
25
+ if RUBY_PLATFORM == "java"
26
+ puts "forked tests not supported on JRuby"
27
27
  else
28
- test.libs << 'lib' << 'test'
29
- test.test_files = FileList['test/forked/**/*_test.rb']
28
+ test.libs << "lib" << "test"
29
+ test.test_files = FileList["test/forked/**/*_test.rb"]
30
30
  test.verbose = true
31
31
  end
32
32
  end
33
33
 
34
- desc 'load irb with this gem'
34
+ desc "load irb with this gem"
35
35
  task :console do
36
- puts 'running console'
37
- exec 'bundle console'
36
+ puts "running console"
37
+ exec "bundle console"
38
38
  end
39
39
 
40
40
  # This is really just for testing and development because without configuration
41
41
  # Coverband can't do much
42
- desc 'start webserver'
42
+ desc "start webserver"
43
43
  task :server do
44
- exec 'rackup -I lib'
44
+ exec "rackup -I lib"
45
45
  end
46
46
 
47
- desc 'publish gem with 2 factor auth, reminder how'
47
+ desc "publish gem with 2 factor auth, reminder how"
48
48
  task :publish_gem do
49
- exec 'gem push pkg/coverband-4.2.3.XXX.gem'
49
+ exec "gem push pkg/coverband-4.2.3.XXX.gem"
50
50
  end
data/changes.md CHANGED
@@ -7,7 +7,7 @@
7
7
  - [redis bitfield](https://stackoverflow.com/questions/47100606/optimal-way-to-store-array-of-integers-in-redis-database)
8
8
  - Add support for [zadd](http://redis.io/topics/data-types-intro) so one could determine single call versus multiple calls on a line, letting us determine the most executed code in production.
9
9
 
10
- ### Coverband 4.X
10
+ ### Coverband Future...
11
11
 
12
12
  Will be the fully modern release that drops maintenance legacy support in favor of increased performance, ease of use, and maintainability.
13
13
 
@@ -51,34 +51,38 @@ Will be the fully modern release that drops maintenance legacy support in favor
51
51
  - add gem_details_safe list to report on details on some gems
52
52
  - - display gems that are in loaded with 0 coverage, thanks @kbaum
53
53
 
54
- ### Coverband_jam_session
55
-
56
- This is a possible gem to host experimental or more complex features, which would require tuning, configuration, and performance trade offs. If something is really valuable it could be promoted into the main line.
57
-
58
- Feature Ideas:
59
-
60
- - per request coverage implemented via Ruby 2.6.0 coverage.clear https://bugs.ruby-lang.org/issues/15022
61
- - statsd adapters (it would allow passing in date ranges on usage)
62
- - Possibly add ability to record code run for a given route
63
- - integrate recording with deploy tag or deploy timestamp
64
- - diff code usage across deployed versions
65
- - what methods increased usage or decreased
66
- - ability to change the Coverband config at runtime by changing the config pushed to the Redis hash. In memory cache around the changes to only make that call periodically.
67
- - Opposed to just showing code usage on a route allow 'tagging' events which would record line coverage for that tag (this would allow tagging all code that modified an ActiveRecord model for example
68
- - additional adapters (tracepoint, ruby-profiler, etc)
69
- - tagged coverage reports
70
- - code route tracing (entry point to all code executed for example /some_path -> code coverage of that path)
71
- - deploy git hash tagging of reported Coverage
72
- - allow only to collect coverage based on route (limiting or scoped coverage)
73
- - coverage over some other variable like a set of alpha users
74
- - document how to use this on staging / selenium test suite runs
75
- - possible add API to pull report at end of run
76
-
77
54
  # Alpha / Beta / Release Candidates
78
55
 
79
- ### Coverband 4.2.6
56
+ ### Coverband 5.0.0
57
+
58
+ - Full JRuby support
59
+ - Reduced footprint
60
+ - drops S3 support
61
+ - drops static report support
62
+ - drops gem support
63
+ - only loaded web reporter files when required
64
+ - configuration improvements
65
+ - improved load order allowing more time for ENV vars (better dotenv, figaro, rails secrets support)
66
+ - all config options can be set via coverband config, not requiring ENV var support
67
+ - deprecation notices on soon to be removed config options
68
+ - config exceptions on invalid configuration combinations
69
+ - improved resque patching pattern
70
+ - improved default ignores
71
+ - additional adapters
72
+ - supports web-service adapter for http coverage collection
73
+ - support log/file adapter
74
+ - reduce logs / errors / alerts on bad startup configurations
75
+
76
+ # Released
77
+
78
+ ###Coverband 4.2.7
80
79
 
81
- - Address Redis `exists` deprecation warning by baffers
80
+ - Ignore patterns too aggressive #382, thanks @thijsnado
81
+ - Stack level too deep error when running certain activejob jobs #367, thanks @kejordan and @hanslauwers
82
+
83
+ ###Coverband 4.2.6
84
+
85
+ - Address Redis exists deprecation warning by baffers
82
86
 
83
87
  ### Coverband 4.2.5
84
88
 
@@ -86,8 +90,6 @@ Feature Ideas:
86
90
  - fix for rails 4.0 by rswaminathan
87
91
  - do not error on branch coverage / simplecov compatibility by desertcart
88
92
 
89
- # Released
90
-
91
93
  ### Coverband 4.2.4
92
94
 
93
95
  - fixes related to startup without Redis, skipping Coverband on common rake tasks (assets:precompile), etc
data/config.ru CHANGED
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require ::File.expand_path('../lib/coverband', __FILE__)
3
+ require ::File.expand_path("../lib/coverband", __FILE__)
4
4
  run Coverband::Reporters::Web.new
@@ -1,49 +1,46 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'coverband/version'
5
+ require "coverband/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'coverband'
9
- spec.version = Coverband::VERSION
10
- spec.authors = ['Dan Mayer', 'Karl Baum']
11
- spec.email = ['dan@mayerdan.com']
12
- spec.description = 'Rack middleware to measure production code usage (LOC runtime usage)'
13
- spec.summary = 'Rack middleware to measure production code usage (LOC runtime usage)'
14
- spec.homepage = 'https://github.com/danmayer/coverband'
15
- spec.license = 'MIT'
8
+ spec.name = "coverband"
9
+ spec.version = Coverband::VERSION
10
+ spec.authors = ["Dan Mayer", "Karl Baum"]
11
+ spec.email = ["dan@mayerdan.com"]
12
+ spec.description = "Rack middleware to measure production code usage (LOC runtime usage)"
13
+ spec.summary = "Rack middleware to measure production code usage (LOC runtime usage)"
14
+ spec.homepage = "https://github.com/danmayer/coverband"
15
+ spec.license = "MIT"
16
16
 
17
- spec.files = `git ls-files`.split("\n").reject { |f| f.start_with?('docs') }
18
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
- spec.require_paths = ['lib']
17
+ spec.files = `git ls-files`.split("\n").reject { |f| f.start_with?("docs") }
18
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
+ spec.require_paths = ["lib"]
21
21
 
22
- # to test support for sdk 1, uncomment this line
23
- # spec.add_development_dependency 'aws-sdk', '~> 1'
24
- # to test sdk 2 use this one
25
- spec.add_development_dependency 'aws-sdk-s3', '~> 1'
26
- spec.add_development_dependency 'benchmark-ips'
27
- spec.add_development_dependency 'capybara'
28
- spec.add_development_dependency 'm'
29
- spec.add_development_dependency 'memory_profiler'
30
- spec.add_development_dependency 'minitest'
31
- spec.add_development_dependency 'minitest-fork_executor'
32
- spec.add_development_dependency 'mocha', '~> 1.7.0'
33
- spec.add_development_dependency 'rack'
34
- spec.add_development_dependency 'rack-test'
35
- spec.add_development_dependency 'rake'
36
- spec.add_development_dependency 'resque'
37
- spec.add_development_dependency 'rubocop'
38
- spec.add_development_dependency 'rubocop-performance'
22
+ spec.add_development_dependency "benchmark-ips"
23
+ spec.add_development_dependency "capybara"
24
+ spec.add_development_dependency "m"
25
+ spec.add_development_dependency "memory_profiler"
26
+ spec.add_development_dependency "minitest"
27
+ spec.add_development_dependency "minitest-fork_executor"
28
+ spec.add_development_dependency "mocha", "~> 1.7.0"
29
+ spec.add_development_dependency "rack"
30
+ spec.add_development_dependency "rack-test"
31
+ spec.add_development_dependency "rake"
32
+ spec.add_development_dependency "resque"
33
+ spec.add_development_dependency "standard", "= 0.2.5"
34
+ spec.add_development_dependency "standardrb"
39
35
 
40
- spec.add_development_dependency 'coveralls'
41
- spec.add_development_dependency 'minitest-profile'
36
+ spec.add_development_dependency "coveralls"
37
+ spec.add_development_dependency "minitest-profile"
38
+ spec.add_development_dependency "webmock"
42
39
 
43
40
  # TODO: Remove when other production adapters exist
44
41
  # because the default configuration of redis store, we really do require
45
42
  # redis now. I was reluctant to add this, but until we offer another production
46
43
  # quality adapter, I think this is more honest about requirements and reduces confusion
47
44
  # without this there was a race condition on calling coverband configure before redis was loaded
48
- spec.add_runtime_dependency 'redis'
45
+ spec.add_runtime_dependency "redis"
49
46
  end