fitting 2.18.1 → 2.18.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
  SHA256:
3
- metadata.gz: 5d4c64b93e5cc274fd6ce45447011be34413072ac0cddc20d75799ef9ccb3f8d
4
- data.tar.gz: be18cc02c5f5a3be1167d17bf46039c8b2f9cc404f0c7849297166bffa45a1d5
3
+ metadata.gz: 4939d5e53f11ac3b5f28fa3088b20acefd5613b3c7ea8b075917ce9fa5703acd
4
+ data.tar.gz: 694aadc94e89341395c72cf1f26baeb065f7e10f6d0a7e305f4190ddc3e50d22
5
5
  SHA512:
6
- metadata.gz: 0f3b8b8a48f3927c09325dd9d0057b2cfe9294d495eb3693471f2e7e1a11f37cdc5165e44bbbd5d736bbb504875fa68e81473624c113217d1d2573b5735179e9
7
- data.tar.gz: 00b71dc28323aefa7dd022a8ea441a337c5316228ffb2ddc0b6f6ad310bcd3fefcad35c174dcbe734fdd8cf1178992125f850d6729225a7627f0be70dbeb4706
6
+ metadata.gz: bd7f9bfe0f22b4110e304e80daf8f843d6eba3bdf32598767b6da1e294ff83867593402eaaaa9665649162789aa3485f64ee3af066688dec0af0e96edb52caf8
7
+ data.tar.gz: 4ebe7ebf8d3f629b66f0378016fbd99a42d9d9907e911fe754732cb0c25761ebfe16cb095b4b76d11f24261b1f5213a6800e433998f225fd20b6bf9d7c0974e6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ### 2.18.2 - 2021-11-09
4
+
5
+ * patch
6
+ * remove legacy [#123](https://github.com/funbox/fitting/issues/123)
7
+
3
8
  ### 2.18.1 - 2021-10-12
4
9
 
5
10
  * patch
@@ -39,24 +39,24 @@ module Fitting
39
39
  end
40
40
 
41
41
  def tomogram
42
- @tomogram ||= if @crafter_yaml_path || @crafter_apib_path
42
+ @tomogram ||= if crafter_yaml_path || crafter_apib_path
43
43
  Tomograph::Tomogram.new(
44
- prefix: @prefix,
45
- crafter_apib_path: @crafter_apib_path,
46
- crafter_yaml_path: @crafter_yaml_path
44
+ prefix: prefix,
45
+ crafter_apib_path: crafter_apib_path,
46
+ crafter_yaml_path: crafter_yaml_path
47
47
  )
48
- elsif @drafter_4_apib_path || @drafter_4_yaml_path
48
+ elsif drafter_4_apib_path || drafter_4_yaml_path
49
49
  Tomograph::Tomogram.new(
50
- prefix: @prefix,
51
- drafter_4_apib_path: @drafter_4_apib_path,
52
- drafter_4_yaml_path: @drafter_4_yaml_path
50
+ prefix: prefix,
51
+ drafter_4_apib_path: drafter_4_apib_path,
52
+ drafter_4_yaml_path: drafter_4_yaml_path
53
53
  )
54
54
  else
55
55
  Tomograph::Tomogram.new(
56
- prefix: @prefix,
57
- apib_path: @apib_path,
58
- drafter_yaml_path: @drafter_yaml_path,
59
- tomogram_json_path: @tomogram_json_path
56
+ prefix: prefix,
57
+ apib_path: apib_path,
58
+ drafter_yaml_path: drafter_yaml_path,
59
+ tomogram_json_path: tomogram_json_path
60
60
  )
61
61
  end
62
62
  end
@@ -80,7 +80,7 @@ module Fitting
80
80
  private
81
81
 
82
82
  def default
83
- @strict ||= false if @strict.nil?
83
+ @strict ||= false if strict.nil?
84
84
  @prefix ||= ''
85
85
  @ignore_list ||= []
86
86
  end
@@ -1,47 +1,11 @@
1
1
  require 'fitting/configuration/yaml'
2
- require 'fitting/configuration/legacy'
3
2
  require 'yaml'
4
3
 
5
4
  module Fitting
6
5
  class Configuration
7
- class << self
8
- def craft
9
- if one_yaml?
10
- one_yaml
11
- elsif more_than_one_yaml?
12
- more_than_one_yaml
13
- else
14
- legacy
15
- end
16
- end
17
-
18
- def one_yaml?
19
- File.file?('.fitting.yml')
20
- end
21
-
22
- def more_than_one_yaml?
23
- !Dir['fitting/*.yml'].empty?
24
- end
25
-
26
- def one_yaml
27
- yaml = YAML.safe_load(File.read('.fitting.yml'))
28
- Fitting::Configuration::Yaml.new(yaml)
29
- end
30
-
31
- def more_than_one_yaml
32
- files.map do |file|
33
- yaml = YAML.safe_load(File.read(file))
34
- Fitting::Configuration::Yaml.new(yaml, file[8..-5])
35
- end
36
- end
37
-
38
- def legacy
39
- Fitting::Configuration::Legacy.new
40
- end
41
-
42
- def files
43
- Dir['fitting/*.yml']
44
- end
6
+ def self.craft
7
+ yaml = YAML.safe_load(File.read('.fitting.yml'))
8
+ Fitting::Configuration::Yaml.new(yaml)
45
9
  end
46
10
  end
47
11
  end
@@ -84,13 +84,5 @@ module Fitting
84
84
  @response.strict_fully_validates.valid?
85
85
  end
86
86
  end
87
-
88
- def match_schema
89
- Response.new
90
- end
91
-
92
- def strictly_match_schema
93
- StrictResponse.new
94
- end
95
87
  end
96
88
  end
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '2.18.1'.freeze
2
+ VERSION = '2.18.2'.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.18.1
4
+ version: 2.18.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.efimov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-10-12 00:00:00.000000000 Z
11
+ date: 2021-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema
@@ -173,7 +173,6 @@ files:
173
173
  - images/logo.png
174
174
  - lib/fitting.rb
175
175
  - lib/fitting/configuration.rb
176
- - lib/fitting/configuration/legacy.rb
177
176
  - lib/fitting/configuration/yaml.rb
178
177
  - lib/fitting/cover/json_schema.rb
179
178
  - lib/fitting/cover/json_schema_enum.rb
@@ -264,7 +263,7 @@ homepage: https://github.com/funbox/fitting
264
263
  licenses:
265
264
  - MIT
266
265
  metadata: {}
267
- post_install_message:
266
+ post_install_message:
268
267
  rdoc_options: []
269
268
  require_paths:
270
269
  - lib
@@ -280,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
280
279
  version: '0'
281
280
  requirements: []
282
281
  rubygems_version: 3.0.1
283
- signing_key:
282
+ signing_key:
284
283
  specification_version: 4
285
284
  summary: Coverage API Blueprint, Swagger and OpenAPI with RSpec
286
285
  test_files: []
@@ -1,61 +0,0 @@
1
- require 'tomograph'
2
-
3
- module Fitting
4
- class Configuration
5
- class Legacy
6
- attr_accessor :apib_path,
7
- :drafter_yaml_path,
8
- :crafter_apib_path,
9
- :crafter_yaml_path,
10
- :drafter_4_apib_path,
11
- :drafter_4_yaml_path,
12
- :strict,
13
- :prefix,
14
- :white_list,
15
- :resource_white_list,
16
- :ignore_list,
17
- :include_resources,
18
- :include_actions
19
-
20
- def initialize
21
- @strict = false
22
- @prefix = ''
23
- @ignore_list = []
24
- end
25
-
26
- def tomogram
27
- @tomogram ||= if @crafter_apib_path || @crafter_yaml_path
28
- Tomograph::Tomogram.new(
29
- prefix: @prefix,
30
- crafter_apib_path: @crafter_apib_path,
31
- crafter_yaml_path: @crafter_yaml_path
32
- )
33
- elsif @drafter_4_apib_path || @drafter_4_yaml_path
34
- Tomograph::Tomogram.new(
35
- prefix: @prefix,
36
- drafter_4_apib_path: @drafter_4_apib_path,
37
- drafter_4_yaml_path: @drafter_4_yaml_path
38
- )
39
- else
40
- Tomograph::Tomogram.new(
41
- prefix: @prefix,
42
- apib_path: @apib_path,
43
- drafter_yaml_path: @drafter_yaml_path
44
- )
45
- end
46
- end
47
-
48
- def title
49
- 'fitting'
50
- end
51
-
52
- def stats_path
53
- 'fitting/stats'
54
- end
55
-
56
- def not_covered_path
57
- 'fitting/not_covered'
58
- end
59
- end
60
- end
61
- end