lalala 4.1.0.dev.410 → 4.1.0.dev.411
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/publitas.rb +40 -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: 4c15cebe0b0605d91b507858810aac452c625f4c
|
4
|
+
data.tar.gz: c76550fd2587c2b21cb701e2435f8a63fd78a3e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c718de000cefcca08d6a24843a0bc44f70e7c36acb6ab8c2268d04522313d353234b8882c36bf8af7b833ae93286c2c609c2ff351af52dfc899cb3cbf7b4b3db
|
7
|
+
data.tar.gz: 0a3c3fb6f0cc1200725c6a36aff2c5f3e87ff786b0fc7ee6876fc44dc0d86e6e37ff689aa6fd968588b6760531878af3749ee9a5bfb57b4fd45c5aaf16eb77f2
|
data/lib/lalala/markdown.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
class Lalala::Markdown::Handlers::Publitas < Lalala::Markdown::Handlers::Base
|
2
|
+
|
3
|
+
def initialize(options={})
|
4
|
+
@options = options
|
5
|
+
end
|
6
|
+
|
7
|
+
def image(url, alt=nil, title=nil)
|
8
|
+
unless %r|^publitas[:]//(.+)$| === url
|
9
|
+
return ""
|
10
|
+
end
|
11
|
+
|
12
|
+
id = $1
|
13
|
+
|
14
|
+
random = "publitas-embed-#{rand(1..9999999)}"
|
15
|
+
|
16
|
+
helpers.content_tag :div, class: "embed-container" do
|
17
|
+
helpers.content_tag(
|
18
|
+
:div,
|
19
|
+
"",
|
20
|
+
id: random
|
21
|
+
)
|
22
|
+
|
23
|
+
helpers.content_tag(
|
24
|
+
:script,
|
25
|
+
"",
|
26
|
+
{
|
27
|
+
:"publitas-embed" => "publitas-embed",
|
28
|
+
wrapperId: random,
|
29
|
+
:"data-cfasync" => false,
|
30
|
+
:"data-menu" => false,
|
31
|
+
:"data-publication" => "https://view.publitas.com/#{id}",
|
32
|
+
:"data-responsive" => true,
|
33
|
+
type: "text/javascript",
|
34
|
+
src: "https://view.publitas.com/embed.js"
|
35
|
+
}
|
36
|
+
)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
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)[:][/]{2}.+\Z}
|
3
|
+
URI_PATTERN = %r{\A(lalala|youtube|vimeo|asset|soundcloud|publitas)[:][/]{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.411
|
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:
|
16
|
+
date: 2016-02-12 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/publitas.rb
|
1455
1456
|
- lib/lalala/markdown/handlers/soundcloud.rb
|
1456
1457
|
- lib/lalala/markdown/handlers/vimeo.rb
|
1457
1458
|
- lib/lalala/markdown/handlers/youtube.rb
|