jekyll-attendease 0.6.33b → 0.6.33
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 +5 -5
- data/lib/jekyll/attendease_plugin/site_pages_generator.rb +7 -0
- data/lib/jekyll/attendease_plugin/tags.rb +4 -7
- data/lib/jekyll/attendease_plugin/version.rb +1 -1
- data/spec/lib/jekyll/attendease_plugin/tags_spec.rb +2 -4
- metadata +4 -5
- data/lib/jekyll/attendease_plugin/site_page_blocks_json.rb +0 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d9621edb982af2f19c57d143d09b3e19936170e5a8474b99cc094d27ef6d1d68
|
4
|
+
data.tar.gz: 2bb65e74f3e3a6ef8ae62633d1d5bc33acd73e92f5a4bc911bf53435bdf7e666
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d648a162ca39da2c0052c7a1b241d22502718df0050ad9994e990c90943fab2653210dfff3054336e58a9e19cfcfcdf5c24ba64a8c105a9efd1e306bd1e74c35
|
7
|
+
data.tar.gz: 4b31864f48b7c6f3bb4b68b7cf99206526c5aab5113192a807896f263ce73b9c5c11b046e0ca4f47639a8617ef9a468865488e3c17d34d3b4627e7576b42ad40
|
@@ -3,13 +3,20 @@ module Jekyll
|
|
3
3
|
class SitePagesGenerator < Generator
|
4
4
|
safe true
|
5
5
|
|
6
|
+
# site.config:
|
7
|
+
# Is where you can find the configs generated for your site
|
8
|
+
# To check the structure sample go in your vagrant to
|
9
|
+
# /home/vagrant/attendease/var/organizations/attendease/portal_site/_config.yml
|
6
10
|
def generate(site)
|
7
11
|
site.data['pages'].each do |page|
|
8
12
|
if !page['external']
|
9
13
|
require 'cgi'
|
14
|
+
|
10
15
|
page['name'] = CGI.escapeHTML(page['name']) if page['name']
|
11
16
|
site.pages << SitePage.new(site, site.source, page)
|
12
17
|
|
18
|
+
next if site.config.attendease['private_site']
|
19
|
+
|
13
20
|
zones = {}
|
14
21
|
keys = [ 'content', 'preferences' ]
|
15
22
|
|
@@ -162,6 +162,7 @@ module Jekyll
|
|
162
162
|
locale: "en",
|
163
163
|
orgApiEndpoint: "#{ config['api_host'] }api",
|
164
164
|
orgId: "#{ config['source_id'] }",
|
165
|
+
privateSite: "#{ config['private_site'] }",
|
165
166
|
authApiEndpoint: "#{ config['auth_host'] }api",
|
166
167
|
orgLocales: #{ config['available_portal_locales'] }
|
167
168
|
}
|
@@ -179,6 +180,7 @@ _EOT
|
|
179
180
|
eventId: "#{ config['source_id'] }",
|
180
181
|
orgApiEndpoint: "#{ config['organization_url'] }api",
|
181
182
|
orgId: "#{ config['organization_id'] }",
|
183
|
+
privateSite: "#{ config['private_site'] }",
|
182
184
|
authApiEndpoint: "#{ config['auth_host'] }api"
|
183
185
|
}
|
184
186
|
})(window)
|
@@ -192,23 +194,18 @@ _EOT
|
|
192
194
|
else
|
193
195
|
case env
|
194
196
|
when 'development'
|
195
|
-
url = '//dashboard.localhost.attendease.com/webpack_assets/
|
196
|
-
style_url = '//dashboard.localhost.attendease.com/webpack_assets/block-renderer.bundle.css'
|
197
|
+
url = '//dashboard.localhost.attendease.com/webpack_assets/blockrenderer.bundle.js'
|
197
198
|
when 'prerelease'
|
198
199
|
url = '//cdn.attendease.com/blockrenderer/prerelease-latest.js'
|
199
|
-
style_url = '//cdn.attendease.com/blockrenderer/prerelease-latest.css'
|
200
200
|
when 'preview'
|
201
201
|
url = '//cdn.attendease.com/blockrenderer/ci-latest.js'
|
202
|
-
style_url = '//cdn.attendease.com/blockrenderer/ci-latest.css'
|
203
202
|
else
|
204
|
-
url = '//
|
205
|
-
style_url = '//cdn.attendease.com/blockrenderer/latest.css'
|
203
|
+
url = '//dashboard.attendease.com/webpack_assets/blockrenderer.bundle.js'
|
206
204
|
end
|
207
205
|
end
|
208
206
|
|
209
207
|
script << <<_EOT
|
210
208
|
<script type="text/javascript" src="#{ url }"></script>
|
211
|
-
<link rel="stylesheet" type="text/css" href="#{style_url}" />
|
212
209
|
_EOT
|
213
210
|
|
214
211
|
script
|
@@ -90,8 +90,7 @@ RSpec.describe "Jekyll Attendease tags" do
|
|
90
90
|
it { is_expected.to match(/orgApiEndpoint: "https:\/\/foobar\.org\/api"/) }
|
91
91
|
it { is_expected.to match(/orgId: "batbaz"/) }
|
92
92
|
it { is_expected.to match(/authApiEndpoint: "https:\/\/foobar.auth\/api"/) }
|
93
|
-
it { is_expected.to match(/
|
94
|
-
it { is_expected.to match(/cdn.attendease.com\/blockrenderer\/latest.css/) }
|
93
|
+
it { is_expected.to match(/dashboard.attendease.com\/webpack_assets\/blockrenderer.bundle.js/) }
|
95
94
|
it { is_expected.to_not match(/orgLocales/) }
|
96
95
|
end
|
97
96
|
|
@@ -108,8 +107,7 @@ RSpec.describe "Jekyll Attendease tags" do
|
|
108
107
|
it { is_expected.to match(/orgApiEndpoint: "https:\/\/foobar\/api"/) }
|
109
108
|
it { is_expected.to match(/orgId: "foobar"/) }
|
110
109
|
it { is_expected.to match(/authApiEndpoint: "https:\/\/foobar.auth\/api"/) }
|
111
|
-
it { is_expected.to match(/
|
112
|
-
it { is_expected.to match(/cdn.attendease.com\/blockrenderer\/latest.css/) }
|
110
|
+
it { is_expected.to match(/dashboard.attendease.com\/webpack_assets\/blockrenderer.bundle.js/) }
|
113
111
|
it { is_expected.to match(/orgLocales: \["en", "fr", "it", "es", "de"\]/) }
|
114
112
|
|
115
113
|
it { is_expected.to_not match(/eventApiEndpoint/) }
|
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.
|
4
|
+
version: 0.6.33
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Wood
|
@@ -183,7 +183,6 @@ files:
|
|
183
183
|
- lib/jekyll/attendease_plugin/schedule_session_page.rb
|
184
184
|
- lib/jekyll/attendease_plugin/schedule_sessions_page.rb
|
185
185
|
- lib/jekyll/attendease_plugin/site_page.rb
|
186
|
-
- lib/jekyll/attendease_plugin/site_page_blocks_json.rb
|
187
186
|
- lib/jekyll/attendease_plugin/site_pages_generator.rb
|
188
187
|
- lib/jekyll/attendease_plugin/sponsor_generator.rb
|
189
188
|
- lib/jekyll/attendease_plugin/sponsors_index_page.rb
|
@@ -234,12 +233,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
233
|
version: '0'
|
235
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
235
|
requirements:
|
237
|
-
- - "
|
236
|
+
- - ">="
|
238
237
|
- !ruby/object:Gem::Version
|
239
|
-
version:
|
238
|
+
version: '0'
|
240
239
|
requirements: []
|
241
240
|
rubyforge_project:
|
242
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.7.4
|
243
242
|
signing_key:
|
244
243
|
specification_version: 4
|
245
244
|
summary: Attendease event helper for Jekyll
|
@@ -1,42 +0,0 @@
|
|
1
|
-
module Jekyll
|
2
|
-
module AttendeasePlugin
|
3
|
-
class SitePageBlocksJson < StaticFile
|
4
|
-
def initialize(site, base, page)
|
5
|
-
@site = site
|
6
|
-
@base = base
|
7
|
-
@dir = page['slug']
|
8
|
-
@name = 'index.json'
|
9
|
-
|
10
|
-
self.process(@name)
|
11
|
-
|
12
|
-
#require 'pry'
|
13
|
-
#binding.pry
|
14
|
-
#self.read_yaml(File.join(base, '_attendease', 'templates', 'pages'), 'default.html')
|
15
|
-
self.read_yaml(File.join(base, '_layouts'), "#{page['layout']}.html")
|
16
|
-
|
17
|
-
self.data['title'] = page['title']
|
18
|
-
self.data['layout'] = page['layout']
|
19
|
-
|
20
|
-
zones = {}
|
21
|
-
|
22
|
-
# create zone buckets
|
23
|
-
page['block_instances'].each do |i|
|
24
|
-
zones[i['zone']] = [] if zones[i['zone']].nil?
|
25
|
-
zones[i['zone']] << i
|
26
|
-
end
|
27
|
-
|
28
|
-
# sort each bucket by widget weight
|
29
|
-
zones.each do |k, zone|
|
30
|
-
zone.sort! { |x, y| x['weight'] <=> y['weight'] }
|
31
|
-
self.data[k] = ''
|
32
|
-
zone.each do |i|
|
33
|
-
self.data[k] << i['rendered_html']
|
34
|
-
end
|
35
|
-
end
|
36
|
-
|
37
|
-
self.data['site_page'] = page
|
38
|
-
end
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|
42
|
-
|