open_api-rspec 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: d794023cd314671660f9a383a6a5eaca9b594a670c1faf32057769c6dc4ac155
4
- data.tar.gz: 85876684fd5f99d9d8fec1b8cebc56308a5075af61e8ff9d156805fc92971c43
3
+ metadata.gz: 0eaa152838fc212c77475757db2bc43f6578981f2c3d5f798921aec151eff980
4
+ data.tar.gz: f497e89a621ddbc452caf3fd14724cc0531a16ec2ee7ed91503b1fe45af0c49b
5
5
  SHA512:
6
- metadata.gz: 4cccf63d318af2996d9969537ecab716f4db2f9220fbf8d152f612b0443b34ffade3a0113cf961ceb05550dcf5cea32e68612775e8ff1ff80ae91e3e7371dee2
7
- data.tar.gz: 912f041ca7834b155572c472dbbef6c755df25aba4189c686d9619205a5df9f80ca2958906d8db103d7693da75f166b11299e3f244004390acbc39f102ac3603
6
+ metadata.gz: 5341b04617825182b2a652108a6c182ea52ef0dbe55db9c2e2bb444a3c064cd2331d25693b641ac56406d2ce2a52efe979f8407dc56d78f2b621d881421967c5
7
+ data.tar.gz: d0fcf7ef8a0f618a0d67524a8ed058e95d74f2069dbe0546512fa6a4964d3312e06a91b65cf9d49da065e87de44bbe32aefe762eed29f3bca0d065a532b5b713
data/.rubocop_todo.yml CHANGED
@@ -1,21 +1,26 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2018-02-25 12:32:27 -0700 using RuboCop version 0.52.1.
3
+ # on 2018-03-06 15:24:53 -0700 using RuboCop version 0.52.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
8
 
9
+ # Offense count: 1
10
+ Lint/AmbiguousRegexpLiteral:
11
+ Exclude:
12
+ - 'spec/spec_helper.rb'
13
+
9
14
  # Offense count: 2
10
15
  Metrics/AbcSize:
11
- Max: 55
16
+ Max: 49
12
17
 
13
- # Offense count: 3
18
+ # Offense count: 6
14
19
  # Configuration parameters: CountComments, ExcludedMethods.
15
20
  Metrics/BlockLength:
16
- Max: 60
21
+ Max: 56
17
22
 
18
- # Offense count: 2
23
+ # Offense count: 1
19
24
  # Configuration parameters: CountBlocks.
20
25
  Metrics/BlockNesting:
21
26
  Max: 4
@@ -23,20 +28,20 @@ Metrics/BlockNesting:
23
28
  # Offense count: 1
24
29
  # Configuration parameters: CountComments.
25
30
  Metrics/ClassLength:
26
- Max: 190
31
+ Max: 183
27
32
 
28
33
  # Offense count: 1
29
34
  Metrics/CyclomaticComplexity:
30
- Max: 14
35
+ Max: 12
31
36
 
32
37
  # Offense count: 4
33
38
  # Configuration parameters: CountComments.
34
39
  Metrics/MethodLength:
35
- Max: 67
40
+ Max: 61
36
41
 
37
42
  # Offense count: 1
38
43
  Metrics/PerceivedComplexity:
39
- Max: 16
44
+ Max: 13
40
45
 
41
46
  # Offense count: 1
42
47
  # Configuration parameters: NamePrefix, NamePrefixBlacklist, NameWhitelist, MethodDefinitionMacros.
@@ -49,6 +54,11 @@ Naming/PredicateName:
49
54
  - 'spec/**/*'
50
55
  - 'lib/open_api/rspec/schema_parser.rb'
51
56
 
57
+ # Offense count: 2
58
+ # Configuration parameters: AggregateFailuresByDefault.
59
+ RSpec/MultipleExpectations:
60
+ Max: 2
61
+
52
62
  # Offense count: 1
53
63
  # Cop supports --auto-correct.
54
64
  # Configuration parameters: AutoCorrect, EnforcedStyle.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- open_api-rspec (0.1.4)
4
+ open_api-rspec (0.1.5)
5
5
  activesupport
6
6
  open_api-schema_validator
7
7
  rspec
@@ -4,7 +4,6 @@ module OpenApi
4
4
  module RSpec
5
5
  class SchemaParser
6
6
  attr_reader :openapi_schema, :request, :response, :schema_for_url
7
- UUID_REGEX = '[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}'
8
7
 
9
8
  def initialize(openapi_schema, request, response)
10
9
  @openapi_schema = openapi_schema
@@ -53,15 +52,8 @@ module OpenApi
53
52
  next
54
53
  end
55
54
  when 'string'
56
- if (url_fragments[i] =~ /#{UUID_REGEX}/) != 0 &&
57
- (url_fragments[i] =~ /[a-zA-Z]+/) != 0
58
-
59
- mismatch = true
60
- break
61
- else
62
- @request_path_params[a.delete('{').delete('}')] = url_fragments[i]
63
- next
64
- end
55
+ @request_path_params[a.delete('{').delete('}')] = url_fragments[i]
56
+ next
65
57
  else
66
58
  mismatch = true
67
59
  break
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OpenApi
4
4
  module RSpec
5
- VERSION = '0.1.4'
5
+ VERSION = '0.1.5'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: open_api-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Hansen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-25 00:00:00.000000000 Z
11
+ date: 2018-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler