woody-decorators 2.2.0 → 2.3.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: 998199005ed2235da9f97f8f5effc60329e83ca0
4
- data.tar.gz: d11091f950adbde26fea150ba849503110ceef14
3
+ metadata.gz: baf802b86d47ec5d5b59a68608a04a1299d52cd9
4
+ data.tar.gz: 865cefa4f02a3f368ee947b1f8d04d4b16151248
5
5
  SHA512:
6
- metadata.gz: e5dc61f0ee15bce38a8c247e00e8a555191407eb7774a17d6a77f3a40ca31b309d6b37b6691d3b4f1d90bd4f9472acb5bcd9e7eb4a4cd76da9ff15a2d25b27a2
7
- data.tar.gz: 7c64a2c998ab09f282a54cec281085427485572360ddd956e545d86f9a14bb9c913da24fc32d25844ffe15a0e656a985b06a33f59d3f8c37fcbf65bc9817e4de
6
+ metadata.gz: 4111f1da419ab2e9d97ef12a531ec1d5e1a88f15fe783530539a7892b35b0818ba32fedb3e734bcf54a3cb96d7b2d8077c8731b885ccffd90db38113b81c95d1
7
+ data.tar.gz: de50b03b6600ee3917ab31a87ff896bae3b92a4d8e8bfc0101deac14a62eaa3f0920b2bbcf39f9a8ea7095d8efdcc81a3e62bb1722a4c5a7b3d3f0387215d8d0
@@ -1,5 +1,5 @@
1
1
  module Woody
2
2
  module Decorators
3
- VERSION = "2.2.0".freeze
3
+ VERSION = "2.3.0".freeze
4
4
  end
5
5
  end
@@ -13,7 +13,7 @@ module Woody
13
13
  case ratio
14
14
  when "1:1"
15
15
  "square"
16
- when "16:9", "4:3", "9:16", "5:4"
16
+ when "16:9", "4:3", "9:16", "4:5"
17
17
  format(CLASS_NAME_FORMAT, orientation, ratio("-"))
18
18
  else
19
19
  format(CLASS_NAME_FORMAT, orientation, default_ratio)
@@ -2,6 +2,7 @@ require "wes/cloudkit"
2
2
  require "wes/data/api/brand"
3
3
  require "wes/data/api/challenge"
4
4
  require "wes/data/api/submission"
5
+ require "wes/data/api/creator_user"
5
6
  require "woody/decorators/base"
6
7
  require "woody/decorators/video_transcoding_state"
7
8
  require "woody/decorators/helper/aspect_ratio"
@@ -9,8 +10,9 @@ require "woody/decorators/helper/aspect_ratio"
9
10
  module Woody
10
11
  module Decorators
11
12
  class Video < Base
12
- def initialize(model, config)
13
- @config = config
13
+ def initialize(model, config, creator_model = nil)
14
+ @config = config
15
+ @creator_model = creator_model
14
16
  super(model)
15
17
  end
16
18
 
@@ -31,6 +33,13 @@ module Woody
31
33
  )
32
34
  end
33
35
 
36
+ def creator
37
+ @creator ||= @creator_model ? @creator_model : Wes::Data::API::CreatorUser.find(
38
+ :id,
39
+ submission.user_id
40
+ )
41
+ end
42
+
34
43
  def gif
35
44
  return "https://i.imgur.com/jZCPUYx.gif" if dev?
36
45
  video_transcoding_state("gif").path(filename_hash)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: woody-decorators
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''