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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 91bb9eb0b421bd6758484edf89a3860472af2926
4
- data.tar.gz: ca133b4fa4b1b1ae32b0da16002144dbbf0c341e
3
+ metadata.gz: 4c15cebe0b0605d91b507858810aac452c625f4c
4
+ data.tar.gz: c76550fd2587c2b21cb701e2435f8a63fd78a3e8
5
5
  SHA512:
6
- metadata.gz: 26e3724db6108c6aa695ceca7d8fbd6f2c338100a052de69113b751ba2bfb1c6413fb07430b59dffbc14eda30deae22551b516d73a790e10e915f6cabfa94d4e
7
- data.tar.gz: 07fc1a3d1444ec0b0144d4d1b90f4240f257cfd4e7d1971249b0bb16e3e32dd1aea7d8bfbc6725c7505af2bfeb25bcb954234bcbfffea3e4f2d9ffe2377aea6c
6
+ metadata.gz: c718de000cefcca08d6a24843a0bc44f70e7c36acb6ab8c2268d04522313d353234b8882c36bf8af7b833ae93286c2c609c2ff351af52dfc899cb3cbf7b4b3db
7
+ data.tar.gz: 0a3c3fb6f0cc1200725c6a36aff2c5f3e87ff786b0fc7ee6876fc44dc0d86e6e37ff689aa6fd968588b6760531878af3749ee9a5bfb57b4fd45c5aaf16eb77f2
@@ -13,6 +13,7 @@ class Lalala::Markdown
13
13
  require 'lalala/markdown/handlers/vimeo'
14
14
  require 'lalala/markdown/handlers/youtube'
15
15
  require 'lalala/markdown/handlers/soundcloud'
16
+ require 'lalala/markdown/handlers/publitas'
16
17
  end
17
18
 
18
19
  PARSER_OPTIONS = [
@@ -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
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.1.0"
3
- BUILD = "410"
3
+ BUILD = "411"
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.410
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: 2015-12-17 00:00:00.000000000 Z
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