woody-decorators 10.0.0 → 10.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: 73768b43db8fd9783e670df49d8e2e7a1f0ff848
4
- data.tar.gz: 07e7ade1292e915c523abf2d98811877c6dbff57
3
+ metadata.gz: 19ac34bd3dc9495d86b212c8437760fea87c59e7
4
+ data.tar.gz: db46a573baa5561bb4db45ed0338ffe80a6071bd
5
5
  SHA512:
6
- metadata.gz: 7a6dd9e0beb9af8c55df55efdef51e326031e10510e9c7d0458fc75efa2cc35609eaf201dc67f20029cb0ed5a46d2a88b999e18bec36df268242bca8b20a062c
7
- data.tar.gz: 60e0e2fe9400fe8af13dd9e586d91525bdae8f92d9b0ea284e6f503c5a7d727d1d6d5274b195298397c00dcb575f918d0d33fb996959795557d53599bfe4e9b0
6
+ metadata.gz: 13be30780372fc6c97754f68a7596a733d28458f4129b5d7a101e240a48f3fd321e64640ddca00c58e4149b88b8b4f44eeed1edf5513f187477a60144fc703fb
7
+ data.tar.gz: ee5f82984f913377c738d8c97084f55ef18702c5fe6a53a7c311692112af69c155e879972f2c0ccd0413c61b3c310244c28740a94a63a6f74399a704860b8689
@@ -45,6 +45,26 @@ module Woody
45
45
  lambda { |val| format('%s%', val.to_s) }
46
46
  end
47
47
 
48
+ def self.post_url()
49
+ lambda do |val|
50
+ config = Wes::Cloudkit.config
51
+ video = Woody::Decorators::Video.new(
52
+ Wes::Data::API::Video.find('facebook_id', val), config
53
+ )
54
+
55
+ brief = Wes::Data::API::Brief.find(:id, video.submission.brief_id)
56
+ post = brief.insights('posts').find do |p|
57
+ p['object_id'] == val
58
+ end
59
+
60
+ format(
61
+ '/brief/%s/insights/post/%s',
62
+ brief.id,
63
+ post['post_id']
64
+ )
65
+ end
66
+ end
67
+
48
68
  def self.round(p)
49
69
  lambda { |val| val.round(p) }
50
70
  end
@@ -1,5 +1,5 @@
1
1
  module Woody
2
2
  module Decorators
3
- VERSION = '10.0.0'.freeze
3
+ VERSION = '10.1.0'.freeze
4
4
  end
5
5
  end
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: 10.0.0
4
+ version: 10.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-12-06 00:00:00.000000000 Z
11
+ date: 2016-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -179,7 +179,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
179
179
  version: '0'
180
180
  requirements: []
181
181
  rubyforge_project:
182
- rubygems_version: 2.5.1
182
+ rubygems_version: 2.5.2
183
183
  signing_key:
184
184
  specification_version: 4
185
185
  summary: ''