unsakini 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +1 -2
  3. data/angular/LICENSE +21 -0
  4. data/angular/README.md +1 -0
  5. data/angular/angular-cli.json +59 -0
  6. data/angular/dist/favicon.ico +0 -0
  7. data/angular/dist/index.html +14 -0
  8. data/angular/dist/inline.bundle.js +139 -0
  9. data/angular/dist/inline.map +1 -0
  10. data/angular/dist/main.bundle.js +64735 -0
  11. data/angular/dist/main.map +1 -0
  12. data/angular/dist/styles.bundle.js +364 -0
  13. data/angular/dist/styles.map +1 -0
  14. data/angular/karma.conf.js +45 -0
  15. data/angular/package.json +49 -0
  16. data/angular/protractor.conf.js +32 -0
  17. data/angular/src/app/app.component.css +0 -0
  18. data/angular/src/app/app.component.html +4 -0
  19. data/angular/src/app/app.component.spec.ts +47 -0
  20. data/angular/src/app/app.component.ts +10 -0
  21. data/angular/src/app/app.module.ts +29 -0
  22. data/angular/src/app/app.routes.module.ts +29 -0
  23. data/angular/src/app/index.ts +2 -0
  24. data/angular/src/app/registration/registration.component.css +0 -0
  25. data/angular/src/app/registration/registration.component.html +14 -0
  26. data/angular/src/app/registration/registration.component.spec.ts +157 -0
  27. data/angular/src/app/registration/registration.component.ts +42 -0
  28. data/angular/src/environments/environment.prod.ts +3 -0
  29. data/angular/src/environments/environment.ts +8 -0
  30. data/angular/src/favicon.ico +0 -0
  31. data/angular/src/index.html +14 -0
  32. data/angular/src/main.ts +12 -0
  33. data/angular/src/polyfills.ts +19 -0
  34. data/angular/src/styles.css +1 -0
  35. data/angular/src/test.ts +31 -0
  36. data/angular/src/tsconfig.json +18 -0
  37. data/angular/src/typings.d.ts +2 -0
  38. data/angular/tslint.json +114 -0
  39. data/angular/typings.json +4 -0
  40. data/lib/generators/unsakini/angular/angular_generator.rb +1 -1
  41. data/lib/tasks/unsakini_tasks.rake +2 -7
  42. data/lib/unsakini/version.rb +1 -1
  43. data/spec/dummy/db/development.sqlite3 +0 -0
  44. data/spec/dummy/db/schema.rb +57 -0
  45. data/spec/dummy/db/test.sqlite3 +0 -0
  46. data/spec/dummy/public/app/index.html +14 -0
  47. metadata +56 -15
  48. /data/spec/dummy/db/migrate/{20161124184336_create_boards.unsakini_engine.rb → 20161124210219_create_boards.unsakini_engine.rb} +0 -0
  49. /data/spec/dummy/db/migrate/{20161124184337_create_user_boards.unsakini_engine.rb → 20161124210220_create_user_boards.unsakini_engine.rb} +0 -0
  50. /data/spec/dummy/db/migrate/{20161124184338_create_posts.unsakini_engine.rb → 20161124210221_create_posts.unsakini_engine.rb} +0 -0
  51. /data/spec/dummy/db/migrate/{20161124184339_create_comments.unsakini_engine.rb → 20161124210222_create_comments.unsakini_engine.rb} +0 -0
  52. /data/spec/dummy/db/migrate/{20161124184340_add_encrypted_password_to_user_board.unsakini_engine.rb → 20161124210223_add_encrypted_password_to_user_board.unsakini_engine.rb} +0 -0
  53. /data/spec/dummy/db/migrate/{20161124184341_create_users.unsakini_engine.rb → 20161124210224_create_users.unsakini_engine.rb} +0 -0
  54. /data/spec/dummy/db/migrate/{20161124184342_add_is_shared_to_boards.unsakini_engine.rb → 20161124210225_add_is_shared_to_boards.unsakini_engine.rb} +0 -0
