woody-decorators 7.0.0 → 7.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: 4dc28b90aba6d3e04a498dbec52d516a65ac6597
4
- data.tar.gz: b9020e7d48accd9c6f9a68dd660cd5afa9adf199
3
+ metadata.gz: 3f3ab4b03d9d7764b0d03a9d7f4a0564c2344e89
4
+ data.tar.gz: 1487eaf268b18e698205d9587b2ed826731357d6
5
5
  SHA512:
6
- metadata.gz: 23b7a8cbae6de6bae80eb469a9345d3fe71fae75ec19bdf1673943732acbdca6ab4b804d9afaf79c4f5d5082d9c157876b68b45cef80bc1e9b4201babdf3fec1
7
- data.tar.gz: e88ac91fb0ee68f23a237eb9bced4ab80ce80d94d147364187719c1524527c2e6f65fc7836ebb3060423a640e3aeb0e7e8943261a240cf6703ab54788b6f1d7e
6
+ metadata.gz: 6ebf5fd5c5ea05d206f2396e94681952994bbd900beded125e297a3828516a171025c02f3861b283fadb0db0d07167e41dff62fcaada920e0a87763a313d2555
7
+ data.tar.gz: 80b6c01bb20169a28ef754838ba45cb0155b3e7e14ce92a428d257bb74c56dd79dbc42166b5f972d0488912dd0fe7cb57d5102b8e8189e6ed983719a4b13fe62
@@ -1,5 +1,5 @@
1
1
  module Woody
2
2
  module Decorators
3
- VERSION = '7.0.0'.freeze
3
+ VERSION = '7.1.0'.freeze
4
4
  end
5
5
  end
@@ -83,6 +83,18 @@ module Woody
83
83
  @model.type == 'public'
84
84
  end
85
85
 
86
+ def insights_post(yml_config, object_id)
87
+ post = @model.insights('posts').find do |p|
88
+ p['object_id'] == object_id
89
+ end
90
+
91
+ return nil unless post
92
+
93
+ {
94
+ post: Insights::Hydrator.hydrate(yml_config, post)
95
+ }
96
+ end
97
+
86
98
  def insights_posts_list(yml_config)
87
99
  {
88
100
  posts: Insights::Hydrator.hydrate_array(
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woody-decorators
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.0
4
+ version: 7.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-06 00:00:00.000000000 Z
11
+ date: 2016-09-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler