lalala 4.1.0.dev.418 → 4.1.0.dev.419

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: 6645262ff5ea2783039dc0b5081d6935dbd33668
4
- data.tar.gz: c41ac2e858f7841d2db3caefc574a39fee72eafb
3
+ metadata.gz: 6fe9df54796b56ac00da390f8c1acf167cfd5458
4
+ data.tar.gz: cf00962bd729357829833903a5ec6e53f8565255
5
5
  SHA512:
6
- metadata.gz: f729d045ff71c821242fdf8d43fb292031283eca5dc3c5c59498ccae14188f0e31dd9cbac7c7ba6357fbe74265ecdce58d294749e320aa12d0bc03b7f664577f
7
- data.tar.gz: 3f82753c4373b49cbbb6d459c9593a04b0d7b8d0210252be42152eec4f42ea394614d9dde516873ab8b93dd6a5769fa39b8d4385cc13c07d21d7bd043102dd72
6
+ metadata.gz: f6eb1c782112c4140d978f289a65394ef5f903f4703da13ae46e1391cb0d2d04738d1b15b490505e38a563219f9d818d80ce892f252290c40a1473cbd5827b2c
7
+ data.tar.gz: f30dca6bf105c9bd32d31465757a25b537edb3c99003d555694b57439594942a3670481a4bfcb14feda84206e6fc10b9570294f95546eccde5430aa123d148b4
@@ -14,6 +14,7 @@ class Lalala::Markdown
14
14
  require 'lalala/markdown/handlers/youtube'
15
15
  require 'lalala/markdown/handlers/soundcloud'
16
16
  require 'lalala/markdown/handlers/publitas'
17
+ require 'lalala/markdown/handlers/mixcloud'
17
18
  end
18
19
 
19
20
  PARSER_OPTIONS = [
@@ -0,0 +1,35 @@
1
+ class Lalala::Markdown::Handlers::Mixcloud < Lalala::Markdown::Handlers::Base
2
+
3
+ def initialize(options={})
4
+ options.assert_valid_keys(:width, :height)
5
+
6
+ options = {
7
+ width: 670,
8
+ height: 120
9
+ }.merge(options)
10
+
11
+ @options = options
12
+ end
13
+
14
+ def image(url, alt=nil, title=nil)
15
+ unless %r|^mixcloud[:]//(.+)$| === url
16
+ return ""
17
+ end
18
+
19
+ id = $1
20
+
21
+ helpers.content_tag :span, class: "embed-container is-mixcloud" do
22
+ helpers.content_tag(
23
+ :iframe,
24
+ "",
25
+ class: "mixcloud-embed js-mixcloud-embed",
26
+ width: "100%",
27
+ height: @options[:height],
28
+ src: "//www.mixcloud.com/widget/iframe/?feed=#{id}&hide_cover=1&light=1",
29
+ frameborder: 0,
30
+ allowfullscreen: true
31
+ )
32
+ end
33
+ end
34
+
35
+ end
@@ -1,6 +1,6 @@
1
1
  class Lalala::Markdown::HtmlRenderer < Redcarpet::Render::HTML
2
2
 
3
- URI_PATTERN = %r{\A(lalala|youtube|vimeo|asset|soundcloud|publitas)[:][/]{2}.+\Z}
3
+ URI_PATTERN = %r{\A(lalala|youtube|vimeo|asset|soundcloud|publitas|mixacloud)[:][/]{2}.+\Z}
4
4
 
5
5
  def initialize(options)
6
6
  @options = options.dup
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.1.0"
3
- BUILD = "418"
3
+ BUILD = "419"
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.418
4
+ version: 4.1.0.dev.419
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: 2016-02-19 00:00:00.000000000 Z
16
+ date: 2016-02-23 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/handlers/asset.rb
1453
1453
  - lib/lalala/markdown/handlers/base.rb
1454
1454
  - lib/lalala/markdown/handlers/lazy_asset.rb
1455
+ - lib/lalala/markdown/handlers/mixcloud.rb
1455
1456
  - lib/lalala/markdown/handlers/publitas.rb
1456
1457
  - lib/lalala/markdown/handlers/soundcloud.rb
1457
1458
  - lib/lalala/markdown/handlers/vimeo.rb