jekyll-attendease 0.6.24c → 0.6.24d

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: fd404c5c2d84e5bb31ab7a41e464e8c40b578e6a
4
- data.tar.gz: 1afd125825c8f7e378c0210e8b8233748dd98e8d
3
+ metadata.gz: c7412519dd3e7988174c88272b3b73c64593e7ae
4
+ data.tar.gz: 2c8b08224cc7fd657e7c530c72e5862aa5684552
5
5
  SHA512:
6
- metadata.gz: db5a98eb2ef40597fc72f71f4494e0174aaf0c04f5f4047ecf7d8a8205c55b4c0d3e2517706a7be6be1e72f2a66c6625b4877fd4a47443856c80418b0d2b0d74
7
- data.tar.gz: e9a134841e66726f8d0118b62ea9da51480cba8c27e4fc557f55a0ed81c0e7feffbad7a9665426c811906be75413127cee425e8fac58858f2a1e94777b939fcb
6
+ metadata.gz: 6fd685368fb40503d6cd332f0e985ffea4f57aa8b1d84226cccdca9d7c14a87a1f061e686bc6643187ae6519f14d649b36c5f75ccee0f2710d92beabdad26ebc
7
+ data.tar.gz: f700d746f5d7e5cfcf1f40be736ae5c8cd80e8fe6311829eefc6ec5a08f92fbfbd4d79b36f83d7e589c942626663e0b690362012070d17af387e75abb16c077a
@@ -4,9 +4,15 @@ module Jekyll
4
4
  def slugify(string)
5
5
  Helpers.parameterize(string, '_')
6
6
  end
7
+
7
8
  def json(obj)
8
9
  obj.to_json
9
10
  end
11
+
12
+ def awesome_inspect(obj)
13
+ require 'awesome_print'
14
+ obj.ai(html: true)
15
+ end
10
16
  end
11
17
  end
12
18
  end
@@ -59,23 +59,23 @@ module Jekyll
59
59
  protected
60
60
 
61
61
  def raw_presenters
62
- @raw_presenters ||= JSON.parse(File.read("#{data_path}/presenters.json")).sort{|p1, p2| p1['last_name'] <=> p2['last_name']}
62
+ @raw_presenters ||= @site.config['attendease']['presenters'].sort{|p1, p2| p1['last_name'] <=> p2['last_name']}
63
63
  end
64
64
 
65
65
  def raw_venues
66
- @raw_venues ||= JSON.parse(File.read("#{data_path}/venues.json")).sort{|v1, v2| v1['name'] <=> v2['name']}
66
+ @raw_venues ||= @site.config['attendease']['venues'].sort{|v1, v2| v1['name'] <=> v2['name']}
67
67
  end
68
68
 
69
69
  def raw_rooms
70
- @raw_rooms ||= JSON.parse(File.read("#{data_path}/rooms.json")).sort{|r1, r2| r1['name'] <=> r2['name']}
70
+ @raw_rooms ||= @site.config['attendease']['rooms'].sort{|r1, r2| r1['name'] <=> r2['name']}
71
71
  end
72
72
 
73
73
  def raw_sessions
74
- @raw_sessions ||= JSON.parse(File.read("#{data_path}/sessions.json")).sort{|s1, s2| s1['name'] <=> s2['name']}
74
+ @raw_sessions ||= @site.config['attendease']['sessions'].sort{|s1, s2| s1['name'] <=> s2['name']}
75
75
  end
76
76
 
77
77
  def raw_filters
78
- @raw_filters ||= JSON.parse(File.read("#{data_path}/filters.json")).sort{|f1, f2| f1['name'] <=> f2['name']}
78
+ @raw_filters ||= @site.config['attendease']['filters'].sort{|f1, f2| f1['name'] <=> f2['name']}
79
79
  end
80
80
 
81
81
  def data_path
@@ -108,17 +108,18 @@ module Jekyll
108
108
  end
109
109
  end
110
110
 
111
- # Populates filter realted data into session,
111
+ # Populates filter related data into session,
112
112
  # from source.
113
113
  def populate_session_filters!(session, source)
114
114
  filters_for_session_hash = {}
115
115
  filters.each do |filter|
116
116
  filter['filter_items'].each_with_index do |filter_item, index|
117
117
  if source['filters'].include?(filter_item['id'])
118
- filters_for_session_hash[filter['name']] ||= []
119
- filters_for_session_hash[filter['name']] << {
120
- 'name' => filter_item['name'],
121
- 'index' => index,
118
+ filters_for_session_hash[filter['name']] ||= { :colour => filter['colour'], :items => [] }
119
+ filters_for_session_hash[filter['name']][:items] << {
120
+ 'name' => filter_item['name'],
121
+ 'colour' => filter_item['colour'],
122
+ 'index' => index,
122
123
  }
123
124
  if event['primary_filter_id'] && event['primary_filter_id'] == filter['id']
124
125
  session['primary_filter_name'] = filter['name']
@@ -128,7 +129,7 @@ module Jekyll
128
129
  end
129
130
  end
130
131
 
131
- session['filters'] = filters_for_session_hash.map { |key, value| { 'name' => key, 'items' => value } }
132
+ session['filters'] = filters_for_session_hash.map { |key, value| { 'name' => key, 'items' => value[:items], 'colour' => value[:colour] } }
132
133
  session['filter_tags'] = get_session_filter_tags(session['filters'])
133
134
  end
134
135
 
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module AttendeasePlugin
3
- VERSION = '0.6.24c'
3
+ VERSION = '0.6.24d'
4
4
  end
5
5
  end
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.24c
4
+ version: 0.6.24d
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Wood
@@ -55,6 +55,20 @@ dependencies:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
57
  version: 0.6.9
58
+ - !ruby/object:Gem::Dependency
59
+ name: awesome_print
60
+ requirement: !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - ">="
63
+ - !ruby/object:Gem::Version
64
+ version: '0'
65
+ type: :runtime
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '0'
58
72
  - !ruby/object:Gem::Dependency
59
73
  name: bundler
60
74
  requirement: !ruby/object:Gem::Requirement