sutty-liquid 0.6.2 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll/filters/strings.rb +13 -0
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdc0091123dbfe9bfa0c5737ebf65f403f3d77998d6c9d6cc3843161df340b65
4
- data.tar.gz: 9766675f543da7cc28a78b267b227f14012b54582af4359bbeb9e3b48f88a24a
3
+ metadata.gz: 658822833e2c35c0741555012f7c9661277e6cab4590e3492858f534b8504a7a
4
+ data.tar.gz: 3b854a57718da74f498ccd7b115ee9e4c6238f98eba9a7fe8e8de7356f128037
5
5
  SHA512:
6
- metadata.gz: 1f228b8e153d2814918326b742dfcb6810a5f6d1a2d16a472159070dae8e9f1e5b5b2083fded57b3509ad59bec8b60ac37e59b84c287c74e94582348dd1400cf
7
- data.tar.gz: 0ec63e9e40d6bded522ca7ae8f9ae2624e72b72fc1daa3069a287fc96188f81ac12f8dd1fb3ffc05a037e784f91b4fb7f5ad636b0c9ef37420d6da24ac3eeaa2
6
+ metadata.gz: 8dc1a69885fc49dc8ad8b74d2fcde8796a228f9e41e9f57bbf4daf264e382347cf230917c6c3ea8e270483e3720caa955f4e6f4faa439edbe968522343520807
7
+ data.tar.gz: 1ab464adf6ee552e28df4e25eccfa03b3e4e167b291b7e307e67f0f40f56be854df5563bc16b3d06f1dc515cb2b55235c3c85d948dcf34b237b55ae3b4decbc0
@@ -7,6 +7,19 @@ module Jekyll
7
7
  def start_with(input, start)
8
8
  input.to_s.start_with? start.to_s
9
9
  end
10
+
11
+ # Replaces the last ocurrence of a String
12
+ #
13
+ # @param [String]
14
+ # @param [String]
15
+ # @param [String]
16
+ # @return [String]
17
+ def replace_last(input, search, replace)
18
+ hay = input.split search
19
+ needle = "#{replace}#{hay.pop}"
20
+
21
+ hay.join(search) + needle
22
+ end
10
23
  end
11
24
  end
12
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sutty-liquid
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - f
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-19 00:00:00.000000000 Z
11
+ date: 2021-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll