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 +4 -4
- data/lib/lalala/markdown.rb +1 -0
- data/lib/lalala/markdown/handlers/mixcloud.rb +35 -0
- data/lib/lalala/markdown/html_renderer.rb +1 -1
- data/lib/lalala/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6fe9df54796b56ac00da390f8c1acf167cfd5458
|
4
|
+
data.tar.gz: cf00962bd729357829833903a5ec6e53f8565255
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f6eb1c782112c4140d978f289a65394ef5f903f4703da13ae46e1391cb0d2d04738d1b15b490505e38a563219f9d818d80ce892f252290c40a1473cbd5827b2c
|
7
|
+
data.tar.gz: f30dca6bf105c9bd32d31465757a25b537edb3c99003d555694b57439594942a3670481a4bfcb14feda84206e6fc10b9570294f95546eccde5430aa123d148b4
|
data/lib/lalala/markdown.rb
CHANGED
@@ -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
|
data/lib/lalala/version.rb
CHANGED
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.
|
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-
|
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
|