jekyll-transistor 0.0.3 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-transistor.rb +9 -7
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 031e75691a7bb93b5591f966cb086617b1173f2631cee51d971147142e57d341
4
- data.tar.gz: 43ed955fab336e91a5e2d907805798d69118696deed9d2436fa32af90d1d6abf
3
+ metadata.gz: 7e3ac98411e250fe6b345f9730d0ae21f58a422c431fbe9f7975ac97cd144ee0
4
+ data.tar.gz: 91b61b1ae40d5c4a5a71b140e3a91a12751c6e9bded81917521f9c4bf8bd59b5
5
5
  SHA512:
6
- metadata.gz: dc895aab52875ed003e69fec6ac0314836e7a854c5eab7d2b6a27dbe1e3b3c33babb478e8044e7fd59f1c494ef6bbbfd1607f41532805c00213c18e7a38f36a6
7
- data.tar.gz: 73745819ebeb82a4c0b1b4fcc5b755364a6f9c1beabe3c3806ea1a7a26c5e4ba9486775e40d5a53bc6a3b7eb1c38e6aff97062ed088ae9074fa55c60e94d910a
6
+ metadata.gz: a5f93106bf2827eafef866052fd3162a742f0b482ede06cb85ab6ee161737059cf5b854103991c7b8e28d3d8d3b3c854097cdfd786df22894fda6b8aeccd3662
7
+ data.tar.gz: 5f26c2dabe68eacc41c2c6d6af7014c3677d2df9a3ce59eb718ec49a417bb41d08631f270d442fc316213eca30fb7a7fa62328d1f53cd9b6fb248083e250e253
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # Transistor embed tag for Jekyll/Liquid
2
4
  #
3
5
  # Usage:
@@ -16,22 +18,22 @@
16
18
  require 'shellwords'
17
19
 
18
20
  module Jekyll
21
+ # Transistor sound tag for Jekyll
19
22
  class TransistorSoundTag < Liquid::Tag
20
-
21
23
  def initialize(tag_name, markup, tokens)
22
24
  super
23
25
  params = Shellwords.shellwords markup
24
- @sound = { :id => params[0], :color => params[1] || "light" }
26
+ @sound = { id: params[0], color: params[1] || 'light' }
25
27
  end
26
28
 
27
- def render(context)
29
+ def render(_context)
28
30
  url = "https://share.transistor.fm/e/#{@sound[:id]}"
29
- url += "/dark" if @sound[:color] == 'dark'
30
- "<iframe src='#{url}' width='100%' height='180' frameborder='0' scrolling='no' seamless='true' style='width:100%; height:180px;'></iframe>"
31
+ url += '/dark' if @sound[:color] == 'dark'
32
+ "<iframe src='#{url}' width='100%' height='180' frameborder='0' "\
33
+ "scrolling='no' seamless='true' style='width:100%; height:180px;'>"\
34
+ '</iframe>'
31
35
  end
32
-
33
36
  end
34
-
35
37
  end
36
38
 
37
39
  Liquid::Template.register_tag('transistor_sound', Jekyll::TransistorSoundTag)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-transistor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Riboulet