arcabouco 0.2.5 → 0.2.6
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 +4 -4
- data/lib/arcabouco/version.rb +1 -1
- data/lib/templates/bootstrap_code.js +8 -15
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: be421103c9cf9a95c59cd174cda8e9b09269a398
|
4
|
+
data.tar.gz: 042901e2b6a15d0ab33ec759ffaabbe7a33135cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fc30a75066b748a0d9ced26fa9a164f4d099f770688c600318bb6dc3af8bae83a95d1afe423f5d94744802e55b4245d97c0ff487c696d098f8ffb032887e9fd
|
7
|
+
data.tar.gz: d79f0b8df783f8a15f6f1d024ba62d64d5b061dff1336474d713e972867c3f30bf0c65a005af24507e729f8c605ad16c51e0f5f2325673f04bf99a7ef3a6c393
|
data/lib/arcabouco/version.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
app.
|
1
|
+
app.bootstraping = false;
|
2
|
+
app.bootstraped = false;
|
2
3
|
|
3
4
|
function _getJSON(url,callback) {
|
4
5
|
var xobj = new XMLHttpRequest();
|
@@ -26,21 +27,13 @@ function _loadCSS(src)
|
|
26
27
|
document.head.appendChild(css);
|
27
28
|
}
|
28
29
|
|
29
|
-
function checkLastUpdate()
|
30
|
-
{
|
31
|
-
// Fix to browser finding new content
|
32
|
-
_lastUpdate = Math.ceil( app._lastUpdate/1000 );
|
33
|
-
_currentUpdate = Math.ceil( (new Date()).getTime()/1000 );
|
34
|
-
if (app.enable_debug) console.log("DEBUG: Last Update: " + _lastUpdate);
|
35
|
-
if (_lastUpdate+5 < _currentUpdate) return false;
|
36
|
-
app._lastUpdate = (new Date()).getTime();
|
37
|
-
return true;
|
38
|
-
}
|
39
|
-
|
40
30
|
function bootstrapApplication()
|
41
31
|
{
|
42
|
-
if (
|
32
|
+
if (app.bootstraping) return;
|
43
33
|
if (app.bootstraped) return;
|
34
|
+
|
35
|
+
app.bootstraping = true;
|
36
|
+
|
44
37
|
if (app.enable_debug) console.log("DEBUG: Bootstrap Application. Manifest (" + app.assets_manifest + ")");
|
45
38
|
_getJSON( app.assets_manifest, function(data) {
|
46
39
|
_loadCSS( data.assets['app.vendor.css'] );
|
@@ -48,6 +41,7 @@ function bootstrapApplication()
|
|
48
41
|
_loadJS( data.assets['app.vendor.js'], function() {
|
49
42
|
_loadJS( data.assets['app.js'], function() {
|
50
43
|
app.boot();
|
44
|
+
app.bootstraping = false;
|
51
45
|
app.bootstraped = true;
|
52
46
|
var el = document.getElementById('application_preload_layer');
|
53
47
|
el.parentNode.removeChild(el);
|
@@ -58,7 +52,6 @@ function bootstrapApplication()
|
|
58
52
|
|
59
53
|
function updateApplicationDownloadProgress(progress)
|
60
54
|
{
|
61
|
-
if (app.bootstraped) return;
|
62
55
|
if (app.enable_debug) console.log("DEBUG: Detected new asset");
|
63
56
|
}
|
64
57
|
|
@@ -86,9 +79,9 @@ appcache_frame.onload = function() {
|
|
86
79
|
app.applicationCache.addEventListener('progress', function(e) { updateApplicationDownloadProgress(e); }, false);
|
87
80
|
|
88
81
|
setInterval(function() {
|
89
|
-
if (!checkLastUpdate()) return;
|
90
82
|
if (app.enable_debug) console.log("DEBUG: Checking for new assets");
|
91
83
|
app.applicationCache.update();
|
84
|
+
bootstrapApplication();
|
92
85
|
}, 10*60*1000);
|
93
86
|
}
|
94
87
|
document.head.appendChild( appcache_frame );
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arcabouco
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Negri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -326,7 +326,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
326
326
|
version: '0'
|
327
327
|
requirements: []
|
328
328
|
rubyforge_project: arcabouco
|
329
|
-
rubygems_version: 2.4.
|
329
|
+
rubygems_version: 2.4.3
|
330
330
|
signing_key:
|
331
331
|
specification_version: 4
|
332
332
|
summary: Arcabouco WebApp Framework
|