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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 950db1e9e68b90e26df21e1ad1ea6dd75e2e2578
4
- data.tar.gz: e97dbf04427a378eebc24d5ed22dd66fea3e4d73
3
+ metadata.gz: 74a7163cae2196d8853cf81863190d0da4b18ae8
4
+ data.tar.gz: a6d3e2df9d5bb4804987956509c72bc3808e4683
5
5
  SHA512:
6
- metadata.gz: 04a4d75870949d91ea39621549ac1ec979fc9cd229efcb2cdc360709aa95c390948c282f112f2c68fd04d78b2416f74d9f20cce2f956423333ff86233d5fa500
7
- data.tar.gz: 96095d2903f1ea83242241a151eb8366b0ab9c2d0743e699b0512eb6ae4d3fa42dd4839d2787c922538ff51012b21a4fecdce8546c17084355b1e9c2a12c9deb
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
- # Setup
7
+ ### Setup
4
8
 
5
9
  Have in your Gemfile:
6
10
 
@@ -1,5 +1,5 @@
1
1
  module Riot
2
2
  module Rails
3
- VERSION = "0.9.0"
3
+ VERSION = "0.9.1"
4
4
  end
5
5
  end
@@ -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).replace(/\n/g, "\\n").replace(/\{([^\}]+)\}/g, "'+_.$1+'") + "'")
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', 'emit', 'off'], function(i, name) {
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.0
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-05 00:00:00.000000000 Z
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: