fitting 1.2.0 → 1.3.0
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 +4 -4
- data/README.md +2 -2
- data/lib/fitting/configuration.rb +2 -2
- data/lib/fitting/version.rb +1 -1
- data/lib/fitting.rb +10 -3
- 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: f3fce709e59f37b6aea1b418aee6c4af7443933f
|
4
|
+
data.tar.gz: 53cdf8fb2af8136b22e1980ca8f4d6f341d8136e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fffad7b8527302929b86f2a40c8244fca7e00895a7651aa7a94950a23523619cd1c91ba618371ef065c27ab0617ff0166af75f5172750082feeb69e4a11105cf
|
7
|
+
data.tar.gz: 558112161639ca609b416654cbe03ecf97d39b12c68da883e0db283ba28aaec674248a7bd4abfae1319cc826ab81480f14654b9acf4f7c52aedbf5621d375ed5
|
data/README.md
CHANGED
@@ -57,9 +57,9 @@ end
|
|
57
57
|
|
58
58
|
## Config
|
59
59
|
|
60
|
-
###
|
60
|
+
### necessary_fully_implementation_of_responses
|
61
61
|
|
62
|
-
Default true.
|
62
|
+
Default `true`. It returns `exit 1` if not implemented all(with tests expect match response) the responses.
|
63
63
|
|
64
64
|
## Report
|
65
65
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
module Fitting
|
2
2
|
class Configuration
|
3
3
|
attr_accessor :tomogram,
|
4
|
-
:
|
4
|
+
:necessary_fully_implementation_of_responses
|
5
5
|
|
6
6
|
def initialize
|
7
|
-
@
|
7
|
+
@necessary_fully_implementation_of_responses = true
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
data/lib/fitting/version.rb
CHANGED
data/lib/fitting.rb
CHANGED
@@ -7,6 +7,8 @@ require 'fitting/storage/documentation'
|
|
7
7
|
require 'fitting/storage/skip'
|
8
8
|
require 'fitting/matchers/response_matcher'
|
9
9
|
|
10
|
+
ERROR_EXIT_CODE = 1
|
11
|
+
|
10
12
|
module Fitting
|
11
13
|
class << self
|
12
14
|
def configure
|
@@ -26,9 +28,9 @@ module RSpec
|
|
26
28
|
alias origin_run_specs run_specs
|
27
29
|
|
28
30
|
def run_specs(example_groups)
|
29
|
-
origin_run_specs(example_groups)
|
31
|
+
returned_exit_code = origin_run_specs(example_groups)
|
30
32
|
|
31
|
-
return if Fitting::Storage::Skip.get
|
33
|
+
return returned_exit_code if Fitting::Storage::Skip.get
|
32
34
|
|
33
35
|
response_routes = Fitting::Documentation::Response::Route.new(
|
34
36
|
Fitting::Storage::Documentation.hash,
|
@@ -40,7 +42,12 @@ module RSpec
|
|
40
42
|
request_routes.statistics
|
41
43
|
response_routes.statistics
|
42
44
|
|
43
|
-
|
45
|
+
if Fitting.configuration.necessary_fully_implementation_of_responses &&
|
46
|
+
returned_exit_code == 0 &&
|
47
|
+
response_routes.not_coverage.present?
|
48
|
+
return ERROR_EXIT_CODE
|
49
|
+
end
|
50
|
+
returned_exit_code
|
44
51
|
end
|
45
52
|
end
|
46
53
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fitting
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d.efimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|