modulejs-rails 1.9.0.1 → 2.2.0.0
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
- data/lib/modulejs/rails/version.rb +1 -1
- data/vendor/assets/javascripts/modulejs.js +260 -245
- metadata +23 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35545facebf8faef1869c5cf31eb209e0abaac96
|
4
|
+
data.tar.gz: 3600367b3ce6510961e86ec28693186b64b31213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd657a34387378a3e63430634b44940eb72a564087fd319995e7b38bc4e54eb9d29d9fb01a529caa9c8d3b23c733e2c9f1823355add4236465b8f950b567c830
|
7
|
+
data.tar.gz: dc50dbd9b224e1d392e3b3afe073c47623d3d47045c593bd6042d09dc099eee5329ac41416946a1c903bab0830247c8dc79319eb1936d83767d7eac63ad27934
|
@@ -1,245 +1,260 @@
|
|
1
|
-
|
2
|
-
(function (root, factory) {
|
3
|
-
'
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
1
|
+
/*! modulejs v2.2.0 - https://larsjung.de/modulejs/ */
|
2
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
3
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
4
|
+
module.exports = factory();
|
5
|
+
else if(typeof define === 'function' && define.amd)
|
6
|
+
define([], factory);
|
7
|
+
else if(typeof exports === 'object')
|
8
|
+
exports["modulejs"] = factory();
|
9
|
+
else
|
10
|
+
root["modulejs"] = factory();
|
11
|
+
})(this, function() {
|
12
|
+
return /******/ (function(modules) { // webpackBootstrap
|
13
|
+
/******/ // The module cache
|
14
|
+
/******/ var installedModules = {};
|
15
|
+
|
16
|
+
/******/ // The require function
|
17
|
+
/******/ function __webpack_require__(moduleId) {
|
18
|
+
|
19
|
+
/******/ // Check if module is in cache
|
20
|
+
/******/ if(installedModules[moduleId])
|
21
|
+
/******/ return installedModules[moduleId].exports;
|
22
|
+
|
23
|
+
/******/ // Create a new module (and put it into the cache)
|
24
|
+
/******/ var module = installedModules[moduleId] = {
|
25
|
+
/******/ exports: {},
|
26
|
+
/******/ id: moduleId,
|
27
|
+
/******/ loaded: false
|
28
|
+
/******/ };
|
29
|
+
|
30
|
+
/******/ // Execute the module function
|
31
|
+
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
|
32
|
+
|
33
|
+
/******/ // Flag the module as loaded
|
34
|
+
/******/ module.loaded = true;
|
35
|
+
|
36
|
+
/******/ // Return the exports of the module
|
37
|
+
/******/ return module.exports;
|
38
|
+
/******/ }
|
39
|
+
|
40
|
+
|
41
|
+
/******/ // expose the modules object (__webpack_modules__)
|
42
|
+
/******/ __webpack_require__.m = modules;
|
43
|
+
|
44
|
+
/******/ // expose the module cache
|
45
|
+
/******/ __webpack_require__.c = installedModules;
|
46
|
+
|
47
|
+
/******/ // __webpack_public_path__
|
48
|
+
/******/ __webpack_require__.p = "";
|
49
|
+
|
50
|
+
/******/ // Load entry module and return exports
|
51
|
+
/******/ return __webpack_require__(0);
|
52
|
+
/******/ })
|
53
|
+
/************************************************************************/
|
54
|
+
/******/ ([
|
55
|
+
/* 0 */
|
56
|
+
/***/ function(module, exports, __webpack_require__) {
|
57
|
+
|
58
|
+
'use strict';
|
59
|
+
|
60
|
+
var _require = __webpack_require__(1),
|
61
|
+
assert = _require.assert,
|
62
|
+
forOwn = _require.forOwn,
|
63
|
+
has = _require.has,
|
64
|
+
resolve = _require.resolve;
|
65
|
+
|
66
|
+
var create = function create() {
|
67
|
+
// Module definitions.
|
68
|
+
var definitions = {};
|
69
|
+
|
70
|
+
// Module instances.
|
71
|
+
var instances = {};
|
72
|
+
|
73
|
+
// Defines a module for `id: String`, optional `deps: Array[String]`,
|
74
|
+
// `def: mixed`.
|
75
|
+
var define = function define(id, deps, def) {
|
76
|
+
// sort arguments
|
77
|
+
if (def === undefined) {
|
78
|
+
var _ref = [[], deps];
|
79
|
+
deps = _ref[0];
|
80
|
+
def = _ref[1];
|
81
|
+
}
|
82
|
+
// check arguments
|
83
|
+
assert(typeof id === 'string', 'id must be string: ' + id);
|
84
|
+
assert(!has(definitions, id), 'id already defined: ' + id);
|
85
|
+
assert(Array.isArray(deps), 'deps must be array: ' + id);
|
86
|
+
|
87
|
+
// accept definition
|
88
|
+
definitions[id] = {
|
89
|
+
id: id,
|
90
|
+
deps: deps,
|
91
|
+
fn: typeof def === 'function' ? def : function () {
|
92
|
+
return def;
|
93
|
+
}
|
94
|
+
};
|
95
|
+
};
|
96
|
+
|
97
|
+
// Returns an instance for `id`. If a `mocks` object is given, it is
|
98
|
+
// used to resolve the dependencies.
|
99
|
+
var require = function require(id, mocks) {
|
100
|
+
assert(typeof id === 'string', 'id must be string: ' + id);
|
101
|
+
return resolve(definitions, mocks || instances, id);
|
102
|
+
};
|
103
|
+
|
104
|
+
// Returns an object that holds infos about the current definitions
|
105
|
+
// and dependencies.
|
106
|
+
var state = function state() {
|
107
|
+
var res = {};
|
108
|
+
|
109
|
+
forOwn(definitions, function (def, id) {
|
110
|
+
res[id] = {
|
111
|
+
|
112
|
+
// direct dependencies
|
113
|
+
deps: def.deps.slice(),
|
114
|
+
|
115
|
+
// transitive dependencies
|
116
|
+
reqs: resolve(definitions, null, id),
|
117
|
+
|
118
|
+
// already initiated/required
|
119
|
+
init: has(instances, id)
|
120
|
+
};
|
121
|
+
});
|
122
|
+
|
123
|
+
forOwn(definitions, function (def, id) {
|
124
|
+
var inv = [];
|
125
|
+
|
126
|
+
forOwn(definitions, function (def2, id2) {
|
127
|
+
if (res[id2].reqs.indexOf(id) >= 0) {
|
128
|
+
inv.push(id2);
|
129
|
+
}
|
130
|
+
});
|
131
|
+
|
132
|
+
// all inverse dependencies
|
133
|
+
res[id].reqd = inv;
|
134
|
+
});
|
135
|
+
|
136
|
+
return res;
|
137
|
+
};
|
138
|
+
|
139
|
+
// Returns a string that displays module dependencies.
|
140
|
+
var log = function log(inv) {
|
141
|
+
var out = '\n';
|
142
|
+
|
143
|
+
forOwn(state(), function (st, id) {
|
144
|
+
var list = inv ? st.reqd : st.reqs;
|
145
|
+
out += (st.init ? '*' : ' ') + ' ' + id + ' -> [ ' + list.join(', ') + ' ]\n';
|
146
|
+
});
|
147
|
+
|
148
|
+
return out;
|
149
|
+
};
|
150
|
+
|
151
|
+
return {
|
152
|
+
create: create,
|
153
|
+
define: define,
|
154
|
+
log: log,
|
155
|
+
require: require,
|
156
|
+
state: state,
|
157
|
+
_d: definitions,
|
158
|
+
_i: instances
|
159
|
+
};
|
160
|
+
};
|
161
|
+
|
162
|
+
module.exports = create();
|
163
|
+
|
164
|
+
/***/ },
|
165
|
+
/* 1 */
|
166
|
+
/***/ function(module, exports) {
|
167
|
+
|
168
|
+
"use strict";
|
169
|
+
|
170
|
+
// Throws an error if `expr` is falsy.
|
171
|
+
var assert = function assert(expr, msg) {
|
172
|
+
if (!expr) {
|
173
|
+
throw new Error("[modulejs] " + msg);
|
174
|
+
}
|
175
|
+
};
|
176
|
+
|
177
|
+
// Iterates over all own props of an object.
|
178
|
+
var forOwn = function forOwn(x, fn) {
|
179
|
+
Object.keys(x).forEach(function (k) {
|
180
|
+
return fn(x[k], k);
|
181
|
+
});
|
182
|
+
};
|
183
|
+
|
184
|
+
// Short cut for `hasOwnProperty`.
|
185
|
+
var has = function has(x, id) {
|
186
|
+
return (x || {}).hasOwnProperty(id);
|
187
|
+
};
|
188
|
+
|
189
|
+
// Returns an new array containing no duplicates. Preserves first occurence and
|
190
|
+
// order.
|
191
|
+
var uniq = function uniq(x) {
|
192
|
+
var cache = {};
|
193
|
+
return x.filter(function (val) {
|
194
|
+
var res = !cache[val];
|
195
|
+
cache[val] = 1;
|
196
|
+
return res;
|
197
|
+
});
|
198
|
+
};
|
199
|
+
|
200
|
+
// Resolves `id` to an object for the given definitions `defs` and already
|
201
|
+
// instantiated objects `insts`. Adds any new instances to `insts`. If `insts`
|
202
|
+
// is null it only resolves dependency IDs.
|
203
|
+
// `stack` is used internal to check for circular dependencies.
|
204
|
+
var resolve = function resolve(defs, insts, id, stack) {
|
205
|
+
var onlyDepIds = !insts;
|
206
|
+
|
207
|
+
// if a module is required that was already created return that object
|
208
|
+
if (!onlyDepIds && has(insts, id)) {
|
209
|
+
return insts[id];
|
210
|
+
}
|
211
|
+
|
212
|
+
// check if `id` is defined
|
213
|
+
var def = defs[id];
|
214
|
+
assert(def, "id not defined: " + id);
|
215
|
+
|
216
|
+
// copy resolve stack and add this `id`
|
217
|
+
stack = (stack || []).slice();
|
218
|
+
stack.push(id);
|
219
|
+
|
220
|
+
// if `onlyDepIds` this will hold the dependency-IDs, otherwise it
|
221
|
+
// will hold the dependency-objects
|
222
|
+
var deps = [];
|
223
|
+
|
224
|
+
def.deps.forEach(function (depId) {
|
225
|
+
// check for circular dependencies
|
226
|
+
assert(stack.indexOf(depId) < 0, "circular dependencies: " + depId + " in " + stack);
|
227
|
+
|
228
|
+
var depDeps = resolve(defs, insts, depId, stack);
|
229
|
+
if (onlyDepIds) {
|
230
|
+
deps = deps.concat(depDeps);
|
231
|
+
deps.push(depId);
|
232
|
+
} else {
|
233
|
+
deps.push(depDeps);
|
234
|
+
}
|
235
|
+
});
|
236
|
+
|
237
|
+
if (onlyDepIds) {
|
238
|
+
// return only dependency-ids in correct order
|
239
|
+
return uniq(deps);
|
240
|
+
}
|
241
|
+
|
242
|
+
// create, memorize and return object
|
243
|
+
// using def.fn(...deps) instead would cost ~120B uglified
|
244
|
+
var obj = def.fn.apply(undefined, deps);
|
245
|
+
insts[id] = obj;
|
246
|
+
return obj;
|
247
|
+
};
|
248
|
+
|
249
|
+
module.exports = {
|
250
|
+
assert: assert,
|
251
|
+
forOwn: forOwn,
|
252
|
+
has: has,
|
253
|
+
resolve: resolve,
|
254
|
+
uniq: uniq
|
255
|
+
};
|
256
|
+
|
257
|
+
/***/ }
|
258
|
+
/******/ ])
|
259
|
+
});
|
260
|
+
;
|
metadata
CHANGED
@@ -1,57 +1,57 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulejs-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ales Vilchytski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name: railties
|
15
|
-
version_requirements: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - '>='
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '4.0'
|
20
14
|
requirement: !ruby/object:Gem::Requirement
|
21
15
|
requirements:
|
22
|
-
- -
|
16
|
+
- - ">="
|
23
17
|
- !ruby/object:Gem::Version
|
24
18
|
version: '4.0'
|
19
|
+
name: railties
|
25
20
|
prerelease: false
|
26
21
|
type: :runtime
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: bundler
|
29
22
|
version_requirements: !ruby/object:Gem::Requirement
|
30
23
|
requirements:
|
31
|
-
- -
|
24
|
+
- - ">="
|
32
25
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
26
|
+
version: '4.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
34
28
|
requirement: !ruby/object:Gem::Requirement
|
35
29
|
requirements:
|
36
|
-
- - ~>
|
30
|
+
- - "~>"
|
37
31
|
- !ruby/object:Gem::Version
|
38
32
|
version: '1.7'
|
33
|
+
name: bundler
|
39
34
|
prerelease: false
|
40
35
|
type: :development
|
41
|
-
- !ruby/object:Gem::Dependency
|
42
|
-
name: rake
|
43
36
|
version_requirements: !ruby/object:Gem::Requirement
|
44
37
|
requirements:
|
45
|
-
- - ~>
|
38
|
+
- - "~>"
|
46
39
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
40
|
+
version: '1.7'
|
41
|
+
- !ruby/object:Gem::Dependency
|
48
42
|
requirement: !ruby/object:Gem::Requirement
|
49
43
|
requirements:
|
50
|
-
- - ~>
|
44
|
+
- - "~>"
|
51
45
|
- !ruby/object:Gem::Version
|
52
46
|
version: '10.0'
|
47
|
+
name: rake
|
53
48
|
prerelease: false
|
54
49
|
type: :development
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
55
|
description: JS module system for Ruby on Rails 4 Assets Pipeline that solves scripts order issues
|
56
56
|
email:
|
57
57
|
- vilchytski.ales@yandex.by
|
@@ -59,7 +59,7 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
-
- .gitignore
|
62
|
+
- ".gitignore"
|
63
63
|
- Gemfile
|
64
64
|
- LICENSE
|
65
65
|
- README.md
|
@@ -80,17 +80,17 @@ require_paths:
|
|
80
80
|
- lib
|
81
81
|
required_ruby_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - ">="
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: '0'
|
86
86
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - ">="
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
requirements: []
|
92
92
|
rubyforge_project:
|
93
|
-
rubygems_version: 2.
|
93
|
+
rubygems_version: 2.4.8
|
94
94
|
signing_key:
|
95
95
|
specification_version: 4
|
96
96
|
summary: Lightweight JavaScript module system for Ruby on Rails 4
|