@@ -0,0 +1,364 @@
1
+ webpackJsonp([1,2],{
2
+
3
+ /***/ 379:
4
+ /***/ function(module, exports, __webpack_require__) {
5
+
6
+ // style-loader: Adds some css to the DOM by adding a <style> tag
7
+
8
+ // load the styles
9
+ var content = __webpack_require__(652);
10
+ if(typeof content === 'string') content = [[module.i, content, '']];
11
+ // add the styles to the DOM
12
+ var update = __webpack_require__(695)(content, {});
13
+ if(content.locals) module.exports = content.locals;
14
+ // Hot Module Replacement
15
+ if(false) {
16
+ // When the styles change, update the <style> tags
17
+ if(!content.locals) {
18
+ module.hot.accept("!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css", function() {
19
+ var newContent = require("!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css");
20
+ if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
21
+ update(newContent);
22
+ });
23
+ }
24
+ // When the module is disposed, remove the <style> tags
25
+ module.hot.dispose(function() { update(); });
26
+ }
27
+
28
+ /***/ },
29
+
30
+ /***/ 652:
31
+ /***/ function(module, exports, __webpack_require__) {
32
+
33
+ exports = module.exports = __webpack_require__(653)();
34
+ // imports
35
+
36
+
37
+ // module
38
+ exports.push([module.i, "/* You can add global styles to this file, and also import other style files */\n", ""]);
39
+
40
+ // exports
41
+
42
+
43
+ /***/ },
44
+
45
+ /***/ 653:
46
+ /***/ function(module, exports) {
47
+
48
+ /*
49
+ MIT License http://www.opensource.org/licenses/mit-license.php
50
+ Author Tobias Koppers @sokra
51
+ */
52
+ // css base code, injected by the css-loader
53
+ module.exports = function() {
54
+ var list = [];
55
+
56
+ // return the list of modules as css string
57
+ list.toString = function toString() {
58
+ var result = [];
59
+ for(var i = 0; i < this.length; i++) {
60
+ var item = this[i];
61
+ if(item[2]) {
62
+ result.push("@media " + item[2] + "{" + item[1] + "}");
63
+ } else {
64
+ result.push(item[1]);
65
+ }
66
+ }
67
+ return result.join("");
68
+ };
69
+
70
+ // import a list of modules into the list
71
+ list.i = function(modules, mediaQuery) {
72
+ if(typeof modules === "string")
73
+ modules = [[null, modules, ""]];
74
+ var alreadyImportedModules = {};
75
+ for(var i = 0; i < this.length; i++) {
76
+ var id = this[i][0];
77
+ if(typeof id === "number")
78
+ alreadyImportedModules[id] = true;
79
+ }
80
+ for(i = 0; i < modules.length; i++) {
81
+ var item = modules[i];
82
+ // skip already imported module
83
+ // this implementation is not 100% perfect for weird media query combinations
84
+ // when a module is imported multiple times with different media queries.
85
+ // I hope this will never occur (Hey this way we have smaller bundles)
86
+ if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
87
+ if(mediaQuery && !item[2]) {
88
+ item[2] = mediaQuery;
89
+ } else if(mediaQuery) {
90
+ item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
91
+ }
92
+ list.push(item);
93
+ }
94
+ }
95
+ };
96
+ return list;
97
+ };
98
+
99
+
100
+ /***/ },
101
+
102
+ /***/ 695:
103
+ /***/ function(module, exports) {
104
+
105
+ /*
106
+ MIT License http://www.opensource.org/licenses/mit-license.php
107
+ Author Tobias Koppers @sokra
108
+ */
109
+ var stylesInDom = {},
110
+ memoize = function(fn) {
111
+ var memo;
112
+ return function () {
113
+ if (typeof memo === "undefined") memo = fn.apply(this, arguments);
114
+ return memo;
115
+ };
116
+ },
117
+ isOldIE = memoize(function() {
118
+ return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
119
+ }),
120
+ getHeadElement = memoize(function () {
121
+ return document.head || document.getElementsByTagName("head")[0];
122
+ }),
123
+ singletonElement = null,
124
+ singletonCounter = 0,
125
+ styleElementsInsertedAtTop = [];
126
+
127
+ module.exports = function(list, options) {
128
+ if(typeof DEBUG !== "undefined" && DEBUG) {
129
+ if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
130
+ }
131
+
132
+ options = options || {};
133
+ // Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
134
+ // tags it will allow on a page
135
+ if (typeof options.singleton === "undefined") options.singleton = isOldIE();
136
+
137
+ // By default, add <style> tags to the bottom of <head>.
138
+ if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
139
+
140
+ var styles = listToStyles(list);
141
+ addStylesToDom(styles, options);
142
+
143
+ return function update(newList) {
144
+ var mayRemove = [];
145
+ for(var i = 0; i < styles.length; i++) {
146
+ var item = styles[i];
147
+ var domStyle = stylesInDom[item.id];
148
+ domStyle.refs--;
149
+ mayRemove.push(domStyle);
150
+ }
151
+ if(newList) {
152
+ var newStyles = listToStyles(newList);
153
+ addStylesToDom(newStyles, options);
154
+ }
155
+ for(var i = 0; i < mayRemove.length; i++) {
156
+ var domStyle = mayRemove[i];
157
+ if(domStyle.refs === 0) {
158
+ for(var j = 0; j < domStyle.parts.length; j++)
159
+ domStyle.parts[j]();
160
+ delete stylesInDom[domStyle.id];
161
+ }
162
+ }
163
+ };
164
+ }
165
+
166
+ function addStylesToDom(styles, options) {
167
+ for(var i = 0; i < styles.length; i++) {
168
+ var item = styles[i];
169
+ var domStyle = stylesInDom[item.id];
170
+ if(domStyle) {
171
+ domStyle.refs++;
172
+ for(var j = 0; j < domStyle.parts.length; j++) {
173
+ domStyle.parts[j](item.parts[j]);
174
+ }
175
+ for(; j < item.parts.length; j++) {
176
+ domStyle.parts.push(addStyle(item.parts[j], options));
177
+ }
178
+ } else {
179
+ var parts = [];
180
+ for(var j = 0; j < item.parts.length; j++) {
181
+ parts.push(addStyle(item.parts[j], options));
182
+ }
183
+ stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
184
+ }
185
+ }
186
+ }
187
+
188
+ function listToStyles(list) {
189
+ var styles = [];
190
+ var newStyles = {};
191
+ for(var i = 0; i < list.length; i++) {
192
+ var item = list[i];
193
+ var id = item[0];
194
+ var css = item[1];
195
+ var media = item[2];
196
+ var sourceMap = item[3];
197
+ var part = {css: css, media: media, sourceMap: sourceMap};
198
+ if(!newStyles[id])
199
+ styles.push(newStyles[id] = {id: id, parts: [part]});
200
+ else
201
+ newStyles[id].parts.push(part);
202
+ }
203
+ return styles;
204
+ }
205
+
206
+ function insertStyleElement(options, styleElement) {
207
+ var head = getHeadElement();
208
+ var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
209
+ if (options.insertAt === "top") {
210
+ if(!lastStyleElementInsertedAtTop) {
211
+ head.insertBefore(styleElement, head.firstChild);
212
+ } else if(lastStyleElementInsertedAtTop.nextSibling) {
213
+ head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
214
+ } else {
215
+ head.appendChild(styleElement);
216
+ }
217
+ styleElementsInsertedAtTop.push(styleElement);
218
+ } else if (options.insertAt === "bottom") {
219
+ head.appendChild(styleElement);
220
+ } else {
221
+ throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
222
+ }
223
+ }
224
+
225
+ function removeStyleElement(styleElement) {
226
+ styleElement.parentNode.removeChild(styleElement);
227
+ var idx = styleElementsInsertedAtTop.indexOf(styleElement);
228
+ if(idx >= 0) {
229
+ styleElementsInsertedAtTop.splice(idx, 1);
230
+ }
231
+ }
232
+
233
+ function createStyleElement(options) {
234
+ var styleElement = document.createElement("style");
235
+ styleElement.type = "text/css";
236
+ insertStyleElement(options, styleElement);
237
+ return styleElement;
238
+ }
239
+
240
+ function createLinkElement(options) {
241
+ var linkElement = document.createElement("link");
242
+ linkElement.rel = "stylesheet";
243
+ insertStyleElement(options, linkElement);
244
+ return linkElement;
245
+ }
246
+
247
+ function addStyle(obj, options) {
248
+ var styleElement, update, remove;
249
+
250
+ if (options.singleton) {
251
+ var styleIndex = singletonCounter++;
252
+ styleElement = singletonElement || (singletonElement = createStyleElement(options));
253
+ update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
254
+ remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
255
+ } else if(obj.sourceMap &&
256
+ typeof URL === "function" &&
257
+ typeof URL.createObjectURL === "function" &&
258
+ typeof URL.revokeObjectURL === "function" &&
259
+ typeof Blob === "function" &&
260
+ typeof btoa === "function") {
261
+ styleElement = createLinkElement(options);
262
+ update = updateLink.bind(null, styleElement);
263
+ remove = function() {
264
+ removeStyleElement(styleElement);
265
+ if(styleElement.href)
266
+ URL.revokeObjectURL(styleElement.href);
267
+ };
268
+ } else {
269
+ styleElement = createStyleElement(options);
270
+ update = applyToTag.bind(null, styleElement);
271
+ remove = function() {
272
+ removeStyleElement(styleElement);
273
+ };
274
+ }
275
+
276
+ update(obj);
277
+
278
+ return function updateStyle(newObj) {
279
+ if(newObj) {
280
+ if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
281
+ return;
282
+ update(obj = newObj);
283
+ } else {
284
+ remove();
285
+ }
286
+ };
287
+ }
288
+
289
+ var replaceText = (function () {
290
+ var textStore = [];
291
+
292
+ return function (index, replacement) {
293
+ textStore[index] = replacement;
294
+ return textStore.filter(Boolean).join('\n');
295
+ };
296
+ })();
297
+
298
+ function applyToSingletonTag(styleElement, index, remove, obj) {
299
+ var css = remove ? "" : obj.css;
300
+
301
+ if (styleElement.styleSheet) {
302
+ styleElement.styleSheet.cssText = replaceText(index, css);
303
+ } else {
304
+ var cssNode = document.createTextNode(css);
305
+ var childNodes = styleElement.childNodes;
306
+ if (childNodes[index]) styleElement.removeChild(childNodes[index]);
307
+ if (childNodes.length) {
308
+ styleElement.insertBefore(cssNode, childNodes[index]);
309
+ } else {
310
+ styleElement.appendChild(cssNode);
311
+ }
312
+ }
313
+ }
314
+
315
+ function applyToTag(styleElement, obj) {
316
+ var css = obj.css;
317
+ var media = obj.media;
318
+
319
+ if(media) {
320
+ styleElement.setAttribute("media", media)
321
+ }
322
+
323
+ if(styleElement.styleSheet) {
324
+ styleElement.styleSheet.cssText = css;
325
+ } else {
326
+ while(styleElement.firstChild) {
327
+ styleElement.removeChild(styleElement.firstChild);
328
+ }
329
+ styleElement.appendChild(document.createTextNode(css));
330
+ }
331
+ }
332
+
333
+ function updateLink(linkElement, obj) {
334
+ var css = obj.css;
335
+ var sourceMap = obj.sourceMap;
336
+
337
+ if(sourceMap) {
338
+ // http://stackoverflow.com/a/26603875
339
+ css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
340
+ }
341
+
342
+ var blob = new Blob([css], { type: "text/css" });
343
+
344
+ var oldSrc = linkElement.href;
345
+
346
+ linkElement.href = URL.createObjectURL(blob);
347
+
348
+ if(oldSrc)
349
+ URL.revokeObjectURL(oldSrc);
350
+ }
351
+
352
+
353
+ /***/ },
354
+
355
+ /***/ 698:
356
+ /***/ function(module, exports, __webpack_require__) {
357
+
358
+ module.exports = __webpack_require__(379);
359
+
360
+
361
+ /***/ }
362
+
363
+ },[698]);
364
+ //# sourceMappingURL=styles.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["webpack:////home/adones/Projects/UNSAKINI/unsakini-ng2/src/styles.css?46c6","webpack:////home/adones/Projects/UNSAKINI/unsakini-ng2/src/styles.css","webpack:////home/adones/Projects/UNSAKINI/unsakini-ng2/~/css-loader/lib/css-base.js","webpack:////home/adones/Projects/UNSAKINI/unsakini-ng2/~/style-loader/addStyles.js"],"names":[],"mappings":";;;;;AAAA;;AAEA;AACA;AACA;AACA;AACA,iDAAgF;AAChF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA,gCAAgC,UAAU,EAAE;AAC5C,C;;;;;;;ACpBA;AACA;;;AAGA;AACA;;AAEA;;;;;;;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA,wCAAwC,gBAAgB;AACxD,IAAI;AACJ;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA;AACA;AACA;AACA,YAAY,oBAAoB;AAChC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;ACjDA;AACA;AACA;AACA;AACA,oBAAoB;AACpB;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;;AAEA;AACA;AACA,gBAAgB,mBAAmB;AACnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,sBAAsB;AACtC;AACA;AACA,kBAAkB,2BAA2B;AAC7C;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,eAAe,mBAAmB;AAClC;AACA;AACA;AACA;AACA,iBAAiB,2BAA2B;AAC5C;AACA;AACA,QAAQ,uBAAuB;AAC/B;AACA;AACA,GAAG;AACH;AACA,iBAAiB,uBAAuB;AACxC;AACA;AACA,2BAA2B;AAC3B;AACA;AACA;;AAEA;AACA;AACA;AACA,eAAe,iBAAiB;AAChC;AACA;AACA;AACA;AACA;AACA,cAAc;AACd;AACA,gCAAgC,sBAAsB;AACtD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA,GAAG;AACH;AACA;AACA;AACA,EAAE;AACF;AACA,EAAE;AACF;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;;AAEA;AACA;AACA;AACA;AACA,CAAC;;AAED;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA,uDAAuD;AACvD;;AAEA,6BAA6B,mBAAmB;;AAEhD;;AAEA;;AAEA;AACA;AACA","file":"styles.bundle.js","sourcesContent":["// style-loader: Adds some css to the DOM by adding a <style> tag\n\n// load the styles\nvar content = require(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\");\nif(typeof content === 'string') content = [[module.id, content, '']];\n// add the styles to the DOM\nvar update = require(\"!./../node_modules/style-loader/addStyles.js\")(content, {});\nif(content.locals) module.exports = content.locals;\n// Hot Module Replacement\nif(module.hot) {\n\t// When the styles change, update the <style> tags\n\tif(!content.locals) {\n\t\tmodule.hot.accept(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\", function() {\n\t\t\tvar newContent = require(\"!!./../node_modules/css-loader/index.js?sourcemap!./../node_modules/postcss-loader/index.js!./styles.css\");\n\t\t\tif(typeof newContent === 'string') newContent = [[module.id, newContent, '']];\n\t\t\tupdate(newContent);\n\t\t});\n\t}\n\t// When the module is disposed, remove the <style> tags\n\tmodule.hot.dispose(function() { update(); });\n}\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini-ng2/src/styles.css\n// module id = 379\n// module chunks = 1","exports = module.exports = require(\"./../node_modules/css-loader/lib/css-base.js\")();\n// imports\n\n\n// module\nexports.push([module.id, \"/* You can add global styles to this file, and also import other style files */\\n\", \"\"]);\n\n// exports\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini-ng2/~/css-loader?sourcemap!/home/adones/Projects/UNSAKINI/unsakini-ng2/~/postcss-loader!/home/adones/Projects/UNSAKINI/unsakini-ng2/src/styles.css\n// module id = 652\n// module chunks = 1","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\n// css base code, injected by the css-loader\r\nmodule.exports = function() {\r\n\tvar list = [];\r\n\r\n\t// return the list of modules as css string\r\n\tlist.toString = function toString() {\r\n\t\tvar result = [];\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar item = this[i];\r\n\t\t\tif(item[2]) {\r\n\t\t\t\tresult.push(\"@media \" + item[2] + \"{\" + item[1] + \"}\");\r\n\t\t\t} else {\r\n\t\t\t\tresult.push(item[1]);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result.join(\"\");\r\n\t};\r\n\r\n\t// import a list of modules into the list\r\n\tlist.i = function(modules, mediaQuery) {\r\n\t\tif(typeof modules === \"string\")\r\n\t\t\tmodules = [[null, modules, \"\"]];\r\n\t\tvar alreadyImportedModules = {};\r\n\t\tfor(var i = 0; i < this.length; i++) {\r\n\t\t\tvar id = this[i][0];\r\n\t\t\tif(typeof id === \"number\")\r\n\t\t\t\talreadyImportedModules[id] = true;\r\n\t\t}\r\n\t\tfor(i = 0; i < modules.length; i++) {\r\n\t\t\tvar item = modules[i];\r\n\t\t\t// skip already imported module\r\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\r\n\t\t\t// when a module is imported multiple times with different media queries.\r\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\r\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\r\n\t\t\t\tif(mediaQuery && !item[2]) {\r\n\t\t\t\t\titem[2] = mediaQuery;\r\n\t\t\t\t} else if(mediaQuery) {\r\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\r\n\t\t\t\t}\r\n\t\t\t\tlist.push(item);\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n\treturn list;\r\n};\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini-ng2/~/css-loader/lib/css-base.js\n// module id = 653\n// module chunks = 1","/*\r\n\tMIT License http://www.opensource.org/licenses/mit-license.php\r\n\tAuthor Tobias Koppers @sokra\r\n*/\r\nvar stylesInDom = {},\r\n\tmemoize = function(fn) {\r\n\t\tvar memo;\r\n\t\treturn function () {\r\n\t\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\r\n\t\t\treturn memo;\r\n\t\t};\r\n\t},\r\n\tisOldIE = memoize(function() {\r\n\t\treturn /msie [6-9]\\b/.test(window.navigator.userAgent.toLowerCase());\r\n\t}),\r\n\tgetHeadElement = memoize(function () {\r\n\t\treturn document.head || document.getElementsByTagName(\"head\")[0];\r\n\t}),\r\n\tsingletonElement = null,\r\n\tsingletonCounter = 0,\r\n\tstyleElementsInsertedAtTop = [];\r\n\r\nmodule.exports = function(list, options) {\r\n\tif(typeof DEBUG !== \"undefined\" && DEBUG) {\r\n\t\tif(typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\r\n\t}\r\n\r\n\toptions = options || {};\r\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>\r\n\t// tags it will allow on a page\r\n\tif (typeof options.singleton === \"undefined\") options.singleton = isOldIE();\r\n\r\n\t// By default, add <style> tags to the bottom of <head>.\r\n\tif (typeof options.insertAt === \"undefined\") options.insertAt = \"bottom\";\r\n\r\n\tvar styles = listToStyles(list);\r\n\taddStylesToDom(styles, options);\r\n\r\n\treturn function update(newList) {\r\n\t\tvar mayRemove = [];\r\n\t\tfor(var i = 0; i < styles.length; i++) {\r\n\t\t\tvar item = styles[i];\r\n\t\t\tvar domStyle = stylesInDom[item.id];\r\n\t\t\tdomStyle.refs--;\r\n\t\t\tmayRemove.push(domStyle);\r\n\t\t}\r\n\t\tif(newList) {\r\n\t\t\tvar newStyles = listToStyles(newList);\r\n\t\t\taddStylesToDom(newStyles, options);\r\n\t\t}\r\n\t\tfor(var i = 0; i < mayRemove.length; i++) {\r\n\t\t\tvar domStyle = mayRemove[i];\r\n\t\t\tif(domStyle.refs === 0) {\r\n\t\t\t\tfor(var j = 0; j < domStyle.parts.length; j++)\r\n\t\t\t\t\tdomStyle.parts[j]();\r\n\t\t\t\tdelete stylesInDom[domStyle.id];\r\n\t\t\t}\r\n\t\t}\r\n\t};\r\n}\r\n\r\nfunction addStylesToDom(styles, options) {\r\n\tfor(var i = 0; i < styles.length; i++) {\r\n\t\tvar item = styles[i];\r\n\t\tvar domStyle = stylesInDom[item.id];\r\n\t\tif(domStyle) {\r\n\t\t\tdomStyle.refs++;\r\n\t\t\tfor(var j = 0; j < domStyle.parts.length; j++) {\r\n\t\t\t\tdomStyle.parts[j](item.parts[j]);\r\n\t\t\t}\r\n\t\t\tfor(; j < item.parts.length; j++) {\r\n\t\t\t\tdomStyle.parts.push(addStyle(item.parts[j], options));\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tvar parts = [];\r\n\t\t\tfor(var j = 0; j < item.parts.length; j++) {\r\n\t\t\t\tparts.push(addStyle(item.parts[j], options));\r\n\t\t\t}\r\n\t\t\tstylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction listToStyles(list) {\r\n\tvar styles = [];\r\n\tvar newStyles = {};\r\n\tfor(var i = 0; i < list.length; i++) {\r\n\t\tvar item = list[i];\r\n\t\tvar id = item[0];\r\n\t\tvar css = item[1];\r\n\t\tvar media = item[2];\r\n\t\tvar sourceMap = item[3];\r\n\t\tvar part = {css: css, media: media, sourceMap: sourceMap};\r\n\t\tif(!newStyles[id])\r\n\t\t\tstyles.push(newStyles[id] = {id: id, parts: [part]});\r\n\t\telse\r\n\t\t\tnewStyles[id].parts.push(part);\r\n\t}\r\n\treturn styles;\r\n}\r\n\r\nfunction insertStyleElement(options, styleElement) {\r\n\tvar head = getHeadElement();\r\n\tvar lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];\r\n\tif (options.insertAt === \"top\") {\r\n\t\tif(!lastStyleElementInsertedAtTop) {\r\n\t\t\thead.insertBefore(styleElement, head.firstChild);\r\n\t\t} else if(lastStyleElementInsertedAtTop.nextSibling) {\r\n\t\t\thead.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);\r\n\t\t} else {\r\n\t\t\thead.appendChild(styleElement);\r\n\t\t}\r\n\t\tstyleElementsInsertedAtTop.push(styleElement);\r\n\t} else if (options.insertAt === \"bottom\") {\r\n\t\thead.appendChild(styleElement);\r\n\t} else {\r\n\t\tthrow new Error(\"Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.\");\r\n\t}\r\n}\r\n\r\nfunction removeStyleElement(styleElement) {\r\n\tstyleElement.parentNode.removeChild(styleElement);\r\n\tvar idx = styleElementsInsertedAtTop.indexOf(styleElement);\r\n\tif(idx >= 0) {\r\n\t\tstyleElementsInsertedAtTop.splice(idx, 1);\r\n\t}\r\n}\r\n\r\nfunction createStyleElement(options) {\r\n\tvar styleElement = document.createElement(\"style\");\r\n\tstyleElement.type = \"text/css\";\r\n\tinsertStyleElement(options, styleElement);\r\n\treturn styleElement;\r\n}\r\n\r\nfunction createLinkElement(options) {\r\n\tvar linkElement = document.createElement(\"link\");\r\n\tlinkElement.rel = \"stylesheet\";\r\n\tinsertStyleElement(options, linkElement);\r\n\treturn linkElement;\r\n}\r\n\r\nfunction addStyle(obj, options) {\r\n\tvar styleElement, update, remove;\r\n\r\n\tif (options.singleton) {\r\n\t\tvar styleIndex = singletonCounter++;\r\n\t\tstyleElement = singletonElement || (singletonElement = createStyleElement(options));\r\n\t\tupdate = applyToSingletonTag.bind(null, styleElement, styleIndex, false);\r\n\t\tremove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);\r\n\t} else if(obj.sourceMap &&\r\n\t\ttypeof URL === \"function\" &&\r\n\t\ttypeof URL.createObjectURL === \"function\" &&\r\n\t\ttypeof URL.revokeObjectURL === \"function\" &&\r\n\t\ttypeof Blob === \"function\" &&\r\n\t\ttypeof btoa === \"function\") {\r\n\t\tstyleElement = createLinkElement(options);\r\n\t\tupdate = updateLink.bind(null, styleElement);\r\n\t\tremove = function() {\r\n\t\t\tremoveStyleElement(styleElement);\r\n\t\t\tif(styleElement.href)\r\n\t\t\t\tURL.revokeObjectURL(styleElement.href);\r\n\t\t};\r\n\t} else {\r\n\t\tstyleElement = createStyleElement(options);\r\n\t\tupdate = applyToTag.bind(null, styleElement);\r\n\t\tremove = function() {\r\n\t\t\tremoveStyleElement(styleElement);\r\n\t\t};\r\n\t}\r\n\r\n\tupdate(obj);\r\n\r\n\treturn function updateStyle(newObj) {\r\n\t\tif(newObj) {\r\n\t\t\tif(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)\r\n\t\t\t\treturn;\r\n\t\t\tupdate(obj = newObj);\r\n\t\t} else {\r\n\t\t\tremove();\r\n\t\t}\r\n\t};\r\n}\r\n\r\nvar replaceText = (function () {\r\n\tvar textStore = [];\r\n\r\n\treturn function (index, replacement) {\r\n\t\ttextStore[index] = replacement;\r\n\t\treturn textStore.filter(Boolean).join('\\n');\r\n\t};\r\n})();\r\n\r\nfunction applyToSingletonTag(styleElement, index, remove, obj) {\r\n\tvar css = remove ? \"\" : obj.css;\r\n\r\n\tif (styleElement.styleSheet) {\r\n\t\tstyleElement.styleSheet.cssText = replaceText(index, css);\r\n\t} else {\r\n\t\tvar cssNode = document.createTextNode(css);\r\n\t\tvar childNodes = styleElement.childNodes;\r\n\t\tif (childNodes[index]) styleElement.removeChild(childNodes[index]);\r\n\t\tif (childNodes.length) {\r\n\t\t\tstyleElement.insertBefore(cssNode, childNodes[index]);\r\n\t\t} else {\r\n\t\t\tstyleElement.appendChild(cssNode);\r\n\t\t}\r\n\t}\r\n}\r\n\r\nfunction applyToTag(styleElement, obj) {\r\n\tvar css = obj.css;\r\n\tvar media = obj.media;\r\n\r\n\tif(media) {\r\n\t\tstyleElement.setAttribute(\"media\", media)\r\n\t}\r\n\r\n\tif(styleElement.styleSheet) {\r\n\t\tstyleElement.styleSheet.cssText = css;\r\n\t} else {\r\n\t\twhile(styleElement.firstChild) {\r\n\t\t\tstyleElement.removeChild(styleElement.firstChild);\r\n\t\t}\r\n\t\tstyleElement.appendChild(document.createTextNode(css));\r\n\t}\r\n}\r\n\r\nfunction updateLink(linkElement, obj) {\r\n\tvar css = obj.css;\r\n\tvar sourceMap = obj.sourceMap;\r\n\r\n\tif(sourceMap) {\r\n\t\t// http://stackoverflow.com/a/26603875\r\n\t\tcss += \"\\n/*# sourceMappingURL=data:application/json;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + \" */\";\r\n\t}\r\n\r\n\tvar blob = new Blob([css], { type: \"text/css\" });\r\n\r\n\tvar oldSrc = linkElement.href;\r\n\r\n\tlinkElement.href = URL.createObjectURL(blob);\r\n\r\n\tif(oldSrc)\r\n\t\tURL.revokeObjectURL(oldSrc);\r\n}\r\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /home/adones/Projects/UNSAKINI/unsakini-ng2/~/style-loader/addStyles.js\n// module id = 695\n// module chunks = 1"],"sourceRoot":""}
@@ -0,0 +1,45 @@
1
+ // Karma configuration file, see link for more information
2
+ // https://karma-runner.github.io/0.13/config/configuration-file.html
3
+
4
+ module.exports = function (config) {
5
+ config.set({
6
+ basePath: '',
7
+ frameworks: ['jasmine', 'angular-cli'],
8
+ plugins: [
9
+ require('karma-jasmine'),
10
+ require('karma-phantomjs-launcher'),
11
+ // require('karma-chrome-launcher'),
12
+ require('karma-remap-istanbul'),
13
+ require('angular-cli/plugins/karma')
14
+ ],
15
+ files: [
16
+ { pattern: './src/test.ts', watched: false }
17
+ ],
18
+ preprocessors: {
19
+ './src/test.ts': ['angular-cli']
20
+ },
21
+ mime: {
22
+ 'text/x-typescript': ['ts','tsx']
23
+ },
24
+ remapIstanbulReporter: {
25
+ reports: {
26
+ html: 'coverage',
27
+ lcovonly: './coverage/coverage.lcov'
28
+ }
29
+ },
30
+ angularCli: {
31
+ config: './angular-cli.json',
32
+ environment: 'dev'
33
+ },
34
+ reporters: config.angularCli && config.angularCli.codeCoverage
35
+ ? ['progress', 'karma-remap-istanbul']
36
+ : ['progress'],
37
+ port: 9874,
38
+ colors: true,
39
+ logLevel: config.LOG_INFO,
40
+ autoWatch: true,
41
+ // browsers: ['Chrome'],
42
+ browsers: ['PhantomJS'],
43
+ singleRun: false
44
+ });
45
+ };
@@ -0,0 +1,49 @@
1
+ {
2
+ "name": "angular",
3
+ "version": "0.0.0",
4
+ "license": "MIT",
5
+ "angular-cli": {},
6
+ "scripts": {
7
+ "start": "ng serve",
8
+ "lint": "tslint \"src/**/*.ts\"",
9
+ "test": "ng test",
10
+ "pree2e": "webdriver-manager update",
11
+ "e2e": "protractor"
12
+ },
13
+ "private": true,
14
+ "dependencies": {
15
+ "@angular/common": "^2.1.0",
16
+ "@angular/compiler": "^2.1.0",
17
+ "@angular/core": "^2.1.0",
18
+ "@angular/forms": "^2.1.0",
19
+ "@angular/http": "^2.1.0",
20
+ "@angular/platform-browser": "^2.1.0",
21
+ "@angular/platform-browser-dynamic": "^2.1.0",
22
+ "@angular/router": "^3.1.0",
23
+ "angular2-token": "^0.2.0-beta.3",
24
+ "core-js": "^2.4.1",
25
+ "rxjs": "5.0.0-beta.12",
26
+ "ts-helpers": "^1.1.1",
27
+ "zone.js": "^0.6.23"
28
+ },
29
+ "devDependencies": {
30
+ "@angular/compiler-cli": "^2.1.0",
31
+ "@types/jasmine": "^2.2.30",
32
+ "@types/node": "^6.0.42",
33
+ "angular-cli": "1.0.0-beta.20-4",
34
+ "codelyzer": "~1.0.0-beta.3",
35
+ "jasmine-core": "2.4.1",
36
+ "jasmine-spec-reporter": "2.5.0",
37
+ "karma": "1.2.0",
38
+ "karma-chrome-launcher": "^2.0.0",
39
+ "karma-cli": "^1.0.1",
40
+ "karma-jasmine": "^1.0.2",
41
+ "karma-phantomjs-launcher": "^1.0.2",
42
+ "karma-remap-istanbul": "^0.2.1",
43
+ "protractor": "4.0.9",
44
+ "ts-node": "1.2.1",
45
+ "tslint": "3.13.0",
46
+ "typescript": "~2.0.3",
47
+ "webdriver-manager": "10.2.5"
48
+ }
49
+ }
@@ -0,0 +1,32 @@
1
+ // Protractor configuration file, see link for more information
2
+ // https://github.com/angular/protractor/blob/master/docs/referenceConf.js
3
+
4
+ /*global jasmine */
5
+ var SpecReporter = require('jasmine-spec-reporter');
6
+
7
+ exports.config = {
8
+ allScriptsTimeout: 11000,
9
+ specs: [
10
+ './e2e/**/*.e2e-spec.ts'
11
+ ],
12
+ capabilities: {
13
+ 'browserName': 'chrome'
14
+ },
15
+ directConnect: true,
16
+ baseUrl: 'http://localhost:3000/app/',
17
+ framework: 'jasmine',
18
+ jasmineNodeOpts: {
19
+ showColors: true,
20
+ defaultTimeoutInterval: 30000,
21
+ print: function() {}
22
+ },
23
+ useAllAngular2AppRoots: true,
24
+ beforeLaunch: function() {
25
+ require('ts-node').register({
26
+ project: 'e2e'
27
+ });
28
+ },
29
+ onPrepare: function() {
30
+ jasmine.getEnv().addReporter(new SpecReporter());
31
+ }
32
+ };
File without changes
@@ -0,0 +1,4 @@
1
+ <h1>
2
+ {{title}}
3
+ <router-outlet></router-outlet>
4
+ </h1>
@@ -0,0 +1,47 @@
1
+ /* tslint:disable:no-unused-variable */
2
+
3
+ import { TestBed, async } from '@angular/core/testing';
4
+ import { AppComponent } from './app.component';
5
+ import { RouterTestingModule } from '@angular/router/testing';
6
+
7
+ describe('AppComponent', () => {
8
+
9
+ beforeEach(() => {
10
+ TestBed.configureTestingModule({
11
+ imports: [
12
+ RouterTestingModule
13
+ ],
14
+ declarations:
15
+ [
16
+ AppComponent
17
+ ],
18
+ });
19
+ });
20
+
21
+ it('should create the app', async(() => {
22
+ let fixture = TestBed.createComponent(AppComponent);
23
+ let app = fixture.debugElement.componentInstance;
24
+ expect(app).toBeTruthy();
25
+ }));
26
+
27
+ it(`should have as title 'app works!'`, async(() => {
28
+ let fixture = TestBed.createComponent(AppComponent);
29
+ let app = fixture.debugElement.componentInstance;
30
+ expect(app.title).toEqual('app works!');
31
+ }));
32
+
33
+ it('should render title in a h1 tag', async(() => {
34
+ let fixture = TestBed.createComponent(AppComponent);
35
+ fixture.detectChanges();
36
+ let compiled = fixture.debugElement.nativeElement;
37
+ expect(compiled.querySelector('h1').textContent).toContain('app works!');
38
+ }));
39
+
40
+ it('should have router outlet', async(() => {
41
+ let fixture = TestBed.createComponent(AppComponent);
42
+ fixture.detectChanges();
43
+ let compiled = fixture.debugElement.nativeElement;
44
+ expect(compiled.querySelector('router-outlet')).toBeTruthy()
45
+ }));
46
+
47
+ });
@@ -0,0 +1,10 @@
1
+ import { Component } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'app-root',
5
+ templateUrl: './app.component.html',
6
+ styleUrls: ['./app.component.css']
7
+ })
8
+ export class AppComponent {
9
+ title = 'app works!';
10
+ }
@@ -0,0 +1,29 @@
1
+ import { BrowserModule } from '@angular/platform-browser';
2
+ import { NgModule } from '@angular/core';
3
+ import { FormsModule } from '@angular/forms';
4
+ import { HttpModule } from '@angular/http';
5
+ import { Angular2TokenService, A2tUiModule } from 'angular2-token';
6
+
7
+ import { AppRoutesModule } from './app.routes.module';
8
+
9
+ import { AppComponent } from './app.component';
10
+ import { RegistrationComponent } from './registration/registration.component';
11
+
12
+ @NgModule({
13
+ imports: [
14
+ BrowserModule,
15
+ FormsModule,
16
+ HttpModule,
17
+ AppRoutesModule,
18
+ A2tUiModule,
19
+ ],
20
+ declarations: [
21
+ AppComponent,
22
+ RegistrationComponent
23
+ ],
24
+ providers: [
25
+ Angular2TokenService,
26
+ ],
27
+ bootstrap: [AppComponent]
28
+ })
29
+ export class AppModule { }
@@ -0,0 +1,29 @@
1
+ import { NgModule } from '@angular/core';
2
+ import { RouterModule } from '@angular/router';
3
+
4
+ import { RegistrationComponent } from './registration/registration.component'
5
+
6
+
7
+ const routes = [
8
+ {
9
+ path: '',
10
+ redirectTo: 'registration',
11
+ pathMatch: 'full'
12
+ },
13
+ {
14
+ path: 'registration',
15
+ component: RegistrationComponent
16
+ }
17
+ ];
18
+
19
+ @NgModule({
20
+ imports: [
21
+ RouterModule.forRoot(routes)
22
+ ],
23
+ exports: [
24
+ RouterModule
25
+ ],
26
+ providers: []
27
+ })
28
+
29
+ export class AppRoutesModule {}
@@ -0,0 +1,2 @@
1
+ export * from './app.component';
2
+ export * from './app.module';
@@ -0,0 +1,14 @@
1
+
2
+ <form (ngSubmit)="doSubmit()">
3
+ <div class="alert alert-success" *ngIf="success">Registration successful. Please confirm your email sent to {{user.email}} to proceed.</div>
4
+ <div class="alert alert-danger" *ngIf="errors">
5
+ <p *ngFor="let e of errors">{{e}}</p>
6
+ </div>
7
+ <input type="text" name="name">
8
+ <input type="email" name="email">
9
+ <input type="password" name="password">
10
+ <input type="password" name="password_confirmation">
11
+ <button type="submit">Sign Up</button>
12
+ </form>
13
+
14
+ <div (click)="doSubmit()">CLICK ME</div>