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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb3291a216302c24e8d3477d8c266f24858523da
4
- data.tar.gz: 05ebb373469071917a43c7f94a8609c0aab51c12
3
+ metadata.gz: 4d18367e52ec3f09cc84c5959e68a8bbe36c53f2
4
+ data.tar.gz: 54abfc8029902f64f480c1260c6c69fd24954a5e
5
5
  SHA512:
6
- metadata.gz: d70ecfe3ea622c99523e4bd9457cd1fd40e14b64e392c3a192398d1be657ebd75bc37acc4d67bd188afe8e641bae46ccd5beaf002e201bae1afe9ed5c75d14c8
7
- data.tar.gz: 2836dad7c3f4fd87e6461b85dea5a5ad7697efae00ed28faa0e2de75534e459f6425d466c842ed634f16d4daf1474ae511fcfa2a70faddea5a5d7c4d666dbaae
6
+ metadata.gz: f519e7ab6c4c3c07989a0656c75f83ad5908bc30874aaad98a0499eda8c3709a7b1660698f14cf8aa8a8861901f5492aebf9ea9db8e6a1cc5216347774c9c038
7
+ data.tar.gz: dfa00ce89851417a5e0d52aef98f52e5cf07e51dd284ffa1570956fdd4f14cc4a55996331529c5c648463957ede12c05d2a1e52f288204361cd1affd1b5606ec
@@ -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
@@ -1,5 +1,5 @@
1
1
  module WCC
2
2
  module Media
3
- VERSION = '0.4.7'.freeze
3
+ VERSION = '0.4.8'.freeze
4
4
  end
5
5
  end
@@ -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.7
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-03 00:00:00.000000000 Z
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: '0'
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: '0'
82
+ version: 11.0.1
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: guard
85
85
  requirement: !ruby/object:Gem::Requirement