dato 0.3.10 → 0.3.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dato.gemspec +0 -1
- data/lib/dato/local/field_type/video.rb +8 -3
- data/lib/dato/version.rb +1 -1
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eeb10e53337741f20ed958bfd8cbbe80577ac526
|
4
|
+
data.tar.gz: c070456c53cc99f91c8ed911e0fd9acaefcb33e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc9e32071f3ff430030762293cdd538629756604e74f856082ab267cefc0274fc21ca82c121d4b25f5074726de82e1156d1320c2ab005d4e3a54e681a05c9d36
|
7
|
+
data.tar.gz: 739ea4c921ee5b14cac770e083a6df9f65a04aab8acb9f6cfd98f367d33750fb22a8d47fcd993fc0a01df738cb9447b68156cef84a1040f4aaf07f388979c232
|
data/dato.gemspec
CHANGED
@@ -40,7 +40,6 @@ Gem::Specification.new do |spec|
|
|
40
40
|
spec.add_runtime_dependency 'addressable'
|
41
41
|
spec.add_runtime_dependency 'thor'
|
42
42
|
spec.add_runtime_dependency 'imgix', ['>= 0.3.1']
|
43
|
-
spec.add_runtime_dependency 'video_embed'
|
44
43
|
spec.add_runtime_dependency 'toml'
|
45
44
|
spec.add_runtime_dependency 'cacert'
|
46
45
|
spec.add_runtime_dependency 'dotenv'
|
@@ -1,6 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
require 'active_support/core_ext/hash/compact'
|
3
|
-
require 'video_embed'
|
4
3
|
|
5
4
|
module Dato
|
6
5
|
module Local
|
@@ -48,8 +47,14 @@ module Dato
|
|
48
47
|
@provider_uid = provider_uid
|
49
48
|
end
|
50
49
|
|
51
|
-
def iframe_embed(width =
|
52
|
-
|
50
|
+
def iframe_embed(width = self.width, height = self.height)
|
51
|
+
# rubocop:disable Metrics/LineLength
|
52
|
+
if provider == 'youtube'
|
53
|
+
%(<iframe width="#{width}" height="#{height}" src="//www.youtube.com/embed/#{provider_uid}?rel=0" frameborder="0" allowfullscreen></iframe>)
|
54
|
+
elsif provider == 'vimeo'
|
55
|
+
%(<iframe src="//player.vimeo.com/video/#{provider_uid}?title=0&byline=0&portrait=0" width="#{width}" height="#{height}" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>)
|
56
|
+
end
|
57
|
+
# rubocop:enable Metrics/LineLength
|
53
58
|
end
|
54
59
|
|
55
60
|
def to_hash(*_args)
|
data/lib/dato/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.11
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stefano Verna
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -276,20 +276,6 @@ dependencies:
|
|
276
276
|
- - ">="
|
277
277
|
- !ruby/object:Gem::Version
|
278
278
|
version: 0.3.1
|
279
|
-
- !ruby/object:Gem::Dependency
|
280
|
-
name: video_embed
|
281
|
-
requirement: !ruby/object:Gem::Requirement
|
282
|
-
requirements:
|
283
|
-
- - ">="
|
284
|
-
- !ruby/object:Gem::Version
|
285
|
-
version: '0'
|
286
|
-
type: :runtime
|
287
|
-
prerelease: false
|
288
|
-
version_requirements: !ruby/object:Gem::Requirement
|
289
|
-
requirements:
|
290
|
-
- - ">="
|
291
|
-
- !ruby/object:Gem::Version
|
292
|
-
version: '0'
|
293
279
|
- !ruby/object:Gem::Dependency
|
294
280
|
name: toml
|
295
281
|
requirement: !ruby/object:Gem::Requirement
|