lalala 4.1.0.dev.340 → 4.1.0.dev.341

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ecfe6b6db78b0a2cb94f302b14a34871a345d587
4
- data.tar.gz: 1ddbf9c89d35cb16d7b84383f5127289e6e700ff
3
+ metadata.gz: 2d29b436bf34a17d57f4f77503f5c1b57ffb0e7f
4
+ data.tar.gz: c26fa4b0a8e989ee1883b905dcd4a6cc6fa821a3
5
5
  SHA512:
6
- metadata.gz: be9c9c0600eef889e97340303463f20aca9af40c3623c32306fc3fa231bf238903075ec80f407c98d1374648950f4f2295720c001e3fb682c298ddb58a723b38
7
- data.tar.gz: a6b81a349711c2a97e82db594bb8ed0327ecc6bfd26c1734c0332a1861ceb6416527933cb7527fa43b8b83d0fbfcc616e040ec9cd054ea3569250fcb5e93bdd3
6
+ metadata.gz: 5883c299f44f221be663ca1b7d7ebda01c776b6b3c3fc3c869d121e6f7c2562d345192b1b4bfefd79ce5bd782ac6b23ea70926a7dc4b9326ddab275851686970
7
+ data.tar.gz: a5d22e768637f7300e25a94ff5ec5036b8ff5ec81fce1c6047d2e1747da14b4c115348556af0e6d8ab22ea2f9b0dd23ef1cc7b111392b8ce749c1d6a91b386e0
@@ -0,0 +1,32 @@
1
+ class Lalala::Markdown::Handlers::Vimeo < Lalala::Markdown::Handlers::Base
2
+
3
+ def initialize(options={})
4
+ options.assert_valid_keys(:width, :height)
5
+
6
+ options = {
7
+ width: 560,
8
+ height: 315
9
+ }.merge(options)
10
+
11
+ @options = options
12
+ end
13
+
14
+ def image(url, alt=nil, title=nil)
15
+ unless %r|^vimeo[:]//(.+)$| === url
16
+ return ""
17
+ end
18
+
19
+ id = $1
20
+
21
+ helpers.content_tag(
22
+ :iframe,
23
+ "",
24
+ width: @options[:width],
25
+ height: @options[:height],
26
+ src: "//player.vimeo.com/video/#{id}",
27
+ frameborder: 0,
28
+ allowfullscreen: true
29
+ )
30
+ end
31
+
32
+ end
@@ -9,6 +9,7 @@ class Lalala::Markdown
9
9
  module Handlers
10
10
  require 'lalala/markdown/handlers/base'
11
11
  require 'lalala/markdown/handlers/asset'
12
+ require 'lalala/markdown/handlers/vimeo'
12
13
  require 'lalala/markdown/handlers/youtube'
13
14
  end
14
15
 
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.1.0"
3
- BUILD = "340"
3
+ BUILD = "341"
4
4
 
5
5
  if BUILD != ("{{BUILD_NUMBER" + "}}") # prevent sed replacement (see script/ci)
6
6
  BUILD_VERSION = "#{VERSION}.dev.#{BUILD}"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lalala
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.0.dev.340
4
+ version: 4.1.0.dev.341
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Menke
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2014-07-25 00:00:00.000000000 Z
16
+ date: 2014-09-09 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activeadmin
@@ -1452,6 +1452,7 @@ files:
1452
1452
  - lib/lalala/markdown/active_model.rb
1453
1453
  - lib/lalala/markdown/handlers/asset.rb
1454
1454
  - lib/lalala/markdown/handlers/base.rb
1455
+ - lib/lalala/markdown/handlers/vimeo.rb
1455
1456
  - lib/lalala/markdown/handlers/youtube.rb
1456
1457
  - lib/lalala/markdown/html_renderer.rb
1457
1458
  - lib/lalala/markdown/input_helper.rb
@@ -1574,7 +1575,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1574
1575
  version: 1.3.1
1575
1576
  requirements: []
1576
1577
  rubyforge_project:
1577
- rubygems_version: 2.2.2
1578
+ rubygems_version: 2.2.0
1578
1579
  signing_key:
1579
1580
  specification_version: 4
1580
1581
  summary: 'Lalala: Probably the best CMS in the world.'