lalala 4.1.0.dev.391 → 4.1.0.dev.392

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: 06124eebfc551071567f66a7e3107be4de300b3b
4
- data.tar.gz: 155dd70459f66d797294c4110193bb28c80c8a70
3
+ metadata.gz: c8ae10bdc67874f70c0687fbe4926d7d9dd8ebbd
4
+ data.tar.gz: ea81493d10fa15086fbabe0d4e6723e8adbf4c63
5
5
  SHA512:
6
- metadata.gz: 8269bdf38ddc846460f4671c31e4f1ae73a773bee454640c7d191010b9be6aba4a4874dfbb501e4f4e34d5edbaafb7ad363e6bdc2d69a1ce5ffe94befe9579c4
7
- data.tar.gz: c26bcb8306e83d32cfe7ad74c43c92871785f76ab1ee3e4a4bc8591167cdad45e96b4cb2765fe451e57156fd80972621444a13bb6b6e825e7dd30d50231e5f42
6
+ metadata.gz: 6999bb8621a27992ff2ea0950d3c0fb166aa4e77dd400ed17f3c25ef347390a20e5d37fe1c4fd52c686999f6d9d445782436d7c1e8ed6dfbb5902293f2382ad6
7
+ data.tar.gz: 70bb0d68a1bf1ea9eeea277811a1aa8a1a23c4a4e62ea2138bf6a70245cd8d0f07afdadd0e3c52413fb50f79cd4127643ca3fc5e58bbbc8ba99008f1f64035b3
@@ -0,0 +1,36 @@
1
+ class Lalala::Markdown::Handlers::Soundcloud < Lalala::Markdown::Handlers::Base
2
+
3
+ def initialize(options={})
4
+ options.assert_valid_keys(:width, :height)
5
+
6
+ options = {
7
+ width: 560,
8
+ height: 166
9
+ }.merge(options)
10
+
11
+ @options = options
12
+ end
13
+
14
+ def image(url, alt=nil, title=nil)
15
+ unless %r|^soundcloud[:]//(.+)$| === url
16
+ return ""
17
+ end
18
+
19
+ id = $1
20
+
21
+ helpers.content_tag :span, class: "embed-container is-soundcloud" do
22
+ helpers.content_tag(
23
+ :iframe,
24
+ "",
25
+ class: "soundcloud-embed js-soundcloud-embed",
26
+ width: @options[:width],
27
+ height: @options[:height],
28
+ src: "//w.soundcloud.com/player/?auto_play=false&hide_related=true&show_comments=false&show_user=false&show_reposts=false&visual=false",
29
+ :"data-url" => "https://soundcloud.com/oembed?format=json&url=https://soundcloud.com/#{id}",
30
+ frameborder: 0,
31
+ allowfullscreen: true
32
+ )
33
+ end
34
+ end
35
+
36
+ end
@@ -23,7 +23,7 @@ class Lalala::Markdown::Handlers::Vimeo < Lalala::Markdown::Handlers::Base
23
23
 
24
24
  id = $1
25
25
 
26
- helpers.content_tag :span, class: "embed-container" do
26
+ helpers.content_tag :span, class: "embed-container is-vimeo" do
27
27
  helpers.content_tag(
28
28
  :iframe,
29
29
  "",
@@ -18,7 +18,7 @@ class Lalala::Markdown::Handlers::YouTube < Lalala::Markdown::Handlers::Base
18
18
 
19
19
  id = $1
20
20
 
21
- helpers.content_tag :span, class: "embed-container" do
21
+ helpers.content_tag :span, class: "embed-container is-youtube" do
22
22
  helpers.content_tag(
23
23
  :iframe,
24
24
  "",
@@ -1,6 +1,6 @@
1
1
  class Lalala::Markdown::HtmlRenderer < Redcarpet::Render::HTML
2
2
 
3
- URI_PATTERN = %r{\A(lalala|youtube|vimeo|asset)[:][/]{2}.+\Z}
3
+ URI_PATTERN = %r{\A(lalala|youtube|vimeo|asset|soundcloud)[:][/]{2}.+\Z}
4
4
 
5
5
  def initialize(options)
6
6
  @options = options.dup
@@ -12,6 +12,7 @@ class Lalala::Markdown
12
12
  require 'lalala/markdown/handlers/lazy_asset'
13
13
  require 'lalala/markdown/handlers/vimeo'
14
14
  require 'lalala/markdown/handlers/youtube'
15
+ require 'lalala/markdown/handlers/soundcloud'
15
16
  end
16
17
 
17
18
  PARSER_OPTIONS = [
@@ -1,6 +1,6 @@
1
1
  module Lalala
2
2
  VERSION = "4.1.0"
3
- BUILD = "391"
3
+ BUILD = "392"
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.391
4
+ version: 4.1.0.dev.392
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-04-24 00:00:00.000000000 Z
16
+ date: 2015-06-09 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: activeadmin
@@ -1460,6 +1460,7 @@ files:
1460
1460
  - lib/lalala/markdown/handlers/asset.rb
1461
1461
  - lib/lalala/markdown/handlers/base.rb
1462
1462
  - lib/lalala/markdown/handlers/lazy_asset.rb
1463
+ - lib/lalala/markdown/handlers/soundcloud.rb
1463
1464
  - lib/lalala/markdown/handlers/vimeo.rb
1464
1465
  - lib/lalala/markdown/handlers/youtube.rb
1465
1466
  - lib/lalala/markdown/html_renderer.rb