ende 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +4 -0
- data/README.md +29 -0
- data/Rakefile +1 -0
- data/WTFP-LICENSE +13 -0
- data/component.json +31 -0
- data/ende.gemspec +23 -0
- data/lib/assets/.gitkeep +0 -0
- data/lib/assets/javascripts/aura/extensions/devise.js.coffee +110 -0
- data/lib/assets/javascripts/aura/extensions/loader.js.coffee +48 -0
- data/lib/assets/javascripts/aura/extensions/mediator.js +98 -0
- data/lib/assets/javascripts/aura/extensions/models.js.coffee.erb +56 -0
- data/lib/assets/javascripts/aura/extensions/rivets.js.coffee +251 -0
- data/lib/assets/javascripts/aura/extensions/states.js.coffee +62 -0
- data/lib/assets/javascripts/aura/extensions/widget/eventable.js.coffee +66 -0
- data/lib/assets/javascripts/aura/extensions/widget/lifecycleable.js.coffee +75 -0
- data/lib/assets/javascripts/config/initializers/jquery.js.coffee +6 -0
- data/lib/assets/javascripts/config/initializers/load_components.js.coffee +73 -0
- data/lib/assets/javascripts/config/initializers/requirejs.js.coffee +3 -0
- data/lib/assets/javascripts/ende.js.coffee +1 -0
- data/lib/assets/javascripts/widgets/authenticator/main.js.coffee +95 -0
- data/lib/assets/javascripts/widgets/authenticator/presenter.js.coffee +35 -0
- data/lib/assets/javascripts/widgets/authenticator/states/default.html +7 -0
- data/lib/assets/javascripts/widgets/authenticator/states/index.js.coffee +3 -0
- data/lib/assets/javascripts/widgets/authenticator/states/passwords.html +6 -0
- data/lib/assets/javascripts/widgets/list/main.js.coffee +82 -0
- data/lib/assets/javascripts/widgets/list/presenter.js.coffee +34 -0
- data/lib/assets/javascripts/widgets/list/states/default.html +4 -0
- data/lib/assets/javascripts/widgets/list/states/index.js.coffee +2 -0
- data/lib/assets/javascripts/widgets/viewer/main.js.coffee +139 -0
- data/lib/assets/javascripts/widgets/viewer/presenter.js.coffee +54 -0
- data/lib/assets/javascripts/widgets/viewer/states/default.html +6 -0
- data/lib/assets/javascripts/widgets/viewer/states/index.js.coffee +2 -0
- data/lib/assets/stylesheets/application/modules/authenticator.css.styl +7 -0
- data/lib/assets/stylesheets/application/modules/widgets/structure/list.css.styl +9 -0
- data/lib/assets/stylesheets/application/modules/widgets/structure/viewer.css.styl +21 -0
- data/lib/assets/stylesheets/application/modules/widgets/structure/widget.css.styl +5 -0
- data/lib/assets/stylesheets/filter.styl +10 -0
- data/lib/assets/stylesheets/helpers/button.styl +61 -0
- data/lib/assets/stylesheets/helpers/general.styl +36 -0
- data/lib/assets/stylesheets/helpers/index.styl +4 -0
- data/lib/assets/stylesheets/helpers/link.styl +6 -0
- data/lib/assets/stylesheets/helpers/url.styl +5 -0
- data/lib/assets/stylesheets/modules/button.styl +42 -0
- data/lib/assets/stylesheets/sprite.styl +40 -0
- data/lib/assets/stylesheets/ssprites.styl +1 -0
- data/lib/ende/version.rb +3 -0
- data/lib/ende.rb +21 -0
- data/lib/tasks/.gitkeep +0 -0
- data/lib/tasks/component.thor +63 -0
- data/lib/tasks/sprite.thor +62 -0
- data/vendor/assets/javascripts/stampit/stampit.js +392 -0
- metadata +126 -0
@@ -0,0 +1,63 @@
|
|
1
|
+
class Component < Thor
|
2
|
+
include Thor::Actions
|
3
|
+
|
4
|
+
COMPONENTS = {
|
5
|
+
"necolas/normalize.css" => "v1"
|
6
|
+
}
|
7
|
+
|
8
|
+
desc "create", "Create basic structure to use Component components."
|
9
|
+
def create
|
10
|
+
create_file "component.json" do
|
11
|
+
|
12
|
+
name = ask "App name:", :cyan
|
13
|
+
default_name = "indefinido/#{name.split(' ')[0].downcase}"
|
14
|
+
|
15
|
+
repo = ask "Repository (<username>/<project>): [#{default_name}]", :cyan
|
16
|
+
repo = default_name if repo == ""
|
17
|
+
|
18
|
+
desc = ask "App description:", :cyan
|
19
|
+
|
20
|
+
repos = []
|
21
|
+
if yes? "Choose some components? [y/n]", :cyan
|
22
|
+
|
23
|
+
COMPONENTS.each_pair do |repo, version|
|
24
|
+
repos << [repo,version] if yes? " #{repo}(#{version})? [y/n] ", :magenta
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
<<-COMPONENT
|
29
|
+
{
|
30
|
+
"name": "#{name}",
|
31
|
+
"repo": "#{repo}",
|
32
|
+
"description": "#{desc}",
|
33
|
+
"version": "0.0.1",
|
34
|
+
"keywords": [],
|
35
|
+
"dependencies": {
|
36
|
+
#{ repos.map do |repo| "\"#{repo[0]}\": \"#{repo[1]}\"" end.join ",\n " }
|
37
|
+
},
|
38
|
+
"development": {},
|
39
|
+
"paths": ["lib/components", "vendor/components"],
|
40
|
+
"license": "MIT"
|
41
|
+
}
|
42
|
+
COMPONENT
|
43
|
+
end
|
44
|
+
|
45
|
+
empty_directory "vendor/components"
|
46
|
+
empty_directory "vendor/assets/components"
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "install [COMPONENT], [PATH]", "Install components to PATH, defaulted to ./vendor/components"
|
50
|
+
def install component = "", path = "vendor/components"
|
51
|
+
run "component install #{component} --out #{path}"
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "search QUERY", "Search components repository for a given component"
|
55
|
+
def search query
|
56
|
+
run "component search #{query}"
|
57
|
+
end
|
58
|
+
|
59
|
+
desc "build [PATH]", "Build components to PATH, defaulted to ./vendor/assets/components"
|
60
|
+
def build path="vendor/assets/components"
|
61
|
+
run "component build --out #{path}"
|
62
|
+
end
|
63
|
+
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
require 'css_parser'
|
2
|
+
require 'awesome_print'
|
3
|
+
require 'pry'
|
4
|
+
|
5
|
+
class Sprite < Thor
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
desc "build WIDGET", "Build CSS helpers for sprites generated by Fireworks exported to 'app/assets/images/WIDGET/sprite.*'"
|
9
|
+
def build widget = 'default'
|
10
|
+
parser = CssParser::Parser.new
|
11
|
+
css = File.read File.join 'app/assets/images', widget, 'sprite.css'
|
12
|
+
|
13
|
+
css.gsub! 'sprite.png', "/assets/#{widget}/sprite.png"
|
14
|
+
parser.add_block! css
|
15
|
+
|
16
|
+
structure = []
|
17
|
+
|
18
|
+
|
19
|
+
parser.each_selector do |selector, declarations, specificity|
|
20
|
+
selector.gsub!(/[\.\#]/,'')
|
21
|
+
properties = []
|
22
|
+
declarations.split(';').each do |property|
|
23
|
+
properties << property.split(':').map(&:strip)
|
24
|
+
end
|
25
|
+
properties << []
|
26
|
+
structure << [selector, properties]
|
27
|
+
end
|
28
|
+
structure << []
|
29
|
+
|
30
|
+
default = structure.shift[1]
|
31
|
+
images = structure
|
32
|
+
|
33
|
+
structure = [widget, [[:default, default], [:images, images]]]
|
34
|
+
sprites = "sprites = (sprites " + stylusize(structure) + stylusize([]) + ")"
|
35
|
+
|
36
|
+
file_path = File.join 'app/assets/stylesheets', 'sprites.styl'
|
37
|
+
|
38
|
+
unless File.exists? file_path
|
39
|
+
create_file file_path
|
40
|
+
append_to_file file_path, 'sprites = ()'
|
41
|
+
end
|
42
|
+
append_to_file file_path, "\n#{sprites}"
|
43
|
+
|
44
|
+
say "Do not forget to check for duplicates in the file above!"
|
45
|
+
end
|
46
|
+
|
47
|
+
|
48
|
+
private
|
49
|
+
|
50
|
+
def stylusize array, str = ""
|
51
|
+
str << "("
|
52
|
+
array.each do |item|
|
53
|
+
if item.is_a? Array
|
54
|
+
stylusize(item,str)
|
55
|
+
else
|
56
|
+
str << "('#{item}') "
|
57
|
+
end
|
58
|
+
end
|
59
|
+
str << ") "
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
@@ -0,0 +1,392 @@
|
|
1
|
+
(function(e){if("function"==typeof bootstrap)bootstrap("stampit",e);else if("object"==typeof exports)module.exports=e();else if("function"==typeof define&&define.amd)define(e);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeStampit=e}else"undefined"!=typeof window?window.stampit=e():global.stampit=e()})(function(){var define,ses,bootstrap,module,exports;
|
2
|
+
return (function(e,t,n){function i(n,s){if(!t[n]){if(!e[n]){var o=typeof require=="function"&&require;if(!s&&o)return o(n,!0);if(r)return r(n,!0);throw new Error("Cannot find module '"+n+"'")}var u=t[n]={exports:{}};e[n][0].call(u.exports,function(t){var r=e[n][1][t];return i(r?r:t)},u,u.exports)}return t[n].exports}var r=typeof require=="function"&&require;for(var s=0;s<n.length;s++)i(n[s]);return i})({1:[function(require,module,exports){
|
3
|
+
|
4
|
+
|
5
|
+
/**
|
6
|
+
* Array forEach
|
7
|
+
*/
|
8
|
+
function forEach(arr, callback, thisObj) {
|
9
|
+
if (arr == null) {
|
10
|
+
return;
|
11
|
+
}
|
12
|
+
var i = -1,
|
13
|
+
len = arr.length;
|
14
|
+
while (++i < len) {
|
15
|
+
// we iterate over sparse items since there is no way to make it
|
16
|
+
// work properly on IE 7-8. see #64
|
17
|
+
if ( callback.call(thisObj, arr[i], i, arr) === false ) {
|
18
|
+
break;
|
19
|
+
}
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
module.exports = forEach;
|
24
|
+
|
25
|
+
|
26
|
+
|
27
|
+
},{}],2:[function(require,module,exports){
|
28
|
+
|
29
|
+
|
30
|
+
function slice(arr, offset){
|
31
|
+
return Array.prototype.slice.call(arr, offset || 0);
|
32
|
+
}
|
33
|
+
|
34
|
+
/**
|
35
|
+
* Return a function that will execute in the given context, optionally adding any additional supplied parameters to the beginning of the arguments collection.
|
36
|
+
* @param {Function} fn Function.
|
37
|
+
* @param {object} context Execution context.
|
38
|
+
* @param {rest} args Arguments (0...n arguments).
|
39
|
+
* @return {Function} Wrapped Function.
|
40
|
+
*/
|
41
|
+
function bind(fn, context, args){
|
42
|
+
var argsArr = slice(arguments, 2); //curried args
|
43
|
+
return function(){
|
44
|
+
return fn.apply(context, argsArr.concat(slice(arguments)));
|
45
|
+
};
|
46
|
+
}
|
47
|
+
|
48
|
+
module.exports = bind;
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
},{}],3:[function(require,module,exports){
|
53
|
+
var shimIndexOf = function shimIndexOf() {
|
54
|
+
|
55
|
+
if (!Array.prototype.indexOf) {
|
56
|
+
Array.prototype.indexOf = function (searchElement /*, fromIndex */ ) {
|
57
|
+
"use strict";
|
58
|
+
if (this == null) {
|
59
|
+
throw new TypeError();
|
60
|
+
}
|
61
|
+
var t = Object(this);
|
62
|
+
var len = t.length >>> 0;
|
63
|
+
if (len === 0) {
|
64
|
+
return -1;
|
65
|
+
}
|
66
|
+
var n = 0;
|
67
|
+
if (arguments.length > 1) {
|
68
|
+
n = Number(arguments[1]);
|
69
|
+
if (n != n) { // shortcut for verifying if it's NaN
|
70
|
+
n = 0;
|
71
|
+
} else if (n != 0 && n != Infinity && n != -Infinity) {
|
72
|
+
n = (n > 0 || -1) * Math.floor(Math.abs(n));
|
73
|
+
}
|
74
|
+
}
|
75
|
+
if (n >= len) {
|
76
|
+
return -1;
|
77
|
+
}
|
78
|
+
var k = n >= 0 ? n : Math.max(len - Math.abs(n), 0);
|
79
|
+
for (; k < len; k++) {
|
80
|
+
if (k in t && t[k] === searchElement) {
|
81
|
+
return k;
|
82
|
+
}
|
83
|
+
}
|
84
|
+
return -1;
|
85
|
+
}
|
86
|
+
}
|
87
|
+
|
88
|
+
}
|
89
|
+
|
90
|
+
module.exports = shimIndexOf;
|
91
|
+
|
92
|
+
},{}],4:[function(require,module,exports){
|
93
|
+
/**
|
94
|
+
* Stampit
|
95
|
+
**
|
96
|
+
* Create objects from reusable, composable behaviors.
|
97
|
+
**
|
98
|
+
* Copyright (c) 2013 Eric Elliott
|
99
|
+
* http://opensource.org/licenses/MIT
|
100
|
+
**/
|
101
|
+
|
102
|
+
'use strict';
|
103
|
+
var forEach = require('mout/array/forEach');
|
104
|
+
var bind = require('mout/function/bind');
|
105
|
+
var mixIn = require('mout/object/mixIn');
|
106
|
+
var stringify = require('json-stringify-safe');
|
107
|
+
var indexOf = require('./indexof'); // shim indexOf for stringify
|
108
|
+
|
109
|
+
var create = function (o) {
|
110
|
+
if (arguments.length > 1) {
|
111
|
+
throw new Error('Object.create implementation only accepts the first parameter.');
|
112
|
+
}
|
113
|
+
function F() {}
|
114
|
+
F.prototype = o;
|
115
|
+
return new F();
|
116
|
+
};
|
117
|
+
|
118
|
+
/**
|
119
|
+
* Return a factory function that will produce new objects using the
|
120
|
+
* prototypes that are passed in or composed.
|
121
|
+
*
|
122
|
+
* @param {Object} [methods] A map of method names and bodies for delegation.
|
123
|
+
* @param {Object} [state] A map of property names and values to clone for each new object.
|
124
|
+
* @param {Function} [enclose] A closure (function) used to create private data and privileged methods.
|
125
|
+
* @return {Function} factory A factory to produce objects using the given prototypes.
|
126
|
+
* @return {Function} factory.create Just like calling the factory function.
|
127
|
+
* @return {Object} factory.fixed An object map containing the fixed prototypes.
|
128
|
+
* @return {Function} factory.methods Add methods to the methods prototype. Chainable.
|
129
|
+
* @return {Function} factory.state Add properties to the state prototype. Chainable.
|
130
|
+
* @return {Function} factory.enclose Add or replace the closure prototype. Not chainable.
|
131
|
+
*/
|
132
|
+
var stampit = function stampit(methods, state, enclose) {
|
133
|
+
var fixed = {
|
134
|
+
methods: methods || {},
|
135
|
+
state: state ?
|
136
|
+
JSON.parse(stringify(state)) :
|
137
|
+
{},
|
138
|
+
enclose: enclose
|
139
|
+
},
|
140
|
+
|
141
|
+
factory = function factory(properties, enclose) {
|
142
|
+
var instance = mixIn(create(fixed.methods || {}),
|
143
|
+
fixed.state, properties),
|
144
|
+
alt;
|
145
|
+
|
146
|
+
if (typeof fixed.enclose === 'function') {
|
147
|
+
alt = fixed.enclose.call(instance);
|
148
|
+
}
|
149
|
+
|
150
|
+
if (typeof enclose === 'function') {
|
151
|
+
alt = enclose.call(alt || instance);
|
152
|
+
}
|
153
|
+
|
154
|
+
return alt || instance;
|
155
|
+
};
|
156
|
+
|
157
|
+
return mixIn(factory, {
|
158
|
+
create: factory,
|
159
|
+
fixed: fixed,
|
160
|
+
methods: function () {
|
161
|
+
var obj = fixed.methods || {},
|
162
|
+
args = [obj].concat([].slice.call(arguments));
|
163
|
+
fixed.methods = mixIn.apply(this, args);
|
164
|
+
return this;
|
165
|
+
},
|
166
|
+
state: function (state) {
|
167
|
+
var obj = fixed.state || {},
|
168
|
+
args = [obj].concat([].slice.call(arguments));
|
169
|
+
fixed.state = mixIn.apply(this, args);
|
170
|
+
return this;
|
171
|
+
},
|
172
|
+
enclose: function (enclose) {
|
173
|
+
fixed.enclose = enclose;
|
174
|
+
return this;
|
175
|
+
}
|
176
|
+
});
|
177
|
+
};
|
178
|
+
|
179
|
+
/**
|
180
|
+
* Take two or more factories produced from stampit() and
|
181
|
+
* combine them to produce a new factory. Combining overrides
|
182
|
+
* properties with last-in priority.
|
183
|
+
*
|
184
|
+
* @param {...Function} factory A factory produced by stampit().
|
185
|
+
* @return {Function} A new stampit factory composed from arguments.
|
186
|
+
*/
|
187
|
+
var compose = function compose() {
|
188
|
+
var args = [].slice.call(arguments),
|
189
|
+
initFunctions = [],
|
190
|
+
obj = stampit(),
|
191
|
+
props = ['methods', 'state'];
|
192
|
+
|
193
|
+
forEach(args, function (source) {
|
194
|
+
if (source) {
|
195
|
+
forEach(props, function (prop) {
|
196
|
+
if (source.fixed[prop]) {
|
197
|
+
obj.fixed[prop] = mixIn(obj.fixed[prop],
|
198
|
+
source.fixed[prop]);
|
199
|
+
}
|
200
|
+
});
|
201
|
+
|
202
|
+
if (typeof source.fixed.enclose === 'function') {
|
203
|
+
initFunctions.push(source.fixed.enclose);
|
204
|
+
}
|
205
|
+
}
|
206
|
+
});
|
207
|
+
|
208
|
+
return stampit(obj.fixed.methods, obj.fixed.state, function () {
|
209
|
+
forEach(initFunctions, bind(function (fn) {
|
210
|
+
fn.call(this);
|
211
|
+
}, this));
|
212
|
+
});
|
213
|
+
};
|
214
|
+
|
215
|
+
indexOf();
|
216
|
+
|
217
|
+
module.exports = mixIn(stampit, {
|
218
|
+
compose: compose,
|
219
|
+
/**
|
220
|
+
* Alias for mixIn
|
221
|
+
*/
|
222
|
+
extend: mixIn,
|
223
|
+
/**
|
224
|
+
* Take a destination object followed by one or more source objects,
|
225
|
+
* and copy the source object properties to the destination object,
|
226
|
+
* with last in priority overrides.
|
227
|
+
* @param {Object} destination An object to copy properties to.
|
228
|
+
* @param {...Object} source An object to copy properties from.
|
229
|
+
* @returns {Object}
|
230
|
+
*/
|
231
|
+
mixIn: mixIn
|
232
|
+
});
|
233
|
+
|
234
|
+
},{"mout/array/forEach":1,"mout/function/bind":2,"mout/object/mixIn":5,"./indexof":3,"json-stringify-safe":6}],6:[function(require,module,exports){
|
235
|
+
module.exports = stringify;
|
236
|
+
|
237
|
+
function getSerialize (fn, decycle) {
|
238
|
+
var seen = [];
|
239
|
+
decycle = decycle || function(key, value) {
|
240
|
+
return '[Circular]';
|
241
|
+
};
|
242
|
+
return function(key, value) {
|
243
|
+
var ret = value;
|
244
|
+
if (typeof value === 'object' && value) {
|
245
|
+
if (seen.indexOf(value) !== -1)
|
246
|
+
ret = decycle(key, value);
|
247
|
+
else
|
248
|
+
seen.push(value);
|
249
|
+
}
|
250
|
+
if (fn) ret = fn(key, ret);
|
251
|
+
return ret;
|
252
|
+
}
|
253
|
+
}
|
254
|
+
|
255
|
+
function stringify(obj, fn, spaces, decycle) {
|
256
|
+
return JSON.stringify(obj, getSerialize(fn, decycle), spaces);
|
257
|
+
}
|
258
|
+
|
259
|
+
stringify.getSerialize = getSerialize;
|
260
|
+
|
261
|
+
},{}],5:[function(require,module,exports){
|
262
|
+
var forOwn = require('./forOwn');
|
263
|
+
|
264
|
+
/**
|
265
|
+
* Combine properties from all the objects into first one.
|
266
|
+
* - This method affects target object in place, if you want to create a new Object pass an empty object as first param.
|
267
|
+
* @param {object} target Target Object
|
268
|
+
* @param {...object} objects Objects to be combined (0...n objects).
|
269
|
+
* @return {object} Target Object.
|
270
|
+
*/
|
271
|
+
function mixIn(target, objects){
|
272
|
+
var i = 0,
|
273
|
+
n = arguments.length,
|
274
|
+
obj;
|
275
|
+
while(++i < n){
|
276
|
+
obj = arguments[i];
|
277
|
+
if (obj != null) {
|
278
|
+
forOwn(obj, copyProp, target);
|
279
|
+
}
|
280
|
+
}
|
281
|
+
return target;
|
282
|
+
}
|
283
|
+
|
284
|
+
function copyProp(val, key){
|
285
|
+
this[key] = val;
|
286
|
+
}
|
287
|
+
|
288
|
+
module.exports = mixIn;
|
289
|
+
|
290
|
+
|
291
|
+
},{"./forOwn":7}],7:[function(require,module,exports){
|
292
|
+
var hasOwn = require('./hasOwn');
|
293
|
+
var forIn = require('./forIn');
|
294
|
+
|
295
|
+
/**
|
296
|
+
* Similar to Array/forEach but works over object properties and fixes Don't
|
297
|
+
* Enum bug on IE.
|
298
|
+
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
|
299
|
+
*/
|
300
|
+
function forOwn(obj, fn, thisObj){
|
301
|
+
forIn(obj, function(val, key){
|
302
|
+
if (hasOwn(obj, key)) {
|
303
|
+
return fn.call(thisObj, obj[key], key, obj);
|
304
|
+
}
|
305
|
+
});
|
306
|
+
}
|
307
|
+
|
308
|
+
module.exports = forOwn;
|
309
|
+
|
310
|
+
|
311
|
+
|
312
|
+
},{"./hasOwn":8,"./forIn":9}],8:[function(require,module,exports){
|
313
|
+
|
314
|
+
|
315
|
+
/**
|
316
|
+
* Safer Object.hasOwnProperty
|
317
|
+
*/
|
318
|
+
function hasOwn(obj, prop){
|
319
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
320
|
+
}
|
321
|
+
|
322
|
+
module.exports = hasOwn;
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
},{}],9:[function(require,module,exports){
|
327
|
+
|
328
|
+
|
329
|
+
var _hasDontEnumBug,
|
330
|
+
_dontEnums;
|
331
|
+
|
332
|
+
function checkDontEnum(){
|
333
|
+
_dontEnums = [
|
334
|
+
'toString',
|
335
|
+
'toLocaleString',
|
336
|
+
'valueOf',
|
337
|
+
'hasOwnProperty',
|
338
|
+
'isPrototypeOf',
|
339
|
+
'propertyIsEnumerable',
|
340
|
+
'constructor'
|
341
|
+
];
|
342
|
+
|
343
|
+
_hasDontEnumBug = true;
|
344
|
+
|
345
|
+
for (var key in {'toString': null}) {
|
346
|
+
_hasDontEnumBug = false;
|
347
|
+
}
|
348
|
+
}
|
349
|
+
|
350
|
+
/**
|
351
|
+
* Similar to Array/forEach but works over object properties and fixes Don't
|
352
|
+
* Enum bug on IE.
|
353
|
+
* based on: http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation
|
354
|
+
*/
|
355
|
+
function forIn(obj, fn, thisObj){
|
356
|
+
var key, i = 0;
|
357
|
+
// no need to check if argument is a real object that way we can use
|
358
|
+
// it for arrays, functions, date, etc.
|
359
|
+
|
360
|
+
//post-pone check till needed
|
361
|
+
if (_hasDontEnumBug == null) checkDontEnum();
|
362
|
+
|
363
|
+
for (key in obj) {
|
364
|
+
if (exec(fn, obj, key, thisObj) === false) {
|
365
|
+
break;
|
366
|
+
}
|
367
|
+
}
|
368
|
+
|
369
|
+
if (_hasDontEnumBug) {
|
370
|
+
while (key = _dontEnums[i++]) {
|
371
|
+
// since we aren't using hasOwn check we need to make sure the
|
372
|
+
// property was overwritten
|
373
|
+
if (obj[key] !== Object.prototype[key]) {
|
374
|
+
if (exec(fn, obj, key, thisObj) === false) {
|
375
|
+
break;
|
376
|
+
}
|
377
|
+
}
|
378
|
+
}
|
379
|
+
}
|
380
|
+
}
|
381
|
+
|
382
|
+
function exec(fn, obj, key, thisObj){
|
383
|
+
return fn.call(thisObj, obj[key], key, obj);
|
384
|
+
}
|
385
|
+
|
386
|
+
module.exports = forIn;
|
387
|
+
|
388
|
+
|
389
|
+
|
390
|
+
},{}]},{},[4])(4)
|
391
|
+
});
|
392
|
+
;
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ende
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Heitor Salazar
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-08-29 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: A modular web application engine for rails. Using aurajs and indemma
|
42
|
+
by default. the goal is to provideseamlessly integrstion with rails and popular
|
43
|
+
rails engines, such as devise.
|
44
|
+
email:
|
45
|
+
- heitorsalazar@gmail.com
|
46
|
+
executables: []
|
47
|
+
extensions: []
|
48
|
+
extra_rdoc_files: []
|
49
|
+
files:
|
50
|
+
- .gitignore
|
51
|
+
- Gemfile
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- WTFP-LICENSE
|
55
|
+
- component.json
|
56
|
+
- ende.gemspec
|
57
|
+
- lib/assets/.gitkeep
|
58
|
+
- lib/assets/javascripts/aura/extensions/devise.js.coffee
|
59
|
+
- lib/assets/javascripts/aura/extensions/loader.js.coffee
|
60
|
+
- lib/assets/javascripts/aura/extensions/mediator.js
|
61
|
+
- lib/assets/javascripts/aura/extensions/models.js.coffee.erb
|
62
|
+
- lib/assets/javascripts/aura/extensions/rivets.js.coffee
|
63
|
+
- lib/assets/javascripts/aura/extensions/states.js.coffee
|
64
|
+
- lib/assets/javascripts/aura/extensions/widget/eventable.js.coffee
|
65
|
+
- lib/assets/javascripts/aura/extensions/widget/lifecycleable.js.coffee
|
66
|
+
- lib/assets/javascripts/config/initializers/jquery.js.coffee
|
67
|
+
- lib/assets/javascripts/config/initializers/load_components.js.coffee
|
68
|
+
- lib/assets/javascripts/config/initializers/requirejs.js.coffee
|
69
|
+
- lib/assets/javascripts/ende.js.coffee
|
70
|
+
- lib/assets/javascripts/widgets/authenticator/main.js.coffee
|
71
|
+
- lib/assets/javascripts/widgets/authenticator/presenter.js.coffee
|
72
|
+
- lib/assets/javascripts/widgets/authenticator/states/default.html
|
73
|
+
- lib/assets/javascripts/widgets/authenticator/states/index.js.coffee
|
74
|
+
- lib/assets/javascripts/widgets/authenticator/states/passwords.html
|
75
|
+
- lib/assets/javascripts/widgets/list/main.js.coffee
|
76
|
+
- lib/assets/javascripts/widgets/list/presenter.js.coffee
|
77
|
+
- lib/assets/javascripts/widgets/list/states/default.html
|
78
|
+
- lib/assets/javascripts/widgets/list/states/index.js.coffee
|
79
|
+
- lib/assets/javascripts/widgets/viewer/main.js.coffee
|
80
|
+
- lib/assets/javascripts/widgets/viewer/presenter.js.coffee
|
81
|
+
- lib/assets/javascripts/widgets/viewer/states/default.html
|
82
|
+
- lib/assets/javascripts/widgets/viewer/states/index.js.coffee
|
83
|
+
- lib/assets/stylesheets/application/modules/authenticator.css.styl
|
84
|
+
- lib/assets/stylesheets/application/modules/widgets/structure/list.css.styl
|
85
|
+
- lib/assets/stylesheets/application/modules/widgets/structure/viewer.css.styl
|
86
|
+
- lib/assets/stylesheets/application/modules/widgets/structure/widget.css.styl
|
87
|
+
- lib/assets/stylesheets/filter.styl
|
88
|
+
- lib/assets/stylesheets/helpers/button.styl
|
89
|
+
- lib/assets/stylesheets/helpers/general.styl
|
90
|
+
- lib/assets/stylesheets/helpers/index.styl
|
91
|
+
- lib/assets/stylesheets/helpers/link.styl
|
92
|
+
- lib/assets/stylesheets/helpers/url.styl
|
93
|
+
- lib/assets/stylesheets/modules/button.styl
|
94
|
+
- lib/assets/stylesheets/sprite.styl
|
95
|
+
- lib/assets/stylesheets/ssprites.styl
|
96
|
+
- lib/ende.rb
|
97
|
+
- lib/ende/version.rb
|
98
|
+
- lib/tasks/.gitkeep
|
99
|
+
- lib/tasks/component.thor
|
100
|
+
- lib/tasks/sprite.thor
|
101
|
+
- vendor/assets/javascripts/stampit/stampit.js
|
102
|
+
homepage: ''
|
103
|
+
licenses:
|
104
|
+
- WTFPL
|
105
|
+
metadata: {}
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - '>='
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubyforge_project:
|
122
|
+
rubygems_version: 2.0.3
|
123
|
+
signing_key:
|
124
|
+
specification_version: 4
|
125
|
+
summary: Endë (core, middle) a web application engine for rails with aurajs.
|
126
|
+
test_files: []
|