html-pipeline-gitlab 0.1.4 → 0.1.5

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: fd6c8995b16ac5d93311facb210ebc6fa9ed74d4
4
- data.tar.gz: 147ef4e54054d3b43c8abb925f67d5b6a4a7daa3
3
+ metadata.gz: b597cdd10f4cb7b8ea744b576726c7de44a9af3d
4
+ data.tar.gz: e6d97da0ae3f3e21075d0be916a33854602e9ecf
5
5
  SHA512:
6
- metadata.gz: 67df9b88434db7d8bd48485a75d9c4463d0b47bc7d53d4fc0542bba8fb99b98ad89443cc7d18b67090ae767a0d0daee8f197f25088acfcc159e596a6c5144a61
7
- data.tar.gz: a06130d7bacda0f227e47f6cac432798ef7ebb7f2470223e929f848a46e48b5d73c26d9d5f0483a49e0279865a042fca146f13c9cecb1de830e3c171afd0488d
6
+ metadata.gz: c2cb57b0e1c926ebb6f5bda9b3f91599819757f611b3b90f92643bd07b09ef9a9d0a8b3c93a3611b284f14b1de049e5191abc6295bc5ec7ed7912c13a414bdbc
7
+ data.tar.gz: 802c35fc82d1e0ea4e4805eafbfe1184b6ed58f77f87a9c738b9a52b3e60e2ba480414dd7831b56d8a0ea6477dfca4f471d4f74e2e10669e6becd567e2ad357f
@@ -42,7 +42,17 @@ module HTML
42
42
  private
43
43
 
44
44
  def emoji_url(name)
45
- url_to_image("emoji/#{emoji_filename(name)}")
45
+ emoji_path = "emoji/#{emoji_filename(name)}"
46
+ if context[:asset_host]
47
+ # Asset host is specified.
48
+ url_to_image(emoji_path)
49
+ elsif context[:asset_root]
50
+ # Gitlab url is specified
51
+ File.join(context[:asset_root], url_to_image(emoji_path))
52
+ else
53
+ # All other cases
54
+ url_to_image(emoji_path)
55
+ end
46
56
  end
47
57
 
48
58
  def url_to_image(image)
@@ -1,7 +1,7 @@
1
1
  module Html
2
2
  module Pipeline
3
3
  module Gitlab
4
- VERSION = '0.1.4'
4
+ VERSION = '0.1.5'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline-gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Schilling