routes_coverage 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitattributes +1 -0
- data/README.md +5 -2
- 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/middleware.rb +2 -0
- data/lib/routes_coverage/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35735247efe2eb64d4f3e0a4f99b17a890f88ce8
|
4
|
+
data.tar.gz: 11aae98ffae7cdf2e19d1762b82f5fb68632ed39
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea5db1529b21dcaf21fb3fc32f44e47bab80fee29b6f724ed33c173b110ce3c21225d08e1ce8203a5a8564dd4e53ff23e6993976d6e1e7d6875fd72002c67208
|
7
|
+
data.tar.gz: 176202c160ca27a496f817dd075f4a572b0e8275216c127227c32aee2e003d3962c2fb8ed99edf483b07753609683df5daf0aa54980342cdd5c34a454950cc72
|
data/.gitattributes
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
compiled_assets/* linguist-generated
|
data/README.md
CHANGED
@@ -39,8 +39,11 @@ RSpec.configure do |config|
|
|
39
39
|
config.routes_coverage.exclude_patterns << %r{PATCH /reqs} # excludes all requests matching regex
|
40
40
|
config.routes_coverage.exclude_namespaces << 'somenamespace' # excludes /somenamespace/*
|
41
41
|
|
42
|
-
config.groups["Some Route group title"] = %r{^/somespace/}
|
43
|
-
config.groups["Admin"] =
|
42
|
+
config.routes_coverage.groups["Some Route group title"] = %r{^/somespace/}
|
43
|
+
config.routes_coverage.groups["Admin"] = Regexp.union([
|
44
|
+
%r{^/admin/},
|
45
|
+
%r{^/secret_place/},
|
46
|
+
])
|
44
47
|
|
45
48
|
config.routes_coverage.format = :html # html is default, others are :full_text and :summary_text, or your custom formatter class
|
46
49
|
|
@@ -8,6 +8,8 @@ module RoutesCoverage
|
|
8
8
|
req = ::Rails.application.routes.request_class.new env
|
9
9
|
::Rails.application.routes.router.recognize(req) do |route|
|
10
10
|
RoutesCoverage._touch_route(route)
|
11
|
+
# there may be multiple matching routes - we should match only first
|
12
|
+
return @app.call(env)
|
11
13
|
end
|
12
14
|
#TODO: detect 404s? and maybe other route errors?
|
13
15
|
@app.call(env)
|
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.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Fedoseyev
|
@@ -74,6 +74,7 @@ executables: []
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
+
- ".gitattributes"
|
77
78
|
- ".gitignore"
|
78
79
|
- ".travis.yml"
|
79
80
|
- Appraisals
|