lumiere 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/lumiere/version.rb +1 -1
- data/lib/provider/dailymotion/dailymotion.rb +2 -2
- data/lib/provider/vimeo/vimeo.rb +2 -2
- data/lib/provider/vimeoplaylist/vimeoplaylist.rb +2 -2
- data/lib/provider/youtube/youtube.rb +2 -2
- data/lib/provider/youtubeplaylist/youtubeplaylist.rb +2 -2
- data/lib/provider.rb +10 -2
- metadata +42 -24
- checksums.yaml +0 -7
data/lib/lumiere/version.rb
CHANGED
@@ -26,11 +26,11 @@ class Dailymotion < Provider
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def embed_url
|
29
|
-
"
|
29
|
+
"//www.dailymotion.com/embed/video/#{video_id}"
|
30
30
|
end
|
31
31
|
|
32
32
|
def embed_code
|
33
|
-
"<iframe frameborder=\"0\" src=\"
|
33
|
+
"<iframe frameborder=\"0\" src=\"#{embed_url}\" allowfullscreen></iframe>"
|
34
34
|
end
|
35
35
|
|
36
36
|
def title
|
data/lib/provider/vimeo/vimeo.rb
CHANGED
@@ -31,11 +31,11 @@ class Vimeo < Provider
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def embed_url
|
34
|
-
"
|
34
|
+
"//player.vimeo.com/video/#{video_id}"
|
35
35
|
end
|
36
36
|
|
37
37
|
def embed_code
|
38
|
-
"<iframe src=\"
|
38
|
+
"<iframe src=\"#{embed_url}\" frameborder=\"0\" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe>"
|
39
39
|
end
|
40
40
|
|
41
41
|
def title
|
@@ -29,11 +29,11 @@ class VimeoPlaylist < Provider
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def embed_url
|
32
|
-
"
|
32
|
+
"//player.vimeo.com/hubnut/album/#{playlist_id}"
|
33
33
|
end
|
34
34
|
|
35
35
|
def embed_code
|
36
|
-
"<iframe src=\"
|
36
|
+
"<iframe src=\"#{embed_url}?autoplay=0&byline=0&portrait=0&title=0\" frameborder=\"0\"></iframe>"
|
37
37
|
end
|
38
38
|
|
39
39
|
def title
|
@@ -31,11 +31,11 @@ class YouTube < Provider
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def embed_url
|
34
|
-
"
|
34
|
+
"//www.youtube.com/embed/#{video_id}"
|
35
35
|
end
|
36
36
|
|
37
37
|
def embed_code
|
38
|
-
"<iframe src=\"
|
38
|
+
"<iframe src=\"#{embed_url}\" frameborder=\"0\" allowfullscreen></iframe>"
|
39
39
|
end
|
40
40
|
|
41
41
|
def thumbnail_small
|
@@ -32,11 +32,11 @@ class YouTubePlaylist < Provider
|
|
32
32
|
end
|
33
33
|
|
34
34
|
def embed_url
|
35
|
-
"
|
35
|
+
"//youtube.com/embed/?list=#{playlist_id}"
|
36
36
|
end
|
37
37
|
|
38
38
|
def embed_code
|
39
|
-
"<iframe src=\"
|
39
|
+
"<iframe src=\"#{embed_url}\" frameborder=\"0\" allowfullscreen></iframe>"
|
40
40
|
end
|
41
41
|
|
42
42
|
def videos
|
data/lib/provider.rb
CHANGED
@@ -75,8 +75,7 @@ module Lumiere
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def accessible?
|
78
|
-
|
79
|
-
@remote_status ||= !%w[403 404].include?(code)
|
78
|
+
response.is_a?(Net::HTTPSuccess)
|
80
79
|
end
|
81
80
|
|
82
81
|
def ==(other)
|
@@ -84,5 +83,14 @@ module Lumiere
|
|
84
83
|
video_id == other.video_id
|
85
84
|
end
|
86
85
|
end
|
86
|
+
|
87
|
+
private
|
88
|
+
|
89
|
+
def response
|
90
|
+
uri = URI(api_url)
|
91
|
+
Net::HTTP.start(uri.hostname, uri.port, {use_ssl: uri.scheme == 'https'}) {|http|
|
92
|
+
http.request_get(uri.request_uri)
|
93
|
+
}
|
94
|
+
end
|
87
95
|
end
|
88
96
|
end
|
metadata
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lumiere
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Karl Entwistle
|
@@ -13,113 +14,129 @@ dependencies:
|
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: representable
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
|
-
- -
|
19
|
+
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
19
21
|
version: 1.8.0
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
|
-
- -
|
27
|
+
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: 1.8.0
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: virtus
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
|
-
- -
|
35
|
+
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
33
37
|
version: 0.5.0
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
|
-
- -
|
43
|
+
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
40
45
|
version: 0.5.0
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: bundler
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
|
-
- -
|
51
|
+
- - ~>
|
46
52
|
- !ruby/object:Gem::Version
|
47
53
|
version: '1.6'
|
48
54
|
type: :development
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
|
-
- -
|
59
|
+
- - ~>
|
53
60
|
- !ruby/object:Gem::Version
|
54
61
|
version: '1.6'
|
55
62
|
- !ruby/object:Gem::Dependency
|
56
63
|
name: rake
|
57
64
|
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
58
66
|
requirements:
|
59
|
-
- -
|
67
|
+
- - ! '>='
|
60
68
|
- !ruby/object:Gem::Version
|
61
69
|
version: '0'
|
62
70
|
type: :development
|
63
71
|
prerelease: false
|
64
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
65
74
|
requirements:
|
66
|
-
- -
|
75
|
+
- - ! '>='
|
67
76
|
- !ruby/object:Gem::Version
|
68
77
|
version: '0'
|
69
78
|
- !ruby/object:Gem::Dependency
|
70
79
|
name: rspec
|
71
80
|
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
72
82
|
requirements:
|
73
|
-
- -
|
83
|
+
- - ! '>='
|
74
84
|
- !ruby/object:Gem::Version
|
75
85
|
version: '0'
|
76
86
|
type: :development
|
77
87
|
prerelease: false
|
78
88
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
79
90
|
requirements:
|
80
|
-
- -
|
91
|
+
- - ! '>='
|
81
92
|
- !ruby/object:Gem::Version
|
82
93
|
version: '0'
|
83
94
|
- !ruby/object:Gem::Dependency
|
84
95
|
name: webmock
|
85
96
|
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
86
98
|
requirements:
|
87
|
-
- -
|
99
|
+
- - ! '>='
|
88
100
|
- !ruby/object:Gem::Version
|
89
101
|
version: '0'
|
90
102
|
type: :development
|
91
103
|
prerelease: false
|
92
104
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
93
106
|
requirements:
|
94
|
-
- -
|
107
|
+
- - ! '>='
|
95
108
|
- !ruby/object:Gem::Version
|
96
109
|
version: '0'
|
97
110
|
- !ruby/object:Gem::Dependency
|
98
111
|
name: vcr
|
99
112
|
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
100
114
|
requirements:
|
101
|
-
- -
|
115
|
+
- - ! '>='
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
107
122
|
requirements:
|
108
|
-
- -
|
123
|
+
- - ! '>='
|
109
124
|
- !ruby/object:Gem::Version
|
110
125
|
version: '0'
|
111
126
|
- !ruby/object:Gem::Dependency
|
112
127
|
name: activesupport
|
113
128
|
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
114
130
|
requirements:
|
115
|
-
- -
|
131
|
+
- - ! '>='
|
116
132
|
- !ruby/object:Gem::Version
|
117
133
|
version: '0'
|
118
134
|
type: :development
|
119
135
|
prerelease: false
|
120
136
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
121
138
|
requirements:
|
122
|
-
- -
|
139
|
+
- - ! '>='
|
123
140
|
- !ruby/object:Gem::Version
|
124
141
|
version: '0'
|
125
142
|
description: Lumiere fetches metadata from video providers
|
@@ -131,10 +148,9 @@ files:
|
|
131
148
|
- LICENSE.txt
|
132
149
|
- lib/extended_uri.rb
|
133
150
|
- lib/fetcher.rb
|
134
|
-
- lib/lumiere.rb
|
135
151
|
- lib/lumiere/version.rb
|
152
|
+
- lib/lumiere.rb
|
136
153
|
- lib/playlist.rb
|
137
|
-
- lib/provider.rb
|
138
154
|
- lib/provider/dailymotion/dailymotion.rb
|
139
155
|
- lib/provider/dailymotion/representer.rb
|
140
156
|
- lib/provider/vimeo/representer.rb
|
@@ -145,28 +161,30 @@ files:
|
|
145
161
|
- lib/provider/youtube/youtube.rb
|
146
162
|
- lib/provider/youtubeplaylist/representer.rb
|
147
163
|
- lib/provider/youtubeplaylist/youtubeplaylist.rb
|
164
|
+
- lib/provider.rb
|
148
165
|
homepage: https://github.com/karlentwistle/lumiere
|
149
166
|
licenses:
|
150
167
|
- MIT
|
151
|
-
metadata: {}
|
152
168
|
post_install_message:
|
153
169
|
rdoc_options: []
|
154
170
|
require_paths:
|
155
171
|
- lib
|
156
172
|
required_ruby_version: !ruby/object:Gem::Requirement
|
173
|
+
none: false
|
157
174
|
requirements:
|
158
|
-
- -
|
175
|
+
- - ! '>='
|
159
176
|
- !ruby/object:Gem::Version
|
160
177
|
version: 1.9.3
|
161
178
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
179
|
+
none: false
|
162
180
|
requirements:
|
163
|
-
- -
|
181
|
+
- - ! '>='
|
164
182
|
- !ruby/object:Gem::Version
|
165
183
|
version: '0'
|
166
184
|
requirements: []
|
167
185
|
rubyforge_project:
|
168
|
-
rubygems_version:
|
186
|
+
rubygems_version: 1.8.23.2
|
169
187
|
signing_key:
|
170
|
-
specification_version:
|
188
|
+
specification_version: 3
|
171
189
|
summary: Lumiere fetches metadata from video providers
|
172
190
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: 62fa0f81be349c04c0c59893fa3933f82d96b802
|
4
|
-
data.tar.gz: 6cef7cfa92eb369e2400b529ff041f6fb209642e
|
5
|
-
SHA512:
|
6
|
-
metadata.gz: 9047d106b199f42e6b98c47801219421d9207df90914807f55d2c1a12a90ba2ea476461ddced51c6af279c001bb373ef42796f5d51e2d989ccc1fd289576491e
|
7
|
-
data.tar.gz: 4b8ccafdef4ee51c51374fa0211719b323e9a152ab09726ab9003c199bfa5d6d7b2b2c703bdb1e077a9ad6e8703aad8344d3543fbd42a7d18c33528d3d0dc166
|