jsonapi-rspec 0.0.2 → 0.0.3

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
- SHA1:
3
- metadata.gz: 2be5ed3e2b2ccdb4cee1028850cfc2c881ce15f6
4
- data.tar.gz: 96c0c548a215f89d66b65ad1335cec161743afe9
2
+ SHA256:
3
+ metadata.gz: b878b8a4ec8f73194ed8abe2b544e1495d19d0ccc5a430a5696993cf63c4f4a7
4
+ data.tar.gz: 94be8756e49e6a50ce5723f9acd6982791b2a00cdfd7ad2c078189ec9190175a
5
5
  SHA512:
6
- metadata.gz: 2f9da5bfd20dc32a38d928744640f3490bcf443cbfd1e0ed1e987884caf3a31ad5db75e3a8bddd1716002655cbbe05bd91a0ae30e0be7f22b61addce281a6857
7
- data.tar.gz: 1f3146f7d30fcd120722539a0e6fd778577bd9574fccf06d60fc8b5cfcb014a6161b33002576fddba31a6a761198e97f4c37c4c7b28c4a567bb34e4f51b4e1f9
6
+ metadata.gz: 214b267455042c80a12476e976d7c4567dc21e8aa6239b29e97e6f55b2aab9285caefe39ab7af84c42090fd9792f97b2044b0a941277dc5cbf60b7ce95c284d2
7
+ data.tar.gz: 6a2926acda88bb36be7455fabbfea98013c545032156b4375d2ab09b419bc23e67e26a03478c35a16cfeafa2140281e1053f1c2f3ed77bf6029a1fd40421c8f5
data/README.md CHANGED
@@ -2,12 +2,6 @@
2
2
 
3
3
  RSpec matchers for [JSON API](http://jsonapi.org).
4
4
 
5
- ## Status
6
-
7
- [![Gem Version](https://badge.fury.io/rb/jsonapi-rspec.svg)](https://badge.fury.io/rb/jsonapi-rspec)
8
- [![Build Status](https://secure.travis-ci.org/jsonapi-rb/jsonapi-rspec.svg?branch=master)](http://travis-ci.org/jsonapi-rb/jsonapi-rspec?branch=master)
9
- [![Gitter chat](https://badges.gitter.im/gitterHQ/gitter.png)](https://gitter.im/jsonapi-rb/Lobby)
10
-
11
5
  ## Resources
12
6
 
13
7
  * Chat: [gitter](http://gitter.im/jsonapi-rb)
@@ -28,6 +22,8 @@ Add to your `spec/spec_helpers.rb`:
28
22
 
29
23
  ```ruby
30
24
  # spec/spec_helpers.rb
25
+ require 'jsonapi/rspec'
26
+
31
27
  RSpec.configure do |config|
32
28
  # ...
33
29
  config.include JSONAPI::RSpec
@@ -59,6 +55,14 @@ Checking for an included resource:
59
55
  expect(response_body['included'])
60
56
  .to include(have_type('posts').and have_id('1'))
61
57
  ```
58
+ ## Contributing
59
+
60
+ Bug reports and pull requests are welcome on GitHub at
61
+ https://github.com/jsonapi-rb/jsonapi-rspec
62
+
63
+ This project is intended to be a safe, welcoming space for collaboration, and
64
+ contributors are expected to adhere to the
65
+ [Contributor Covenant](http://contributor-covenant.org) code of conduct.
62
66
 
63
67
  ## License
64
68
 
@@ -4,7 +4,7 @@ module JSONAPI
4
4
  ::RSpec::Matchers.define :have_link do |link|
5
5
  match do |actual|
6
6
  actual.key?('links') && actual['links'].key?(link.to_s) &&
7
- (!@val_set || actual['links'] == @val)
7
+ (!@val_set || actual['links'][link.to_s] == @val)
8
8
  end
9
9
 
10
10
  chain :with_value do |val|
data/lib/jsonapi/rspec.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require 'rspec/matchers'
1
2
  require 'jsonapi/rspec/id'
2
3
  require 'jsonapi/rspec/type'
3
4
  require 'jsonapi/rspec/attributes'
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Hosseini
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-14 00:00:00.000000000 Z
11
+ date: 2020-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rspec-expectations
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: rspec
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +52,20 @@ dependencies:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: simplecov
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
41
69
  description: Helpers for validating JSON API payloads
42
70
  email:
43
71
  - lucas.hosseini@gmail.com
@@ -73,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
101
  - !ruby/object:Gem::Version
74
102
  version: '0'
75
103
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.6.13
104
+ rubygems_version: 3.0.1
78
105
  signing_key:
79
106
  specification_version: 4
80
107
  summary: RSpec matchers for JSON API.