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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce83a52a40a57bfc4bd67c084dedf7c298054d20
4
- data.tar.gz: d5b4b24b5b80b324fe541db56ecca305b74dfae6
3
+ metadata.gz: 52713450b9629f0a0873e30a3c247513b46cde5e
4
+ data.tar.gz: c233748d729d58c91424998b46ab5a015bca2116
5
5
  SHA512:
6
- metadata.gz: 7e517401d53af0ca8c5955d1e593d54045e2334fe228331e24f9f3651ff1b1e692b3d311b72324e98b72a4d59b55ba112b383b9c70ddcbcec9d6fc8be1170af6
7
- data.tar.gz: 78846c5906ca5fc841b099d257ca3a92d8f8984fa751baa8f5ba20775c4e8f421288902f7d38013611189ea5008b83527aa247d7ad61bee1ced477638ac3f499
6
+ metadata.gz: 01edbccf2c85beaa5973c08d2796de106e3e2405f52ab1895c39c43849f843daea8b8cb72e96aa0f761685dd57dd3ae54f8733be36468c42b18bb15103529ca0
7
+ data.tar.gz: 6c9d1a3597b6ffe1eb4639776a02e3a246a89ac68d7942c888f01dd72ef4e1e8bc3afa0bc318e8268b124ed3057434543bd8e8b6903498d7cf419f2261129f59
@@ -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
- if defined? RSpec
159
- require "routes_coverage/adapters/rspec"
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
- config.before(:suite) do
8
- RoutesCoverage.reset!
9
- end
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
- config.after(:suite) do
12
- RoutesCoverage.perform_report
17
+ config.after(:suite) do
18
+ RoutesCoverage.perform_report
19
+ end
20
+ end
21
+ end
22
+ end
13
23
  end
14
24
  end
@@ -1,3 +1,3 @@
1
1
  module RoutesCoverage
2
- VERSION = "0.4.1"
2
+ VERSION = "0.4.2"
3
3
  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.1
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: 2017-09-25 00:00:00.000000000 Z
11
+ date: 2018-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler