coverband 4.2.7 → 5.0.0.rc.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) 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/reporters/base.rb +11 -12
  28. data/lib/coverband/reporters/console_report.rb +1 -1
  29. data/lib/coverband/reporters/html_report.rb +10 -30
  30. data/lib/coverband/reporters/web.rb +55 -50
  31. data/lib/coverband/utils/absolute_file_converter.rb +6 -6
  32. data/lib/coverband/utils/html_formatter.rb +32 -61
  33. data/lib/coverband/utils/railtie.rb +23 -6
  34. data/lib/coverband/utils/relative_file_converter.rb +2 -2
  35. data/lib/coverband/utils/result.rb +6 -11
  36. data/lib/coverband/utils/results.rb +0 -10
  37. data/lib/coverband/utils/source_file.rb +21 -30
  38. data/lib/coverband/utils/tasks.rb +8 -11
  39. data/lib/coverband/version.rb +1 -1
  40. data/public/application.js +0 -30
  41. data/test/benchmarks/benchmark.rake +97 -92
  42. data/test/benchmarks/dog.rb +1 -1
  43. data/test/benchmarks/init_rails.rake +4 -4
  44. data/test/coverband/adapters/base_test.rb +29 -30
  45. data/test/coverband/adapters/file_store_test.rb +19 -20
  46. data/test/coverband/adapters/hash_redis_store_test.rb +57 -57
  47. data/test/coverband/adapters/redis_store_test.rb +26 -26
  48. data/test/coverband/adapters/web_service_store_test.rb +56 -0
  49. data/test/coverband/at_exit_test.rb +2 -2
  50. data/test/coverband/collectors/coverage_test.rb +33 -47
  51. data/test/coverband/collectors/delta_test.rb +52 -23
  52. data/test/coverband/collectors/view_tracker_test.rb +35 -35
  53. data/test/coverband/configuration_test.rb +49 -36
  54. data/test/coverband/coverband_test.rb +11 -11
  55. data/test/coverband/integrations/background_middleware_test.rb +10 -10
  56. data/test/coverband/integrations/background_test.rb +17 -5
  57. data/test/coverband/integrations/rack_server_check_test.rb +7 -7
  58. data/test/coverband/integrations/report_middleware_test.rb +9 -9
  59. data/test/coverband/integrations/resque_worker_test.rb +9 -9
  60. data/test/coverband/integrations/test_resque_job.rb +1 -1
  61. data/test/coverband/reporters/base_test.rb +9 -9
  62. data/test/coverband/reporters/console_test.rb +6 -6
  63. data/test/coverband/reporters/html_test.rb +36 -48
  64. data/test/coverband/reporters/web_test.rb +16 -18
  65. data/test/coverband/utils/absolute_file_converter_test.rb +22 -22
  66. data/test/coverband/utils/file_hasher_test.rb +6 -12
  67. data/test/coverband/utils/file_list_test.rb +13 -13
  68. data/test/coverband/utils/html_formatter_test.rb +9 -23
  69. data/test/coverband/utils/lines_classifier_test.rb +29 -29
  70. data/test/coverband/utils/relative_file_converter_test.rb +13 -13
  71. data/test/coverband/utils/result_test.rb +18 -18
  72. data/test/coverband/utils/results_test.rb +17 -17
  73. data/test/coverband/utils/source_file_line_test.rb +46 -46
  74. data/test/coverband/utils/source_file_test.rb +38 -88
  75. data/test/dog.rb +1 -1
  76. data/test/fake_app/basic_rack.rb +2 -2
  77. data/test/fixtures/app/controllers/sample_controller.rb +1 -1
  78. data/test/fixtures/app/models/user.rb +1 -1
  79. data/test/fixtures/sample.rb +1 -1
  80. data/test/fixtures/utf-8.rb +0 -2
  81. data/test/forked/rails_full_stack_test.rb +24 -27
  82. data/test/forked/rails_rake_full_stack_test.rb +7 -26
  83. data/test/integration/full_stack_test.rb +11 -22
  84. data/test/jruby_check.rb +2 -3
  85. data/test/rails4_dummy/Rakefile +1 -1
  86. data/test/rails4_dummy/config.ru +1 -1
  87. data/test/rails4_dummy/config/application.rb +4 -4
  88. data/test/rails4_dummy/config/boot.rb +2 -2
  89. data/test/rails4_dummy/config/coverband.rb +1 -1
  90. data/test/rails4_dummy/config/coverband_missing_redis.rb +1 -1
  91. data/test/rails4_dummy/config/environment.rb +1 -1
  92. data/test/rails4_dummy/config/routes.rb +2 -2
  93. data/test/rails5_dummy/Rakefile +1 -1
  94. data/test/rails5_dummy/config.ru +1 -1
  95. data/test/rails5_dummy/config/application.rb +3 -3
  96. data/test/rails5_dummy/config/coverband.rb +8 -8
  97. data/test/rails5_dummy/config/coverband_missing_redis.rb +8 -8
  98. data/test/rails5_dummy/config/environment.rb +1 -1
  99. data/test/rails5_dummy/config/routes.rb +2 -2
  100. data/test/rails6_dummy/Rakefile +1 -1
  101. data/test/rails6_dummy/config.ru +1 -1
  102. data/test/rails6_dummy/config/application.rb +4 -4
  103. data/test/rails6_dummy/config/boot.rb +2 -2
  104. data/test/rails6_dummy/config/coverband.rb +1 -1
  105. data/test/rails6_dummy/config/coverband_missing_redis.rb +1 -1
  106. data/test/rails6_dummy/config/environment.rb +1 -1
  107. data/test/rails6_dummy/config/routes.rb +2 -2
  108. data/test/rails_test_helper.rb +11 -11
  109. data/test/test_helper.rb +44 -34
  110. data/test/unique_files.rb +10 -10
  111. data/views/layout.erb +2 -12
  112. metadata +28 -34
  113. data/.rubocop.yml +0 -86
  114. data/lib/coverband/integrations/bundler.rb +0 -8
  115. data/lib/coverband/utils/file_groups.rb +0 -53
  116. data/lib/coverband/utils/gem_list.rb +0 -31
  117. data/lib/coverband/utils/s3_report.rb +0 -105
  118. data/test/coverband/utils/file_groups_test.rb +0 -61
  119. data/test/coverband/utils/gem_list_test.rb +0 -48
  120. data/test/coverband/utils/s3_report_test.rb +0 -44
  121. data/views/gem_list.erb +0 -63
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20e9436ff0630bcadbcc20f7722e68ae741dc097f35a66f1cd475922735e0992
4
- data.tar.gz: c1e38bce438a659964742341b2717c48c70d01343ac577a573196e59e97f5500
3
+ metadata.gz: 48bac64c5afbae512ae05bd206f11e1e520097722787ebf2371e4f82a866c41a
4
+ data.tar.gz: a0e1ed588ab6b40b05ebcc2433f945a1a0f67d874ca8ad52f6845fe20a06b1fa
5
5
  SHA512:
6
- metadata.gz: 0e27f3a253494b84ece19a9c300f8e2b7272c2d00775bb881f4297f2bb4ca7481187979bfad3ebf61fa5c225ac882164a1ec760f650508fa7fef6d893b81584c
7
- data.tar.gz: 589cb836e0a278fc704afa55d873ea3c6e42fd420141b8480cb7d968e0a5e037a7ad34dd148d2a1c7a77c3dc09d6ba1e4bcddc05707c9f17471a4bf0a7da4030
6
+ metadata.gz: 3047130d731edaf94cc8fef23b8168d32175d70ea8a5daac8f48facd74e0cbe4f42cd6e622a5b7370cbd4df14ae70894c2288ff12b51cbcb45ee68dcacd31276
7
+ data.tar.gz: 74e499709a8270bab88c0f7bbda7c99798ef62eb6958577f8ca9dde51dbea79ce432445a57e0f0edfc13918e201a15331c1ce638ab45ebbdcdf1e40aeef485de
@@ -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