jekyll-attendease 0.6.37 → 0.6.38
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f595d607f6427a967ba807233e0f6b1e1d55a510
|
4
|
+
data.tar.gz: 57ec4f0a60928244e36ab44403a9434f5c785a52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d46fac7405d254dbbab9b5211b9a1502aebc012aa57266390a043effe6a3f892feb7390c427986bbce972690762ba78e7efeebfe0b70836e3d6df4c5a18b0ca1
|
7
|
+
data.tar.gz: 5bdcf31ac6b82a30c14768802cad1907efa8b876ccfad18538bd1bf8418fad02979cb813ab9ebbc0bc772ad6ef213cd37e309c8f95af89839526d9f5cfc9a791
|
@@ -151,18 +151,19 @@ module Jekyll
|
|
151
151
|
|
152
152
|
def render(context)
|
153
153
|
config = context.registers[:site].config['attendease']
|
154
|
-
|
155
|
-
parent_pages_are_clickable = config['parent_pages_are_clickable']
|
154
|
+
siteSettings = context.registers[:site].data['site_settings'].delete_if {|key, value| ['analytics', 'meta'].include? key }
|
156
155
|
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
156
|
+
organizationSiteSettings = {}
|
157
|
+
if context.registers[:site].data['organization_site_settings']
|
158
|
+
organizationSiteSettings = context.registers[:site].data['organization_site_settings'].delete_if {|key, value| ['analytics', 'meta'].include? key }
|
159
|
+
end
|
160
|
+
|
161
|
+
parent_pages_are_clickable = config['parent_pages_are_clickable']
|
162
162
|
|
163
163
|
page_keys = %w[id name href weight active root children parent]
|
164
164
|
|
165
|
-
pages =
|
165
|
+
pages = {}
|
166
|
+
pages = context.registers[:site].data['pages']
|
166
167
|
.select { |p| p['root'] }
|
167
168
|
.reject { |p| p['hidden'] }
|
168
169
|
.map do |page|
|
@@ -177,6 +178,25 @@ module Jekyll
|
|
177
178
|
end
|
178
179
|
.sort_by { |p| p['weight'] }
|
179
180
|
|
181
|
+
portal_pages = {}
|
182
|
+
if (context.registers[:site].data['portal_pages'])
|
183
|
+
portal_pages = context.registers[:site].data['portal_pages']
|
184
|
+
.select { |p| p['root'] }
|
185
|
+
.reject { |p| p['hidden'] }
|
186
|
+
.map do |page|
|
187
|
+
page = page.select { |key| page_keys.include?(key) }
|
188
|
+
|
189
|
+
page['children'] = page['children']
|
190
|
+
.reject { |p| p['hidden'] }
|
191
|
+
.map { |child| child.select { |key| page_keys.include?(key) } }
|
192
|
+
.sort_by { |p| p['weight'] }
|
193
|
+
|
194
|
+
page
|
195
|
+
end
|
196
|
+
.sort_by { |p| p['weight'] }
|
197
|
+
end
|
198
|
+
|
199
|
+
|
180
200
|
env = config['environment']
|
181
201
|
|
182
202
|
if config['mode'] == 'organization'
|
@@ -185,14 +205,15 @@ module Jekyll
|
|
185
205
|
(function(w) {
|
186
206
|
w.AttendeaseConstants = {
|
187
207
|
locale: "en",
|
188
|
-
|
208
|
+
orgURL: "#{ config['api_host'] }",
|
189
209
|
orgId: "#{ config['source_id'] }",
|
190
210
|
privateSite: #{ config['private_site'] },
|
191
211
|
authApiEndpoint: "#{ config['auth_host'] }api",
|
192
212
|
orgLocales: #{ config['available_portal_locales'] },
|
193
213
|
features: #{ config['features'].to_json },
|
194
214
|
pages: #{ pages.to_json },
|
195
|
-
settings: { parentPagesAreClickable: #{!!parent_pages_are_clickable} }
|
215
|
+
settings: { parentPagesAreClickable: #{!!parent_pages_are_clickable} },
|
216
|
+
siteSettings: #{ siteSettings.to_json }
|
196
217
|
}
|
197
218
|
})(window)
|
198
219
|
</script>
|
@@ -206,13 +227,16 @@ _EOT
|
|
206
227
|
locale: "#{ config['locale'] }",
|
207
228
|
eventApiEndpoint: "#{ config['api_host'] }api",
|
208
229
|
eventId: "#{ config['source_id'] }",
|
209
|
-
|
230
|
+
orgURL: "#{ config['organization_url'] }",
|
210
231
|
orgId: "#{ config['organization_id'] }",
|
211
232
|
privateSite: #{ config['private_site'] },
|
212
233
|
authApiEndpoint: "#{ config['auth_host'] }api",
|
213
234
|
features: #{ config['features'].to_json },
|
214
235
|
pages: #{ pages.to_json },
|
215
|
-
|
236
|
+
portalPages: #{ portal_pages.to_json },
|
237
|
+
settings: { parentPagesAreClickable: #{!!parent_pages_are_clickable} },
|
238
|
+
siteSettings: #{ siteSettings.to_json },
|
239
|
+
organizationSiteSettings: #{ organizationSiteSettings.to_json }
|
216
240
|
}
|
217
241
|
})(window)
|
218
242
|
</script>
|
@@ -87,7 +87,7 @@ RSpec.describe "Jekyll Attendease tags" do
|
|
87
87
|
it { is_expected.to match(/locale: "en"/) }
|
88
88
|
it { is_expected.to match(/eventApiEndpoint: "https:\/\/foobar\/api"/) }
|
89
89
|
it { is_expected.to match(/eventId: "foobar"/) }
|
90
|
-
it { is_expected.to match(/
|
90
|
+
it { is_expected.to match(/orgURL: "https:\/\/foobar.org\/"/) }
|
91
91
|
it { is_expected.to match(/orgId: "batbaz"/) }
|
92
92
|
it { is_expected.to match(/authApiEndpoint: "https:\/\/foobar.auth\/api"/) }
|
93
93
|
it { is_expected.to match(/dashboard.attendease.com\/webpack_assets\/blockrenderer.bundle.js/) }
|
@@ -104,7 +104,7 @@ RSpec.describe "Jekyll Attendease tags" do
|
|
104
104
|
subject { org_render("{% attendease_block_renderer %}") }
|
105
105
|
|
106
106
|
it { is_expected.to match(/locale: "en"/) }
|
107
|
-
it { is_expected.to match(/
|
107
|
+
it { is_expected.to match(/orgURL: "https:\/\/foobar\/"/) }
|
108
108
|
it { is_expected.to match(/orgId: "foobar"/) }
|
109
109
|
it { is_expected.to match(/authApiEndpoint: "https:\/\/foobar.auth\/api"/) }
|
110
110
|
it { is_expected.to match(/dashboard.attendease.com\/webpack_assets\/blockrenderer.bundle.js/) }
|
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.38
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Wood
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2018-
|
14
|
+
date: 2018-09-25 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: httparty
|
@@ -238,7 +238,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
238
238
|
version: '0'
|
239
239
|
requirements: []
|
240
240
|
rubyforge_project:
|
241
|
-
rubygems_version: 2.
|
241
|
+
rubygems_version: 2.2.5
|
242
242
|
signing_key:
|
243
243
|
specification_version: 4
|
244
244
|
summary: Attendease event helper for Jekyll
|