fitting 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.travis.yml +4 -0
- data/README.md +6 -4
- data/lib/fitting/response.rb +2 -2
- data/lib/fitting/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b691110010526d218502ab3a96d72d42c2f7b7ee
|
4
|
+
data.tar.gz: 22970b49d14ae1a301104accc9eacd00c36cdafe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 739fd734d8ff748bbd7e3dbe5f55e8d402b1abb6493872e92b9ba1ddcbb77c145f4f388b52aed0a3c8a5a6b8560cb5646640e0905c980b0e3f2a67d7562e070f
|
7
|
+
data.tar.gz: 3990b73d16072cdb1f2a570d7c1ed2efc0c9b31e9e5f3322b789d5e08546de29e368edd93b4ecf4e4deea70a9c5bde9de7fb8445e829db055f80f019ba8909bb
|
data/.rubocop.yml
CHANGED
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Fitting
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/funbox/fitting.svg?branch=master)](https://travis-ci.org/funbox/fitting)
|
4
|
+
|
3
5
|
This gem will help to make your tests according to the documentation for the API.
|
4
6
|
|
5
7
|
When writing tests, you can be sure that the implement API in accordance with documentation on API Blueprint.
|
@@ -29,7 +31,7 @@ rails_helper.rb
|
|
29
31
|
```ruby
|
30
32
|
require 'fitting'
|
31
33
|
config.after(:each, :type => :controller) do
|
32
|
-
Fitting::Documentation.try_on(request, response)
|
34
|
+
Fitting::Documentation.try_on(self, request, response)
|
33
35
|
end
|
34
36
|
```
|
35
37
|
|
@@ -45,7 +47,7 @@ or
|
|
45
47
|
bundle exec rspec --format Fitting::Formatter::Response::MicroYaml
|
46
48
|
```
|
47
49
|
|
48
|
-
After that you can find the report in `
|
50
|
+
After that you can find the report in `report_response_macro.yaml` or `report_response_micro.yaml`.
|
49
51
|
|
50
52
|
## Config
|
51
53
|
|
@@ -53,7 +55,7 @@ After that you can find the report in `rreport_response_macro.yaml` or `report_r
|
|
53
55
|
|
54
56
|
This gem takes a simplified format json convert from API Blueprint which we have called API Tomogram.
|
55
57
|
|
56
|
-
Use gem tomograph.
|
58
|
+
Use gem [tomograph](https://github.com/funbox/tomograph)
|
57
59
|
|
58
60
|
```ruby
|
59
61
|
Fitting.configure do |config|
|
@@ -76,7 +78,7 @@ Default true.
|
|
76
78
|
|
77
79
|
## Contributing
|
78
80
|
|
79
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
81
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/funbox/fitting. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
80
82
|
|
81
83
|
## License
|
82
84
|
|
data/lib/fitting/response.rb
CHANGED
@@ -10,7 +10,7 @@ module Fitting
|
|
10
10
|
@body = env_response.body
|
11
11
|
@schemas = expect_request.find_responses(status: @status).map{|response|response['body']} if expect_request
|
12
12
|
@fully_validates = set_fully_validate if @schemas
|
13
|
-
raise Response::NotDocumented unless (@schemas
|
13
|
+
raise Response::NotDocumented unless (@schemas && @schemas.first) || Fitting.configuration.skip_not_documented
|
14
14
|
self
|
15
15
|
end
|
16
16
|
|
@@ -30,7 +30,7 @@ module Fitting
|
|
30
30
|
end
|
31
31
|
|
32
32
|
def validate?
|
33
|
-
@schemas
|
33
|
+
@schemas && @schemas.first && Fitting.configuration.validation_response
|
34
34
|
end
|
35
35
|
|
36
36
|
def to_hash
|
data/lib/fitting/version.rb
CHANGED
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: 0.4.
|
4
|
+
version: 0.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- d.efimov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json-schema
|
@@ -181,6 +181,7 @@ extra_rdoc_files: []
|
|
181
181
|
files:
|
182
182
|
- ".gitignore"
|
183
183
|
- ".rubocop.yml"
|
184
|
+
- ".travis.yml"
|
184
185
|
- CODE_OF_CONDUCT.md
|
185
186
|
- Gemfile
|
186
187
|
- LICENSE.txt
|
@@ -221,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
222
|
version: '0'
|
222
223
|
requirements: []
|
223
224
|
rubyforge_project:
|
224
|
-
rubygems_version: 2.5
|
225
|
+
rubygems_version: 2.4.5
|
225
226
|
signing_key:
|
226
227
|
specification_version: 4
|
227
228
|
summary: Validation in the rspec of API Blueprint
|