rb42-videos 1.0.1 → 1.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/videos/version.rb +1 -1
- data/lib/videos/video.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: aee85690bd42b8cc33351a859ba796f3c29f98b710ae9822983d895b5219ca4f
|
|
4
|
+
data.tar.gz: 81093d3474797f0925c17172a4dc8dfeb2a7a3041a4623d23002133068f73652
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a01a410404444985910ab569b8e2a40f894673342319cda3c577613a238d42f634624d2b9dd6a8ed4571507cb630d8f99892ed22236878a24132d0c953531c0b
|
|
7
|
+
data.tar.gz: 8fc71cb6023c37b518822a66af67cd7d720baff007a4e8489cfa08c8a526e743c34ea318fc93ce4ccc3d7e6993717114469ba5f56d6b6fe9dc6bb1247029b129
|
data/Gemfile.lock
CHANGED
data/lib/videos/version.rb
CHANGED
data/lib/videos/video.rb
CHANGED
|
@@ -9,7 +9,8 @@ class Videos::Video
|
|
|
9
9
|
|
|
10
10
|
DEFAULTS = {
|
|
11
11
|
width: 640,
|
|
12
|
-
height: 360
|
|
12
|
+
height: 360,
|
|
13
|
+
controls: true
|
|
13
14
|
}
|
|
14
15
|
def initialize(uri,options={})
|
|
15
16
|
@uri = uri
|
|
@@ -17,7 +18,7 @@ class Videos::Video
|
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
def embed_code
|
|
20
|
-
content_tag(:video) do
|
|
21
|
+
content_tag(:video, '', controls: controls) do
|
|
21
22
|
concat(tag(:source, src: @uri.to_s, type: @uri.content_type))
|
|
22
23
|
concat(content_tag(:span, sorry_message, class: 'sorry'))
|
|
23
24
|
end
|
|
@@ -35,4 +36,8 @@ class Videos::Video
|
|
|
35
36
|
def height
|
|
36
37
|
@options[:height]
|
|
37
38
|
end
|
|
39
|
+
|
|
40
|
+
def controls
|
|
41
|
+
@options[:controls]
|
|
42
|
+
end
|
|
38
43
|
end
|