taskinator_ui 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +16 -0
- data/app/assets/stylesheets/taskinator_ui/application.css +0 -0
- data/app/controllers/taskinator_ui/application_controller.rb +7 -0
- data/lib/taskinator_ui/version.rb +1 -1
- data/lib/taskinator_ui.rb +1 -1
- metadata +3 -3
- data/app/assets/stylesheets/taskinator_ui/application.scss +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7bbff9fb448c633632f969f7f4eda1b0133e9ad82011860f5fcb275a57a75813
|
4
|
+
data.tar.gz: 7faa5609c48e334fe56517caeae1cb4507cc047d026f0843057a2e33f28866e9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4113967deba386a838dbb3c66b7358d9d0e10b2bb5a7cb22888b89b970344db3ab6d3782c3983df53bb9ce1c6d9279195ee490ce24bf8ab9593eabe83db9dd1c
|
7
|
+
data.tar.gz: 95ab956ef3088d79ed31a79cdb3fd0e4a578efca066cadef72bc03e7422c80840e0ceddd051ced9092c6b609de04c7d39f6bb77114127171086b8b0ffae56a39
|
data/README.md
CHANGED
@@ -26,6 +26,22 @@ mount TaskinatorUi::Engine, at: '/taskinator'
|
|
26
26
|
|
27
27
|
Run `rails server` and navigate to `http://localhost:3000/taskinator/`
|
28
28
|
|
29
|
+
## HTTP Basic Auth
|
30
|
+
|
31
|
+
To add basic auth add the line into initializer:
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
# config/initializers/taskinator.rb
|
35
|
+
|
36
|
+
TaskinatorUi.http_basic_auth = ->(user, password) { user == 'username' && password == 'password' }
|
37
|
+
```
|
38
|
+
|
39
|
+
You can use your database if needed:
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
TaskinatorUi.http_basic_auth = ->(email, password) { User.admin.find_by(email: email)&.authenticate(password) }
|
43
|
+
```
|
44
|
+
|
29
45
|
## Known issues
|
30
46
|
|
31
47
|
If you use Rails in API only mode it can happen that you have `Rack::MethodOverride` middleware disabled.
|
File without changes
|
@@ -1,4 +1,11 @@
|
|
1
1
|
module TaskinatorUi
|
2
2
|
class ApplicationController < ActionController::Base
|
3
|
+
before_action :authenticate, if: -> { TaskinatorUi.http_basic_auth }
|
4
|
+
|
5
|
+
protected
|
6
|
+
|
7
|
+
def authenticate
|
8
|
+
authenticate_or_request_with_http_basic(nil, nil, &TaskinatorUi.http_basic_auth)
|
9
|
+
end
|
3
10
|
end
|
4
11
|
end
|
data/lib/taskinator_ui.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: taskinator_ui
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bogdan Guban
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -49,7 +49,7 @@ files:
|
|
49
49
|
- README.md
|
50
50
|
- Rakefile
|
51
51
|
- app/assets/config/taskinator_ui_manifest.js
|
52
|
-
- app/assets/stylesheets/taskinator_ui/application.
|
52
|
+
- app/assets/stylesheets/taskinator_ui/application.css
|
53
53
|
- app/controllers/taskinator_ui/application_controller.rb
|
54
54
|
- app/controllers/taskinator_ui/processes_controller.rb
|
55
55
|
- app/decorators/taskinator_ui/process_decorator.rb
|
@@ -1 +0,0 @@
|
|
1
|
-
@import "bootstrap";
|