fitting 2.4.1 → 2.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2e1476cb8037cf4a811b6549cb7102fe10529283
4
- data.tar.gz: 3a4509e0a71fd394b8f2343adf744cd1b8664bfd
3
+ metadata.gz: 873df0636bcad7162066d90caaeaebef52eb1ef6
4
+ data.tar.gz: 3ec118c489b012fdcc62c6f3ff4600a5efe6131a
5
5
  SHA512:
6
- metadata.gz: 141563085307095ecbffeca16a61988896637f1ba0234edfa847a899df8d4b3bcd42f7c92366812a1f85c653af1e82b4facaca94ecb0c5de8cf47c228d13e1e4
7
- data.tar.gz: 89b0e98392d5787cdcd905db15e08ec6ee78f99e0cb46c9f35cad4ee8b8b1950da358ce80430e95aa5d75c9e00ef196575611c0f6fb173f6211f55d0ee348eda
6
+ metadata.gz: 7072803275b24d10a44a58762f5c884c06310339da331c41514b24ccb40417681d3f51fc532196cdfa9aa27a08f70d4a4281a3dd254729c2b6c58f3878ed9f94
7
+ data.tar.gz: cdd978371460f13dde294c13eae7b2c8ed049d1faaecbc236e4504abd56107ddc9868f9c2fb189e11b34f672cd633ddd0642df111687537c891ce032a5417cd2
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ### 2.5.0 - 2018-07-05
4
+
5
+ * features
6
+ * Add Tomograph JSON support
7
+
3
8
  ### 2.4.1 - 2018-03-16
4
9
 
5
10
  * fixes
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/sponsored_by_funbox.svg" alt="Sponsored by FunBox" width=250 />
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 condisidered to have `"required": true` and all objects `"additionalProperties": false`.
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's work only for match_schema (NOT FOR strictly_match_schema)
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.0.0'
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['method']
11
+ @method ||= @tomogram_request.method
12
12
  end
13
13
 
14
14
  def path
15
- @path ||= @tomogram_request['path']
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['responses'].group_by do |tomogram_response|
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.to_hash.inject([]) do |res, tomogram_request|
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
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '2.4.1'.freeze
2
+ VERSION = '2.5.0'.freeze
3
3
  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: 2.4.1
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-03-16 00:00:00.000000000 Z
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.0.0
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.0.0
66
+ version: 2.2.0
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: bundler
69
69
  requirement: !ruby/object:Gem::Requirement