riotjs-rails 1.0.4 → 2.0.2
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
- metadata +3 -12
- data/.gitignore +0 -3
- data/Gemfile +0 -2
- data/LICENSE.md +0 -21
- data/Rakefile +0 -1
- data/Readme.md +0 -15
- data/lib/riotjs-rails.rb +0 -10
- data/lib/riotjs-rails/version.rb +0 -5
- data/riotjs-rails.gemspec +0 -22
- data/vendor/assets/javascripts/riot.js +0 -129
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 25dbc5d0c8f66337b2c05e27e1fbc0a106efd067
|
4
|
+
data.tar.gz: 98de632f5c9140fe0c4affa20c32defad9353ce0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c380b2699ff01e0c7b526c2e167ac1adf6516696f595e09ec6af8ac82d07034e6ad7a3531cc58c38684ead5f35ec857e01c4c409970d531cc0229d5fb9502c4b
|
7
|
+
data.tar.gz: d46e50e7fa8800fcfa31a1628f3fbc9239315e90d5c8d29da19f80d83102a4a832dcd4308284191948c2e8ffffbfab4e52e1b9b3cd2b74d85c64f84b1422a62b
|
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:
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Butler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A simple asset-pipeline wrapper for riot.js by moot
|
14
14
|
email:
|
@@ -16,16 +16,7 @@ email:
|
|
16
16
|
executables: []
|
17
17
|
extensions: []
|
18
18
|
extra_rdoc_files: []
|
19
|
-
files:
|
20
|
-
- ".gitignore"
|
21
|
-
- Gemfile
|
22
|
-
- LICENSE.md
|
23
|
-
- Rakefile
|
24
|
-
- Readme.md
|
25
|
-
- lib/riotjs-rails.rb
|
26
|
-
- lib/riotjs-rails/version.rb
|
27
|
-
- riotjs-rails.gemspec
|
28
|
-
- vendor/assets/javascripts/riot.js
|
19
|
+
files: []
|
29
20
|
homepage: https://github.com/adambutler/riotjs-rails
|
30
21
|
licenses:
|
31
22
|
- MIT
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/LICENSE.md
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2013 Adam Butler
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
7
|
-
in the Software without restriction, including without limitation the rights
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
10
|
-
furnished to do so, subject to the following conditions:
|
11
|
-
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
13
|
-
all copies or substantial portions of the Software.
|
14
|
-
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
-
THE SOFTWARE.
|
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
data/Readme.md
DELETED
@@ -1,15 +0,0 @@
|
|
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
|
-
|
5
|
-
Rails 3.1+ asset-pipeline gem to provide riot.js
|
6
|
-
|
7
|
-
### Setup
|
8
|
-
|
9
|
-
Have in your Gemfile:
|
10
|
-
|
11
|
-
gem 'riotjs-rails'
|
12
|
-
|
13
|
-
And, have in your application.js manifest:
|
14
|
-
|
15
|
-
//= require riot
|
data/lib/riotjs-rails.rb
DELETED
data/lib/riotjs-rails/version.rb
DELETED
data/riotjs-rails.gemspec
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "riotjs-rails/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "riotjs-rails"
|
7
|
-
s.version = Riot::Rails::VERSION
|
8
|
-
s.authors = ["Adam Butler"]
|
9
|
-
s.email = ["adam@lab.io"]
|
10
|
-
s.homepage = "https://github.com/adambutler/riotjs-rails"
|
11
|
-
s.summary = %q{riot.js asset pipeline provider/wrapper}
|
12
|
-
s.description = "A simple asset-pipeline wrapper for riot.js by moot"
|
13
|
-
s.license = "MIT"
|
14
|
-
|
15
|
-
s.rubyforge_project = "riotjs-rails"
|
16
|
-
|
17
|
-
s.files = `git ls-files`.split("\n")
|
18
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
-
s.require_paths = ["lib"]
|
21
|
-
|
22
|
-
end
|
@@ -1,129 +0,0 @@
|
|
1
|
-
/* Riot 1.0.4, @license MIT, (c) 2014 Muut Inc + contributors */
|
2
|
-
(function(riot) { "use strict";
|
3
|
-
|
4
|
-
riot.observable = function(el) {
|
5
|
-
var callbacks = {}, slice = [].slice;
|
6
|
-
|
7
|
-
el.on = function(events, fn) {
|
8
|
-
if (typeof fn === "function") {
|
9
|
-
events.replace(/\S+/g, function(name, pos) {
|
10
|
-
(callbacks[name] = callbacks[name] || []).push(fn);
|
11
|
-
fn.typed = pos > 0;
|
12
|
-
});
|
13
|
-
}
|
14
|
-
return el;
|
15
|
-
};
|
16
|
-
|
17
|
-
el.off = function(events, fn) {
|
18
|
-
if (events === "*") callbacks = {};
|
19
|
-
else if (fn) {
|
20
|
-
var arr = callbacks[events];
|
21
|
-
for (var i = 0, cb; (cb = arr && arr[i]); ++i) {
|
22
|
-
if (cb === fn) { arr.splice(i, 1); i--; }
|
23
|
-
}
|
24
|
-
} else {
|
25
|
-
events.replace(/\S+/g, function(name) {
|
26
|
-
callbacks[name] = [];
|
27
|
-
});
|
28
|
-
}
|
29
|
-
return el;
|
30
|
-
};
|
31
|
-
|
32
|
-
// only single event supported
|
33
|
-
el.one = function(name, fn) {
|
34
|
-
if (fn) fn.one = true;
|
35
|
-
return el.on(name, fn);
|
36
|
-
};
|
37
|
-
|
38
|
-
el.trigger = function(name) {
|
39
|
-
var args = slice.call(arguments, 1),
|
40
|
-
fns = callbacks[name] || [];
|
41
|
-
|
42
|
-
for (var i = 0, fn; (fn = fns[i]); ++i) {
|
43
|
-
if (!fn.busy) {
|
44
|
-
fn.busy = true;
|
45
|
-
fn.apply(el, fn.typed ? [name].concat(args) : args);
|
46
|
-
if (fn.one) { fns.splice(i, 1); i--; }
|
47
|
-
fn.busy = false;
|
48
|
-
}
|
49
|
-
}
|
50
|
-
|
51
|
-
return el;
|
52
|
-
};
|
53
|
-
|
54
|
-
return el;
|
55
|
-
|
56
|
-
};
|
57
|
-
var FN = {}, // Precompiled templates (JavaScript functions)
|
58
|
-
template_escape = {"\\": "\\\\", "\n": "\\n", "\r": "\\r", "'": "\\'"},
|
59
|
-
render_escape = {'&': '&', '"': '"', '<': '<', '>': '>'};
|
60
|
-
|
61
|
-
function default_escape_fn(str, key) {
|
62
|
-
return str == null ? '' : (str+'').replace(/[&\"<>]/g, function(char) {
|
63
|
-
return render_escape[char];
|
64
|
-
});
|
65
|
-
}
|
66
|
-
|
67
|
-
riot.render = function(tmpl, data, escape_fn) {
|
68
|
-
if (escape_fn === true) escape_fn = default_escape_fn;
|
69
|
-
tmpl = tmpl || '';
|
70
|
-
|
71
|
-
return (FN[tmpl] = FN[tmpl] || new Function("_", "e", "return '" +
|
72
|
-
tmpl.replace(/[\\\n\r']/g, function(char) {
|
73
|
-
return template_escape[char];
|
74
|
-
}).replace(/{\s*([\w\.]+)\s*}/g, "' + (e?e(_.$1,'$1'):_.$1||(_.$1==null?'':_.$1)) + '") + "'")
|
75
|
-
)(data, escape_fn);
|
76
|
-
};
|
77
|
-
/* Cross browser popstate */
|
78
|
-
(function () {
|
79
|
-
// for browsers only
|
80
|
-
if (typeof window === "undefined") return;
|
81
|
-
|
82
|
-
var currentHash,
|
83
|
-
pops = riot.observable({}),
|
84
|
-
listen = window.addEventListener,
|
85
|
-
doc = document;
|
86
|
-
|
87
|
-
function pop(hash) {
|
88
|
-
hash = hash.type ? location.hash : hash;
|
89
|
-
if (hash !== currentHash) pops.trigger("pop", hash);
|
90
|
-
currentHash = hash;
|
91
|
-
}
|
92
|
-
|
93
|
-
/* Always fire pop event upon page load (normalize behaviour across browsers) */
|
94
|
-
|
95
|
-
// standard browsers
|
96
|
-
if (listen) {
|
97
|
-
listen("popstate", pop, false);
|
98
|
-
doc.addEventListener("DOMContentLoaded", pop, false);
|
99
|
-
|
100
|
-
// IE
|
101
|
-
} else {
|
102
|
-
doc.attachEvent("onreadystatechange", function() {
|
103
|
-
if (doc.readyState === "complete") pop("");
|
104
|
-
});
|
105
|
-
}
|
106
|
-
|
107
|
-
/* Change the browser URL or listen to changes on the URL */
|
108
|
-
riot.route = function(to) {
|
109
|
-
// listen
|
110
|
-
if (typeof to === "function") return pops.on("pop", to);
|
111
|
-
|
112
|
-
// fire
|
113
|
-
if (history.pushState) history.pushState(0, 0, to);
|
114
|
-
pop(to);
|
115
|
-
|
116
|
-
};
|
117
|
-
})();
|
118
|
-
if (typeof exports === 'object') {
|
119
|
-
// CommonJS support
|
120
|
-
module.exports = riot;
|
121
|
-
} else if (typeof define === 'function' && define.amd) {
|
122
|
-
// support AMD
|
123
|
-
define(function() { return riot; });
|
124
|
-
} else {
|
125
|
-
// support browser
|
126
|
-
window.riot = riot;
|
127
|
-
}
|
128
|
-
|
129
|
-
})({});
|