routes_coverage 0.1.1 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: df2c7028ed9fb9c69bc862139f3a3b2839e20ef6
4
- data.tar.gz: 0d329c25a43808052a8f82a1ac74c38d3a0f1f59
3
+ metadata.gz: 82c396bb228eaf4de2010396f8e4e92c1aeac532
4
+ data.tar.gz: 8922fee50b35986d376aa169fe0f91564637bc41
5
5
  SHA512:
6
- metadata.gz: 590267e07d0e6bf4faf78607393fccabda982cb8deff6bff8da7be08d2dd06825ab84d4bc027aaf36c9f53d7e85651e6705711961957999b860887197fdf8870
7
- data.tar.gz: 72ae1a4d4a560debeaf04ddcde489ec5c1e1447004bb6f3db48ecb4cb134b753d9efb87d7aa3d9a4e644464013d7a9e9694cf8a13859a9d4635ec77efa39ed57
6
+ metadata.gz: 8b0a62573173744fdca363518d6699e151f713bf900457919e4eccec06f9ed5d41169355ab92ba70c354c13243e48d938c5c43356362dcde06f8cf4576860d42
7
+ data.tar.gz: 686373ac00b110f341626e53b4b1e37696e0a73ff82ef417f1306c4c9e09288cbc519f720912cd209898b65bc4e9b7d2523746f902e6240a366fb7e495fa6901
data/README.md CHANGED
@@ -34,6 +34,8 @@ By default html report with no groupping is generated. If you need more funtiona
34
34
 
35
35
  ```ruby
36
36
  RSpec.configure do |config|
37
+ config.routes_coverage.perform_report = ENV['ROUTES_COVERAGE'] # only generate report if env var is set
38
+
37
39
  config.routes_coverage.exclude_patterns << %r{PATCH /reqs} # excludes all requests matching regex
38
40
  config.routes_coverage.exclude_namespaces << 'somenamespace' # excludes /somenamespace/*
39
41
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- routes_coverage (0.1.1)
4
+ routes_coverage (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- routes_coverage (0.1.1)
4
+ routes_coverage (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- routes_coverage (0.1.1)
4
+ routes_coverage (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- routes_coverage (0.1.1)
4
+ routes_coverage (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- routes_coverage (0.1.1)
4
+ routes_coverage (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: ..
3
3
  specs:
4
- routes_coverage (0.1.1)
4
+ routes_coverage (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module RoutesCoverage
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.1"
3
3
  end
@@ -21,6 +21,8 @@ module RoutesCoverage
21
21
  class Settings
22
22
  attr_reader :exclude_patterns
23
23
  attr_reader :exclude_namespaces
24
+
25
+ attr_accessor :perform_report
24
26
  attr_accessor :minimum_coverage
25
27
  attr_accessor :round_precision
26
28
 
@@ -35,6 +37,7 @@ module RoutesCoverage
35
37
  @round_precision = 1
36
38
  @format = :html
37
39
  @groups = {}
40
+ @perform_report = true
38
41
  end
39
42
 
40
43
  def formatter_class
@@ -73,6 +76,7 @@ module RoutesCoverage
73
76
  end
74
77
 
75
78
  def self.perform_report
79
+ return unless settings.perform_report
76
80
 
77
81
  all_routes = ::Rails.application.routes.routes.routes.dup
78
82
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: routes_coverage
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasily Fedoseyev