video_info 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/unit_test.yml +3 -0
- data/lib/video_info/providers/youtube_scraper.rb +1 -0
- data/lib/video_info/version.rb +1 -1
- data/video_info.gemspec +1 -2
- metadata +3 -329
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_invalid_video_url/_available_/1_2_2_1_1.yml +0 -82
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author/1_3_7_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_thumbnail/1_3_9_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_author_url/1_3_8_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_date/should_show_correct_date.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_description/1_3_10_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_duration/1_3_12_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_keywords/1_3_11_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail/1_3_21_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_large/1_3_18_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_medium/1_3_17_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_thumbnail_small/1_3_16_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_title/1_3_6_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Dailymotion/with_video_x7lni3/_view_count/1_3_22_1.yml +0 -91
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/1_2_3_1_1.yml +0 -151
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_password_required_video/_available_/2_2_3_1_1.yml +0 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/1_2_2_1_1.yml +0 -127
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_this_video_does_not_exist_video/_available_/2_2_2_1_1.yml +0 -70
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -158
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/_available_/with_valid_video/_available_/2_2_1_1_1.yml +0 -68
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author/1_13_2_1.yml +0 -130
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_thumbnail/1_13_3_1.yml +0 -130
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/author_url/1_13_4_1.yml +0 -132
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/available_/1_13_1_1.yml +0 -130
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/date/1_13_7_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/description/1_13_6_1.yml +0 -131
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/duration/1_13_8_1.yml +0 -130
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/height/1_13_10_1.yml +0 -131
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/keywords/1_13_9_1.yml +0 -128
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_large/1_13_14_1.yml +0 -129
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_medium/1_13_13_1.yml +0 -129
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/thumbnail_small/1_13_12_1.yml +0 -129
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/title/1_13_5_1.yml +0 -130
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/view_count/1_13_15_1.yml +0 -129
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_unavailable_video/width/1_13_11_1.yml +0 -129
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/1_3_20_1.yml +0 -158
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author/2_3_20_1.yml +0 -80
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/1_3_19_1.yml +0 -158
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_thumbnail/2_3_19_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/1_3_21_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_author_url/2_3_21_1.yml +0 -80
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_date/should_have_correct_upload_date.yml +0 -240
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/1_3_7_1.yml +0 -160
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_description/2_3_7_1.yml +0 -80
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/1_3_9_1.yml +0 -158
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_duration/2_3_9_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/1_3_11_1.yml +0 -158
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_height/2_3_11_1.yml +0 -80
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_keywords/should_return_a_string_list_of_keywords.yml +0 -240
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/1_3_18_1.yml +0 -236
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail/2_3_18_1.yml +0 -82
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/1_3_15_1.yml +0 -236
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_large/2_3_15_1.yml +0 -82
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/1_3_14_1.yml +0 -235
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_medium/2_3_14_1.yml +0 -84
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/1_3_13_1.yml +0 -236
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_thumbnail_small/2_3_13_1.yml +0 -84
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/1_3_6_1.yml +0 -159
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_title/2_3_6_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/1_3_22_1.yml +0 -158
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_view_count/2_3_22_1.yml +0 -84
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/1_3_10_1.yml +0 -156
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_136971428/_width/2_3_10_1.yml +0 -82
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/1_12_1_1.yml +0 -234
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail/2_12_1_1.yml +0 -78
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/1_12_2_1.yml +0 -233
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_large/2_12_2_1.yml +0 -78
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/1_12_3_1.yml +0 -235
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_medium/2_12_3_1.yml +0 -73
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/1_12_4_1.yml +0 -234
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Vimeo/with_video_141349194/thumbnail_small/2_12_4_1.yml +0 -77
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_invalid_video/_available_/1_2_2_1_1.yml +0 -75
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -79
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_duration/1_4_7_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_height/1_4_9_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_large/1_4_12_1.yml +0 -86
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_medium/1_4_11_1.yml +0 -86
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_thumbnail_small/1_4_10_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_title/1_4_6_1.yml +0 -86
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_pxonqr42is/_width/1_4_8_1.yml +0 -86
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_duration/1_3_7_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_height/1_3_9_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail/1_3_15_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_large/1_3_12_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_medium/1_3_11_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_thumbnail_small/1_3_10_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_title/1_3_6_1.yml +0 -85
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Wistia/with_video_rs1me54mpw/_width/1_3_8_1.yml +0 -87
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/1_2_2_1_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_available_/2_2_2_1_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/1_2_2_11_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_date/2_2_2_11_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/1_2_2_8_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_description/2_2_2_8_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/1_2_2_10_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_duration/2_2_2_10_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/1_2_2_9_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_keywords/2_2_2_9_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/1_2_2_7_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_title/2_2_2_7_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/1_2_2_18_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_unavailable_video/_view_count/2_2_2_18_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/1_2_1_1_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_valid_video/_available_/2_2_1_1_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/1_2_3_1_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/_available_/with_video_removed_because_of_copyright_claim/_available_/2_2_3_1_1.yml +0 -114
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_a_video_without_description/_description/1_1_1_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_date/should_return_date_video_was_posted.yml +0 -249
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/1_17_7_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_description/2_17_7_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/1_17_9_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_duration/2_17_9_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/1_17_8_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_keywords/2_17_8_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/1_17_6_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_title/2_17_6_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/1_17_17_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_full_screen_video_URLs/_view_count/2_17_17_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/1_3_6_1.yml +0 -115
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author/2_3_6_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/1_3_7_1.yml +0 -115
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_thumbnail/2_3_7_1.yml +0 -335
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/1_3_8_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/2_3_8_1.yml +0 -335
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_author_url/can_be_called_twice_and_receive_the_same_value.yml +0 -391
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_date/should_return_date_video_was_posted.yml +0 -243
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/1_3_10_1.yml +0 -60
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_description/2_3_10_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/1_3_12_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_duration/2_3_12_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/1_3_11_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_keywords/2_3_11_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/1_3_9_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_title/2_3_9_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/1_3_21_1.yml +0 -59
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_Youtube/with_video_mZqGqE0D0n4/_view_count/2_3_21_1.yml +0 -187
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_invalid_playlist/_available_/1_2_2_1_1.yml +0 -120
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_list_url/_available_/1_2_3_1_1.yml +0 -154
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/_available_/with_valid_playlist/_available_/1_2_1_1_1.yml +0 -154
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author/1_3_21_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_thumbnail/1_3_22_1.yml +0 -274
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_author_url/1_3_23_1.yml +0 -274
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_description/1_3_7_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_keywords/1_3_8_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail/1_3_18_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large/1_3_15_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_large_2x/1_3_16_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_maxres/1_3_17_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_medium/1_3_14_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_thumbnail_small/1_3_13_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_title/1_3_6_1.yml +0 -165
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_PL9hW1uS6HUftLdHI6RIsaf/_videos/returns_list_of_videos_in_playlist.yml +0 -112
- data/spec/fixtures/vcr_cassettes/VideoInfo_Providers_YoutubePlaylist/with_playlist_that_does_not_exist_in_embed_path/_videos/1_4_2_1.yml +0 -114
- data/spec/lib/video_info/provider_spec.rb +0 -80
- data/spec/lib/video_info/providers/dailymotion_spec.rb +0 -204
- data/spec/lib/video_info/providers/vimeo_spec.rb +0 -338
- data/spec/lib/video_info/providers/wistia_spec.rb +0 -207
- data/spec/lib/video_info/providers/youtube_playlist_spec.rb +0 -240
- data/spec/lib/video_info/providers/youtube_scraper_spec.rb +0 -14
- data/spec/lib/video_info/providers/youtube_spec.rb +0 -599
- data/spec/lib/video_info_spec.rb +0 -102
- data/spec/spec_helper.rb +0 -31
@@ -1,338 +0,0 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
[nil, ENV["VIMEO_ACCESS_TOKEN"] || 'vimeo_access_token'].each do |api_key|
|
4
|
-
describe VideoInfo::Providers::Vimeo, :vcr do
|
5
|
-
before(:all) do
|
6
|
-
VideoInfo.provider_api_keys = { vimeo: api_key }
|
7
|
-
end
|
8
|
-
|
9
|
-
describe '.usable?' do
|
10
|
-
subject { VideoInfo::Providers::Vimeo.usable?(url) }
|
11
|
-
|
12
|
-
context 'with vimeo url' do
|
13
|
-
let(:url) { 'http://www.vimeo.com/898029' }
|
14
|
-
it { is_expected.to be_truthy }
|
15
|
-
end
|
16
|
-
|
17
|
-
context 'with Vimeo OnDemand url' do
|
18
|
-
let(:url) { 'https://vimeo.com/ondemand/less/101677664' }
|
19
|
-
it { is_expected.to be_truthy }
|
20
|
-
end
|
21
|
-
|
22
|
-
context 'with Vimeo Channels url' do
|
23
|
-
let(:url) { 'https://vimeo.com/channels/any_channel/111431415' }
|
24
|
-
it { is_expected.to be_truthy }
|
25
|
-
end
|
26
|
-
|
27
|
-
context 'with Vimeo Review url' do
|
28
|
-
video_url = 'https://vimeo.com/user39798190/review/126641548/8a56234e32'
|
29
|
-
let(:url) { video_url }
|
30
|
-
it { is_expected.to be_truthy }
|
31
|
-
end
|
32
|
-
|
33
|
-
context 'with vimeo album url' do
|
34
|
-
let(:url) { 'http://vimeo.com/album/2755718' }
|
35
|
-
it { is_expected.to be_falsey }
|
36
|
-
end
|
37
|
-
|
38
|
-
context 'with vimeo hubnub embed url' do
|
39
|
-
let(:url) { 'http://player.vimeo.com/hubnut/album/2755718' }
|
40
|
-
it { is_expected.to be_falsey }
|
41
|
-
end
|
42
|
-
|
43
|
-
context 'with other url' do
|
44
|
-
let(:url) { 'http://www.youtube.com/898029' }
|
45
|
-
it { is_expected.to be_falsey }
|
46
|
-
end
|
47
|
-
end
|
48
|
-
|
49
|
-
describe '#available?' do
|
50
|
-
context 'with valid video' do
|
51
|
-
subject { VideoInfo.new('http://vimeo.com/98605382'.freeze) }
|
52
|
-
|
53
|
-
describe '#available?' do
|
54
|
-
it { is_expected.to be_available }
|
55
|
-
end
|
56
|
-
end
|
57
|
-
|
58
|
-
context "with 'this video does not exist' video" do
|
59
|
-
subject { VideoInfo.new('http://vimeo.com/59312311') }
|
60
|
-
|
61
|
-
describe '#available?' do
|
62
|
-
it { is_expected.to_not be_available }
|
63
|
-
end
|
64
|
-
end
|
65
|
-
|
66
|
-
context "with 'password required' video" do
|
67
|
-
subject { VideoInfo.new('http://vimeo.com/74636562') }
|
68
|
-
|
69
|
-
describe '#available?' do
|
70
|
-
it { is_expected.to_not be_available }
|
71
|
-
end
|
72
|
-
end
|
73
|
-
end
|
74
|
-
|
75
|
-
context 'with video 136971428' do
|
76
|
-
subject { VideoInfo.new('https://vimeo.com/136971428') }
|
77
|
-
|
78
|
-
describe '#provider' do
|
79
|
-
subject { super().provider }
|
80
|
-
it { is_expected.to eq 'Vimeo' }
|
81
|
-
end
|
82
|
-
|
83
|
-
describe '#video_id' do
|
84
|
-
subject { super().video_id }
|
85
|
-
it { is_expected.to eq '136971428' }
|
86
|
-
end
|
87
|
-
|
88
|
-
describe '#url' do
|
89
|
-
subject { super().url }
|
90
|
-
it { is_expected.to eq 'https://vimeo.com/136971428' }
|
91
|
-
end
|
92
|
-
|
93
|
-
describe '#embed_url' do
|
94
|
-
subject { super().embed_url }
|
95
|
-
it { is_expected.to eq '//player.vimeo.com/video/136971428' }
|
96
|
-
end
|
97
|
-
|
98
|
-
describe '#embed_code' do
|
99
|
-
subject { super().embed_code }
|
100
|
-
embed_code = '<iframe src="//player.vimeo.com/video/136971428?' \
|
101
|
-
'title=0&byline=0&portrait=0&autoplay=0" ' \
|
102
|
-
'frameborder="0"></iframe>'
|
103
|
-
it { is_expected.to eq embed_code }
|
104
|
-
end
|
105
|
-
|
106
|
-
describe '#title' do
|
107
|
-
subject { super().title }
|
108
|
-
it { is_expected.to eq "Deafheaven - 'New Bermuda' Trailer" }
|
109
|
-
end
|
110
|
-
|
111
|
-
describe '#description' do
|
112
|
-
subject { super().description }
|
113
|
-
description = "'New Bermuda,' the upcoming album from Deafheaven, " \
|
114
|
-
'is available October 2nd'
|
115
|
-
it { is_expected.to eq description }
|
116
|
-
end
|
117
|
-
|
118
|
-
describe '#keywords' do
|
119
|
-
subject { super().keywords }
|
120
|
-
it 'should return a string list of keywords' do
|
121
|
-
keywords_list = []
|
122
|
-
is_expected.to eq keywords_list
|
123
|
-
end
|
124
|
-
end
|
125
|
-
|
126
|
-
describe '#duration' do
|
127
|
-
subject { super().duration }
|
128
|
-
it { is_expected.to eq 59 }
|
129
|
-
end
|
130
|
-
|
131
|
-
describe '#width' do
|
132
|
-
subject { super().width }
|
133
|
-
it { is_expected.to eq 1280 }
|
134
|
-
end
|
135
|
-
|
136
|
-
describe '#height' do
|
137
|
-
subject { super().height }
|
138
|
-
it { is_expected.to eq 720 }
|
139
|
-
end
|
140
|
-
|
141
|
-
describe '#date' do
|
142
|
-
subject { super().date }
|
143
|
-
it 'should have correct upload date' do
|
144
|
-
is_expected.to eq Time.parse('2015-08-21T21:37:43+00:00',
|
145
|
-
Time.now.utc).utc
|
146
|
-
end
|
147
|
-
end
|
148
|
-
|
149
|
-
describe '#thumbnail_small' do
|
150
|
-
subject { super().thumbnail_small }
|
151
|
-
thumbnail_url = 'https://i.vimeocdn.com/video/531688239_100x75.jpg'
|
152
|
-
it { is_expected.to eq thumbnail_url }
|
153
|
-
end
|
154
|
-
|
155
|
-
describe '#thumbnail_medium' do
|
156
|
-
subject { super().thumbnail_medium }
|
157
|
-
thumbnail_url = 'https://i.vimeocdn.com/video/531688239_200x150.jpg'
|
158
|
-
it { is_expected.to eq thumbnail_url }
|
159
|
-
end
|
160
|
-
|
161
|
-
describe '#thumbnail_large' do
|
162
|
-
subject { super().thumbnail_large }
|
163
|
-
thumbnail_url = 'https://i.vimeocdn.com/video/531688239_640.jpg'
|
164
|
-
it { is_expected.to eq thumbnail_url }
|
165
|
-
end
|
166
|
-
|
167
|
-
describe '#thumbnail_large_2x' do
|
168
|
-
subject { super().thumbnail_large_2x }
|
169
|
-
it { is_expected.to be_nil }
|
170
|
-
end
|
171
|
-
|
172
|
-
describe '#thumbnail_maxres' do
|
173
|
-
subject { super().thumbnail_maxres }
|
174
|
-
it { is_expected.to be_nil }
|
175
|
-
end
|
176
|
-
|
177
|
-
describe '#thumbnail' do
|
178
|
-
subject { super().thumbnail }
|
179
|
-
thumbnail_url = 'https://i.vimeocdn.com/video/531688239_640.jpg'
|
180
|
-
it { is_expected.to eq thumbnail_url }
|
181
|
-
end
|
182
|
-
|
183
|
-
describe '#author_thumbnail' do
|
184
|
-
subject { super().author_thumbnail }
|
185
|
-
|
186
|
-
#
|
187
|
-
# For some reason, the scraper returns an image URL without
|
188
|
-
# a file extension. This will likely change in the future.
|
189
|
-
#
|
190
|
-
|
191
|
-
thumbnail_url = 'https://i.vimeocdn.com/portrait/14790276_75x75'
|
192
|
-
|
193
|
-
if api_key
|
194
|
-
thumbnail_url += '.jpg'
|
195
|
-
end
|
196
|
-
|
197
|
-
it { is_expected.to eq thumbnail_url }
|
198
|
-
end
|
199
|
-
|
200
|
-
describe '#author' do
|
201
|
-
subject { super().author }
|
202
|
-
it { is_expected.to eq 'Anti Records' }
|
203
|
-
end
|
204
|
-
|
205
|
-
describe '#author_url' do
|
206
|
-
subject { super().author_url }
|
207
|
-
it { is_expected.to eq 'https://vimeo.com/antirecords' }
|
208
|
-
end
|
209
|
-
|
210
|
-
describe '#view_count' do
|
211
|
-
subject { super().view_count }
|
212
|
-
it { is_expected.to be > 80 }
|
213
|
-
end
|
214
|
-
end
|
215
|
-
|
216
|
-
context 'with video 898029 and url_attributes' do
|
217
|
-
subject { VideoInfo.new('http://www.vimeo.com/898029') }
|
218
|
-
|
219
|
-
it 'should add URL attribute' do
|
220
|
-
attributes = { autoplay: 1 }
|
221
|
-
embed_code = subject.embed_code(url_attributes: attributes)
|
222
|
-
expect(embed_code).to match(/autoplay=1/)
|
223
|
-
end
|
224
|
-
end
|
225
|
-
|
226
|
-
context 'with video 898029 and iframe_attributes' do
|
227
|
-
subject { VideoInfo.new('http://www.vimeo.com/898029') }
|
228
|
-
|
229
|
-
it 'should have proper dimensions' do
|
230
|
-
dimensions = { width: 800, height: 600 }
|
231
|
-
embed_code = subject.embed_code(iframe_attributes: dimensions)
|
232
|
-
expect(embed_code).to match(/width="800"/)
|
233
|
-
expect(embed_code).to match(/height="600"/)
|
234
|
-
end
|
235
|
-
end
|
236
|
-
|
237
|
-
context 'with video 898029 in /group/ url' do
|
238
|
-
subject { VideoInfo.new('http://vimeo.com/groups/1234/videos/898029') }
|
239
|
-
|
240
|
-
describe '#provider' do
|
241
|
-
subject { super().provider }
|
242
|
-
it { is_expected.to eq 'Vimeo' }
|
243
|
-
end
|
244
|
-
|
245
|
-
describe '#video_id' do
|
246
|
-
subject { super().video_id }
|
247
|
-
it { is_expected.to eq '898029' }
|
248
|
-
end
|
249
|
-
end
|
250
|
-
|
251
|
-
context 'with video 898029 in /group/ url' do
|
252
|
-
subject { VideoInfo.new('http://player.vimeo.com/video/898029') }
|
253
|
-
|
254
|
-
describe '#provider' do
|
255
|
-
subject { super().provider }
|
256
|
-
it { is_expected.to eq 'Vimeo' }
|
257
|
-
end
|
258
|
-
|
259
|
-
describe '#video_id' do
|
260
|
-
subject { super().video_id }
|
261
|
-
it { is_expected.to eq '898029' }
|
262
|
-
end
|
263
|
-
end
|
264
|
-
|
265
|
-
context 'with video 898029 in text' do
|
266
|
-
video_url_in_text = '<a href="http://www.vimeo.com/898029">' \
|
267
|
-
'http://www.vimeo.com/898029</a>'
|
268
|
-
subject { VideoInfo.new(video_url_in_text) }
|
269
|
-
|
270
|
-
describe '#provider' do
|
271
|
-
subject { super().provider }
|
272
|
-
it { is_expected.to eq 'Vimeo' }
|
273
|
-
end
|
274
|
-
|
275
|
-
describe '#video_id' do
|
276
|
-
subject { super().video_id }
|
277
|
-
it { is_expected.to eq '898029' }
|
278
|
-
end
|
279
|
-
end
|
280
|
-
|
281
|
-
context 'with video 101677664 in /ondemand/ url' do
|
282
|
-
subject { VideoInfo.new('https://vimeo.com/ondemand/less/101677664') }
|
283
|
-
|
284
|
-
its(:provider) { should eq 'Vimeo' }
|
285
|
-
its(:video_id) { should eq '101677664' }
|
286
|
-
end
|
287
|
-
|
288
|
-
context 'with video 111431415 in /channels/*/ url' do
|
289
|
-
video_url = 'https://vimeo.com/channels/some_channel1/111431415'
|
290
|
-
subject { VideoInfo.new(video_url) }
|
291
|
-
|
292
|
-
its(:provider) { should eq 'Vimeo' }
|
293
|
-
its(:video_id) { should eq '111431415' }
|
294
|
-
end
|
295
|
-
|
296
|
-
context 'with video 126641548 in /user*/review/126641548/* url' do
|
297
|
-
video_url = 'http://www.vimeo.com/user39798190/review/126641548/8a56234e32'
|
298
|
-
subject { VideoInfo.new(video_url) }
|
299
|
-
|
300
|
-
its(:provider) { should eq 'Vimeo' }
|
301
|
-
its(:video_id) { should eq '126641548' }
|
302
|
-
end
|
303
|
-
|
304
|
-
context 'with video 141349194' do
|
305
|
-
video_url = 'https://vimeo.com/141349194'
|
306
|
-
subject { VideoInfo.new(video_url) }
|
307
|
-
|
308
|
-
its(:thumbnail) { should eq 'https://i.vimeocdn.com/video/538320894_640.jpg' }
|
309
|
-
its(:thumbnail_large) { should eq 'https://i.vimeocdn.com/video/538320894_640.jpg' }
|
310
|
-
its(:thumbnail_medium) { should eq 'https://i.vimeocdn.com/video/538320894_200x150.jpg' }
|
311
|
-
its(:thumbnail_small) { should eq 'https://i.vimeocdn.com/video/538320894_100x75.jpg' }
|
312
|
-
|
313
|
-
end
|
314
|
-
|
315
|
-
context 'with unavailable video' do
|
316
|
-
if api_key.nil?
|
317
|
-
video_url = 'https://vimeo.com/0812455'
|
318
|
-
subject { VideoInfo.new(video_url) }
|
319
|
-
|
320
|
-
its(:available?) { should be false }
|
321
|
-
its(:author) { should be nil }
|
322
|
-
its(:author_thumbnail) { should be nil }
|
323
|
-
its(:author_url) { should be nil }
|
324
|
-
its(:title) { should be nil }
|
325
|
-
its(:description) { should be nil }
|
326
|
-
its(:date) { should be nil }
|
327
|
-
its(:duration) { should be nil }
|
328
|
-
its(:keywords) { should be nil }
|
329
|
-
its(:height) { should be nil }
|
330
|
-
its(:width) { should be nil }
|
331
|
-
its(:thumbnail_small) { should be nil }
|
332
|
-
its(:thumbnail_medium) { should be nil }
|
333
|
-
its(:thumbnail_large) { should be nil }
|
334
|
-
its(:view_count) { should be nil }
|
335
|
-
end
|
336
|
-
end
|
337
|
-
end
|
338
|
-
end
|
@@ -1,207 +0,0 @@
|
|
1
|
-
# encoding: UTF-8
|
2
|
-
require 'spec_helper'
|
3
|
-
|
4
|
-
describe VideoInfo::Providers::Wistia, :vcr do
|
5
|
-
describe '.usable?' do
|
6
|
-
subject { VideoInfo::Providers::Wistia.usable?(url) }
|
7
|
-
|
8
|
-
context 'with wistia url' do
|
9
|
-
let(:url) { 'http://fast.wistia.net/embed/iframe/rs1me54mpw' }
|
10
|
-
it { is_expected.to be_truthy }
|
11
|
-
end
|
12
|
-
|
13
|
-
context 'with other url' do
|
14
|
-
let(:url) { 'http://www.youtube.com/898029' }
|
15
|
-
it { is_expected.to be_falsey }
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
describe '#available?' do
|
20
|
-
context 'with valid video' do
|
21
|
-
video_url = 'http://fast.wistia.net/embed/iframe/rs1me54mpw'
|
22
|
-
subject { VideoInfo.new(video_url.freeze) }
|
23
|
-
|
24
|
-
describe '#available?' do
|
25
|
-
subject { super().available? }
|
26
|
-
it { is_expected.to be_truthy }
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
context 'with invalid video' do
|
31
|
-
subject { VideoInfo.new('http://fast.wistia.net/embed/iframe/no_video') }
|
32
|
-
|
33
|
-
describe '#available?' do
|
34
|
-
subject { super().available? }
|
35
|
-
it { is_expected.to be_falsey }
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|
39
|
-
|
40
|
-
context 'with video rs1me54mpw' do
|
41
|
-
subject { VideoInfo.new('http://fast.wistia.net/embed/iframe/rs1me54mpw') }
|
42
|
-
|
43
|
-
describe '#provider' do
|
44
|
-
subject { super().provider }
|
45
|
-
it { is_expected.to eq 'Wistia' }
|
46
|
-
end
|
47
|
-
|
48
|
-
describe '#video_id' do
|
49
|
-
subject { super().video_id }
|
50
|
-
it { is_expected.to eq 'rs1me54mpw' }
|
51
|
-
end
|
52
|
-
|
53
|
-
describe '#url' do
|
54
|
-
subject { super().url }
|
55
|
-
it { is_expected.to eq 'http://fast.wistia.net/embed/iframe/rs1me54mpw' }
|
56
|
-
end
|
57
|
-
|
58
|
-
describe '#embed_url' do
|
59
|
-
subject { super().embed_url }
|
60
|
-
it { is_expected.to eq '//fast.wistia.net/embed/iframe/rs1me54mpw' }
|
61
|
-
end
|
62
|
-
|
63
|
-
describe '#embed_code' do
|
64
|
-
subject { super().embed_code }
|
65
|
-
embed_code = '<iframe src="//fast.wistia.net/embed/iframe/rs1me54mpw" '\
|
66
|
-
'frameborder="0"></iframe>'
|
67
|
-
it { is_expected.to eq embed_code }
|
68
|
-
end
|
69
|
-
|
70
|
-
describe '#title' do
|
71
|
-
subject { super().title }
|
72
|
-
it { is_expected.to eq 'Lance Kalish - Yes To Group' }
|
73
|
-
end
|
74
|
-
|
75
|
-
describe '#duration' do
|
76
|
-
subject { super().duration }
|
77
|
-
it { is_expected.to eq 1214.83 }
|
78
|
-
end
|
79
|
-
|
80
|
-
describe '#width' do
|
81
|
-
subject { super().width }
|
82
|
-
it { is_expected.to eq 960 }
|
83
|
-
end
|
84
|
-
|
85
|
-
describe '#height' do
|
86
|
-
subject { super().height }
|
87
|
-
it { is_expected.to eq 540 }
|
88
|
-
end
|
89
|
-
|
90
|
-
describe '#thumbnail_small' do
|
91
|
-
subject { super().thumbnail_small }
|
92
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
93
|
-
'dc005e6a7583a25c4b7c284c08afc42fb67fdb95.jpg' \
|
94
|
-
'?image_crop_resized=960x540'
|
95
|
-
it { is_expected.to eq thumbnail_url }
|
96
|
-
end
|
97
|
-
|
98
|
-
describe '#thumbnail_medium' do
|
99
|
-
subject { super().thumbnail_small }
|
100
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
101
|
-
'dc005e6a7583a25c4b7c284c08afc42fb67fdb95.jpg?' \
|
102
|
-
'image_crop_resized=960x540'
|
103
|
-
it { is_expected.to eq thumbnail_url }
|
104
|
-
end
|
105
|
-
|
106
|
-
describe '#thumbnail_large' do
|
107
|
-
subject { super().thumbnail_small }
|
108
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
109
|
-
'dc005e6a7583a25c4b7c284c08afc42fb67fdb95.jpg' \
|
110
|
-
'?image_crop_resized=960x540'
|
111
|
-
it { is_expected.to eq thumbnail_url }
|
112
|
-
end
|
113
|
-
|
114
|
-
describe '#thumbnail_large_2x' do
|
115
|
-
subject { super().thumbnail_large_2x }
|
116
|
-
it { is_expected.to be_nil }
|
117
|
-
end
|
118
|
-
|
119
|
-
describe '#thumbnail_maxres' do
|
120
|
-
subject { super().thumbnail_maxres }
|
121
|
-
it { is_expected.to be_nil }
|
122
|
-
end
|
123
|
-
|
124
|
-
describe '#thumbnail' do
|
125
|
-
subject { super().thumbnail }
|
126
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
127
|
-
'dc005e6a7583a25c4b7c284c08afc42fb67fdb95.jpg' \
|
128
|
-
'?image_crop_resized=960x540'
|
129
|
-
it { is_expected.to eq thumbnail_url }
|
130
|
-
end
|
131
|
-
end
|
132
|
-
|
133
|
-
context 'with video pxonqr42is' do
|
134
|
-
subject { VideoInfo.new('http://fast.wistia.com/embed/medias/pxonqr42is') }
|
135
|
-
|
136
|
-
describe '#provider' do
|
137
|
-
subject { super().provider }
|
138
|
-
it { is_expected.to eq 'Wistia' }
|
139
|
-
end
|
140
|
-
|
141
|
-
describe '#video_id' do
|
142
|
-
subject { super().video_id }
|
143
|
-
it { is_expected.to eq 'pxonqr42is' }
|
144
|
-
end
|
145
|
-
|
146
|
-
describe '#url' do
|
147
|
-
subject { super().url }
|
148
|
-
it { is_expected.to eq 'http://fast.wistia.com/embed/medias/pxonqr42is' }
|
149
|
-
end
|
150
|
-
|
151
|
-
describe '#embed_url' do
|
152
|
-
subject { super().embed_url }
|
153
|
-
it { is_expected.to eq '//fast.wistia.net/embed/iframe/pxonqr42is' }
|
154
|
-
end
|
155
|
-
|
156
|
-
describe '#embed_code' do
|
157
|
-
subject { super().embed_code }
|
158
|
-
embed_code = '<iframe src="//fast.wistia.net/embed/iframe/pxonqr42is" ' \
|
159
|
-
'frameborder="0"></iframe>'
|
160
|
-
it { is_expected.to eq embed_code }
|
161
|
-
end
|
162
|
-
|
163
|
-
describe '#title' do
|
164
|
-
subject { super().title }
|
165
|
-
it { is_expected.to eq 'Understanding Analytics' }
|
166
|
-
end
|
167
|
-
|
168
|
-
describe '#duration' do
|
169
|
-
subject { super().duration }
|
170
|
-
it { is_expected.to eq 250.428 }
|
171
|
-
end
|
172
|
-
|
173
|
-
describe '#width' do
|
174
|
-
subject { super().width }
|
175
|
-
it { is_expected.to eq 960 }
|
176
|
-
end
|
177
|
-
|
178
|
-
describe '#height' do
|
179
|
-
subject { super().height }
|
180
|
-
it { is_expected.to eq 540 }
|
181
|
-
end
|
182
|
-
|
183
|
-
describe '#thumbnail_small' do
|
184
|
-
subject { super().thumbnail_small }
|
185
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
186
|
-
'0fccbdc60ade35723f79f1c002bc61b135b610fa.jpg' \
|
187
|
-
'?image_crop_resized=960x540'
|
188
|
-
it { is_expected.to eq thumbnail_url }
|
189
|
-
end
|
190
|
-
|
191
|
-
describe '#thumbnail_medium' do
|
192
|
-
subject { super().thumbnail_small }
|
193
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
194
|
-
'0fccbdc60ade35723f79f1c002bc61b135b610fa.jpg' \
|
195
|
-
'?image_crop_resized=960x540'
|
196
|
-
it { is_expected.to eq thumbnail_url }
|
197
|
-
end
|
198
|
-
|
199
|
-
describe '#thumbnail_large' do
|
200
|
-
subject { super().thumbnail_small }
|
201
|
-
thumbnail_url = 'https://embed-ssl.wistia.com/deliveries/' \
|
202
|
-
'0fccbdc60ade35723f79f1c002bc61b135b610fa.jpg' \
|
203
|
-
'?image_crop_resized=960x540'
|
204
|
-
it { is_expected.to eq thumbnail_url }
|
205
|
-
end
|
206
|
-
end
|
207
|
-
end
|