actv 2.4.0 → 2.5.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: 80b26605eb42caee35085876754e4943f4bb8793
4
- data.tar.gz: 2b4db7027f34e07ee2dfa4a6604efe53f1a6c41c
3
+ metadata.gz: 4269228c84454953535d04d0d80db8626a4aa9e9
4
+ data.tar.gz: 7820be864d4ab4ac32e21ae8c2e5b7e4dcc4b911
5
5
  SHA512:
6
- metadata.gz: 36d3d9b754946b453ad8a2b56506816ca7d3caab013f9028f60001f8ae5702cb6a8c4eaf82c371d6c340c54bfac5ab8a516b322949f05c75daced6a1553fe7f4
7
- data.tar.gz: 27db902ddcb8041ff7bfbc2a8adb45c08bc0554dd86fa75b1825acfd7cd90ed99fe5732e508fa8c95e35afcbe33b063e456cdfec8159931b7f1c2655597491e2
6
+ metadata.gz: 1de425fa54d216951dfa56044e98077f0aa40be68412201f97884dcf4af70e5ba16e7db149ade31e5194c370364fe5df4bfc2a4a5cc98545151756e4713bb584
7
+ data.tar.gz: 44d6ba3cb4485219c8edd1357040de16f66c6f4a101ff46f4d008650dc73cd3d319e5aaa2e838d975c3a57b98eb911dda7273e388b1d4572edd93d19b717852e
@@ -12,6 +12,16 @@ module ACTV
12
12
 
13
13
  private
14
14
 
15
+ def asset_media_types
16
+ response[:assetMediaTypes] || []
17
+ end
18
+
19
+ def media_type_is? name
20
+ asset_media_types.any? do |media_type|
21
+ media_type[:mediaType][:mediaTypeName].downcase == name.downcase
22
+ end
23
+ end
24
+
15
25
  def asset_categories
16
26
  response[:assetCategories] || []
17
27
  end
@@ -2,7 +2,7 @@ require 'actv/validators/asset_validator'
2
2
  module ACTV
3
3
  class EventValidator < AssetValidator
4
4
  def valid?
5
- category_is?('event') || taxonomy_has?('event')
5
+ category_is?('event') || taxonomy_has?('event') || media_type_is?('event')
6
6
  end
7
7
  end
8
8
  end
data/lib/actv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ACTV
2
- VERSION = "2.4.0"
2
+ VERSION = "2.5.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: actv
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.4.0
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathaniel Barnes
@@ -412,7 +412,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
412
412
  version: '0'
413
413
  requirements: []
414
414
  rubyforge_project:
415
- rubygems_version: 2.4.3
415
+ rubygems_version: 2.4.8
416
416
  signing_key:
417
417
  specification_version: 4
418
418
  summary: Active API