unsakini 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/angular/LICENSE +21 -0
- data/angular/README.md +1 -0
- data/angular/angular-cli.json +59 -0
- data/angular/dist/favicon.ico +0 -0
- data/angular/dist/index.html +14 -0
- data/angular/dist/inline.bundle.js +139 -0
- data/angular/dist/inline.map +1 -0
- data/angular/dist/main.bundle.js +64735 -0
- data/angular/dist/main.map +1 -0
- data/angular/dist/styles.bundle.js +364 -0
- data/angular/dist/styles.map +1 -0
- data/angular/karma.conf.js +45 -0
- data/angular/package.json +49 -0
- data/angular/protractor.conf.js +32 -0
- data/angular/src/app/app.component.css +0 -0
- data/angular/src/app/app.component.html +4 -0
- data/angular/src/app/app.component.spec.ts +47 -0
- data/angular/src/app/app.component.ts +10 -0
- data/angular/src/app/app.module.ts +29 -0
- data/angular/src/app/app.routes.module.ts +29 -0
- data/angular/src/app/index.ts +2 -0
- data/angular/src/app/registration/registration.component.css +0 -0
- data/angular/src/app/registration/registration.component.html +14 -0
- data/angular/src/app/registration/registration.component.spec.ts +157 -0
- data/angular/src/app/registration/registration.component.ts +42 -0
- data/angular/src/environments/environment.prod.ts +3 -0
- data/angular/src/environments/environment.ts +8 -0
- data/angular/src/favicon.ico +0 -0
- data/angular/src/index.html +14 -0
- data/angular/src/main.ts +12 -0
- data/angular/src/polyfills.ts +19 -0
- data/angular/src/styles.css +1 -0
- data/angular/src/test.ts +31 -0
- data/angular/src/tsconfig.json +18 -0
- data/angular/src/typings.d.ts +2 -0
- data/angular/tslint.json +114 -0
- data/angular/typings.json +4 -0
- data/lib/generators/unsakini/angular/angular_generator.rb +1 -1
- data/lib/tasks/unsakini_tasks.rake +2 -7
- data/lib/unsakini/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +57 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/public/app/index.html +14 -0
- metadata +56 -15
- /data/spec/dummy/db/migrate/{20161124184336_create_boards.unsakini_engine.rb → 20161124210219_create_boards.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161124184337_create_user_boards.unsakini_engine.rb → 20161124210220_create_user_boards.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161124184338_create_posts.unsakini_engine.rb → 20161124210221_create_posts.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161124184339_create_comments.unsakini_engine.rb → 20161124210222_create_comments.unsakini_engine.rb} +0 -0
- /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
- /data/spec/dummy/db/migrate/{20161124184341_create_users.unsakini_engine.rb → 20161124210224_create_users.unsakini_engine.rb} +0 -0
- /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,157 @@
|
|
1
|
+
/* tslint:disable:no-unused-variable */
|
2
|
+
|
3
|
+
import { inject, async, ComponentFixture, TestBed } from '@angular/core/testing';
|
4
|
+
import { Observable } from 'rxjs/Observable';
|
5
|
+
import 'rxjs/add/observable/of';
|
6
|
+
import 'rxjs/add/observable/throw';
|
7
|
+
import { By } from '@angular/platform-browser';
|
8
|
+
import { DebugElement } from '@angular/core';
|
9
|
+
import { Angular2TokenService } from 'angular2-token';
|
10
|
+
|
11
|
+
import { RegistrationComponent } from './registration.component';
|
12
|
+
|
13
|
+
let user = {
|
14
|
+
name: 'first last',
|
15
|
+
email: 'hello@world.com',
|
16
|
+
password: null,
|
17
|
+
password_confirmation: null
|
18
|
+
}
|
19
|
+
|
20
|
+
let status = 0
|
21
|
+
let errors = []
|
22
|
+
|
23
|
+
class Angular2TokenServiceMock {
|
24
|
+
registerAccount(user) {
|
25
|
+
|
26
|
+
if (status === 200) {
|
27
|
+
return Observable.of({
|
28
|
+
status: 200,
|
29
|
+
json: () => {
|
30
|
+
return {
|
31
|
+
user
|
32
|
+
}
|
33
|
+
}
|
34
|
+
});
|
35
|
+
} else {
|
36
|
+
return Observable.throw({
|
37
|
+
status: status,
|
38
|
+
json: () => {
|
39
|
+
return {
|
40
|
+
errors: errors
|
41
|
+
}
|
42
|
+
}
|
43
|
+
});
|
44
|
+
}
|
45
|
+
}
|
46
|
+
}
|
47
|
+
|
48
|
+
describe('RegistrationComponent', () => {
|
49
|
+
let component: RegistrationComponent;
|
50
|
+
let fixture: ComponentFixture<RegistrationComponent>;
|
51
|
+
let compiled: any;
|
52
|
+
|
53
|
+
beforeEach(async(() => {
|
54
|
+
TestBed.configureTestingModule({
|
55
|
+
imports: [
|
56
|
+
],
|
57
|
+
declarations: [RegistrationComponent],
|
58
|
+
providers: [
|
59
|
+
{
|
60
|
+
provide: Angular2TokenService,
|
61
|
+
useClass: Angular2TokenServiceMock
|
62
|
+
},
|
63
|
+
]
|
64
|
+
})
|
65
|
+
.compileComponents();
|
66
|
+
}));
|
67
|
+
|
68
|
+
beforeEach(() => {
|
69
|
+
fixture = TestBed.createComponent(RegistrationComponent);
|
70
|
+
component = fixture.componentInstance;
|
71
|
+
compiled = fixture.debugElement.nativeElement;
|
72
|
+
fixture.detectChanges();
|
73
|
+
});
|
74
|
+
|
75
|
+
describe('Component', () => {
|
76
|
+
|
77
|
+
it('should create', () => {
|
78
|
+
expect(component).toBeTruthy();
|
79
|
+
});
|
80
|
+
|
81
|
+
it('should have token service', () => {
|
82
|
+
expect(component.service).toBeDefined();
|
83
|
+
});
|
84
|
+
|
85
|
+
it('should have user', () => {
|
86
|
+
expect(component.user).toEqual({
|
87
|
+
name: '',
|
88
|
+
email: '',
|
89
|
+
password: '',
|
90
|
+
password_confirmation: ''
|
91
|
+
});
|
92
|
+
});
|
93
|
+
|
94
|
+
it('should handle http 422', () => {
|
95
|
+
status = 422
|
96
|
+
errors = ['some errors']
|
97
|
+
component.user = user
|
98
|
+
component.doSubmit()
|
99
|
+
expect(component.success).toBe(false)
|
100
|
+
expect(component.errors).toEqual(errors)
|
101
|
+
fixture.detectChanges();
|
102
|
+
expect(compiled.querySelector('.alert-success')).toBeFalsy()
|
103
|
+
expect(compiled.querySelector('.alert-danger').textContent).toContain('some errors')
|
104
|
+
})
|
105
|
+
|
106
|
+
it('should handle http 500 and other errors', () => {
|
107
|
+
status = 500
|
108
|
+
component.user = user
|
109
|
+
component.doSubmit()
|
110
|
+
expect(component.success).toBe(false)
|
111
|
+
expect(component.errors).toEqual(['Something went wrong.'])
|
112
|
+
fixture.detectChanges();
|
113
|
+
expect(compiled.querySelector('.alert-success')).toBeFalsy()
|
114
|
+
expect(compiled.querySelector('.alert-danger').textContent).toContain('Something went wrong')
|
115
|
+
})
|
116
|
+
|
117
|
+
it('should notify when success', () => {
|
118
|
+
component.user = user
|
119
|
+
status = 200
|
120
|
+
component.doSubmit()
|
121
|
+
expect(component.success).toBe(true)
|
122
|
+
fixture.detectChanges();
|
123
|
+
expect(compiled.querySelector('.alert-success')).toBeTruthy()
|
124
|
+
expect(compiled.querySelector('.alert-success').textContent).toContain('Registration successful')
|
125
|
+
})
|
126
|
+
|
127
|
+
});
|
128
|
+
|
129
|
+
describe('View', () => {
|
130
|
+
|
131
|
+
it('should have form', () => {
|
132
|
+
expect(compiled.querySelector('form')).toBeTruthy();
|
133
|
+
});
|
134
|
+
|
135
|
+
it('should have input name', () => {
|
136
|
+
expect(compiled.querySelector('input[name="name"]')).toBeTruthy();
|
137
|
+
});
|
138
|
+
|
139
|
+
it('should have input email', () => {
|
140
|
+
expect(compiled.querySelector('input[name="email"][type="email"]')).toBeTruthy();
|
141
|
+
});
|
142
|
+
|
143
|
+
it('should have input password', () => {
|
144
|
+
expect(compiled.querySelector('input[name="password"][type="password"]')).toBeTruthy();
|
145
|
+
});
|
146
|
+
|
147
|
+
it('should have input password confirmation', () => {
|
148
|
+
expect(compiled.querySelector('input[name="password_confirmation"][type="password"]')).toBeTruthy();
|
149
|
+
});
|
150
|
+
|
151
|
+
it('should have submit button', () => {
|
152
|
+
expect(compiled.querySelector('button[type="submit"]')).toBeTruthy();
|
153
|
+
});
|
154
|
+
|
155
|
+
});
|
156
|
+
|
157
|
+
});
|
@@ -0,0 +1,42 @@
|
|
1
|
+
import { Component, OnInit } from '@angular/core';
|
2
|
+
import { Angular2TokenService } from 'angular2-token';
|
3
|
+
|
4
|
+
@Component({
|
5
|
+
selector: 'app-registration',
|
6
|
+
templateUrl: './registration.component.html',
|
7
|
+
styleUrls: ['./registration.component.css']
|
8
|
+
})
|
9
|
+
export class RegistrationComponent implements OnInit {
|
10
|
+
|
11
|
+
user: any;
|
12
|
+
errors: any;
|
13
|
+
success = false;
|
14
|
+
|
15
|
+
constructor(public service: Angular2TokenService) {
|
16
|
+
this.user = {
|
17
|
+
name: '',
|
18
|
+
email: '',
|
19
|
+
password: '',
|
20
|
+
password_confirmation: ''
|
21
|
+
};
|
22
|
+
}
|
23
|
+
|
24
|
+
doSubmit () {
|
25
|
+
this.service.registerAccount(this.user).subscribe(
|
26
|
+
(res) => {
|
27
|
+
this.success = true;
|
28
|
+
},
|
29
|
+
(res) => {
|
30
|
+
if (res.status == 422) {
|
31
|
+
this.errors = res.json().errors
|
32
|
+
} else {
|
33
|
+
this.errors = ['Something went wrong.']
|
34
|
+
}
|
35
|
+
}
|
36
|
+
);
|
37
|
+
}
|
38
|
+
|
39
|
+
ngOnInit() {
|
40
|
+
}
|
41
|
+
|
42
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
// The file contents for the current environment will overwrite these during build.
|
2
|
+
// The build system defaults to the dev environment which uses `environment.ts`, but if you do
|
3
|
+
// `ng build --env=prod` then `environment.prod.ts` will be used instead.
|
4
|
+
// The list of which env maps to which file can be found in `angular-cli.json`.
|
5
|
+
|
6
|
+
export const environment = {
|
7
|
+
production: false
|
8
|
+
};
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Angular</title>
|
6
|
+
<base href="/app/">
|
7
|
+
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<app-root>Loading...</app-root>
|
13
|
+
</body>
|
14
|
+
</html>
|
data/angular/src/main.ts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import './polyfills.ts';
|
2
|
+
|
3
|
+
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
|
4
|
+
import { enableProdMode } from '@angular/core';
|
5
|
+
import { environment } from './environments/environment';
|
6
|
+
import { AppModule } from './app/';
|
7
|
+
|
8
|
+
if (environment.production) {
|
9
|
+
enableProdMode();
|
10
|
+
}
|
11
|
+
|
12
|
+
platformBrowserDynamic().bootstrapModule(AppModule);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// This file includes polyfills needed by Angular 2 and is loaded before
|
2
|
+
// the app. You can add your own extra polyfills to this file.
|
3
|
+
import 'core-js/es6/symbol';
|
4
|
+
import 'core-js/es6/object';
|
5
|
+
import 'core-js/es6/function';
|
6
|
+
import 'core-js/es6/parse-int';
|
7
|
+
import 'core-js/es6/parse-float';
|
8
|
+
import 'core-js/es6/number';
|
9
|
+
import 'core-js/es6/math';
|
10
|
+
import 'core-js/es6/string';
|
11
|
+
import 'core-js/es6/date';
|
12
|
+
import 'core-js/es6/array';
|
13
|
+
import 'core-js/es6/regexp';
|
14
|
+
import 'core-js/es6/map';
|
15
|
+
import 'core-js/es6/set';
|
16
|
+
import 'core-js/es6/reflect';
|
17
|
+
|
18
|
+
import 'core-js/es7/reflect';
|
19
|
+
import 'zone.js/dist/zone';
|
@@ -0,0 +1 @@
|
|
1
|
+
/* You can add global styles to this file, and also import other style files */
|
data/angular/src/test.ts
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
import './polyfills.ts';
|
2
|
+
import 'zone.js/dist/long-stack-trace-zone';
|
3
|
+
import 'zone.js/dist/proxy.js';
|
4
|
+
import 'zone.js/dist/sync-test';
|
5
|
+
import 'zone.js/dist/jasmine-patch';
|
6
|
+
import 'zone.js/dist/async-test';
|
7
|
+
import 'zone.js/dist/fake-async-test';
|
8
|
+
import { getTestBed } from '@angular/core/testing';
|
9
|
+
import {
|
10
|
+
BrowserDynamicTestingModule,
|
11
|
+
platformBrowserDynamicTesting
|
12
|
+
} from '@angular/platform-browser-dynamic/testing';
|
13
|
+
|
14
|
+
// Unfortunately there's no typing for the `__karma__` variable. Just declare it as any.
|
15
|
+
declare var __karma__: any;
|
16
|
+
declare var require: any;
|
17
|
+
|
18
|
+
// Prevent Karma from running prematurely.
|
19
|
+
__karma__.loaded = function () {};
|
20
|
+
|
21
|
+
// First, initialize the Angular testing environment.
|
22
|
+
getTestBed().initTestEnvironment(
|
23
|
+
BrowserDynamicTestingModule,
|
24
|
+
platformBrowserDynamicTesting()
|
25
|
+
);
|
26
|
+
// Then we find all the tests.
|
27
|
+
let context = require.context('./', true, /\.spec\.ts/);
|
28
|
+
// And load the modules.
|
29
|
+
context.keys().map(context);
|
30
|
+
// Finally, start Karma to run the tests.
|
31
|
+
__karma__.start();
|
@@ -0,0 +1,18 @@
|
|
1
|
+
{
|
2
|
+
"compilerOptions": {
|
3
|
+
"baseUrl": "",
|
4
|
+
"declaration": false,
|
5
|
+
"emitDecoratorMetadata": true,
|
6
|
+
"experimentalDecorators": true,
|
7
|
+
"lib": ["es6", "dom"],
|
8
|
+
"mapRoot": "./",
|
9
|
+
"module": "es6",
|
10
|
+
"moduleResolution": "node",
|
11
|
+
"outDir": "../dist/out-tsc",
|
12
|
+
"sourceMap": true,
|
13
|
+
"target": "es5",
|
14
|
+
"typeRoots": [
|
15
|
+
"../node_modules/@types"
|
16
|
+
]
|
17
|
+
}
|
18
|
+
}
|
data/angular/tslint.json
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
{
|
2
|
+
"rulesDirectory": [
|
3
|
+
"node_modules/codelyzer"
|
4
|
+
],
|
5
|
+
"rules": {
|
6
|
+
"class-name": true,
|
7
|
+
"comment-format": [
|
8
|
+
true,
|
9
|
+
"check-space"
|
10
|
+
],
|
11
|
+
"curly": true,
|
12
|
+
"eofline": true,
|
13
|
+
"forin": true,
|
14
|
+
"indent": [
|
15
|
+
true,
|
16
|
+
"spaces"
|
17
|
+
],
|
18
|
+
"label-position": true,
|
19
|
+
"label-undefined": true,
|
20
|
+
"max-line-length": [
|
21
|
+
true,
|
22
|
+
140
|
23
|
+
],
|
24
|
+
"member-access": false,
|
25
|
+
"member-ordering": [
|
26
|
+
true,
|
27
|
+
"static-before-instance",
|
28
|
+
"variables-before-functions"
|
29
|
+
],
|
30
|
+
"no-arg": true,
|
31
|
+
"no-bitwise": true,
|
32
|
+
"no-console": [
|
33
|
+
true,
|
34
|
+
"debug",
|
35
|
+
"info",
|
36
|
+
"time",
|
37
|
+
"timeEnd",
|
38
|
+
"trace"
|
39
|
+
],
|
40
|
+
"no-construct": true,
|
41
|
+
"no-debugger": true,
|
42
|
+
"no-duplicate-key": true,
|
43
|
+
"no-duplicate-variable": true,
|
44
|
+
"no-empty": false,
|
45
|
+
"no-eval": true,
|
46
|
+
"no-inferrable-types": true,
|
47
|
+
"no-shadowed-variable": true,
|
48
|
+
"no-string-literal": false,
|
49
|
+
"no-switch-case-fall-through": true,
|
50
|
+
"no-trailing-whitespace": true,
|
51
|
+
"no-unused-expression": true,
|
52
|
+
"no-unused-variable": true,
|
53
|
+
"no-unreachable": true,
|
54
|
+
"no-use-before-declare": true,
|
55
|
+
"no-var-keyword": true,
|
56
|
+
"object-literal-sort-keys": false,
|
57
|
+
"one-line": [
|
58
|
+
true,
|
59
|
+
"check-open-brace",
|
60
|
+
"check-catch",
|
61
|
+
"check-else",
|
62
|
+
"check-whitespace"
|
63
|
+
],
|
64
|
+
"quotemark": [
|
65
|
+
true,
|
66
|
+
"single"
|
67
|
+
],
|
68
|
+
"radix": true,
|
69
|
+
"semicolon": [
|
70
|
+
"always"
|
71
|
+
],
|
72
|
+
"triple-equals": [
|
73
|
+
true,
|
74
|
+
"allow-null-check"
|
75
|
+
],
|
76
|
+
"typedef-whitespace": [
|
77
|
+
true,
|
78
|
+
{
|
79
|
+
"call-signature": "nospace",
|
80
|
+
"index-signature": "nospace",
|
81
|
+
"parameter": "nospace",
|
82
|
+
"property-declaration": "nospace",
|
83
|
+
"variable-declaration": "nospace"
|
84
|
+
}
|
85
|
+
],
|
86
|
+
"variable-name": false,
|
87
|
+
"whitespace": [
|
88
|
+
true,
|
89
|
+
"check-branch",
|
90
|
+
"check-decl",
|
91
|
+
"check-operator",
|
92
|
+
"check-separator",
|
93
|
+
"check-type"
|
94
|
+
],
|
95
|
+
|
96
|
+
"directive-selector-prefix": [true, "app"],
|
97
|
+
"component-selector-prefix": [true, "app"],
|
98
|
+
"directive-selector-name": [true, "camelCase"],
|
99
|
+
"component-selector-name": [true, "kebab-case"],
|
100
|
+
"directive-selector-type": [true, "attribute"],
|
101
|
+
"component-selector-type": [true, "element"],
|
102
|
+
"use-input-property-decorator": true,
|
103
|
+
"use-output-property-decorator": true,
|
104
|
+
"use-host-property-decorator": true,
|
105
|
+
"no-input-rename": true,
|
106
|
+
"no-output-rename": true,
|
107
|
+
"use-life-cycle-interface": true,
|
108
|
+
"use-pipe-transform-interface": true,
|
109
|
+
"component-class-suffix": true,
|
110
|
+
"directive-class-suffix": true,
|
111
|
+
"templates-use-public": true,
|
112
|
+
"invoke-injectable": true
|
113
|
+
}
|
114
|
+
}
|
@@ -18,20 +18,15 @@ namespace :unsakini do
|
|
18
18
|
|
19
19
|
desc "Installs the Angular 2 web client to public/app"
|
20
20
|
task :ng2 do
|
21
|
-
repo_name = "https://github.com/unsakini/unsakini-ng2"
|
22
|
-
tmp_dir = "#{Rails.root}/tmp/unsakini-ng2"
|
23
|
-
app_dir = "#{Rails.root}/public/app/"
|
24
21
|
begin
|
25
22
|
Dir.chdir Rails.root do
|
26
|
-
system("
|
27
|
-
system("git clone #{repo_name} #{tmp_dir}")
|
28
|
-
system("mv #{tmp_dir}/dist #{app_dir}")
|
23
|
+
system("bin/rails g unsakini:angular")
|
29
24
|
end
|
30
25
|
rescue Exception => e
|
31
26
|
puts e.to_s
|
32
27
|
raise "
|
33
28
|
|
34
|
-
Please clone #{repo_name} and extract dist folder to your projects public/app folder
|
29
|
+
Please clone #{repo_name} and extract angular/dist folder to your projects public/app folder
|
35
30
|
|
36
31
|
"
|
37
32
|
end
|
data/lib/unsakini/version.rb
CHANGED
Binary file
|
@@ -0,0 +1,57 @@
|
|
1
|
+
# This file is auto-generated from the current state of the database. Instead
|
2
|
+
# of editing this file, please use the migrations feature of Active Record to
|
3
|
+
# incrementally modify your database, and then regenerate this schema definition.
|
4
|
+
#
|
5
|
+
# Note that this schema.rb definition is the authoritative source for your
|
6
|
+
# database schema. If you need to create the application database on another
|
7
|
+
# system, you should be using db:schema:load, not running all the migrations
|
8
|
+
# from scratch. The latter is a flawed and unsustainable approach (the more migrations
|
9
|
+
# you'll amass, the slower it'll run and the greater likelihood for issues).
|
10
|
+
#
|
11
|
+
# It's strongly recommended that you check this file into your version control system.
|
12
|
+
|
13
|
+
ActiveRecord::Schema.define(version: 20161124210225) do
|
14
|
+
|
15
|
+
create_table "boards", force: :cascade do |t|
|
16
|
+
t.text "name"
|
17
|
+
t.datetime "created_at", null: false
|
18
|
+
t.datetime "updated_at", null: false
|
19
|
+
t.boolean "is_shared", default: false
|
20
|
+
end
|
21
|
+
|
22
|
+
create_table "comments", force: :cascade do |t|
|
23
|
+
t.text "content"
|
24
|
+
t.integer "user_id"
|
25
|
+
t.integer "post_id"
|
26
|
+
t.datetime "created_at", null: false
|
27
|
+
t.datetime "updated_at", null: false
|
28
|
+
end
|
29
|
+
|
30
|
+
create_table "posts", force: :cascade do |t|
|
31
|
+
t.text "title"
|
32
|
+
t.text "content"
|
33
|
+
t.integer "user_id"
|
34
|
+
t.integer "board_id"
|
35
|
+
t.datetime "created_at", null: false
|
36
|
+
t.datetime "updated_at", null: false
|
37
|
+
end
|
38
|
+
|
39
|
+
create_table "user_boards", force: :cascade do |t|
|
40
|
+
t.integer "user_id"
|
41
|
+
t.integer "board_id"
|
42
|
+
t.boolean "is_admin", default: false
|
43
|
+
t.datetime "created_at", null: false
|
44
|
+
t.datetime "updated_at", null: false
|
45
|
+
t.string "encrypted_password"
|
46
|
+
end
|
47
|
+
|
48
|
+
create_table "users", force: :cascade do |t|
|
49
|
+
t.string "name"
|
50
|
+
t.string "email"
|
51
|
+
t.string "password_digest"
|
52
|
+
t.boolean "confirmed"
|
53
|
+
t.datetime "created_at", null: false
|
54
|
+
t.datetime "updated_at", null: false
|
55
|
+
end
|
56
|
+
|
57
|
+
end
|
Binary file
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
<title>Angular</title>
|
6
|
+
<base href="/app/">
|
7
|
+
|
8
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
9
|
+
<link rel="icon" type="image/x-icon" href="favicon.ico">
|
10
|
+
</head>
|
11
|
+
<body>
|
12
|
+
<app-root>Loading...</app-root>
|
13
|
+
<script type="text/javascript" src="inline.bundle.js"></script><script type="text/javascript" src="styles.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body>
|
14
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: unsakini
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adones Pitogo
|
@@ -252,6 +252,43 @@ files:
|
|
252
252
|
- MIT-LICENSE
|
253
253
|
- README.md
|
254
254
|
- Rakefile
|
255
|
+
- angular/LICENSE
|
256
|
+
- angular/README.md
|
257
|
+
- angular/angular-cli.json
|
258
|
+
- angular/dist/favicon.ico
|
259
|
+
- angular/dist/index.html
|
260
|
+
- angular/dist/inline.bundle.js
|
261
|
+
- angular/dist/inline.map
|
262
|
+
- angular/dist/main.bundle.js
|
263
|
+
- angular/dist/main.map
|
264
|
+
- angular/dist/styles.bundle.js
|
265
|
+
- angular/dist/styles.map
|
266
|
+
- angular/karma.conf.js
|
267
|
+
- angular/package.json
|
268
|
+
- angular/protractor.conf.js
|
269
|
+
- angular/src/app/app.component.css
|
270
|
+
- angular/src/app/app.component.html
|
271
|
+
- angular/src/app/app.component.spec.ts
|
272
|
+
- angular/src/app/app.component.ts
|
273
|
+
- angular/src/app/app.module.ts
|
274
|
+
- angular/src/app/app.routes.module.ts
|
275
|
+
- angular/src/app/index.ts
|
276
|
+
- angular/src/app/registration/registration.component.css
|
277
|
+
- angular/src/app/registration/registration.component.html
|
278
|
+
- angular/src/app/registration/registration.component.spec.ts
|
279
|
+
- angular/src/app/registration/registration.component.ts
|
280
|
+
- angular/src/environments/environment.prod.ts
|
281
|
+
- angular/src/environments/environment.ts
|
282
|
+
- angular/src/favicon.ico
|
283
|
+
- angular/src/index.html
|
284
|
+
- angular/src/main.ts
|
285
|
+
- angular/src/polyfills.ts
|
286
|
+
- angular/src/styles.css
|
287
|
+
- angular/src/test.ts
|
288
|
+
- angular/src/tsconfig.json
|
289
|
+
- angular/src/typings.d.ts
|
290
|
+
- angular/tslint.json
|
291
|
+
- angular/typings.json
|
255
292
|
- app/controllers/api/boards_controller.rb
|
256
293
|
- app/controllers/api/comments_controller.rb
|
257
294
|
- app/controllers/api/posts_controller.rb
|
@@ -342,13 +379,15 @@ files:
|
|
342
379
|
- spec/dummy/config/secrets.yml
|
343
380
|
- spec/dummy/config/spring.rb
|
344
381
|
- spec/dummy/db/development.sqlite3
|
345
|
-
- spec/dummy/db/migrate/
|
346
|
-
- spec/dummy/db/migrate/
|
347
|
-
- spec/dummy/db/migrate/
|
348
|
-
- spec/dummy/db/migrate/
|
349
|
-
- spec/dummy/db/migrate/
|
350
|
-
- spec/dummy/db/migrate/
|
351
|
-
- spec/dummy/db/migrate/
|
382
|
+
- spec/dummy/db/migrate/20161124210219_create_boards.unsakini_engine.rb
|
383
|
+
- spec/dummy/db/migrate/20161124210220_create_user_boards.unsakini_engine.rb
|
384
|
+
- spec/dummy/db/migrate/20161124210221_create_posts.unsakini_engine.rb
|
385
|
+
- spec/dummy/db/migrate/20161124210222_create_comments.unsakini_engine.rb
|
386
|
+
- spec/dummy/db/migrate/20161124210223_add_encrypted_password_to_user_board.unsakini_engine.rb
|
387
|
+
- spec/dummy/db/migrate/20161124210224_create_users.unsakini_engine.rb
|
388
|
+
- spec/dummy/db/migrate/20161124210225_add_is_shared_to_boards.unsakini_engine.rb
|
389
|
+
- spec/dummy/db/schema.rb
|
390
|
+
- spec/dummy/db/test.sqlite3
|
352
391
|
- spec/dummy/public/404.html
|
353
392
|
- spec/dummy/public/422.html
|
354
393
|
- spec/dummy/public/500.html
|
@@ -522,14 +561,16 @@ test_files:
|
|
522
561
|
- spec/dummy/app/channels/application_cable/connection.rb
|
523
562
|
- spec/dummy/app/controllers/application_controller.rb
|
524
563
|
- spec/dummy/app/models/application_record.rb
|
525
|
-
- spec/dummy/db/
|
526
|
-
- spec/dummy/db/migrate/
|
527
|
-
- spec/dummy/db/migrate/
|
528
|
-
- spec/dummy/db/migrate/
|
529
|
-
- spec/dummy/db/migrate/
|
530
|
-
- spec/dummy/db/migrate/
|
531
|
-
- spec/dummy/db/migrate/
|
564
|
+
- spec/dummy/db/test.sqlite3
|
565
|
+
- spec/dummy/db/migrate/20161124210223_add_encrypted_password_to_user_board.unsakini_engine.rb
|
566
|
+
- spec/dummy/db/migrate/20161124210220_create_user_boards.unsakini_engine.rb
|
567
|
+
- spec/dummy/db/migrate/20161124210224_create_users.unsakini_engine.rb
|
568
|
+
- spec/dummy/db/migrate/20161124210225_add_is_shared_to_boards.unsakini_engine.rb
|
569
|
+
- spec/dummy/db/migrate/20161124210219_create_boards.unsakini_engine.rb
|
570
|
+
- spec/dummy/db/migrate/20161124210222_create_comments.unsakini_engine.rb
|
571
|
+
- spec/dummy/db/migrate/20161124210221_create_posts.unsakini_engine.rb
|
532
572
|
- spec/dummy/db/development.sqlite3
|
573
|
+
- spec/dummy/db/schema.rb
|
533
574
|
- spec/dummy/config/application.rb
|
534
575
|
- spec/dummy/config/spring.rb
|
535
576
|
- spec/dummy/config/puma.rb
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|