jekyll-kw-shorten 0.0.2 → 0.0.7

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
  SHA256:
3
- metadata.gz: 74d9d8746b3f09f5e81059c895977475ddd103343a9fafd7eec638972af7efe6
4
- data.tar.gz: 76ffd6ccc60ef22bdf8cce71387095336ebf1fb84a51e3f9f1b8848aac152d3b
3
+ metadata.gz: eb27dde8ac5b0e129bea77504f4d60f5056362c057cc1d3ac60b79641eca3199
4
+ data.tar.gz: 72952c2ef3477374858a7069be47100f687bc8cc67ea0a02c7ca8ccbdeeb1e8c
5
5
  SHA512:
6
- metadata.gz: f19b03659c99e855816b32d4d8a4d8bd641da9871994cfb8f0facee22ec3285250dda52f23e35af777dea607fb347faba7b6dbf8cfee0c4e2591d18376986786
7
- data.tar.gz: 96d0c08eca24fb19a56ec80bc21fb0e1803c75c38c6b1ba9cbb0198cb6eee4d8a961fa041876b843c5d0b412d3cbaa5e983381002be60e98f01d517c92df5fbf
6
+ metadata.gz: 7db034eb7c07fdc09713dc54279048e78663d22e15a98daca06821cc177329d3eb33c0115972100a7c6025a134eea3377ca11db66eba3feb84fb165cb41a1636
7
+ data.tar.gz: 6a544ec6995693777fbf6d607510163ee09520aaeaed34c0484396b0a174bae1ee82e5d8eec24eda781e59c0955977a3af8c4bd500594dccd84c310291ab8843
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'jekyll/KargWare/Shorten/parser'
4
+
3
5
  module Jekyll
4
6
  module KargWare
5
7
  module Shorten
@@ -8,14 +10,15 @@ module Jekyll
8
10
 
9
11
  # shorten tag {% shorten input %} for Jekyll
10
12
  class ShortenTag < Liquid::Tag
13
+ include Jekyll::KargWare::Shorten::ShortenFilter
14
+
11
15
  def initialize(tag_name, input, tokens)
12
16
  super
13
17
  @input = input
14
18
  end
15
19
 
16
20
  def render(context)
17
- filter = ShortenFilter.new
18
- filter.shorten(@input)
21
+ shorten(@input)
19
22
  end
20
23
  end
21
24
 
@@ -5,7 +5,7 @@ module Jekyll
5
5
  module Shorten
6
6
  # Shorten configuration class
7
7
  class Configuration
8
- attr_accessor :shorten_gt3_digit, :shorten_gt6_digit, :shorten_gt9_digit
8
+ attr_reader :shorten_gt3_digit, :shorten_gt6_digit, :shorten_gt9_digit
9
9
 
10
10
  DEFAULT_CONFIG = {
11
11
  'shorten_gt3_digit' => ' K',
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'jekyll/KargWare/Shorten/configuration'
4
+
3
5
  module Jekyll
4
6
  module KargWare
5
7
  module Shorten
@@ -8,7 +10,7 @@ module Jekyll
8
10
  attr_reader :configuration
9
11
 
10
12
  def initialize(options = {})
11
- @configuration = Configuration.new(options)
13
+ @configuration = Jekyll::KargWare::Shorten::Configuration.new(options)
12
14
  end
13
15
 
14
16
  def shorten(text)
@@ -4,7 +4,7 @@ module Jekyll
4
4
  module KargWare
5
5
  module Shorten
6
6
  RUBYGEM_NAME = 'jekyll-kw-shorten'
7
- VERSION = '0.0.2'
7
+ VERSION = '0.0.7'
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-kw-shorten
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Karg