woody-decorators 5.0.1 → 5.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: 77be5a1721daf35d7fe02c1a9b3a737bb00ca9d0
4
- data.tar.gz: 671d9645054dbb1a8ce4def9af43c885d84d4ef9
3
+ metadata.gz: d05a69befbb257afe865d61f245dd1ef58e6546a
4
+ data.tar.gz: ded34058691b2250755f7504ecf4b0722b150138
5
5
  SHA512:
6
- metadata.gz: bd23edb8d06052f5b68bdbc2cb0cdaa23d8d381ee060738d8b7f48062ef0613e2b2da53ac1501913db9e1353e2584d1107206dbf1a5923351505b779901acbdd
7
- data.tar.gz: df69302256090fab3084c561720ef6ff92177abca6f4108469ac750682bef61116ef0c69703c4473961728a922c1d56adea5de4e0eccd1390a9db6ef64a59425
6
+ metadata.gz: 54afc8d5a8420f4cd5a50e8f491ea5d0beb073cb6a53a8744cae805f65dede71b9ef0db92e3a936b94b63385ebfb6726e9314f7eefc8778c3216034c9765933f
7
+ data.tar.gz: 088095006c3202bcefe453ed9b5e557038272f515c3001dcd67734f8b1814095fc8580230685ff67b834e76c131be77aa080a9536f0b52fcc0d178b407c27769
@@ -1,5 +1,5 @@
1
1
  module Woody
2
2
  module Decorators
3
- VERSION = '5.0.1'.freeze
3
+ VERSION = '5.1.0'.freeze
4
4
  end
5
5
  end
@@ -2,6 +2,7 @@ require 'time_diff'
2
2
  require 'wes/data/api/brand'
3
3
  require 'wes/data/api/brief'
4
4
  require 'woody/decorators/base'
5
+ require 'woody/decorators/brand'
5
6
  require 'woody/decorators/brief_question'
6
7
 
7
8
  module Woody
@@ -12,8 +13,10 @@ module Woody
12
13
  super(model)
13
14
  end
14
15
 
15
- def brand_name
16
- brand.name
16
+ def brand
17
+ @brand ||= Woody::Decorators::Brand.new(
18
+ @model.brands.first, @config
19
+ )
17
20
  end
18
21
 
19
22
  def concept_questions
@@ -77,10 +80,6 @@ module Woody
77
80
 
78
81
  private
79
82
 
80
- def brand
81
- @brand ||= Wes::Data::API::Brand.find(:id, @model.brand_id)
82
- end
83
-
84
83
  def purchased_videos
85
84
  @purchased_videos ||= @model.videos(state: 'purchased').size
86
85
  end
@@ -16,6 +16,12 @@ module Woody
16
16
  @config
17
17
  )
18
18
  end
19
+
20
+ def title
21
+ format(
22
+ '%s - %s', brief.brand.name, brief.title
23
+ )
24
+ end
19
25
  end
20
26
  end
21
27
  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: 5.0.1
4
+ version: 5.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-07-01 00:00:00.000000000 Z
11
+ date: 2016-07-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler