jekyll-uj-powertools 1.0.2 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5c3efb8fb31c1f6806df49c54c2fb1e66481d1a890b2d18171c01a5b370c0187
4
- data.tar.gz: 5fc03c5c867b1e3ba1e6dfc368a19e38f7f3eec0bc58ec196353a24c032f6637
3
+ metadata.gz: 1b1eeb74ef3c331414ed6d19cf45bbf23c595439772f135fc98abda18a49c375
4
+ data.tar.gz: da2e48c85e00d36dc2c46fc0e7059d44cbe9e85030ab8ff3d5d65757aa6b653f
5
5
  SHA512:
6
- metadata.gz: 0dc2f8936ae1a5cd47f7080defeabb867c901012db5ac147a90c6d5be3e76d781f14c7d224be4719686d076ab28d86564e91eb3b86ee022fcc6b6b7217933363
7
- data.tar.gz: 1a7b25486b7b12389628e4b5a73570c7ef6e7d43778ca4a243a97bf891c5b6a865afd287c22d005e40654df74ecac0ed3a2946addee5e5a503c902c5642b052a
6
+ metadata.gz: 9044a5f544ffffc8b9b642057ebb016366109e110542e6a3ca40f8e0cfb14692798ef4c816d52860160168bc334d1f0e9222f61dc08a10a438957881cfb55c73
7
+ data.tar.gz: 9fc1399673852cbc68df06a38821dd18330ee0b241e03e6a0f453bad1981fedd067f825a3a2a32e6f19a290fe7f59d5a5b3408b70ff4ed5ef570e819ca2376a0
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module UJPowertools
3
- VERSION = "1.0.2"
3
+ VERSION = "1.0.4"
4
4
  end
5
5
  end
@@ -3,7 +3,8 @@ require "jekyll"
3
3
  module Jekyll
4
4
  module UJPowertools
5
5
  def strip_ads(input)
6
- input.gsub(/\{% include \/master\/modules\/adunits[^%]*%\}/, '')
6
+ # input.gsub(/\{% include \/master\/modules\/adunits[^%]*%\}/, '')
7
+ input.gsub(/<!--\s*ADUNIT_TRIGGER_START\s*-->.*?<!--\s*ADUNIT_TRIGGER_END\s*-->/m, '')
7
8
  end
8
9
 
9
10
  def json_escape(value)
@@ -9,12 +9,19 @@ RSpec.describe Jekyll::UJPowertools do
9
9
  let(:dummy) { DummyClass.new }
10
10
 
11
11
  describe '.strip_ads' do
12
+ # it 'removes ads from the string' do
13
+ # expect(dummy.strip_ads('{% include /master/modules/adunits/adsense-in-article.html index="0" %} This is content')).to eq(' This is content')
14
+ # end
15
+
16
+ # it 'returns the original string if no ads are present' do
17
+ # expect(dummy.strip_ads('No ads here')).to eq('No ads here')
18
+ # end
12
19
  it 'removes ads from the string' do
13
- expect(dummy.strip_ads('{% include /master/modules/adunits/adsense-in-article.html index="0" %} This is content')).to eq(' This is content')
20
+ expect(dummy.remove_ads('This is <!-- ADUNIT_START -->and ad<!-- ADUNIT_END -->')).to eq('This is ')
14
21
  end
15
22
 
16
23
  it 'returns the original string if no ads are present' do
17
- expect(dummy.strip_ads('No ads here')).to eq('No ads here')
24
+ expect(dummy.remove_ads('No ads here')).to eq('No ads here')
18
25
  end
19
26
  end
20
27
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-uj-powertools
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ITW Creative Works