middleman-dato 0.0.1.rc1 → 0.0.1.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dato/repo.rb +11 -10
- data/middleman-dato.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2662bb3c2b38f4f37124b6ea9eb18de9db52b121
|
4
|
+
data.tar.gz: f798ff90cad69d1eb951dc3d95d345d9bc9b30a7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 935e93b6a99c6c7a244b7f48184f3af845f8252d04cf696d8a94c00971fbd8e1a5c906ead27407ca39e0fedc2a4ed91a6888e22d1f046e734d02de9bdbf41895
|
7
|
+
data.tar.gz: 88393186cced3a657979a04fefafb21a482791dbfb4a5f060935f8c10d7286b9d43d7af4f45006729e79bb9617a2d511436da953e8cac65f00587d945cd5dedb
|
data/lib/dato/repo.rb
CHANGED
@@ -66,18 +66,19 @@ module Dato
|
|
66
66
|
|
67
67
|
def group_by_content_type(data)
|
68
68
|
Hash[
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
record
|
73
|
-
|
74
|
-
.map do |content_type, records|
|
75
|
-
if content_types[content_type][:singleton]
|
76
|
-
[ content_type, normalize_record(records.first) ]
|
77
|
-
else
|
78
|
-
[ content_type.pluralize, group_by_id(records) ]
|
69
|
+
content_types.map do |id, content_type|
|
70
|
+
records = data
|
71
|
+
.with_indifferent_access[:data]
|
72
|
+
.select do |record|
|
73
|
+
record[:links][:content_type][:linkage][:id] == id
|
79
74
|
end
|
75
|
+
|
76
|
+
if content_type[:singleton]
|
77
|
+
[ id, records.any? ? normalize_record(records.first) : nil ]
|
78
|
+
else
|
79
|
+
[ id.pluralize, group_by_id(records) ]
|
80
80
|
end
|
81
|
+
end
|
81
82
|
]
|
82
83
|
end
|
83
84
|
|
data/middleman-dato.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "middleman-dato"
|
6
|
-
s.version = "0.0.1.
|
6
|
+
s.version = "0.0.1.rc2"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Stefano Verna"]
|
9
9
|
s.email = ["s.verna@cantierecreativo.net"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-dato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1.
|
4
|
+
version: 0.0.1.rc2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-05-
|
11
|
+
date: 2015-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|