fitting 2.18.0 → 2.18.1

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: 86988a5ed3f114df581b0d6c6550867e2f9864f05808b6ec66a063f2ad573c93
4
- data.tar.gz: 0b1c58784f5838caea3942d022f9dfaa4196912a7f30119e0b3e1b71080f9e43
3
+ metadata.gz: 5d4c64b93e5cc274fd6ce45447011be34413072ac0cddc20d75799ef9ccb3f8d
4
+ data.tar.gz: be18cc02c5f5a3be1167d17bf46039c8b2f9cc404f0c7849297166bffa45a1d5
5
5
  SHA512:
6
- metadata.gz: d8f5d03f52a1332fc7483f17c8bbfde3c3a751a1c8f539f65637137e8b6ef95d251574105b5cecd9f4292f47f3a951ad45d9a9c914cfbee450b2d1eee8f1e25e
7
- data.tar.gz: d40fe0ae76fa5a381e19c1444d84ae90262571cbf2ab9d3198d299b71333f042ccd1a637f150c28403b2a4ccb96b7abf230d9638ffb4ef645700244c4d8194db
6
+ metadata.gz: 0f3b8b8a48f3927c09325dd9d0057b2cfe9294d495eb3693471f2e7e1a11f37cdc5165e44bbbd5d736bbb504875fa68e81473624c113217d1d2573b5735179e9
7
+ data.tar.gz: 00b71dc28323aefa7dd022a8ea441a337c5316228ffb2ddc0b6f6ad310bcd3fefcad35c174dcbe734fdd8cf1178992125f850d6729225a7627f0be70dbeb4706
data/.rubocop.yml CHANGED
@@ -46,3 +46,6 @@ Metrics/ClassLength:
46
46
 
47
47
  Lint/UselessAssignment:
48
48
  Enabled: false
49
+
50
+ Style/ZeroLengthPredicate:
51
+ Enabled: false
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Change log
2
2
 
3
+ ### 2.18.1 - 2021-10-12
4
+
5
+ * patch
6
+ * fix bugs and refactoring
7
+
3
8
  ### 2.18.0 - 2021-09-29
4
9
 
5
10
  * patch
@@ -6,9 +6,9 @@ module Fitting
6
6
  class Records
7
7
  class Tested
8
8
  class Request
9
- def initialize(env_response, test_title)
9
+ def initialize(env_response, metadata)
10
10
  @env_response = env_response
11
- @test_title = test_title
11
+ @metadata = metadata
12
12
  end
13
13
 
14
14
  def method
@@ -28,11 +28,11 @@ module Fitting
28
28
  end
29
29
 
30
30
  def test_path
31
- @test_path ||= @test_title[/\\(\\.(.*?)\\)/m, 1] || @test_title[/\\.(.*?)\\"/m, 1]
31
+ @test_path ||= @metadata.fetch(:location)
32
32
  end
33
33
 
34
34
  def test_file_path
35
- @test_file_path ||= test_path.split(':').first
35
+ @test_file_path ||= @metadata.fetch(:file_path)
36
36
  end
37
37
 
38
38
  def to_spherical
@@ -14,7 +14,7 @@ module Fitting
14
14
  end
15
15
 
16
16
  def size_with_tests
17
- @combinations.count { |c| !c.tests.empty? }
17
+ @combinations.count { |c| c.tests.size != 0 }
18
18
  end
19
19
 
20
20
  def join(tests)
@@ -31,9 +31,9 @@ module Fitting
31
31
  end
32
32
 
33
33
  def good?
34
- return false unless @tests_without_prefixes.empty?
35
- return false unless @tests_without_actions.empty?
36
- return false unless @tests_without_responses.empty?
34
+ return false if @tests_without_prefixes.size != 0
35
+ return false if @tests_without_actions.size != 0
36
+ return false if @tests_without_responses.size != 0
37
37
 
38
38
  @good
39
39
  end
@@ -9,8 +9,8 @@ module Fitting
9
9
  @tested_requests = []
10
10
  end
11
11
 
12
- def add(env_response, test_title = '')
13
- @tested_requests.push(Fitting::Records::Tested::Request.new(env_response, test_title))
12
+ def add(env_response, metadata = {})
13
+ @tested_requests.push(Fitting::Records::Tested::Request.new(env_response, metadata))
14
14
  end
15
15
 
16
16
  def statistics
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '2.18.0'.freeze
2
+ VERSION = '2.18.1'.freeze
3
3
  end
data/lib/fitting.rb CHANGED
@@ -38,12 +38,12 @@ module Fitting
38
38
  FileUtils.rm_r Dir.glob('fitting_tests/*'), force: true
39
39
 
40
40
  RSpec.configure do |config|
41
- config.after(:each, type: :request) do
42
- responses.add(response, inspect)
41
+ config.after(:each, type: :request) do |example|
42
+ responses.add(response, example.metadata)
43
43
  end
44
44
 
45
- config.after(:each, type: :controller) do
46
- responses.add(response, inspect)
45
+ config.after(:each, type: :controller) do |example|
46
+ responses.add(response, example.metadata)
47
47
  end
48
48
 
49
49
  config.after(:suite) do
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.0
4
+ version: 2.18.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - d.efimov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-29 00:00:00.000000000 Z
11
+ date: 2021-10-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema