jekyll-attendease 0.6.11.pre → 0.6.11

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
  SHA1:
3
- metadata.gz: 5c29fa1f96f397b4c423f4bbb7eea5b1aab3fadf
4
- data.tar.gz: c501afde0e0347dedbf076f84ccc297c391d4d66
3
+ metadata.gz: ee99d06f8c1a20786499ad241dd543f9f7721b8d
4
+ data.tar.gz: fd1258e81bd31ebbecd27c11e1ec3d78ba3aebd4
5
5
  SHA512:
6
- metadata.gz: 45832ac3c8ad82a7dd59ef71c788c7ce334e0b92edc98015081535eca026be31a4b2ad43430066d88a177fb5806dde6758b3eea8673d469fd3538620c16f08ee
7
- data.tar.gz: 36d04b855eb0cb3b00e1bda2dd8f67de89a194c97cf3098cddd1bf9736441b099fe923214f158774861d031c6e47e6b50c43c30d85f1c8d038f7e5325f8f07cb
6
+ metadata.gz: 63711df01ce343ab2a2caecf19a6ba81ce837a500c51d5dfc4dcea7c7f1750afbd7d1b754a80e50b9acb8007baee8b909df86919c97f1e10571b2212ec114486
7
+ data.tar.gz: dc94248e7026860ac525a099591fe25f56240a0a6fb99de6eec498f071d37c51ba1558fddd5b4aa236eb44c4561a439da0c4b1500518b8dcb4e98f59a7bae131
@@ -37,6 +37,18 @@ module Jekyll
37
37
  s.encode('ASCII',
38
38
  fallback: lambda { |c| fallback.key?(c) ? fallback[c] : undefined })
39
39
  end
40
+
41
+ def self.get_template(site, template_string)
42
+ template = nil
43
+
44
+ if site.config['attendease'] && templates = site.config['attendease']['templates']
45
+ if t = templates.detect{|t| t['page'] == template_string}
46
+ template = t['data']
47
+ end
48
+ end
49
+
50
+ template
51
+ end
40
52
  end
41
53
  end
42
54
  end
@@ -15,18 +15,13 @@ module Jekyll
15
15
 
16
16
  self.data['title'] = site.config['homepage_title'] || 'Welcome'
17
17
 
18
- if site.config['attendease'] && templates = site.config['attendease']['templates']
19
- if t = templates.detect{|t| t['page'] == 'index'}
20
- template = t['data']
21
- end
22
- end
23
-
24
- if template.nil?
25
- # use the included template in the gem
26
- self.content = File.read(File.join(base, '_attendease', 'templates', 'index.html'))
27
- else
18
+ # Check if Attendease API has a template for this page
19
+ if template = Helpers.get_template(site, 'index')
28
20
  # use the template file from the attendease api
29
21
  self.content = template
22
+ else
23
+ # use the included template in the gem
24
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'index.html'))
30
25
  end
31
26
  end
32
27
  end
@@ -24,7 +24,14 @@ module Jekyll
24
24
 
25
25
  self.data['presenter'] = presenter
26
26
 
27
- self.content = File.read(File.join(base, '_attendease', 'templates', 'presenters', 'presenter.html'))
27
+ # Check if Attendease API has a template for this page
28
+ if template = Helpers.get_template(site, 'presenters/presenter')
29
+ # use the template file from the attendease api
30
+ self.content = template
31
+ else
32
+ # use the included template in the gem
33
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'presenters', 'presenter.html'))
34
+ end
28
35
  end
29
36
  end
30
37
  end
@@ -15,7 +15,14 @@ module Jekyll
15
15
 
16
16
  self.data['presenters'] = presenters
17
17
 
18
- self.content = File.read(File.join(base, '_attendease', 'templates', 'presenters', 'index.html'))
18
+ # Check if Attendease API has a template for this page
19
+ if template = Helpers.get_template(site, 'presenters/index')
20
+ # use the template file from the attendease api
21
+ self.content = template
22
+ else
23
+ # use the included template in the gem
24
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'presenters', 'index.html'))
25
+ end
19
26
  end
20
27
  end
21
28
  end
@@ -30,7 +30,14 @@ module Jekyll
30
30
 
31
31
  self.data['instances'] = instances.sort{|x,y| [x['time'], x['session']['name']] <=> [y['time'], y['session']['name']]}
32
32
 
