film_on 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/lib/film_on/base.rb +2 -0
- data/lib/film_on/helpers/channel_helper.rb +16 -0
- data/lib/film_on/helpers/group_helper.rb +14 -0
- data/lib/film_on/services.rb +3 -18
- data/lib/film_on.rb +2 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e807fafd2a9389c0d5aadd5beee263d2d7df225b
|
4
|
+
data.tar.gz: 3c479794f5a7824246f1ddc7d2018b167cb7861d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 687825d8c2c12afc729eca40a6eccc93d0b98150b48990e2b84ea7421d1bdb64853415b0a28cb5fabc4c4429321313188e400c2b1d59ceaa2fb2814ec617f057
|
7
|
+
data.tar.gz: f69e4acf1ca6e935398f68d1d16e5f4c4561cfeae94c20ef35be00312998f9e79f6e4a1748f345c0f3f79e3907bd453f68149898268d4c8d08898206545c233c
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.5
|
data/lib/film_on/base.rb
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
module FilmOn
|
2
|
+
|
3
|
+
module ChannelHelper
|
4
|
+
|
5
|
+
def convert_channel(id,json)
|
6
|
+
hash = JSON.parse(json)
|
7
|
+
FilmOn::Channel.new(hash)
|
8
|
+
end
|
9
|
+
|
10
|
+
def convert_channels(json)
|
11
|
+
hash = JSON.parse(json)
|
12
|
+
hash.map{|ch| FilmOn::Channel.new(ch)}
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
data/lib/film_on/services.rb
CHANGED
@@ -9,12 +9,7 @@ module FilmOn
|
|
9
9
|
@channel[id] = json
|
10
10
|
return json
|
11
11
|
end
|
12
|
-
convert_channel(id, json)
|
13
|
-
end
|
14
|
-
|
15
|
-
def convert_channel(id, json)
|
16
|
-
hash = JSON.parse(json)
|
17
|
-
@channel[id] = FilmOn::Channel.new(hash)
|
12
|
+
@channel[id] = convert_channel(id, json)
|
18
13
|
end
|
19
14
|
|
20
15
|
def channels(opts={})
|
@@ -24,12 +19,7 @@ module FilmOn
|
|
24
19
|
@channels = json
|
25
20
|
return json
|
26
21
|
end
|
27
|
-
convert_channels(json)
|
28
|
-
end
|
29
|
-
|
30
|
-
def convert_channels(json)
|
31
|
-
hash = JSON.parse(json)
|
32
|
-
@channels = hash.map{|ch| FilmOn::Channel.new(ch)}
|
22
|
+
@channels = convert_channels(json)
|
33
23
|
end
|
34
24
|
|
35
25
|
def groups(opts={})
|
@@ -39,12 +29,7 @@ module FilmOn
|
|
39
29
|
@groups = json
|
40
30
|
return json
|
41
31
|
end
|
42
|
-
convert_groups(json)
|
43
|
-
end
|
44
|
-
|
45
|
-
def convert_groups(json)
|
46
|
-
hash = JSON.parse(json)
|
47
|
-
@groups = hash.map{|gr| FilmOn::Group.new(gr)}
|
32
|
+
@groups = convert_groups(json)
|
48
33
|
end
|
49
34
|
|
50
35
|
end
|
data/lib/film_on.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: film_on
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stuart Hanscombe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -114,6 +114,8 @@ files:
|
|
114
114
|
- film_on.gemspec
|
115
115
|
- lib/film_on.rb
|
116
116
|
- lib/film_on/base.rb
|
117
|
+
- lib/film_on/helpers/channel_helper.rb
|
118
|
+
- lib/film_on/helpers/group_helper.rb
|
117
119
|
- lib/film_on/models/channel.rb
|
118
120
|
- lib/film_on/models/group.rb
|
119
121
|
- lib/film_on/models/programme.rb
|