wcc-media-client 0.7.5 → 0.7.7

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
  SHA256:
3
- metadata.gz: f7933fd357d12e89fc43575a4dad5153bc9dd52dc4dc8678d45fa4992d523479
4
- data.tar.gz: 11ddb0d5a0ba43a82f79198aeb3b0b3c48dc730cf705b7494c2bbfc4e7def919
3
+ metadata.gz: 13811fc5f388b8a84cbfca06f1f96dba8b022b6a5369b7657760251797b0e606
4
+ data.tar.gz: 5a4d59ba9f640ab75b45d3ece1b1d726941cae5d238cd9353c2bad7094c55038
5
5
  SHA512:
6
- metadata.gz: 83130887ea23f8e03da72ae4937c19ebc5e74d45d1413f75775df96ee081b0f04dc908cb22fa1666412a29ed551b35b71c683614bed33e099a81f7be1644b3fc
7
- data.tar.gz: c922f90ed311a889aecd06f6e7c9fa95c3777c571096354ce7775665466cb9b88510cf0cbb7b030142fd09c6cb4b0e7eeb4b0d4380262ee0f09b400491e5a8a9
6
+ metadata.gz: ba369d26bbae429ffec8bb50bd638205b5b36ab7adfff616e80fdb46549bb940a6ab85e067896faed8d00925246ad0ba265b0f443fea2fb437f1f21b31a41c51
7
+ data.tar.gz: 7c81fc559b666d334aa747307dbaeb39ce45e6782d16e50cbc92ec7f1177d70001936c4383fc5475de07a33904ea175f7f56bcf677c4398b285b4fd159dacdc4
data/Gemfile CHANGED
@@ -25,7 +25,7 @@ group :development, :test do
25
25
  gem 'simplecov', '~> 0.21.2', require: false
26
26
  gem 'simplecov-cobertura', '~> 1.4'
27
27
  gem 'sprockets', '< 4.0'
28
- gem 'sqlite3', '~> 1.3.6'
28
+ gem 'sqlite3', '>= 1.4'
29
29
  gem 'typhoeus', '~> 1.3'
30
30
  gem 'webmock', '~> 3.0'
31
31
  end
@@ -41,7 +41,7 @@ module WCC::Media::ActiveRecordShim
41
41
  def find_by(**filters)
42
42
  raise ArgumentError, 'You must provide at least one filter' if filters.empty?
43
43
 
44
- find_all(filters).first
44
+ find_all(**filters).first
45
45
  end
46
46
 
47
47
  def model_name
@@ -64,7 +64,7 @@ module WCC::Media::ActiveRecordShim
64
64
  offset: options.delete(:start) || 0
65
65
  }
66
66
 
67
- find_all(filter).each_slice(batch_size, &block)
67
+ find_all(**filter).each_slice(batch_size, &block)
68
68
  end
69
69
 
70
70
  def where(**conditions)
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'ostruct'
3
4
  require 'wcc/api/rest_client'
4
5
  require_relative 'message'
5
6
  require_relative 'series'
@@ -53,7 +54,7 @@ module WCC
53
54
  super(**options)
54
55
 
55
56
  RESOURCES.each do |(endpoint, model)|
56
- instance_variable_set("@#{endpoint}", Resource.new(self, model, @options))
57
+ instance_variable_set(:"@#{endpoint}", Resource.new(self, model, @options))
57
58
  end
58
59
  end
59
60
 
@@ -33,6 +33,9 @@ class WCC::Media::Message < WCC::Media::Base
33
33
  topics
34
34
  hide_from_internal_search
35
35
  archived
36
+ episode_number
37
+ season_number
38
+ episode_type
36
39
  ].each do |att|
37
40
  define_method att do
38
41
  raw[att]
@@ -40,11 +43,11 @@ class WCC::Media::Message < WCC::Media::Base
40
43
  end
41
44
 
42
45
  def hide_from_internal_search
43
- raw['flags']['hide_from_internal_search'] || false
46
+ raw.dig('flags', 'hide_from_internal_search') || false
44
47
  end
45
48
 
46
49
  def archived?
47
- raw['flags']['archived'] || false
50
+ raw.dig('flags', 'archived') || false
48
51
  end
49
52
 
50
53
  def speakers
@@ -2,6 +2,6 @@
2
2
 
3
3
  module WCC
4
4
  module Media
5
- VERSION = '0.7.5'
5
+ VERSION = '0.7.7'
6
6
  end
7
7
  end
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.7.5
4
+ version: 0.7.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Watermark Dev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-15 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: wcc-api
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
- rubygems_version: 3.1.6
75
+ rubygems_version: 3.4.19
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: ''