33
- self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'day.html'))
33
+ # Check if Attendease API has a template for this page
34
+ if template = Helpers.get_template(site, 'schedule/day')
35
+ # use the template file from the attendease api
36
+ self.content = template
37
+ else
38
+ # use the included template in the gem
39
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'day.html'))
40
+ end
34
41
  end
35
42
  end
36
43
  end
@@ -15,7 +15,14 @@ module Jekyll
15
15
 
16
16
  self.data['dates'] = dates
17
17
 
18
- self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'index.html'))
18
+ # Check if Attendease API has a template for this page
19
+ if template = Helpers.get_template(site, 'schedule/index')
20
+ # use the template file from the attendease api
21
+ self.content = template
22
+ else
23
+ # use the included template in the gem
24
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'index.html'))
25
+ end
19
26
  end
20
27
  end
21
28
  end
@@ -16,7 +16,14 @@ module Jekyll
16
16
 
17
17
  self.data['session'] = session
18
18
 
19
- self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'session.html'))
19
+ # Check if Attendease API has a template for this page
20
+ if template = Helpers.get_template(site, 'schedule/session')
21
+ # use the template file from the attendease api
22
+ self.content = template
23
+ else
24
+ # use the included template in the gem
25
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'session.html'))
26
+ end
20
27
  end
21
28
  end
22
29
  end
@@ -18,7 +18,14 @@ module Jekyll
18
18
  self.data['sessions'] = sessions
19
19
  self.data['dates'] = dates
20
20
 
21
- self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'sessions.html'))
21
+ # Check if Attendease API has a template for this page
22
+ if template = Helpers.get_template(site, 'schedule/sessions')
23
+ # use the template file from the attendease api
24
+ self.content = template
25
+ else
26
+ # use the included template in the gem
27
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'schedule', 'sessions.html'))
28
+ end
22
29
  end
23
30
  end
24
31
  end
@@ -15,7 +15,14 @@ module Jekyll
15
15
 
16
16
  self.data['sponsor_levels'] = sponsor_levels
17
17
 
18
- self.content = File.read(File.join(base, '_attendease', 'templates', 'sponsors', 'index.html'))
18
+ # Check if Attendease API has a template for this page
19
+ if template = Helpers.get_template(site, 'sponsors/index')
20
+ # use the template file from the attendease api
21
+ self.content = template
22
+ else
23
+ # use the included template in the gem
24
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'sponsors', 'index.html'))
25
+ end
19
26
  end
20
27
  end
21
28
  end
@@ -16,7 +16,14 @@ module Jekyll
16
16
 
17
17
  self.data['venue'] = venue
18
18
 
19
- self.content = File.read(File.join(base, '_attendease', 'templates', 'venues', 'venue.html'))
19
+ # Check if Attendease API has a template for this page
20
+ if template = Helpers.get_template(site, 'venues/venue')
21
+ # use the template file from the attendease api
22
+ self.content = template
23
+ else
24
+ # use the included template in the gem
25
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'venues', 'venue.html'))
26
+ end
20
27
  end
21
28
  end
22
29
  end
@@ -15,7 +15,14 @@ module Jekyll
15
15
 
16
16
  self.data['venues'] = venues
17
17
 
18
- self.content = File.read(File.join(base, '_attendease', 'templates', 'venues', 'index.html'))
18
+ # Check if Attendease API has a template for this page
19
+ if template = Helpers.get_template(site, 'venues/index')
20
+ # use the template file from the attendease api
21
+ self.content = template
22
+ else
23
+ # use the included template in the gem
24
+ self.content = File.read(File.join(base, '_attendease', 'templates', 'venues', 'index.html'))
25
+ end
19
26
  end
20
27
  end
21
28
  end
@@ -1,6 +1,6 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = "0.6.11.pre"
3
+ VERSION = "0.6.11"
4
4
  end
5
5
  end
6
6
 
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.11.pre
4
+ version: 0.6.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -194,9 +194,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
194
194
  version: '0'
195
195
  required_rubygems_version: !ruby/object:Gem::Requirement
196
196
  requirements:
197
- - - ">"
197
+ - - ">="
198
198
  - !ruby/object:Gem::Version
199
- version: 1.3.1
199
+ version: '0'
200
200
  requirements: []
201
201
  rubyforge_project:
202
202
  rubygems_version: 2.2.2