riotjs-rails 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/riotjs-rails/version.rb +1 -1
- data/vendor/assets/javascripts/riot.js +24 -36
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cb7e2baf9a0ae4cadabc315ccf3489e5b9162da1
|
4
|
+
data.tar.gz: 9df2e6f95dc4accee2853cd9e6ce33637574d1d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5f739ef1e692afc263672db881c3ba148d76c82d53df2faa99bddc177c36df6c36f6d9bb4624c9bed105f2ac50e3d81eeda72c6ab48f35712147ef7e29a0547
|
7
|
+
data.tar.gz: 81c8575331611137ff2592866c9a9ab285c5a8b304e6d8a80e40a2dd7655299c5b2ad8ecc08c736fa9a01001740971426b73cd792286accf199b7d41094709c6
|
data/lib/riotjs-rails/version.rb
CHANGED
@@ -1,57 +1,44 @@
|
|
1
|
-
/*
|
2
|
-
Riot.js 0.9.7 | moot.it/riotjs | @license MIT
|
3
|
-
(c) 2013 Tero Piirainen, Moot Inc and other contributors.
|
4
|
-
*/
|
1
|
+
/* Riot 0.9.8, @license MIT, (c) 2014 Moot Inc + contributors */
|
5
2
|
(function($) { "use strict";
|
6
3
|
|
7
4
|
$.observable = function(el) {
|
8
5
|
var callbacks = {}, slice = [].slice;
|
9
6
|
|
10
7
|
el.on = function(events, fn) {
|
11
|
-
|
12
8
|
if (typeof fn === "function") {
|
13
|
-
events
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
(callbacks[type] = callbacks[type] || []).push(fn);
|
18
|
-
if (len > 1) fn.typed = true;
|
19
|
-
}
|
9
|
+
events.replace(/[^\s]+/g, function(name, pos) {
|
10
|
+
(callbacks[name] = callbacks[name] || []).push(fn);
|
11
|
+
fn.typed = pos > 0;
|
12
|
+
});
|
20
13
|
}
|
21
14
|
return el;
|
22
15
|
};
|
23
16
|
|
24
17
|
el.off = function(events) {
|
25
|
-
events
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
}
|
30
|
-
|
18
|
+
events.replace(/[^\s]+/g, function(name) {
|
19
|
+
callbacks[name] = [];
|
20
|
+
});
|
21
|
+
if (events == "*") callbacks = {};
|
31
22
|
return el;
|
32
23
|
};
|
33
24
|
|
34
25
|
// only single event supported
|
35
|
-
el.one = function(
|
26
|
+
el.one = function(name, fn) {
|
36
27
|
if (fn) fn.one = true;
|
37
|
-
return el.on(
|
38
|
-
|
28
|
+
return el.on(name, fn);
|
39
29
|
};
|
40
30
|
|
41
|
-
el.trigger = function(
|
42
|
-
|
31
|
+
el.trigger = function(name) {
|
43
32
|
var args = slice.call(arguments, 1),
|
44
|
-
fns = callbacks[
|
45
|
-
|
46
|
-
for (var i = 0, fn;
|
47
|
-
fn
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
fn.done = true;
|
33
|
+
fns = callbacks[name] || [];
|
34
|
+
|
35
|
+
for (var i = 0, fn; fn = fns[i]; ++i) {
|
36
|
+
if (!((fn.one && fn.done) || fn.busy)) {
|
37
|
+
fn.busy = true;
|
38
|
+
fn.apply(el, fn.typed ? [name].concat(args) : args);
|
39
|
+
fn.done = true;
|
40
|
+
fn.busy = false;
|
41
|
+
}
|
55
42
|
}
|
56
43
|
|
57
44
|
return el;
|
@@ -80,10 +67,11 @@ $.render = function(template, data) {
|
|
80
67
|
};
|
81
68
|
|
82
69
|
|
83
|
-
|
70
|
+
/* Cross browser popstate */
|
71
|
+
|
72
|
+
// for browsers only
|
84
73
|
if (typeof top != "object") return;
|
85
74
|
|
86
|
-
// cross browser popstate
|
87
75
|
var currentHash,
|
88
76
|
pops = $.observable({}),
|
89
77
|
listen = window.addEventListener,
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: riotjs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple asset-pipeline wrapper for riot.js by moot
|
14
14
|
email:
|