woody-decorators 4.3.0 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/lib/woody/decorators.rb +1 -1
- data/lib/woody/decorators/brand.rb +4 -4
- data/lib/woody/decorators/{challenge.rb → brief.rb} +5 -5
- data/lib/woody/decorators/{challenge_question.rb → brief_question.rb} +1 -1
- data/lib/woody/decorators/submission.rb +5 -5
- data/lib/woody/decorators/video.rb +5 -5
- data/woody-decorators.gemspec +4 -2
- metadata +11 -11
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 14a864c007030370c43bddda1b2ea75ea925cb8d
|
|
4
|
+
data.tar.gz: 64aae0847d520fd48dd8a0c752d4f4120bb51f58
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1583ae06cb3c91500e3a867bb773ba0c0665d4620fd7297c9a3f8772a005e68357536e9f3eeb67c20f00f3874d4d51a9b6b77c6d2a3d580bbc355572bcd4de90
|
|
7
|
+
data.tar.gz: b54aa842e9b0296096d2416db3e0226cd86b56ac7950a9487e9f2a9c37c91e7c885eaa30eb4f205d34938113eae192a6e0fc674ae711647ffb94aaafa43a12e2
|
data/Gemfile
CHANGED
data/lib/woody/decorators.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require 'woody/decorators/base'
|
|
2
|
-
require 'woody/decorators/
|
|
2
|
+
require 'woody/decorators/brief'
|
|
3
3
|
|
|
4
4
|
module Woody
|
|
5
5
|
module Decorators
|
|
@@ -9,9 +9,9 @@ module Woody
|
|
|
9
9
|
super(model)
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
def
|
|
13
|
-
@model.
|
|
14
|
-
|
|
12
|
+
def briefs
|
|
13
|
+
@model.briefs.map do |c|
|
|
14
|
+
Brief.new(c, @config)
|
|
15
15
|
end
|
|
16
16
|
end
|
|
17
17
|
end
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
require 'time_diff'
|
|
2
2
|
require 'wes/data/api/brand'
|
|
3
|
-
require 'wes/data/api/
|
|
3
|
+
require 'wes/data/api/brief'
|
|
4
4
|
require 'woody/decorators/base'
|
|
5
|
-
require 'woody/decorators/
|
|
5
|
+
require 'woody/decorators/brief_question'
|
|
6
6
|
|
|
7
7
|
module Woody
|
|
8
8
|
module Decorators
|
|
9
|
-
class
|
|
9
|
+
class Brief < Base
|
|
10
10
|
def initialize(model, config)
|
|
11
11
|
@config = config
|
|
12
12
|
super(model)
|
|
@@ -86,8 +86,8 @@ module Woody
|
|
|
86
86
|
end
|
|
87
87
|
|
|
88
88
|
def questions
|
|
89
|
-
@questions ||= Wes::Data::API::
|
|
90
|
-
|
|
89
|
+
@questions ||= Wes::Data::API::Brief.questions.map do |question|
|
|
90
|
+
BriefQuestion.new(question, @model.answers)
|
|
91
91
|
end.group_by(&:section)
|
|
92
92
|
end
|
|
93
93
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
require 'wes/data/api/
|
|
1
|
+
require 'wes/data/api/brief'
|
|
2
2
|
require 'woody/decorators/base'
|
|
3
|
-
require 'woody/decorators/
|
|
3
|
+
require 'woody/decorators/brief'
|
|
4
4
|
|
|
5
5
|
module Woody
|
|
6
6
|
module Decorators
|
|
@@ -10,9 +10,9 @@ module Woody
|
|
|
10
10
|
super(model)
|
|
11
11
|
end
|
|
12
12
|
|
|
13
|
-
def
|
|
14
|
-
@
|
|
15
|
-
Wes::Data::API::
|
|
13
|
+
def brief
|
|
14
|
+
@brief ||= Woody::Decorators::Brief.new(
|
|
15
|
+
Wes::Data::API::Brief.find(:id, @model.brief_id),
|
|
16
16
|
@config
|
|
17
17
|
)
|
|
18
18
|
end
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'wes/cloudkit'
|
|
2
2
|
require 'wes/data/api/brand'
|
|
3
|
-
require 'wes/data/api/
|
|
3
|
+
require 'wes/data/api/brief'
|
|
4
4
|
require 'wes/data/api/submission'
|
|
5
5
|
require 'wes/data/api/creator_user'
|
|
6
6
|
require 'woody/decorators/base'
|
|
@@ -24,12 +24,12 @@ module Woody
|
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def brand
|
|
27
|
-
@brand ||= Wes::Data::API::Brand.find(:id,
|
|
27
|
+
@brand ||= Wes::Data::API::Brand.find(:id, brief.brand_id)
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
def
|
|
31
|
-
@
|
|
32
|
-
:id, submission.
|
|
30
|
+
def brief
|
|
31
|
+
@brief ||= Wes::Data::API::Brief.find(
|
|
32
|
+
:id, submission.brief_id
|
|
33
33
|
)
|
|
34
34
|
end
|
|
35
35
|
|
data/woody-decorators.gemspec
CHANGED
|
@@ -17,14 +17,16 @@ Gem::Specification.new do |spec|
|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
18
18
|
spec.require_paths = ["lib"]
|
|
19
19
|
|
|
20
|
+
spec.required_ruby_version = '2.3.1'
|
|
21
|
+
|
|
20
22
|
spec.add_development_dependency "bundler", "~> 1.9"
|
|
21
23
|
spec.add_development_dependency "pry"
|
|
22
24
|
spec.add_development_dependency "rake", "~> 10.0"
|
|
23
25
|
spec.add_development_dependency "rspec", "~> 3.0"
|
|
24
26
|
spec.add_development_dependency "timecop", "~> 0"
|
|
25
27
|
|
|
26
|
-
spec.add_dependency "json"
|
|
28
|
+
spec.add_dependency "json", "~> 2"
|
|
27
29
|
spec.add_dependency "time_diff", "~> 0"
|
|
28
30
|
spec.add_dependency "wes-cloudkit", "~> 3"
|
|
29
|
-
spec.add_dependency "wes-data-api", "~>
|
|
31
|
+
spec.add_dependency "wes-data-api", "~> 10"
|
|
30
32
|
end
|
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:
|
|
4
|
+
version: 5.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -84,16 +84,16 @@ dependencies:
|
|
|
84
84
|
name: json
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
|
-
- - "
|
|
87
|
+
- - "~>"
|
|
88
88
|
- !ruby/object:Gem::Version
|
|
89
|
-
version: '
|
|
89
|
+
version: '2'
|
|
90
90
|
type: :runtime
|
|
91
91
|
prerelease: false
|
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
|
93
93
|
requirements:
|
|
94
|
-
- - "
|
|
94
|
+
- - "~>"
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
|
-
version: '
|
|
96
|
+
version: '2'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
98
|
name: time_diff
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -128,14 +128,14 @@ dependencies:
|
|
|
128
128
|
requirements:
|
|
129
129
|
- - "~>"
|
|
130
130
|
- !ruby/object:Gem::Version
|
|
131
|
-
version: '
|
|
131
|
+
version: '10'
|
|
132
132
|
type: :runtime
|
|
133
133
|
prerelease: false
|
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
|
135
135
|
requirements:
|
|
136
136
|
- - "~>"
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
|
-
version: '
|
|
138
|
+
version: '10'
|
|
139
139
|
description:
|
|
140
140
|
email:
|
|
141
141
|
- ''
|
|
@@ -148,8 +148,8 @@ files:
|
|
|
148
148
|
- lib/woody/decorators/base.rb
|
|
149
149
|
- lib/woody/decorators/brand.rb
|
|
150
150
|
- lib/woody/decorators/brand_user.rb
|
|
151
|
-
- lib/woody/decorators/
|
|
152
|
-
- lib/woody/decorators/
|
|
151
|
+
- lib/woody/decorators/brief.rb
|
|
152
|
+
- lib/woody/decorators/brief_question.rb
|
|
153
153
|
- lib/woody/decorators/collective.rb
|
|
154
154
|
- lib/woody/decorators/creator_user.rb
|
|
155
155
|
- lib/woody/decorators/helper/aspect_ratio.rb
|
|
@@ -167,9 +167,9 @@ require_paths:
|
|
|
167
167
|
- lib
|
|
168
168
|
required_ruby_version: !ruby/object:Gem::Requirement
|
|
169
169
|
requirements:
|
|
170
|
-
- -
|
|
170
|
+
- - '='
|
|
171
171
|
- !ruby/object:Gem::Version
|
|
172
|
-
version:
|
|
172
|
+
version: 2.3.1
|
|
173
173
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
174
174
|
requirements:
|
|
175
175
|
- - ">="
|