rspec_contracts 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6cab146f0b5238b15596f71f1c5614585fce2f0732aac42e84004766f4969ad7
4
+ data.tar.gz: 669e2f9d5f7bc72dd610ddedf9b4d10f77e9ee6b37602869e6ca8faa6883adcd
5
+ SHA512:
6
+ metadata.gz: 5750d9c2729be85eb29e47dbfcb870931c46965953058c534bd22c5c9cfc9e92050ef4123c3598ace3982099498ac7230a8e3d283e8aeb7c388c1b154307bb4c
7
+ data.tar.gz: 899375e79fa8533076cd8bd9f078d863a5a2466df6f34cf6af5f96733999417dadeec2b6e6cf2a79216f91abd72a5f38c4279049d58c5459678c0ac1177edd2e
@@ -0,0 +1,20 @@
1
+ Copyright 2020 Steven Allen
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,126 @@
1
+ # RspecContracts
2
+
3
+ 1. Do you have an API with an OpenAPI3 schema?
4
+ 2. Do you test your API with Rspec request tests?
5
+ 3. Do you want to make sure your API conforms to your schema?
6
+
7
+ If you answered "yes" to all three, you want contract testing. Since we couldn't find a contract testing plugin for Rspec that we liked, we built our own.
8
+
9
+
10
+ ## Installation
11
+ Add this line to your application's Gemfile:
12
+
13
+ ```ruby
14
+ gem 'rspec_contracts'
15
+ ```
16
+
17
+ And then execute:
18
+ ```bash
19
+ $ bundle
20
+ ```
21
+
22
+ Or install it yourself as:
23
+ ```bash
24
+ $ gem install rspec_contracts
25
+ ```
26
+
27
+ ## Usage
28
+
29
+ If you write Rspec request tests, you'll recognize this:
30
+
31
+ ```ruby
32
+ let(:api_call) { get pets_path }
33
+ ```
34
+
35
+ It's a simple `get` request, performed within Rspec. Adding contract testing is as simple as this:
36
+
37
+ ```ruby
38
+ let(:file) { "spec/fixtures/petstore.yaml" }
39
+ let(:contract) { RspecContracts::Contract.new(YAML.load_file(file)) }
40
+
41
+ let(:api_call) { get pets_path, api_operation: contract["findPets"] } # 'findPets' is the operation ID for this path
42
+ ```
43
+
44
+ When the API call is actually made, RspecContracts will automatically validate the specified operation against the path, POST body (if one exists), and the response. Any validation errors will raise an exception, halting your tests and telling you that you've broken your API.
45
+
46
+ ## Configuration
47
+
48
+ In `rails_helper.rb`:
49
+
50
+ ```ruby
51
+ RSpec.configure do |config|
52
+ config.before(:each) do
53
+ # These are all the default values. Nothing to do if you want to accept the defaults
54
+ RspecContracts.config.base_path = ""
55
+ RspecContracts.config.request_validation_mode = :raise # Valid modes are `raise`, `log`, and `ignore`
56
+ RspecContracts.config.response_validation_mode = :raise # Valid modes are `raise`, `log`, and `ignore`
57
+ RspecContracts.config.path_validation_mode = :raise # Valid modes are `raise`, `log`, and `ignore`
58
+ RspecContracts.config.logger = Rails.logger
59
+ end
60
+ end
61
+ ```
62
+
63
+ Each of these configuration values can be changed for a specific test. EG:
64
+
65
+ ```ruby
66
+ before { RspecContracts.config.request_validation_mode = :ignore }
67
+ after { RspecContracts.config.request_validation_mode = :raise } # Don't forget to set it back to the default
68
+ ```
69
+
70
+ ## Versioning
71
+
72
+ Sometimes, you'll be developing an API endpoint that doesn't officially exist yet, and you don't want contract validation errors to halt your test suite. That's where semantic version matching saves the day.
73
+
74
+ RspecContracts will automatically determine the version of the API schema, which you can use to gate certain API operations.
75
+
76
+ For example, let's say you're adding a new API endpoint, and it doesn't officially exist in your public documentation yet.
77
+
78
+ In this example, the schema version is `"1.0.0"`, but the new endpoint won't exist until `"1.1.0"`:
79
+
80
+ ```ruby
81
+ let(:file) { "spec/fixtures/petstore.yaml" }
82
+ let(:contract) { RspecContracts::Contract.new(YAML.load_file(file)) }
83
+
84
+ let(:api_call) { get pets_path, api_operation: contract["findPets"], api_version: ">= 1.1.0" }
85
+
86
+ ```
87
+
88
+ Because the schema is only at version `"1.0.0"`, RspecContracts will skip validating the contract for this API call.
89
+
90
+ Version constraints accept the same format as bundler in your Gemfile, so all of these would be valid:
91
+
92
+ ```ruby
93
+ let(:api_call) { get pets_path, api_operation: contract["findPets"], api_version: "~> 1.1.0" }
94
+ let(:api_call) { get pets_path, api_operation: contract["findPets"], api_version: ">= 1.1.0, < 2" }
95
+ let(:api_call) { get pets_path, api_operation: contract["findPets"], api_version: "1.1.0" }
96
+ ```
97
+
98
+ This is useful for deprecated API endpoints & new API endpoints.
99
+
100
+ #### Caveat about version matching
101
+
102
+ It is recommended to always load whatever the canonical version of your public-facing API schema into the test suite for your CI pipeline on production deployments. How you do this will change depending on how your CI pipeline is configured and how you distribute your API schema.
103
+
104
+ In general, an API schema meant for 3rd-party development use _should_ be public anyway, which will make this step easier.
105
+
106
+ ## Raised exceptions, explained
107
+
108
+ ### `RspecContracts::Error::OperationLookup`
109
+
110
+ This exception means the contract you've loaded does not have a definition for the operation you're trying to test
111
+
112
+ ### `RspecContracts::Error::PathValidation`
113
+
114
+ The operation you're trying to test does not match either the HTTP method, or the path for the API request.
115
+
116
+ ### `RspecContracts::Error::RequestValidation`
117
+
118
+ The POST body (if one is present) does not match the schema for a valid request as defined by the given operation.
119
+
120
+ ### `RspecContracts::Error::RequestValidation`
121
+
122
+ The response body does not match the schema for a valid response as defined by the given operation.
123
+
124
+
125
+ ## License
126
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require "bundler/setup"
5
+ rescue LoadError
6
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
7
+ end
8
+
9
+ require "rdoc/task"
10
+
11
+ RDoc::Task.new(:rdoc) do |rdoc|
12
+ rdoc.rdoc_dir = "rdoc"
13
+ rdoc.title = "RspecContracts"
14
+ rdoc.options << "--line-numbers"
15
+ rdoc.rdoc_files.include("README.md")
16
+ rdoc.rdoc_files.include("lib/**/*.rb")
17
+ end
18
+
19
+ APP_RAKEFILE = File.expand_path("spec/dummy/Rakefile", __dir__)
20
+ load "rails/tasks/engine.rake"
21
+
22
+ load "rails/tasks/statistics.rake"
23
+
24
+ require "bundler/gem_tasks"
@@ -0,0 +1,2 @@
1
+ RspecContracts::Engine.routes.draw do
2
+ end
@@ -0,0 +1,45 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'active_support/lazy_load_hooks'
4
+ require "rspec_contracts/engine"
5
+ require "rspec_contracts/integration"
6
+ require 'rspec_contracts/contract'
7
+ require 'rspec_contracts/operation'
8
+ require 'rspec_contracts/error'
9
+ require 'rspec_contracts/error/operation_lookup'
10
+ require 'rspec_contracts/error/request_validation'
11
+ require 'rspec_contracts/error/response_validation'
12
+ require 'rspec_contracts/error/path_validation'
13
+ require 'rspec_contracts/error/schema'
14
+ require 'rspec_contracts/path_validator'
15
+ require 'rspec_contracts/request_validator'
16
+ require 'rspec_contracts/response_validator'
17
+ require 'rspec_contracts/railtie' if defined?(Rails::Railtie)
18
+ require "openapi_parser"
19
+ require "semverse"
20
+
21
+ module RspecContracts
22
+ def self.config
23
+ @config ||= ActiveSupport::OrderedOptions.new
24
+ end
25
+
26
+ def self.install
27
+ ActiveSupport.on_load(:action_dispatch_integration_test) do
28
+ include RspecContracts::Integration
29
+ end
30
+
31
+ RspecContracts.config.base_path ||= ""
32
+ RspecContracts.config.request_validation_mode ||= :raise
33
+ RspecContracts.config.response_validation_mode ||= :raise
34
+ RspecContracts.config.path_validation_mode ||= :raise
35
+ RspecContracts.config.strict_response_validation ||= true
36
+ RspecContracts.config.logger ||= Logger.new("log/rspec_contracts.log")
37
+ end
38
+
39
+ def self.valid_json?(json)
40
+ JSON.parse(json)
41
+ return true
42
+ rescue JSON::ParserError => e
43
+ return false
44
+ end
45
+ end
@@ -0,0 +1,36 @@
1
+ class RspecContracts::Contract
2
+ def initialize(schema)
3
+ @schema = schema.with_indifferent_access
4
+ @root = OpenAPIParser.parse(schema)
5
+ end
6
+
7
+ def [](key)
8
+ return RspecContracts::Operation.new(nil, self) unless operations.key?(key)
9
+
10
+ operations[key]
11
+ end
12
+
13
+ def version
14
+ @schema[:info][:version]
15
+ rescue NoMethodError => _e
16
+ raise RspecContracts::Error.new("Version not found in schema")
17
+ end
18
+
19
+ def operations
20
+ @operations ||= paths.map do |p|
21
+ p._openapi_all_child_objects.values.map do |op|
22
+ next unless op.respond_to?(:operation_id)
23
+
24
+ [op.operation_id, RspecContracts::Operation.new(op, self)]
25
+ end.compact.to_h
26
+ end.inject(:merge).with_indifferent_access
27
+ end
28
+
29
+ def paths
30
+ @paths ||= @root.paths._openapi_all_child_objects.values
31
+ end
32
+
33
+ def method_missing(m, *args, &block)
34
+ @root.send(m, *args, &block)
35
+ end
36
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RspecContracts
4
+ class Engine < ::Rails::Engine
5
+ isolate_namespace RspecContracts
6
+ end
7
+ end
@@ -0,0 +1,2 @@
1
+ class RspecContracts::Error < StandardError
2
+ end
@@ -0,0 +1,2 @@
1
+ class RspecContracts::Error::OperationLookup < RspecContracts::Error
2
+ end
@@ -0,0 +1,2 @@
1
+ class RspecContracts::Error::PathValidation < RspecContracts::Error
2
+ end
@@ -0,0 +1,2 @@
1
+ class RspecContracts::Error::RequestValidation < RspecContracts::Error
2
+ end
@@ -0,0 +1,2 @@
1
+ class RspecContracts::Error::ResponseValidation < RspecContracts::Error
2
+ end
@@ -0,0 +1,2 @@
1
+ class RspecContracts::Error::Schema < RspecContracts::Error
2
+ end
@@ -0,0 +1,27 @@
1
+ module RspecContracts::Integration
2
+ http_verbs = %w(get post patch put delete)
3
+
4
+ http_verbs.each do |method|
5
+ define_method(method) do |*args, **kwargs|
6
+ request_path = args.first
7
+ api_operation = kwargs.delete(:api_operation)
8
+ api_version = kwargs.delete(:api_version)
9
+ super(*args, **kwargs).tap do |status_code|
10
+ return unless api_operation # even a not found contract lookup will still be present
11
+ return if api_version.present? && !Semverse::Constraint.new(api_operation.root.version).include?(api_version)
12
+ raise RspecContracts::Error::OperationLookup.new("Operation not found") unless api_operation.valid?
13
+
14
+ RspecContracts.config.logger.tagged("rspec_contracts", api_operation.operation_id) do
15
+
16
+ RspecContracts::PathValidator.validate_path(api_operation, method, request_path) unless RspecContracts.config.path_validation_mode == :ignore
17
+ RspecContracts::RequestValidator.validate_request(api_operation, request) unless RspecContracts.config.request_validation_mode == :ignore
18
+
19
+ unless RspecContracts.config.response_validation_mode == :ignore
20
+ validatable_response = OpenAPIParser::RequestOperation::ValidatableResponseBody.new(status_code, JSON.parse(response.body), response.headers)
21
+ RspecContracts::ResponseValidator.validate_response(api_operation, validatable_response)
22
+ end
23
+ end
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,19 @@
1
+ class RspecContracts::Operation
2
+ attr_reader :root
3
+ def initialize(op, root)
4
+ @op = op
5
+ @root = root
6
+ end
7
+
8
+ def valid?
9
+ @op.present?
10
+ end
11
+
12
+ def ==(val)
13
+ val == @op
14
+ end
15
+
16
+ def method_missing(m, *args, &block)
17
+ @op.send(m, *args, &block)
18
+ end
19
+ end
@@ -0,0 +1,17 @@
1
+ class RspecContracts::PathValidator
2
+ class << self
3
+ def validate_path(op, method, path)
4
+ lookup_path = path.remove(RspecContracts.config.base_path)
5
+ return if operation_matches_request?(op, method, lookup_path)
6
+
7
+ msg = "#{method.upcase} #{path} does not resolve to #{op.operation_id}"
8
+ raise RspecContracts::Error::PathValidation.new(msg) if RspecContracts.config.path_validation_mode == :raise
9
+
10
+ RspecContracts.config.logger.error "Contract validation warning: #{msg}"
11
+ end
12
+
13
+ def operation_matches_request?(op, method, path)
14
+ op == op.root.request_operation(method.to_sym, path)&.operation_object
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,5 @@
1
+ class RspecContracts::Railtie < Rails::Railtie
2
+ initializer "rspec_contracts" do
3
+ RspecContracts.install
4
+ end
5
+ end
@@ -0,0 +1,22 @@
1
+ class RspecContracts::RequestValidator
2
+ class << self
3
+ def validate_request(op, request)
4
+ body = request.body.read
5
+ parsed_body = RspecContracts.valid_json?(body) ? JSON.parse(request.body.read) : nil
6
+ op.validate_request_body(request.content_type, parsed_body, opts)
7
+ rescue OpenAPIParser::OpenAPIError => e
8
+ raise RspecContracts::Error::RequestValidation.new(e.message) if RspecContracts.config.request_validation_mode == :raise
9
+
10
+ formatted_for_logging = {
11
+ body: parsed_body,
12
+ headers: request.headers.to_h.select { |k, _| k.starts_with?("HTTP_") }.transform_keys { |k| k.remove("HTTP_").downcase }
13
+ }
14
+ RspecContracts.config.logger.error "Contract validation warning: #{e.message}"
15
+ RspecContracts.config.logger.error "Request was: #{formatted_for_logging.pretty_inspect}"
16
+ end
17
+
18
+ def opts
19
+ OpenAPIParser::SchemaValidator::Options.new(coerce_value: true, datetime_coerce_class: DateTime)
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,16 @@
1
+ class RspecContracts::ResponseValidator
2
+ class << self
3
+ def validate_response(op, resp)
4
+ op.validate_response(resp, opts)
5
+ rescue OpenAPIParser::OpenAPIError => e
6
+ raise RspecContracts::Error::ResponseValidation.new(e.message) if RspecContracts.config.response_validation_mode == :raise
7
+
8
+ RspecContracts.config.logger.error "Contract validation warning: #{e.message}"
9
+ RspecContracts.config.logger.error "Response was: #{resp.pretty_inspect}"
10
+ end
11
+
12
+ def opts
13
+ OpenAPIParser::SchemaValidator::ResponseValidateOptions.new(strict: RspecContracts.config.strict_response_validation)
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RspecContracts
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+ # desc "Explaining what the task does"
3
+ # task :rspec_contracts do
4
+ # # Task goes here
5
+ # end
metadata ADDED
@@ -0,0 +1,337 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rspec_contracts
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Steven Allen
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.2.4
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 5.2.4.3
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 5.2.4
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 5.2.4.3
33
+ - !ruby/object:Gem::Dependency
34
+ name: rspec-rails
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: openapi_parser
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: '0'
61
+ - !ruby/object:Gem::Dependency
62
+ name: semverse
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: '0'
68
+ type: :runtime
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ - !ruby/object:Gem::Dependency
76
+ name: awesome_print
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: active_model_serializers
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ - !ruby/object:Gem::Dependency
104
+ name: bundler
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: '0'
117
+ - !ruby/object:Gem::Dependency
118
+ name: byebug
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: factory_bot_rails
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - ">="
136
+ - !ruby/object:Gem::Version
137
+ version: '0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: guard
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - ">="
150
+ - !ruby/object:Gem::Version
151
+ version: '0'
152
+ type: :development
153
+ prerelease: false
154
+ version_requirements: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ - !ruby/object:Gem::Dependency
160
+ name: guard-bundler
161
+ requirement: !ruby/object:Gem::Requirement
162
+ requirements:
163
+ - - ">="
164
+ - !ruby/object:Gem::Version
165
+ version: '0'
166
+ type: :development
167
+ prerelease: false
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ requirements:
170
+ - - ">="
171
+ - !ruby/object:Gem::Version
172
+ version: '0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: guard-rspec
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ - !ruby/object:Gem::Dependency
188
+ name: overcommit
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
201
+ - !ruby/object:Gem::Dependency
202
+ name: pry-byebug
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ type: :development
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ - !ruby/object:Gem::Dependency
216
+ name: rubocop
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ version: '0'
229
+ - !ruby/object:Gem::Dependency
230
+ name: rubocop-rspec
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - ">="
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
236
+ type: :development
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ - !ruby/object:Gem::Dependency
244
+ name: simplecov
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ type: :development
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ - !ruby/object:Gem::Dependency
258
+ name: simplecov-console
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ type: :development
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: '0'
271
+ - !ruby/object:Gem::Dependency
272
+ name: sqlite3
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :development
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ version: '0'
285
+ description: Use your OpenAPI3 schema to automatically perform contract testing while
286
+ you write request specs
287
+ email:
288
+ - sallen@tractionguest.com
289
+ executables: []
290
+ extensions: []
291
+ extra_rdoc_files: []
292
+ files:
293
+ - MIT-LICENSE
294
+ - README.md
295
+ - Rakefile
296
+ - config/routes.rb
297
+ - lib/rspec_contracts.rb
298
+ - lib/rspec_contracts/contract.rb
299
+ - lib/rspec_contracts/engine.rb
300
+ - lib/rspec_contracts/error.rb
301
+ - lib/rspec_contracts/error/operation_lookup.rb
302
+ - lib/rspec_contracts/error/path_validation.rb
303
+ - lib/rspec_contracts/error/request_validation.rb
304
+ - lib/rspec_contracts/error/response_validation.rb
305
+ - lib/rspec_contracts/error/schema.rb
306
+ - lib/rspec_contracts/integration.rb
307
+ - lib/rspec_contracts/operation.rb
308
+ - lib/rspec_contracts/path_validator.rb
309
+ - lib/rspec_contracts/railtie.rb
310
+ - lib/rspec_contracts/request_validator.rb
311
+ - lib/rspec_contracts/response_validator.rb
312
+ - lib/rspec_contracts/version.rb
313
+ - lib/tasks/rspec_contracts_tasks.rake
314
+ homepage: https://github.com/tractionguest/rspec-openapi-validator
315
+ licenses:
316
+ - MIT
317
+ metadata: {}
318
+ post_install_message:
319
+ rdoc_options: []
320
+ require_paths:
321
+ - lib
322
+ required_ruby_version: !ruby/object:Gem::Requirement
323
+ requirements:
324
+ - - ">="
325
+ - !ruby/object:Gem::Version
326
+ version: '0'
327
+ required_rubygems_version: !ruby/object:Gem::Requirement
328
+ requirements:
329
+ - - ">="
330
+ - !ruby/object:Gem::Version
331
+ version: '0'
332
+ requirements: []
333
+ rubygems_version: 3.0.3
334
+ signing_key:
335
+ specification_version: 4
336
+ summary: Contract testing for Rspec requests
337
+ test_files: []