jekyll-attendease 0.6.25f → 0.6.25g

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: 2a11306494bb4116e771d0f1b4d51f518d4f39c8
4
- data.tar.gz: caf112273efd3ceedc870aa537231e262e9db21a
3
+ metadata.gz: 470e747753670595a1a19351c61f55935df6c2b6
4
+ data.tar.gz: 984d6214e1d28dfbd81d628a9d14c149b06340d6
5
5
  SHA512:
6
- metadata.gz: 5b7667d3c8e3d3b98a1c9352dd523ef7e6fa2230dc6c9cd042a320d4eeccde2f39c44f51c753951e10537767dd72fe9958740f63d07a2366065ca0c268302eb8
7
- data.tar.gz: 918fb7219dce875264b04e8f84f5b5694d9dd24444a025138220cd55aa998d823cfe43941a4a6626fce2075946bcd3ca4b281d3512f5e348ed6d58888759ddd9
6
+ metadata.gz: e6fe0b36536b62641bac5a058fc5d73661a7e2016fbe47559387cd9f74ca4f2ab923b7df2632de477aa7029bce4d2ed0156bebd3633fa9128adfcb0e31cc759b
7
+ data.tar.gz: cba01fc046ea07bf0e046e1ea0888bf2da787ea35c36e6b8f3504190876938366677fd1611657e40ea1cc5566811599fb4cf56ae28ece9b6c13f634c06c12727
@@ -31,6 +31,20 @@ module Jekyll
31
31
  File.open(base_layout_file, 'w+') { |f| f.write("{{ content }}") }
32
32
  end
33
33
 
34
+ cms_layouts = []
35
+ begin
36
+ Dir.glob(File.join(layouts_path, '*.html')).each do |l|
37
+ html = File.read(l)
38
+ if html =~ %r!\A(---\s*\n.*?\n?)^((---|\.\.\.)\s*$\n?)!m
39
+ data = YAML.load(Regexp.last_match(1))
40
+ if data['cms_layout']
41
+ cms_layouts << File.basename(l).split('.').first
42
+ end
43
+ end
44
+ end
45
+ rescue
46
+ end
47
+
34
48
  layouts_to_precompile = %w{ layout register surveys } # These are compiled to the html site.
35
49
  layouts_to_precompile.each do |layout|
36
50
  # create a layout file if it already doesn't exist.
@@ -42,6 +56,9 @@ module Jekyll
42
56
  end
43
57
  end
44
58
 
59
+ cms_layouts.each do |layout|
60
+ site.pages << EventLayoutPage.new(site, site.source, 'attendease_layouts', "cms-#{layout}.html", layout, layout.capitalize)
61
+ end
45
62
 
46
63
  # Precompiled layouts for attendease email
47
64
  base_email_layout = site.config['attendease']['base_email_layout'] || 'email'
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = '0.6.25f'
3
+ VERSION = '0.6.25g'
4
4
  end
5
5
  end
@@ -13,6 +13,7 @@ RSpec.describe Jekyll::AttendeasePlugin::SitePagesGenerator do
13
13
  file = File.join(@site.config['destination'], slug, 'index.html')
14
14
  expect(File.exists?(file)).to eq(true)
15
15
  expect(File.file?(file)).to eq(true)
16
+ expect(File.read(file)).to include '<title>Test Page</title>'
16
17
  end
17
18
 
18
19
  it 'creates a block instance json file using the provided slug' do
@@ -8,7 +8,7 @@
8
8
 
9
9
  <div class="attendease-venue" data-venue-id="{{ venue.id }}">
10
10
 
11
- {% if venue.address.latitude && venue.address.longitude %}
11
+ {% if venue.address.latitude and venue.address.longitude %}
12
12
  {% if venue.primary %}
13
13
  {% assign marker_colour = 'blue' %}
14
14
  {% else %}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-attendease
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.25f
4
+ version: 0.6.25g
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood