kiosk 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/kiosk/prospective_node.rb +1 -1
- data/lib/kiosk/version.rb +1 -1
- metadata +2 -3
- data/lib/kiosk/word_press/video.rb +0 -36
data/lib/kiosk/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kiosk
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: nokogiri
|
@@ -144,7 +144,6 @@ files:
|
|
144
144
|
- lib/kiosk/word_press/post.rb
|
145
145
|
- lib/kiosk/word_press/resource.rb
|
146
146
|
- lib/kiosk/word_press/tag.rb
|
147
|
-
- lib/kiosk/word_press/video.rb
|
148
147
|
- lib/kiosk/word_press.rb
|
149
148
|
- lib/kiosk.rb
|
150
149
|
- MIT-LICENSE
|
@@ -1,36 +0,0 @@
|
|
1
|
-
module Kiosk
|
2
|
-
module WordPress
|
3
|
-
class Video < Resource
|
4
|
-
schema do
|
5
|
-
attribute 'id', :string
|
6
|
-
attribute 'slug', :string
|
7
|
-
attribute 'classid', :string
|
8
|
-
end
|
9
|
-
|
10
|
-
claims_content(:selector => 'object') do |object|
|
11
|
-
if object['id'] && (match = object['id'].match(/^viddler(?:player)?-(\w+)/))
|
12
|
-
{:slug => object['id'], :classid => object['classid']}
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
# Returns the video ID, which is either an explicitly set attribute or the
|
17
|
-
# trailing string identifier from the slug (following the last "-").
|
18
|
-
#
|
19
|
-
def id
|
20
|
-
attributes[:id] || (attributes[:slug] && attributes[:slug].match(/-(\w+)$/)[1])
|
21
|
-
end
|
22
|
-
|
23
|
-
# Returns the path to the "thumbnail" version of the movie.
|
24
|
-
#
|
25
|
-
def thumbnail_url
|
26
|
-
"http://www.viddler.com/simple/#{id}/"
|
27
|
-
end
|
28
|
-
|
29
|
-
# Returns the path to the "full" version of the movie.
|
30
|
-
#
|
31
|
-
def url
|
32
|
-
"http://www.viddler.com/player/#{id}/"
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|
36
|
-
end
|