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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 52ae02eea52bdf0bf70e3e108b114b9cab5fe8fc
4
- data.tar.gz: 39898c9efd4731179115b0152db40cd32e35ef32
3
+ metadata.gz: b691110010526d218502ab3a96d72d42c2f7b7ee
4
+ data.tar.gz: 22970b49d14ae1a301104accc9eacd00c36cdafe
5
5
  SHA512:
6
- metadata.gz: 2cbcda05958d10ae66479f271f94e254d89abf05f3176f68e7be92b7813e24424dd8fe32ddab6cc5527e6a9f9a30d20e2229c04b42ab68ce2cb6494fb84bc9c2
7
- data.tar.gz: 35d1aa6f0a9aff22f4f5f49c276c46fa0d6bbd7b7cfa39a7ddb09367480aefb8ca7b779661ace0b3d8c81eb86d32deb45c4c53f1aa07733d1647d06f1cc790f9
6
+ metadata.gz: 739fd734d8ff748bbd7e3dbe5f55e8d402b1abb6493872e92b9ba1ddcbb77c145f4f388b52aed0a3c8a5a6b8560cb5646640e0905c980b0e3f2a67d7562e070f
7
+ data.tar.gz: 3990b73d16072cdb1f2a570d7c1ed2efc0c9b31e9e5f3322b789d5e08546de29e368edd93b4ecf4e4deea70a9c5bde9de7fb8445e829db055f80f019ba8909bb
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.0
2
+ TargetRubyVersion: 2.2
3
3
 
4
4
  Metrics/LineLength:
5
5
  Max: 120
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.2
4
+ before_install: gem install bundler -v 1.12
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 `rreport_response_macro.yaml` or `report_response_micro.yaml`.
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/[USERNAME]/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.
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
 
@@ -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&.first) || Fitting.configuration.skip_not_documented
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&.first && Fitting.configuration.validation_response
33
+ @schemas && @schemas.first && Fitting.configuration.validation_response
34
34
  end
35
35
 
36
36
  def to_hash
@@ -1,3 +1,3 @@
1
1
  module Fitting
2
- VERSION = '0.4.1'.freeze
2
+ VERSION = '0.4.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: 0.4.1
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-07 00:00:00.000000000 Z
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.1
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