actv 1.3.5 → 1.3.6

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: 7080317800e75bb6372a4ffc1ad61eb298c5733d
4
- data.tar.gz: b044addc4ec410ae9dc060ef5c4aaf70257128f1
3
+ metadata.gz: 879990899fd61e474d302742229f2f2e2ae6d616
4
+ data.tar.gz: 3a07bed8d672f1bd95ff01b3043363379c65a1fd
5
5
  SHA512:
6
- metadata.gz: 81d445ef727f675e99464c6482c58fe57fc1c86aa3730fb493a42604bb8990d8e12652995c0fd70e7f56d645ca065a73c7250e59f0ef7c32547d7fcdb43eb66b
7
- data.tar.gz: 1c03109f0778c163758b1270bf6070b112bdb5025bbb4a79cdb687abb4478dd745fb0e04d90c5b8554fbcdbca0a186dba0a3d4c6d809ccbd1739f1c9256bd8d8
6
+ metadata.gz: 138f0fe37f39a4d09d8d3a5e780350b307f8c586744bbf938e8c4bd48115b78ba7676c3788609d059b7086b109a14e4af36ac58b2e4654e7d8f97e4ea4c765ff
7
+ data.tar.gz: 4a93eabc6959845b8d8c538b88becce1e7444d094f1f10594e06c4cd6ab11ea0d756fbaf90df2c8f5c6523243d4d3c57157e3e5b6e8dc14bb26f30cd36ee3fce
data/lib/actv/asset.rb CHANGED
@@ -246,7 +246,7 @@ module ACTV
246
246
  end
247
247
 
248
248
  def kids?
249
- kids_friendly_source_system? && kids_interest?
249
+ kids_interest?
250
250
  end
251
251
 
252
252
  def registration_status
@@ -391,14 +391,10 @@ module ACTV
391
391
  end
392
392
  end
393
393
 
394
- private
394
+ private
395
395
  def kids_interest?
396
396
  interests = meta_interests.to_a.map(&:downcase)
397
- ['kids', 'family'].any? { |tag| interests.include? tag }
398
- end
399
-
400
- def kids_friendly_source_system?
401
- activenet? || awcamps? || awcamps30? || articles_source?
397
+ ['kids', 'family'].any? { |tag| interests.include? tag }
402
398
  end
403
399
 
404
400
  def articles_source?
data/lib/actv/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module ACTV
2
- VERSION = "1.3.5"
2
+ VERSION = "1.3.6"
3
3
  end
@@ -229,7 +229,7 @@ describe ACTV::Asset do
229
229
  describe "#kids?" do
230
230
  let(:asset) { ACTV::Asset.new assetGuid: 1 }
231
231
 
232
- before do
232
+ before do
233
233
  class Rails
234
234
  def self.env
235
235
  "development"
@@ -237,96 +237,19 @@ describe ACTV::Asset do
237
237
  end
238
238
  end
239
239
 
240
- context "when kids_friendly_source_system? is true" do
241
- context "by stubbing kids_friendly_source_system?" do
242
- before { asset.stub kids_friendly_source_system?: true }
240
+ context 'when kids_interest? is true' do
241
+ before { asset.stub kids_interest?: true }
243
242
 
244
- context 'when kids_interest? is true' do
245
- before { asset.stub kids_interest?: true }
246
-
247
- it 'evaluates to true' do
248
- asset.kids?.should eq true
249
- end
250
- end
251
-
252
- context 'when kids_interest? is false' do
253
- before { asset.stub kids_interest?: false }
254
-
255
- it 'evaluates to false' do
256
- asset.kids?.should eq false
257
- end
258
- end
259
- end
260
-
261
- context "and activenet? returns true" do
262
- let(:asset) { ACTV::Asset.new assetGuid: 1, sourceSystem: {legacyGuid: "FB27C928-54DB-4ECD-B42F-482FC3C8681F"} }
263
-
264
- context 'and kids_interest? is true' do
265
- before { asset.stub kids_interest?: true }
266
-
267
- it 'evaluates to true' do
268
- asset.kids?.should eq true
269
- end
270
- end
271
- end
272
-
273
- context "and awcamps? returns true" do
274
- let(:asset) { ACTV::Asset.new assetGuid: 1, sourceSystem: {legacyGuid: "2B22B4E6-5AA4-44D7-BF06-F7A71F9FA8A6"} }
275
-
276
- context 'and kids_interest? is true' do
277
- before { asset.stub kids_interest?: true }
278
-
279
- it 'evaluates to true' do
280
- asset.kids?.should eq true
281
- end
282
- end
283
- end
284
-
285
- context "and awcamps30? returns true" do
286
- let(:asset) { ACTV::Asset.new assetGuid: 1, sourceSystem: {legacyGuid: "89208DBA-F535-4950-880A-34A6888A184C"} }
287
-
288
- context 'and kids_interest? is true' do
289
- before { asset.stub kids_interest?: true }
290
-
291
- it 'evaluates to true' do
292
- asset.kids?.should eq true
293
- end
294
- end
295
- end
296
-
297
- context "and articles_source? returns true" do
298
- let(:asset) { ACTV::Asset.new assetGuid: 1, sourceSystem: {legacyGuid: "CA4EA0B1-7377-470D-B20D-BF6BEA23F040"} }
299
-
300
- context 'and kids_interest? is true' do
301
- before { asset.stub kids_interest?: true }
302
-
303
- it 'evaluates to true' do
304
- asset.kids?.should eq true
305
- end
306
- end
243
+ it 'evaluates to true' do
244
+ asset.kids?.should eq true
307
245
  end
308
246
  end
309
247
 
310
- context "when kids_friendly_source_system? is false" do
311
- context "by stubbing kids_friendly_source_system?" do
312
- before { asset.stub kids_friendly_source_system?: false }
313
-
314
- it 'evaluates to false' do
315
- asset.kids?.should eq false
316
- end
317
- end
248
+ context 'when kids_interest? is false' do
249
+ before { asset.stub kids_interest?: false }
318
250
 
319
- context "and all source systems return false" do
320
- before do
321
- asset.stub activenet?: false
322
- asset.stub awcamps?: false
323
- asset.stub awcamps30?: false
324
- asset.stub articles_source?: false
325
- end
326
-
327
- it 'evaluates to false' do
328
- asset.kids?.should eq false
329
- end
251
+ it 'evaluates to false' do
252
+ asset.kids?.should eq false
330
253
  end
331
254
  end
332
255
  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: 1.3.5
4
+ version: 1.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathaniel Barnes