riotjs-rails 0.9.0 → 0.9.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Readme.md +5 -1
- data/lib/riotjs-rails/version.rb +1 -1
- data/vendor/assets/javascripts/riot.js +7 -16
- 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: 74a7163cae2196d8853cf81863190d0da4b18ae8
|
4
|
+
data.tar.gz: a6d3e2df9d5bb4804987956509c72bc3808e4683
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9aa7563eac2cf41b1e9746095c03f6bec1c2733cbaf9a92751e1ba0b47307b9c7e2291006f3cfedc61bda0e87b42d64433589c6818a37c39391085476fc382dd
|
7
|
+
data.tar.gz: 4a710a8b704587e302b9d5402bfe7475bde9504e06a8d819151130fd21b2cb8b611da571eceb185be9d8c228fac7c9ca3c44c773c0a6e5a78648af81e889e784
|
data/Readme.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
+
# riotjs-rails <a href="http://badge.fury.io/rb/riotjs-rails"><img src="https://badge.fury.io/rb/riotjs-rails@2x.png" alt="Gem Version" height="18"></a>
|
2
|
+
|
3
|
+
### About
|
4
|
+
|
1
5
|
Rails 3.1+ asset-pipeline gem to provide riot.js
|
2
6
|
|
3
|
-
|
7
|
+
### Setup
|
4
8
|
|
5
9
|
Have in your Gemfile:
|
6
10
|
|
data/lib/riotjs-rails/version.rb
CHANGED
@@ -1,12 +1,4 @@
|
|
1
|
-
/*
|
2
|
-
|
3
|
-
Riot.js 0.9.0 | moot.it/riotjs
|
4
|
-
|
5
|
-
(c) 2013 Tero Piirainen, Moot Inc
|
6
|
-
|
7
|
-
@license: MIT
|
8
|
-
|
9
|
-
*/
|
1
|
+
/* Riot.js 0.9.1 | moot.it/riotjs | (c) 2013 Moot Inc | @license: MIT */
|
10
2
|
(function($, win) {
|
11
3
|
|
12
4
|
// Precompiled templates (JavaScript functions)
|
@@ -17,20 +9,18 @@
|
|
17
9
|
// Render a template with data
|
18
10
|
$.render = function(template, data) {
|
19
11
|
return (FN[template] = FN[template] || Function("_", "return '" +
|
20
|
-
$.trim(template)
|
12
|
+
$.trim(template)
|
13
|
+
.replace(/\n/g, "\\n")
|
14
|
+
.replace(/'/g, "\\'")
|
15
|
+
.replace(/\{(\w+)\}/g, "' + (_.$1 || '') + '") + "'")
|
21
16
|
)(data);
|
22
17
|
}
|
23
18
|
|
24
|
-
// A convenience render method to return a jQuery element
|
25
|
-
$.el = function(template, data) {
|
26
|
-
return $($.render(template, data));
|
27
|
-
}
|
28
|
-
|
29
19
|
// A classic pattern for separating concerns
|
30
20
|
$.observable = function(obj) {
|
31
21
|
var jq = $({});
|
32
22
|
|
33
|
-
$.each(['on', 'one', '
|
23
|
+
$.each(['on', 'one', 'trigger', 'off'], function(i, name) {
|
34
24
|
obj[name] = function(names, fn) {
|
35
25
|
|
36
26
|
if (i < 2) {
|
@@ -49,6 +39,7 @@
|
|
49
39
|
|
50
40
|
return obj;
|
51
41
|
}
|
42
|
+
|
52
43
|
})
|
53
44
|
|
54
45
|
return obj;
|
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.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-11-
|
11
|
+
date: 2013-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple asset-pipeline wrapper for riot.js by moot
|
14
14
|
email:
|