routes_coverage 0.1.1 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/gemfiles/rails_40.gemfile.lock +1 -1
- data/gemfiles/rails_40_rspec.gemfile.lock +1 -1
- data/gemfiles/rails_40_simplecov.gemfile.lock +1 -1
- data/gemfiles/rails_42.gemfile.lock +1 -1
- data/gemfiles/rails_5.gemfile.lock +1 -1
- data/gemfiles/rails_51.gemfile.lock +1 -1
- data/lib/routes_coverage/version.rb +1 -1
- data/lib/routes_coverage.rb +4 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 82c396bb228eaf4de2010396f8e4e92c1aeac532
|
4
|
+
data.tar.gz: 8922fee50b35986d376aa169fe0f91564637bc41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
|
data/lib/routes_coverage.rb
CHANGED
@@ -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
|
|