jsonapi-object-mapper 0.8.0 → 0.8.1

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: 5157d67f308d9f6417ffa2e89ef11065eecfbd3ac46f16ff39cff8847a28f9a1
4
- data.tar.gz: f16f510476d9871b8b64f14f36c92c800b947cb5c9c19f9128348b65dac70d78
3
+ metadata.gz: 13f9a7b828f1b92f507cc28cf7eb65cbf697042669846a11ac0099aa6b6f24b6
4
+ data.tar.gz: 9dfb0ad00761af92d00c87062fb60399f19989f3f13d989abd7c046676509896
5
5
  SHA512:
6
- metadata.gz: ede8aaaf9c04823da0f4b6c82394cb31bd97026456d3d5ba89a170e555b28cccf08ddd7ac127ca3925c466659a3bb9a974737236ce4b5eda3488e8373bd0b2a0
7
- data.tar.gz: 6059101e8152b7fb0096ad3f786c1679feaf0fa73e9fdee6781bb2b326694d4b9758da81c8384e2ea3d940e22cf5aa1c4e37405ff44c89f102aba4ddb2227f8c
6
+ metadata.gz: 7cd208aa8aa699060367018cd73e0c8263e3f45839de720e6983a8400c8c4056c1300e846c3933729c227f3c03e37107a02f2b829a899d84b9aa24a6f9d276fd
7
+ data.tar.gz: 637cf774585df3d34fc84aa64d6f252066135c1df09316e797dbf2c71732ffbe74b98b844e7cfc7c469c9a7b8954888b6a256f310c29d7225535f730a5b8d9f5
data/README.md CHANGED
@@ -38,6 +38,8 @@ class User < JsonAPIObjectMapper::Deserialize::Resource
38
38
  # - IE: { "type" = "friend", "id" = "10" }
39
39
  has_one :friend
40
40
 
41
+ has_many :enemies, embed_with: User
42
+
41
43
  # This will accept the default value
42
44
  attribute :last_name
43
45
 
@@ -55,6 +57,7 @@ user = User.call(json_payload) #=> <#User:123>
55
57
 
56
58
  user.first_name #=> "FOOER"
57
59
  user.last_name #=> "Bar"
60
+ user.enemies #=> <# JsonAPIObjectMapper::Deserialize::Collection #>
58
61
 
59
62
  # If json API Payload is a collection of data points
60
63
  users = User.call(json_payload) #=> <# JsonAPIObjectMapper::Deserialize::Collection #>
@@ -85,10 +88,6 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
85
88
 
86
89
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
87
90
 
88
- ## Contributing
89
-
90
- Bug reports and pull requests are welcome on GitHub at https://github.com/georgekaraszi@gmail.com/jsonapi_object_mapper. 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.
91
-
92
91
  ## License
93
92
 
94
93
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "jsonapi-object-mapper/parser/errors"
4
- extend Forwardable
5
4
 
6
5
  module JsonAPIObjectMapper
7
6
  module Deserialize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JsonAPIObjectMapper
4
- VERSION = "0.8.0"
4
+ VERSION = "0.8.1"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jsonapi-object-mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - George Protacio-Karaszi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-23 00:00:00.000000000 Z
11
+ date: 2018-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj