json_matchers 0.8.0 → 0.9.0

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: 915cc934b6081cff12a854f252864b3e6a563b638a2852872ea5e50d9373832e
4
- data.tar.gz: f580d61fdbd56461ffe9fc13295adbac531492ddf66abb33f875bdfc7f31bf74
3
+ metadata.gz: 5922bc3d062651cf85a9aa16420365e544abe115adb3e79683360abf06a806e2
4
+ data.tar.gz: 8413dc48cb9588a41149ebb7a710ab358138578f72f22b212a61f809bd784596
5
5
  SHA512:
6
- metadata.gz: 94538a59b1dce067f741957af0c1d7c1057004dde8dfd887253de6cfb6f586de917ac73a9c8e9649e9175c477dc7e5cc98f093d8d17973c3814d5666ecb0aa7e
7
- data.tar.gz: 6a63c1185707740da0498e7b9962fc8edc15fd7a6915f927a5c7d0d582334cde79d74fecaa31634974f43dd869400dd939b090a5e383819acf75c1eaaddcfa52
6
+ metadata.gz: 88663040a28f53d62815fb2544a1c3fe7760bd294d99f373f879e7b106d269e5961da3a7a29252888d3be55da242a530cb8d2d5c533b983e4b35bf8db6a46190
7
+ data.tar.gz: 1ec7eba89fcad7f02e0782032c8cdb7938d4ad1d4c575022f183881e8e75d08b8b2c76c16cd46d8eb6fda3fff481abe1cfce287802f71bbf264a1330ad8d2f45
data/NEWS.md CHANGED
@@ -1,6 +1,11 @@
1
1
  master
2
2
  ======
3
3
 
4
+ 0.9.0
5
+ =====
6
+
7
+ * Deprecate support for configuring validation options.
8
+
4
9
  0.8.0
5
10
  =====
6
11
 
data/README.md CHANGED
@@ -116,7 +116,7 @@ def test_GET_posts_returns_Posts
116
116
  end
117
117
  ```
118
118
 
119
- ### Passing options to the validator
119
+ ### DEPRECATED: Passing options to the validator
120
120
 
121
121
  The matcher accepts options, which it passes to the validator:
122
122
 
@@ -137,7 +137,7 @@ A list of available options can be found [here][options].
137
137
 
138
138
  [options]: https://github.com/ruby-json-schema/json-schema/blob/2.2.4/lib/json-schema/validator.rb#L160-L162
139
139
 
140
- ### Global matcher options
140
+ ### DEPRECATED: Global matcher options
141
141
 
142
142
  To configure the default options passed to *all* matchers, call
143
143
  `JsonMatchers.configure`.
@@ -152,7 +152,7 @@ end
152
152
 
153
153
  A list of available options can be found [here][options].
154
154
 
155
- ### Default matcher options
155
+ ### DEPRECATED: Default matcher options
156
156
 
157
157
  * `record_errors: true` - *NOTE* `json_matchers` will always set
158
158
  `record_errors: true`. This cannot be overridden.
@@ -201,6 +201,12 @@ In this case `"post.json"` will be resolved relative to
201
201
 
202
202
  To learn more about `$ref`, check out [Understanding JSON Schema Structuring](http://spacetelescope.github.io/understanding-json-schema/structuring.html)
203
203
 
204
+ ## Upgrading from `0.9.x`
205
+
206
+ After `json_matchers@0.9.x`, calls to `match_json_schema` and
207
+ `match_response_schema` no longer accept options, and `JsonMatchers.configure`
208
+ will been removed.
209
+
204
210
  ## Contributing
205
211
 
206
212
  Please see [CONTRIBUTING].
@@ -4,6 +4,14 @@ module JsonMatchers
4
4
  end
5
5
 
6
6
  def self.configure
7
+ warn <<-WARN
8
+ DEPRECATION: `JsonMatchers.configure`
9
+ After `json_matchers@0.9.x`, JsonMatchers.configure will be removed.
10
+
11
+ See https://github.com/thoughtbot/json_matchers/pull/31 for more information.
12
+
13
+ WARN
14
+
7
15
  yield(configuration)
8
16
  end
9
17
 
@@ -6,6 +6,18 @@ module JsonMatchers
6
6
  end
7
7
 
8
8
  RSpec::Matchers.define :match_json_schema do |schema_name, **options|
9
+ if options.present?
10
+ warn <<-WARN
11
+ DEPRECATION:
12
+
13
+ After `json_matchers@0.9.x`, calls to `match_json_schema` and
14
+ `match_response_schema` will no longer accept options.
15
+
16
+ See https://github.com/thoughtbot/json_matchers/pull/31 for more information.
17
+
18
+ WARN
19
+ end
20
+
9
21
  assertion = JsonMatchers::Assertion.new(schema_name.to_s, options)
10
22
 
11
23
  match do |json|
@@ -1,3 +1,3 @@
1
1
  module JsonMatchers
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: json_matchers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Doyle
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-06 00:00:00.000000000 Z
11
+ date: 2018-04-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json-schema