jekyll-attendease 0.3.3 → 0.3.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/jekyll-attendease.rb +4 -5
- metadata +2 -2
data/lib/jekyll-attendease.rb
CHANGED
@@ -36,7 +36,7 @@ module Jekyll
|
|
36
36
|
update_data = true
|
37
37
|
|
38
38
|
if File.exists?("#{@attendease_data_path}/site.json")
|
39
|
-
if (Time.now.to_i - File.mtime("#{@attendease_data_path}/site.json").to_i) <= 30 # file is less than 30 seconds old
|
39
|
+
if (Time.now.to_i - File.mtime("#{@attendease_data_path}/site.json").to_i) <= (@attendease_config['cache_expiry'].nil? ? 30 : @attendease_config['cache_expiry']) # file is less than 30 seconds old
|
40
40
|
update_data = false
|
41
41
|
|
42
42
|
site_json = File.read("#{@attendease_data_path}/site.json")
|
@@ -221,6 +221,8 @@ layout: layout
|
|
221
221
|
|
222
222
|
class AttendeaseAuthScriptTag < Liquid::Tag
|
223
223
|
def render(context)
|
224
|
+
@attendease_data_path = "#{context['site']['source']}/_attendease_data"
|
225
|
+
|
224
226
|
content = <<-eos
|
225
227
|
<script type="text/javascript">
|
226
228
|
function handleAuthState()
|
@@ -251,10 +253,7 @@ function handleAuthState()
|
|
251
253
|
}
|
252
254
|
}
|
253
255
|
|
254
|
-
document.addEventListener('DOMContentLoaded',
|
255
|
-
handleAuthState();
|
256
|
-
});
|
257
|
-
|
256
|
+
document.addEventListener('DOMContentLoaded', handleAuthState);
|
258
257
|
</script>
|
259
258
|
eos
|
260
259
|
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: jekyll-attendease
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.3.
|
5
|
+
version: 0.3.4
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Michael Wood
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-06-
|
12
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|