wcc-media-client 0.4.7 → 0.4.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/wcc/media/message.rb +20 -0
- data/lib/wcc/media/version.rb +1 -1
- data/wcc-media-client.gemspec +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d18367e52ec3f09cc84c5959e68a8bbe36c53f2
|
4
|
+
data.tar.gz: 54abfc8029902f64f480c1260c6c69fd24954a5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f519e7ab6c4c3c07989a0656c75f83ad5908bc30874aaad98a0499eda8c3709a7b1660698f14cf8aa8a8861901f5492aebf9ea9db8e6a1cc5216347774c9c038
|
7
|
+
data.tar.gz: dfa00ce89851417a5e0d52aef98f52e5cf07e51dd284ffa1570956fdd4f14cc4a55996331529c5c648463957ede12c05d2a1e52f288204361cd1affd1b5606ec
|
data/lib/wcc/media/message.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'base'
|
2
|
+
require_relative 'tag_group'
|
2
3
|
|
3
4
|
class WCC::Media::Message < WCC::Media::Base
|
4
5
|
active_record_shim do
|
@@ -22,6 +23,7 @@ class WCC::Media::Message < WCC::Media::Base
|
|
22
23
|
subtitle
|
23
24
|
description
|
24
25
|
series_position
|
26
|
+
slug
|
25
27
|
campus_names
|
26
28
|
topic
|
27
29
|
topics
|
@@ -68,4 +70,22 @@ class WCC::Media::Message < WCC::Media::Base
|
|
68
70
|
OpenStruct.new(raw[att]) if raw[att]
|
69
71
|
end
|
70
72
|
end
|
73
|
+
|
74
|
+
def has_video? # rubocop:disable Naming/PredicateName
|
75
|
+
assets.each_pair
|
76
|
+
.any? { |k, v| /video/.match(k) && v && !v.empty? }
|
77
|
+
end
|
78
|
+
|
79
|
+
def to_param
|
80
|
+
"#{id}-#{slug}"
|
81
|
+
end
|
82
|
+
|
83
|
+
WCC::Media::TagGroup.all.each do |tag_group|
|
84
|
+
define_method(tag_group.name.downcase) do
|
85
|
+
tags.select { |t| t.tag_group == tag_group }
|
86
|
+
end
|
87
|
+
end
|
88
|
+
# pluralize "campus" specifically
|
89
|
+
alias_method :campuses, :campus
|
90
|
+
remove_method :campus
|
71
91
|
end
|
data/lib/wcc/media/version.rb
CHANGED
data/wcc-media-client.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_runtime_dependency 'wcc-base', '~> 0.3.1'
|
30
30
|
spec.add_runtime_dependency 'wcc-data', '~> 0.3.3'
|
31
31
|
|
32
|
-
spec.add_development_dependency 'byebug'
|
32
|
+
spec.add_development_dependency 'byebug', '~> 11.0.1'
|
33
33
|
spec.add_development_dependency 'guard', '~> 2.15'
|
34
34
|
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
35
35
|
spec.add_development_dependency 'guard-rubocop', '~> 1.3'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: wcc-media-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Watermark Dev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: wcc-api
|
@@ -70,16 +70,16 @@ dependencies:
|
|
70
70
|
name: byebug
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 11.0.1
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 11.0.1
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: guard
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|