routes_coverage 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/routes_coverage.rb +8 -6
- data/lib/routes_coverage/adapters/rspec.rb +15 -5
- data/lib/routes_coverage/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52713450b9629f0a0873e30a3c247513b46cde5e
|
4
|
+
data.tar.gz: c233748d729d58c91424998b46ab5a015bca2116
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01edbccf2c85beaa5973c08d2796de106e3e2405f52ab1895c39c43849f843daea8b8cb72e96aa0f761685dd57dd3ae54f8733be36468c42b18bb15103529ca0
|
7
|
+
data.tar.gz: 6c9d1a3597b6ffe1eb4639776a02e3a246a89ac68d7942c888f01dd72ef4e1e8bc3afa0bc318e8268b124ed3057434543bd8e8b6903498d7cf419f2261129f59
|
data/lib/routes_coverage.rb
CHANGED
@@ -150,16 +150,18 @@ module RoutesCoverage
|
|
150
150
|
end
|
151
151
|
end
|
152
152
|
|
153
|
+
if defined? RSpec
|
154
|
+
require "routes_coverage/adapters/rspec"
|
155
|
+
end
|
156
|
+
|
153
157
|
if RoutesCoverage.enabled?
|
154
158
|
if defined?(SimpleCov) && SimpleCov.running
|
155
159
|
require 'routes_coverage/adapters/simplecov'
|
156
160
|
RoutesCoverage::Adapters::SimpleCov.use
|
161
|
+
elsif defined? RSpec
|
162
|
+
RoutesCoverage::Adapters::RSpec.use
|
157
163
|
else
|
158
|
-
|
159
|
-
|
160
|
-
else
|
161
|
-
require "routes_coverage/adapters/atexit"
|
162
|
-
RoutesCoverage::Adapters::AtExit.use
|
163
|
-
end
|
164
|
+
require "routes_coverage/adapters/atexit"
|
165
|
+
RoutesCoverage::Adapters::AtExit.use
|
164
166
|
end
|
165
167
|
end
|
@@ -3,12 +3,22 @@ require 'rspec/core'
|
|
3
3
|
RSpec.configure do |config|
|
4
4
|
config.add_setting :routes_coverage
|
5
5
|
config.routes_coverage = RoutesCoverage.settings
|
6
|
+
end
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
8
|
+
module RoutesCoverage
|
9
|
+
module Adapters
|
10
|
+
class RSpec
|
11
|
+
def self.use
|
12
|
+
::RSpec.configure do |config|
|
13
|
+
config.before(:suite) do
|
14
|
+
RoutesCoverage.reset!
|
15
|
+
end
|
10
16
|
|
11
|
-
|
12
|
-
|
17
|
+
config.after(:suite) do
|
18
|
+
RoutesCoverage.perform_report
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
13
23
|
end
|
14
24
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: routes_coverage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vasily Fedoseyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|