simple-json-api-serializer 1.0.3 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: db9d7ad9e9ff2c20fa4e94d11bd1f5efd450a6c6
4
- data.tar.gz: 02f59b32bd833328a2f80a5683e888f5dce1129e
3
+ metadata.gz: 1aacf5765126a76841c9539c101f1bf4b249d788
4
+ data.tar.gz: 4fe4c64426cc98f2e0765bd6bf9ebeeda20dabbc
5
5
  SHA512:
6
- metadata.gz: 4c496038ca335ed6d2e2df678f48707b9703244447f604e5d2229f744bc8f9c5b466352ff061c5300f17f2fc3f283e0612535e88e22d5d6bf8dbd83a70b75226
7
- data.tar.gz: 971963f0ca6335f00486b606025347ea7ff671f2241f796e900fe79924aa404b5ce9cddb489d30297f2c937bba3e992a2699fc137b3be5582bc1422913ca17c1
6
+ metadata.gz: 1b0b30de6394fc0b0110349fa0020df1d657836663c3363758b632bd5314ee44355dc13c38bab9afca881fa4d743fd79daa1efb853f031a05e75f2cfe4b7ebdb
7
+ data.tar.gz: 6541806644aa03eb74f8b990f4055523865c618113e6bb5e732467ace9183193c91086143e1305b0f00e8c122a71c7f8bd8e3491eef1b9716317b844f176c7cb
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple-json-api-serializer (1.0.3)
4
+ simple-json-api-serializer (1.0.4)
5
5
  activesupport (~> 4.2)
6
6
 
7
7
  GEM
@@ -18,6 +18,7 @@ module JSONApi
18
18
  specialization.relationships(*relationships)
19
19
  specialization.id_attribute(id_attribute)
20
20
  specialization.base_url(base_url)
21
+ specialization.type(type)
21
22
  end
22
23
 
23
24
  def attributes(*attrs)
@@ -33,6 +34,10 @@ module JSONApi
33
34
  @base_url = url
34
35
  end
35
36
 
37
+ def type(type = @type)
38
+ @type = type
39
+ end
40
+
36
41
  def relationship(name, **config)
37
42
  config[:name] = name
38
43
  relationships(config)
@@ -59,6 +64,7 @@ module JSONApi
59
64
  options[:id_attribute] ||= id_attribute
60
65
  options[:attributes] ||= attributes
61
66
  options[:relationships] ||= relationships
67
+ options[:type] ||= type
62
68
  options
63
69
  end
64
70
  end
@@ -1,3 +1,3 @@
1
1
  module JSONApi
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple-json-api-serializer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marten Schilstra
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-11-27 00:00:00.000000000 Z
11
+ date: 2015-12-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -112,7 +112,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  version: '0'
113
113
  requirements: []
114
114
  rubyforge_project:
115
- rubygems_version: 2.4.5.1
115
+ rubygems_version: 2.4.6
116
116
  signing_key:
117
117
  specification_version: 4
118
118
  summary: An extremely simple JSON Api serializer