etvnet-seek 0.7.2 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +18 -8
- data/README +1 -1
- data/Rakefile +27 -5
- data/VERSION +1 -1
- data/bin/etvnet-seek +8 -3
- data/etvnet-seek.gemspec +79 -42
- data/lib/etvnet_seek/accessor.rb +64 -0
- data/lib/etvnet_seek/commander.rb +37 -21
- data/lib/etvnet_seek/core/access_page.rb +23 -6
- data/lib/etvnet_seek/core/audio_page.rb +26 -0
- data/lib/etvnet_seek/core/best_hundred_page.rb +20 -0
- data/lib/etvnet_seek/core/browse_media_item.rb +1 -0
- data/lib/etvnet_seek/core/catalog_page.rb +26 -14
- data/lib/etvnet_seek/core/channels_page.rb +6 -2
- data/lib/etvnet_seek/core/group_media_item.rb +2 -0
- data/lib/etvnet_seek/core/group_page.rb +9 -23
- data/lib/etvnet_seek/core/home_page.rb +5 -2
- data/lib/etvnet_seek/core/items_page.rb +140 -0
- data/lib/etvnet_seek/core/items_page_factory.rb +47 -0
- data/lib/etvnet_seek/core/login_page.rb +3 -1
- data/lib/etvnet_seek/core/media_info.rb +3 -18
- data/lib/etvnet_seek/core/media_item.rb +10 -2
- data/lib/etvnet_seek/core/media_page.rb +54 -27
- data/lib/etvnet_seek/core/new_item.rb +2 -0
- data/lib/etvnet_seek/core/new_items_page.rb +4 -1
- data/lib/etvnet_seek/core/page.rb +2 -0
- data/lib/etvnet_seek/core/premiere_page.rb +7 -0
- data/lib/etvnet_seek/core/radio_page.rb +23 -0
- data/lib/etvnet_seek/core/search_page.rb +3 -33
- data/lib/etvnet_seek/core/service_call.rb +34 -6
- data/lib/etvnet_seek/core/top_this_week_page.rb +20 -0
- data/lib/etvnet_seek/etvnet_seek.rb +1 -4
- data/lib/etvnet_seek/main.rb +113 -84
- data/spec/etvnet_seek_spec.rb +10 -8
- data/spec/spec_helper.rb +3 -0
- data/spec/unit/pages_spec.rb +77 -0
- metadata +182 -32
- data/lib/etvnet_seek/core/base_page.rb +0 -43
- data/lib/etvnet_seek/core/page_factory.rb +0 -51
@@ -1,51 +0,0 @@
|
|
1
|
-
require 'etvnet_seek/core/media_item'
|
2
|
-
require 'etvnet_seek/core/new_item'
|
3
|
-
require 'etvnet_seek/core/catalog_item'
|
4
|
-
require 'etvnet_seek/core/media_info'
|
5
|
-
require 'etvnet_seek/core/browse_media_item'
|
6
|
-
require 'etvnet_seek/core/channel_media_item'
|
7
|
-
require 'etvnet_seek/core/group_media_item'
|
8
|
-
|
9
|
-
require 'etvnet_seek/core/service_call'
|
10
|
-
require 'etvnet_seek/core/page'
|
11
|
-
require 'etvnet_seek/core/home_page'
|
12
|
-
require 'etvnet_seek/core/base_page'
|
13
|
-
require 'etvnet_seek/core/media_page'
|
14
|
-
require 'etvnet_seek/core/search_page'
|
15
|
-
require 'etvnet_seek/core/channels_page'
|
16
|
-
require 'etvnet_seek/core/catalog_page'
|
17
|
-
require 'etvnet_seek/core/new_items_page'
|
18
|
-
require 'etvnet_seek/core/group_page'
|
19
|
-
require 'etvnet_seek/core/access_page'
|
20
|
-
require 'etvnet_seek/core/login_page'
|
21
|
-
|
22
|
-
class PageFactory
|
23
|
-
def self.create mode, params = []
|
24
|
-
url = (mode == 'search') ? nil : (params.class == String ? params : params[0])
|
25
|
-
|
26
|
-
case mode
|
27
|
-
when 'search' then
|
28
|
-
SearchPage.new *params
|
29
|
-
when 'main' then
|
30
|
-
HomePage.new
|
31
|
-
when 'channels' then
|
32
|
-
ChannelsPage.new
|
33
|
-
when 'catalog' then
|
34
|
-
CatalogPage.new
|
35
|
-
when 'best_hundred' then
|
36
|
-
BestHundredPage.new
|
37
|
-
when 'new_items' then
|
38
|
-
NewItemsPage.new
|
39
|
-
when 'premiere' then
|
40
|
-
PremierePage.new
|
41
|
-
when 'media' then
|
42
|
-
MediaPage.new url
|
43
|
-
when 'access' then
|
44
|
-
AccessPage.new
|
45
|
-
when 'login' then
|
46
|
-
LoginPage.new
|
47
|
-
else
|
48
|
-
nil
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|