lacey-rails 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/lacey/rails/version.rb +1 -1
- data/vendor/assets/javascripts/lacey.js +28 -13
- 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: 959f0e0f56bebf58ae44da80650d76881ad0781f
|
4
|
+
data.tar.gz: 443177bcaaf532373e974976cfbed3ca6ad9a4c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6f9bb9a831fbb261f3844c7a011711458172758a108b855888d0dd30f5f3c122faf501e19e009c9ee7fd9267788b44bbc695dfcc606852027227cff60ca59a80
|
7
|
+
data.tar.gz: 67f04083361175cc12e7e8c8bc5fc2db641c9f9176835fa94bfa23e9b881270fb6f1273f0c35857217d11a5cc4aa9085decaa43246f6b80066b38132411f6638
|
data/lib/lacey/rails/version.rb
CHANGED
@@ -1,11 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
Object.prototype
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
};
|
8
|
-
|
1
|
+
var prototype = Object.prototype;
|
2
|
+
|
3
|
+
Object.defineProperty(prototype, 'has_parent', {
|
4
|
+
value: false,
|
5
|
+
writable: true,
|
6
|
+
enumerable: false
|
7
|
+
});
|
8
|
+
|
9
|
+
Object.defineProperty(prototype, 'is_child', {
|
10
|
+
value: false,
|
11
|
+
writable: true,
|
12
|
+
enumerable: false
|
13
|
+
});
|
14
|
+
|
15
|
+
Object.defineProperty(prototype, 'inherits_from', {
|
16
|
+
value: function (klass) {
|
17
|
+
this.prototype = new (Function.bind.apply(klass, arguments))();
|
18
|
+
this.prototype.constructor = this;
|
19
|
+
this.prototype.is_child = this.prototype.has_parent = true;
|
20
|
+
},
|
21
|
+
writable: true,
|
22
|
+
enumerable: false
|
23
|
+
});
|
9
24
|
var LaceyApp,
|
10
25
|
LaceyModule,
|
11
26
|
modules,
|
@@ -79,7 +94,7 @@ validate_module_type = function (Module) {
|
|
79
94
|
};
|
80
95
|
|
81
96
|
validate_duplicated_module = function (module_name) {
|
82
|
-
|
97
|
+
if (this.modules.indexOf(module_name) !== -1) {
|
83
98
|
throw 'DuplicateModuleError - your module has already been registered';
|
84
99
|
}
|
85
100
|
|
@@ -111,7 +126,7 @@ LaceyModule = function (module_name, parent_module, Module) {
|
|
111
126
|
LaceyModule.prototype.initialize = function () {
|
112
127
|
var instance = this.get_instance();
|
113
128
|
|
114
|
-
if (!this.initialized &&
|
129
|
+
if (!this.initialized && typeof instance.initialize === 'function') {
|
115
130
|
instance.initialize();
|
116
131
|
this.initialized = true;
|
117
132
|
}
|
@@ -120,12 +135,12 @@ LaceyModule.prototype.initialize = function () {
|
|
120
135
|
};
|
121
136
|
|
122
137
|
validate_parent_module_name = function (parent_module) {
|
123
|
-
if (modules[parent_module] ===
|
124
|
-
throw '
|
138
|
+
if (typeof modules[parent_module] === 'undefined') {
|
139
|
+
throw 'InvalidParentModuleError - the parent module does not exist';
|
125
140
|
}
|
126
141
|
|
127
142
|
return true;
|
128
143
|
};
|
129
144
|
|
130
145
|
|
131
|
-
window.LaceyApp = LaceyApp;
|
146
|
+
window.LaceyApp = LaceyApp;
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lacey-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- alexzicat
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-04-
|
11
|
+
date: 2016-04-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|