jekyll-contentful-data-import 1.0.1 → 1.1.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
  SHA1:
3
- metadata.gz: f513bf4ba639954cb4e2a7dc33c0178929e70164
4
- data.tar.gz: 9a966a8b8d5f7993680eb2de411c43d4bfd13b91
3
+ metadata.gz: 117c6b44c14c191f720ab4aeaf2f35d02db27d73
4
+ data.tar.gz: 9fe2e0d728401af419da7757ffbc315683e98665
5
5
  SHA512:
6
- metadata.gz: 54b15aa840aad18463fde399758f7bc48de50be91cb293bcd95f97b386d2cdb3dbb85b855935ea7c618d18210c5b41676086adaabf61b830e516b4e0e3369263
7
- data.tar.gz: 66dfbc53fb58a80af071770ad9f724eee25d16074f7c1f6ea714b85885502670b390a364777206e6844247dcb50580751a612061b12d5eec47c1d07fc8969ef0
6
+ metadata.gz: 6f89f6ec31a0c43da8db98d3a8f6b935137131f6ebc7487d7d1369af142cf34a3ebbc036bb1a2bfe21566eb788ed1ec5b89362fd293c41f494f9f824ab1395ce
7
+ data.tar.gz: 49c16f616c0a11a9b6a23a4f0284a5ba1067e42f2b8115c6418a5ce90a9dccb6c2a44f69fcf3ccba461a43ffe92eb3157eefd9620b6636ec28d028f7f55ac6f2
@@ -1,6 +1,10 @@
1
1
  # Change Log
2
2
  ## Unreleased
3
3
 
4
+ ## v1.1.0
5
+ ### Added
6
+ * Nested Entries are now serialized completely
7
+
4
8
  ## v1.0.1
5
9
  ### Changed
6
10
  * Content Type format is now as expected
@@ -67,7 +67,7 @@ module Jekyll
67
67
  end
68
68
 
69
69
  def map_entry(child)
70
- {'sys' => {'id' => child.id}}
70
+ self.class.mapper_for(child, config).map
71
71
  end
72
72
 
73
73
  def map_location(location)
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Contentful
3
- VERSION = "1.0.1"
3
+ VERSION = "1.1.0"
4
4
  end
5
5
  end
@@ -34,6 +34,19 @@ describe Jekyll::Contentful::Serializer do
34
34
  expect(subject.serialize).to eq(expected)
35
35
  end
36
36
 
37
+ it 'serializes a nested entry like an entry' do
38
+ subject.instance_variable_set(:@entries, [
39
+ EntryDouble.new('foo', ContentTypeDouble.new, {
40
+ 'foobar' => EntryDouble.new('foobar', ContentTypeDouble.new, {
41
+ 'baz' => 1
42
+ })
43
+ })
44
+ ])
45
+
46
+ expected = {'content_type' => [{'sys' => {'id' => 'foo'}, 'foobar' => {'sys' => {'id' => 'foobar'}, 'baz' => 1}}]}
47
+ expect(subject.serialize).to eq(expected)
48
+ end
49
+
37
50
  it 'serializes multiple entries' do
38
51
  subject.instance_variable_set(:@entries, [
39
52
  EntryDouble.new('foo', ContentTypeDouble.new, {'foobar' => 'bar'}),
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-contentful-data-import
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Contentful GmbH