fitting 2.4.1 → 2.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +3 -3
- data/fitting.gemspec +1 -1
- data/lib/fitting/configuration/yaml.rb +4 -1
- data/lib/fitting/records/documented/request.rb +3 -7
- data/lib/fitting/statistics/template.rb +1 -1
- data/lib/fitting/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 873df0636bcad7162066d90caaeaebef52eb1ef6
|
4
|
+
data.tar.gz: 3ec118c489b012fdcc62c6f3ff4600a5efe6131a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7072803275b24d10a44a58762f5c884c06310339da331c41514b24ccb40417681d3f51fc532196cdfa9aa27a08f70d4a4281a3dd254729c2b6c58f3878ed9f94
|
7
|
+
data.tar.gz: cdd978371460f13dde294c13eae7b2c8ed049d1faaecbc236e4504abd56107ddc9868f9c2fb189e11b34f672cd633ddd0642df111687537c891ce032a5417cd2
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Fitting
|
2
2
|
|
3
3
|
<a href="https://funbox.ru">
|
4
|
-
<img src="https://funbox.ru/badges/
|
4
|
+
<img src="https://funbox.ru/badges/sponsored_by_funbox_compact.svg" alt="Sponsored by FunBox" width=250 />
|
5
5
|
</a>
|
6
6
|
|
7
7
|
[![Gem Version](https://badge.fury.io/rb/fitting.svg)](https://badge.fury.io/rb/fitting)
|
@@ -108,7 +108,7 @@ expect(response).to match_schema
|
|
108
108
|
|
109
109
|
### strictly_match_schema
|
110
110
|
|
111
|
-
Makes a strict validation against JSON Schema. All properties are
|
111
|
+
Makes a strict validation against JSON Schema. All properties are considered to have `"required": true` and all objects `"additionalProperties": false`.
|
112
112
|
|
113
113
|
```ruby
|
114
114
|
expect(response).to strictly_match_schema
|
@@ -214,7 +214,7 @@ ignore_list:
|
|
214
214
|
- %r{/api/v1/comments}
|
215
215
|
```
|
216
216
|
|
217
|
-
It
|
217
|
+
It works only for match_schema (NOT FOR strictly_match_schema)
|
218
218
|
|
219
219
|
## Contributing
|
220
220
|
|
data/fitting.gemspec
CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
|
|
22
22
|
|
23
23
|
spec.add_runtime_dependency 'json-schema', '~> 2.6', '>= 2.6.2'
|
24
24
|
spec.add_runtime_dependency 'multi_json'
|
25
|
-
spec.add_runtime_dependency 'tomograph', '~> 2.0', '>= 2.
|
25
|
+
spec.add_runtime_dependency 'tomograph', '~> 2.0', '>= 2.2.0'
|
26
26
|
spec.add_development_dependency 'bundler', '~> 1.12'
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
28
28
|
spec.add_development_dependency 'byebug', '~> 8.2', '>= 8.2.1'
|
@@ -6,6 +6,7 @@ module Fitting
|
|
6
6
|
attr_reader :title
|
7
7
|
attr_accessor :apib_path,
|
8
8
|
:drafter_yaml_path,
|
9
|
+
:tomogram_json_path,
|
9
10
|
:strict,
|
10
11
|
:prefix,
|
11
12
|
:white_list,
|
@@ -17,6 +18,7 @@ module Fitting
|
|
17
18
|
def initialize(yaml, title = 'fitting')
|
18
19
|
@apib_path = yaml['apib_path']
|
19
20
|
@drafter_yaml_path = yaml['drafter_yaml_path']
|
21
|
+
@tomogram_json_path = yaml['tomogram_json_path']
|
20
22
|
@strict = yaml['strict']
|
21
23
|
@prefix = yaml['prefix']
|
22
24
|
@white_list = yaml['white_list']
|
@@ -32,7 +34,8 @@ module Fitting
|
|
32
34
|
@tomogram ||= Tomograph::Tomogram.new(
|
33
35
|
prefix: @prefix,
|
34
36
|
apib_path: @apib_path,
|
35
|
-
drafter_yaml_path: @drafter_yaml_path
|
37
|
+
drafter_yaml_path: @drafter_yaml_path,
|
38
|
+
tomogram_json_path: @tomogram_json_path
|
36
39
|
)
|
37
40
|
end
|
38
41
|
|
@@ -8,15 +8,11 @@ module Fitting
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def method
|
11
|
-
@method ||= @tomogram_request
|
11
|
+
@method ||= @tomogram_request.method
|
12
12
|
end
|
13
13
|
|
14
14
|
def path
|
15
|
-
@path ||= @tomogram_request
|
16
|
-
end
|
17
|
-
|
18
|
-
def json_schema
|
19
|
-
@json_schema ||= @tomogram_request['json_schema']
|
15
|
+
@path ||= @tomogram_request.path
|
20
16
|
end
|
21
17
|
|
22
18
|
def responses
|
@@ -43,7 +39,7 @@ module Fitting
|
|
43
39
|
end
|
44
40
|
|
45
41
|
def groups
|
46
|
-
@groups ||= @tomogram_request
|
42
|
+
@groups ||= @tomogram_request.responses.group_by do |tomogram_response|
|
47
43
|
tomogram_response['status']
|
48
44
|
end
|
49
45
|
end
|
@@ -73,7 +73,7 @@ module Fitting
|
|
73
73
|
end
|
74
74
|
|
75
75
|
def documented
|
76
|
-
@documented_requests ||= @config.tomogram.
|
76
|
+
@documented_requests ||= @config.tomogram.to_a.inject([]) do |res, tomogram_request|
|
77
77
|
res.push(Fitting::Records::Documented::Request.new(tomogram_request, white_list.to_a))
|
78
78
|
end
|
79
79
|
end
|
data/lib/fitting/version.rb
CHANGED
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: 2.
|
4
|
+
version: 2.5.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: 2018-
|
11
|
+
date: 2018-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
version: '2.0'
|
54
54
|
- - ">="
|
55
55
|
- !ruby/object:Gem::Version
|
56
|
-
version: 2.
|
56
|
+
version: 2.2.0
|
57
57
|
type: :runtime
|
58
58
|
prerelease: false
|
59
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -63,7 +63,7 @@ dependencies:
|
|
63
63
|
version: '2.0'
|
64
64
|
- - ">="
|
65
65
|
- !ruby/object:Gem::Version
|
66
|
-
version: 2.
|
66
|
+
version: 2.2.0
|
67
67
|
- !ruby/object:Gem::Dependency
|
68
68
|
name: bundler
|
69
69
|
requirement: !ruby/object:Gem::Requirement
|