Skip to content

Commit a793cb4

Browse files
author
Stas Makarov
authored
Merge pull request #194 from Flexiana/yogthos-config-update
update yougthous config, bump version (0.4.0-rc1), rename config keys to `:xiana/...`
2 parents 950f256 + e38d66f commit a793cb4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+434
-615
lines changed

.cljstyle

+15-14
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
{:rules
2-
{:whitespace {:remove-surrounding? true
3-
:remove-trailing? true
4-
:insert-missing? true}
5-
:blank-lines {:padding-lines 1
6-
:max-consecutive 1
7-
:insert-padding true
8-
:trim-consecutive? true}
9-
:types {:enabled? false}
10-
:functions {:enabled? false}
11-
:eof-new-line {:enabled? true}
12-
:namespaces {:enabled? true
13-
:break-libs true
14-
:indent-size 2}}}
1+
{:files {:ignore #{"checkouts" "target"}
2+
:extensions #{"clj" "edn"}}
3+
:rules {:whitespace {:remove-surrounding? true
4+
:remove-trailing? true
5+
:insert-missing? true}
6+
:blank-lines {:padding-lines 1
7+
:max-consecutive 1
8+
:insert-padding true
9+
:trim-consecutive? true}
10+
:types {:enabled? false}
11+
:functions {:enabled? false}
12+
:eof-new-line {:enabled? true}
13+
:namespaces {:enabled? true
14+
:break-libs true
15+
:indent-size 2}}}

config/dev/config.edn

+25-25
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
{:framework.db.storage/postgresql {:port 5432
2-
:dbname "framework"
3-
:host "localhost"
4-
:dbtype "postgresql"
5-
:user "postgres"
6-
:password "postgres"}
7-
:framework.app/web-server {:port 3000
8-
:join? false}
9-
:framework.db.storage/migration {:store :database
10-
:migration-dir "resources/migrations"
11-
:init-in-transaction? false
12-
:migration-table-name "migrations"}
13-
:framework.app/emails {:host ""
14-
:user ""
15-
:pass ""
16-
:tls true
17-
:port 587
18-
:from ""}
19-
:framework.app/auth {:hash-algorithm :bcrypt ;; Available values: :bcrypt, :scrypt, and :pbkdf2
20-
:bcrypt-settings {:work-factor 11}
21-
:scrypt-settings {:cpu-cost 32768 ;; Must be a power of 2
22-
:memory-cost 8
23-
:parallelization 1}
24-
:pbkdf2-settings {:type :sha1 ;; Available values: :sha1 and :sha256
25-
:iterations 100000}}}
1+
{:xiana/postgresql {:port 5432
2+
:dbname "framework"
3+
:host "localhost"
4+
:dbtype "postgresql"
5+
:user "postgres"
6+
:password "postgres"}
7+
:xiana/web-server {:port 3000
8+
:join? false}
9+
:xiana/migration {:store :database
10+
:migration-dir "resources/migrations"
11+
:init-in-transaction? false
12+
:migration-table-name "migrations"}
13+
:xiana/emails {:host ""
14+
:user ""
15+
:pass ""
16+
:tls true
17+
:port 587
18+
:from ""}
19+
:xiana/auth {:hash-algorithm :bcrypt ; Available values: :bcrypt, :scrypt, and :pbkdf2
20+
:bcrypt-settings {:work-factor 11}
21+
:scrypt-settings {:cpu-cost 32768 ; Must be a power of 2
22+
:memory-cost 8
23+
:parallelization 1}
24+
:pbkdf2-settings {:type :sha1 ; Available values: :sha1 and :sha256
25+
:iterations 100000}}}

config/test/config.edn

+26-26
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
{:framework.db.storage/postgresql {:image-name "postgres:14-alpine"
2-
:port 5432
3-
:dbname "framework"
4-
:host "localhost"
5-
:dbtype "postgresql"
6-
:user "postgres"
7-
:password "postgres"}
8-
:framework.app/web-server {:port 3333
9-
:join? false}
10-
:framework.db.storage/migration {:store :database
11-
:migration-dir "resources/migrations"
12-
:init-in-transaction? false
13-
:migration-table-name "migrations"}
14-
:framework.app/emails {:host ""
15-
:user ""
16-
:pass ""
17-
:tls true
18-
:port 587
19-
:from ""}
20-
:framework.app/auth {:hash-algorithm :bcrypt ;; Available values: :bcrypt, :scrypt, and :pbkdf2
21-
:bcrypt-settings {:work-factor 11}
22-
:scrypt-settings {:cpu-cost 32768 ;; Must be a power of 2
23-
:memory-cost 8
24-
:parallelization 1}
25-
:pbkdf2-settings {:type :sha1 ;; Available values: :sha1 and :sha256
26-
:iterations 100000}}}
1+
{:xiana/postgresql {:image-name "postgres:14-alpine"
2+
:port 5432
3+
:dbname "framework"
4+
:host "localhost"
5+
:dbtype "postgresql"
6+
:user "postgres"
7+
:password "postgres"}
8+
:xiana/web-server {:port 3333
9+
:join? false}
10+
:xiana/migration {:store :database
11+
:migration-dir "resources/migrations"
12+
:init-in-transaction? false
13+
:migration-table-name "migrations"}
14+
:xiana/emails {:host ""
15+
:user ""
16+
:pass ""
17+
:tls true
18+
:port 587
19+
:from ""}
20+
:xiana/auth {:hash-algorithm :bcrypt ; Available values: :bcrypt, :scrypt, and :pbkdf2
21+
:bcrypt-settings {:work-factor 11}
22+
:scrypt-settings {:cpu-cost 32768 ; Must be a power of 2
23+
:memory-cost 8
24+
:parallelization 1}
25+
:pbkdf2-settings {:type :sha1 ; Available values: :sha1 and :sha256
26+
:iterations 100000}}}

examples/.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*/.shadow-cljs/
2+
*/node_modules/
3+
*/resources/public/js/

examples/acl/Docker/db.Dockerfile

-2
This file was deleted.

examples/acl/Docker/init.sql

-2
This file was deleted.

examples/acl/README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ API implementation for ACL example
66

77
### Prepare
88

9-
- start postgres with docker-compose, or with `postgres-start.sh` shell-script
10-
- apply tables and default users with `lein migratus migrate`
9+
start postgres with docker-compose:
10+
11+
docker compose up -d
1112

1213
### Run application
1314

examples/acl/config/dev/config.edn

+57-75
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,59 @@
1-
{:framework.db.storage/postgresql {:port 5433
2-
:dbname "acl"
3-
:host "localhost"
4-
:dbtype "postgresql"
5-
:user "postgres"
6-
:password "postgres"}
1+
{:xiana/postgresql {:port 5433
2+
:dbname "acl"
3+
:host "localhost"
4+
:dbtype "postgresql"
5+
:user "postgres"
6+
:password "postgres"}
77

8-
:framework.db.storage/migration {:store :database
9-
:migration-dir "resources/migrations"
10-
:init-in-transaction? false
11-
:migration-table-name "migrations"}
8+
:xiana/migration {:store :database
9+
:migration-dir "resources/migrations"
10+
:init-in-transaction? false
11+
:migration-table-name "migrations"}
1212

13-
:framework.app/ring {:defaults {:params {:urlencoded true
14-
:multipart true
15-
:nested true
16-
:keywordize true}
17-
:cookies true
18-
:session {:flash true
19-
:cookie-attrs
20-
{:http-only true, :same-site :strict}}
21-
:security {:anti-forgery true
22-
:xss-protection
23-
{:enable? true, :mode :block}
24-
:frame-options :sameorigin
25-
:content-type-options :nosniff}
26-
:static {:resources "public"}
27-
:responses {:not-modified-responses true
28-
:absolute-redirects true
29-
:content-types true}}}
30-
31-
:framework.app/web-server {:port 3000
32-
:join? false}
33-
:framework.app/role-set {:resources [:posts :comments :users]
34-
:actions {:posts [:read :create :update :delete :comment :react]
35-
:comments [:read :create :update :delete :reply :react]
36-
:users [:read :create :update :delete :ban]}
37-
:roles {:guest {:posts {:read :all}
38-
:comments {:read :all}}
39-
:member {:posts {:read :all
40-
:comment :friends
41-
:react :friends
42-
:create :own
43-
:update :own
44-
:delete :own}
45-
:comments {:read :all
46-
:create :own
47-
:update :own
48-
:delete :own
49-
:reply :friends
50-
:react :friends}
51-
:users {:read :all
52-
:create :own
53-
:update :own
54-
:delete :own}}
55-
:staff {:posts {:read :all
56-
:delete :all}
57-
:comments {:read :all
58-
:delete :all}
59-
:users {:read :all
60-
:delete :ban}}
61-
:superuser {:posts {:read :all
62-
:comment :all
63-
:react :all
64-
:create :all
65-
:update :all
66-
:delete :all}
67-
:comments {:read :all
68-
:create :all
69-
:update :all
70-
:delete :all
71-
:reply :all
72-
:react :all}
73-
:users {:read :all
74-
:create :all
75-
:update :all
76-
:delete :all
77-
:ban :all}}}}}
13+
:xiana/web-server {:port 3000
14+
:join? false}
15+
:xiana/role-set {:resources [:posts :comments :users]
16+
:actions {:posts [:read :create :update :delete :comment :react]
17+
:comments [:read :create :update :delete :reply :react]
18+
:users [:read :create :update :delete :ban]}
19+
:roles {:guest {:posts {:read :all}
20+
:comments {:read :all}}
21+
:member {:posts {:read :all
22+
:comment :friends
23+
:react :friends
24+
:create :own
25+
:update :own
26+
:delete :own}
27+
:comments {:read :all
28+
:create :own
29+
:update :own
30+
:delete :own
31+
:reply :friends
32+
:react :friends}
33+
:users {:read :all
34+
:create :own
35+
:update :own
36+
:delete :own}}
37+
:staff {:posts {:read :all
38+
:delete :all}
39+
:comments {:read :all
40+
:delete :all}
41+
:users {:read :all
42+
:delete :ban}}
43+
:superuser {:posts {:read :all
44+
:comment :all
45+
:react :all
46+
:create :all
47+
:update :all
48+
:delete :all}
49+
:comments {:read :all
50+
:create :all
51+
:update :all
52+
:delete :all
53+
:reply :all
54+
:react :all}
55+
:users {:read :all
56+
:create :all
57+
:update :all
58+
:delete :all
59+
:ban :all}}}}}

0 commit comments

Comments
 (0)