unsakini 0.0.1 → 0.0.2
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/Rakefile +1 -5
- data/app/controllers/api/boards_controller.rb +8 -2
- data/app/controllers/api/comments_controller.rb +1 -1
- data/app/controllers/api/posts_controller.rb +1 -1
- data/app/controllers/api/share_board_controller.rb +7 -7
- data/app/controllers/api/users_controller.rb +1 -1
- data/app/controllers/concerns/board_owner_controller_concern.rb +2 -2
- data/app/controllers/concerns/comment_owner_controller_concern.rb +2 -2
- data/app/controllers/concerns/logged_in_controller_concern.rb +1 -1
- data/app/controllers/concerns/post_owner_controller_concern.rb +2 -2
- data/app/controllers/web_base_controller.rb +4 -0
- data/app/models/user_board.rb +11 -0
- data/app/serializers/user_board_serializer.rb +2 -1
- data/app/views/web_base/index.html +16 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20161124102633_add_is_shared_to_boards.rb +5 -0
- data/lib/tasks/unsakini_tasks.rake +28 -30
- data/lib/unsakini/engine.rb +7 -8
- data/lib/unsakini/version.rb +1 -1
- data/spec/{requests/render_app_index_spec.rb → controllers/web_base_controller_spec.rb} +7 -0
- data/spec/dummy/app/assets/config/manifest.js +2 -0
- data/spec/dummy/app/assets/javascripts/cable.js +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +2 -1
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +0 -7
- data/spec/dummy/config/environments/development.rb +7 -0
- data/spec/dummy/config/environments/production.rb +8 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +5 -0
- data/spec/dummy/config/initializers/new_framework_defaults.rb +6 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/routes.rb +1 -1
- data/spec/dummy/config/secrets.yml +2 -2
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20161124184342_add_is_shared_to_boards.unsakini_engine.rb +6 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/app/index.html +0 -14
- data/spec/dummy/public/app/inline.map +1 -1
- data/spec/dummy/public/app/main.bundle.js +110 -64
- data/spec/dummy/public/app/main.map +1 -1
- data/spec/dummy/public/app/styles.map +1 -1
- data/spec/dummy/tmp/unsakini-ng2/LICENSE +21 -0
- data/spec/dummy/tmp/unsakini-ng2/README.md +1 -0
- data/{angular → spec/dummy/tmp/unsakini-ng2}/angular-cli.json +1 -1
- data/spec/dummy/tmp/unsakini-ng2/src/app/registration/registration.component.css +0 -0
- data/spec/models/user_board_spec.rb +2 -0
- data/spec/requests/api/boards/api_boards_crud_spec.rb +174 -0
- data/spec/requests/api/boards/api_boards_pagination_spec.rb +51 -0
- data/spec/requests/api/{api_boards_spec.rb → boards/api_private_board_spec.rb} +1 -98
- data/spec/requests/api/boards/api_shared_board_spec.rb +66 -0
- data/spec/support/scenario_helper.rb +66 -34
- data/spec/support/serialize_helper.rb +4 -0
- metadata +154 -127
- data/angular/README.md +0 -31
- data/config/initializers/unsakini.rb +0 -4
- data/spec/dummy/angular/README.md +0 -31
- data/spec/dummy/angular/angular-cli.json +0 -59
- data/spec/dummy/angular/karma.conf.js +0 -45
- data/spec/dummy/angular/package.json +0 -49
- data/spec/dummy/angular/protractor.conf.js +0 -32
- data/spec/dummy/angular/src/app/app.component.html +0 -4
- data/spec/dummy/angular/src/app/app.component.spec.ts +0 -47
- data/spec/dummy/angular/src/app/app.component.ts +0 -10
- data/spec/dummy/angular/src/app/app.module.ts +0 -29
- data/spec/dummy/angular/src/app/app.routes.module.ts +0 -29
- data/spec/dummy/angular/src/app/index.ts +0 -2
- data/spec/dummy/angular/src/app/registration/registration.component.html +0 -14
- data/spec/dummy/angular/src/app/registration/registration.component.spec.ts +0 -157
- data/spec/dummy/angular/src/app/registration/registration.component.ts +0 -42
- data/spec/dummy/angular/src/environments/environment.prod.ts +0 -3
- data/spec/dummy/angular/src/environments/environment.ts +0 -8
- data/spec/dummy/angular/src/favicon.ico +0 -0
- data/spec/dummy/angular/src/index.html +0 -14
- data/spec/dummy/angular/src/main.ts +0 -12
- data/spec/dummy/angular/src/polyfills.ts +0 -19
- data/spec/dummy/angular/src/styles.css +0 -1
- data/spec/dummy/angular/src/test.ts +0 -31
- data/spec/dummy/angular/src/tsconfig.json +0 -18
- data/spec/dummy/angular/src/typings.d.ts +0 -2
- data/spec/dummy/angular/tslint.json +0 -114
- data/spec/dummy/angular/typings.json +0 -4
- data/spec/dummy/config/crypto.yml +0 -7
- data/spec/dummy/config/initializers/cors.rb +0 -16
- data/spec/dummy/db/schema.rb +0 -56
- data/spec/dummy/db/test.sqlite3 +0 -0
- /data/spec/dummy/db/migrate/{20161123150822_create_boards.unsakini_engine.rb → 20161124184336_create_boards.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161123150823_create_user_boards.unsakini_engine.rb → 20161124184337_create_user_boards.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161123150824_create_posts.unsakini_engine.rb → 20161124184338_create_posts.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161123150825_create_comments.unsakini_engine.rb → 20161124184339_create_comments.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161123150826_add_encrypted_password_to_user_board.unsakini_engine.rb → 20161124184340_add_encrypted_password_to_user_board.unsakini_engine.rb} +0 -0
- /data/spec/dummy/db/migrate/{20161123150827_create_users.unsakini_engine.rb → 20161124184341_create_users.unsakini_engine.rb} +0 -0
- /data/{angular/src/app/app.component.css → spec/dummy/public/apple-touch-icon-precomposed.png} +0 -0
- /data/{angular/src/app/registration/registration.component.css → spec/dummy/public/apple-touch-icon.png} +0 -0
- /data/spec/dummy/{angular/src/app/app.component.css → public/favicon.ico} +0 -0
- /data/spec/dummy/{angular → tmp/unsakini-ng2}/e2e/app.e2e-spec.ts +0 -0
- /data/spec/dummy/{angular → tmp/unsakini-ng2}/e2e/app.po.ts +0 -0
- /data/spec/dummy/{angular → tmp/unsakini-ng2}/e2e/signup.e2e-spec.ts +0 -0
- /data/spec/dummy/{angular → tmp/unsakini-ng2}/e2e/signup.po.ts +0 -0
- /data/spec/dummy/{angular → tmp/unsakini-ng2}/e2e/tsconfig.json +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/karma.conf.js +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/package.json +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/protractor.conf.js +0 -0
- /data/spec/dummy/{angular/src/app/registration/registration.component.css → tmp/unsakini-ng2/src/app/app.component.css} +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/app.component.html +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/app.component.spec.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/app.component.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/app.module.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/app.routes.module.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/index.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/registration/registration.component.html +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/registration/registration.component.spec.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/registration/registration.component.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/environments/environment.prod.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/environments/environment.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/favicon.ico +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/index.html +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/main.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/polyfills.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/styles.css +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/test.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/tsconfig.json +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/src/typings.d.ts +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/tslint.json +0 -0
- /data/{angular → spec/dummy/tmp/unsakini-ng2}/typings.json +0 -0
- /data/spec/requests/api/{api_share_board_spec.rb → boards/api_sharing_board_spec.rb} +0 -0
- /data/spec/requests/api/{board/post/api_board_post_comments_spec.rb → comments/api_comments_spec.rb} +0 -0
- /data/spec/requests/api/{board/api_board_posts_spec.rb → posts/api_posts_spec.rb} +0 -0
@@ -1,18 +0,0 @@
|
|
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
|
-
}
|
@@ -1,114 +0,0 @@
|
|
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
|
-
}
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Avoid CORS issues when API is called from the frontend app.
|
4
|
-
# Handle Cross-Origin Resource Sharing (CORS) in order to accept cross-origin AJAX requests.
|
5
|
-
|
6
|
-
# Read more: https://github.com/cyu/rack-cors
|
7
|
-
|
8
|
-
# Rails.application.config.middleware.insert_before 0, Rack::Cors do
|
9
|
-
# allow do
|
10
|
-
# origins 'example.com'
|
11
|
-
#
|
12
|
-
# resource '*',
|
13
|
-
# headers: :any,
|
14
|
-
# methods: [:get, :post, :put, :patch, :delete, :options, :head]
|
15
|
-
# end
|
16
|
-
# end
|
data/spec/dummy/db/schema.rb
DELETED
@@ -1,56 +0,0 @@
|
|
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: 20161122211105) 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
|
-
end
|
20
|
-
|
21
|
-
create_table "comments", force: :cascade do |t|
|
22
|
-
t.text "content"
|
23
|
-
t.integer "user_id"
|
24
|
-
t.integer "post_id"
|
25
|
-
t.datetime "created_at", null: false
|
26
|
-
t.datetime "updated_at", null: false
|
27
|
-
end
|
28
|
-
|
29
|
-
create_table "posts", force: :cascade do |t|
|
30
|
-
t.text "title"
|
31
|
-
t.text "content"
|
32
|
-
t.integer "user_id"
|
33
|
-
t.integer "board_id"
|
34
|
-
t.datetime "created_at", null: false
|
35
|
-
t.datetime "updated_at", null: false
|
36
|
-
end
|
37
|
-
|
38
|
-
create_table "user_boards", force: :cascade do |t|
|
39
|
-
t.integer "user_id"
|
40
|
-
t.integer "board_id"
|
41
|
-
t.boolean "is_admin", default: false
|
42
|
-
t.datetime "created_at", null: false
|
43
|
-
t.datetime "updated_at", null: false
|
44
|
-
t.string "encrypted_password"
|
45
|
-
end
|
46
|
-
|
47
|
-
create_table "users", force: :cascade do |t|
|
48
|
-
t.string "name"
|
49
|
-
t.string "email"
|
50
|
-
t.string "password_digest"
|
51
|
-
t.boolean "confirmed"
|
52
|
-
t.datetime "created_at", null: false
|
53
|
-
t.datetime "updated_at", null: false
|
54
|
-
end
|
55
|
-
|
56
|
-
end
|
data/spec/dummy/db/test.sqlite3
DELETED
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/{angular/src/app/app.component.css → spec/dummy/public/apple-touch-icon-precomposed.png}
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/registration/registration.component.html
RENAMED
File without changes
|
/data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/registration/registration.component.spec.ts
RENAMED
File without changes
|
/data/{angular → spec/dummy/tmp/unsakini-ng2}/src/app/registration/registration.component.ts
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
/data/spec/requests/api/{board/post/api_board_post_comments_spec.rb → comments/api_comments_spec.rb}
RENAMED
File without changes
|
File without changes
|