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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 250745bab9f7bb071e156362bfd5e7c2585882f7
4
- data.tar.gz: aa31a21a45f243582873d07e25c66502aac5e292
3
+ metadata.gz: eeb10e53337741f20ed958bfd8cbbe80577ac526
4
+ data.tar.gz: c070456c53cc99f91c8ed911e0fd9acaefcb33e4
5
5
  SHA512:
6
- metadata.gz: bb324ab8bfd919bc0f9aed804b3f960327119c772cdb728c17a141f6dcf7c63580a8a74af30bec7eab0183534ef111891d569cbdc3404a666fd0bbbffb4a905f
7
- data.tar.gz: 4b8e3cf6eefe414ba64cbef0a7d09d8ac8dd32d09d8ee6c3d18aececa65d42925ef6e975563ef462100fccf9de99e32ad115c3e876d77b1d7db9bd6ce8fe6b89
6
+ metadata.gz: bc9e32071f3ff430030762293cdd538629756604e74f856082ab267cefc0274fc21ca82c121d4b25f5074726de82e1156d1320c2ab005d4e3a54e681a05c9d36
7
+ data.tar.gz: 739ea4c921ee5b14cac770e083a6df9f65a04aab8acb9f6cfd98f367d33750fb22a8d47fcd993fc0a01df738cb9447b68156cef84a1040f4aaf07f388979c232
@@ -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 = nil, height = nil)
52
- VideoEmbed.embed(url, { width: width, height: height }.compact)
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&amp;byline=0&amp;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)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Dato
3
- VERSION = '0.3.10'
3
+ VERSION = '0.3.11'
4
4
  end
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.10
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-16 00:00:00.000000000 Z
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