appril-cli 0.4.0 → 0.4.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/base/components/base_controller.rb +4 -0
- data/app/base/helpers/user.rb +20 -3
- data/app/base/setup/build_component.js +0 -2
- data/app/base/store/mutations.js +0 -4
- data/app/base/store/state.js +0 -1
- data/lib/appril-cli/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ee721ade293046ea9df28ce0288bc064723db70
|
4
|
+
data.tar.gz: 9d20afa062e49e4187bca223248aa8104f35b8eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06c31c0035a214fde72972d5e174fb5ef09a76d2435d1d9e7e7c412435b6c18b6decfd53af4e6e2a5b7ee04342bd424ea64274ca0bb2d83bc173c4171e83d0f7
|
7
|
+
data.tar.gz: 1e6c81f03984d229fe8fb6e56bd0cec1a0de66026ad82bf528dc1c585e6936a7c9654d47174aa8fdb28ac19347c174855412ba53055560fc1e0e446705c98121
|
data/app/base/helpers/user.rb
CHANGED
@@ -1,7 +1,24 @@
|
|
1
1
|
module UserHelpers
|
2
2
|
|
3
|
-
def
|
4
|
-
return unless authorization_token
|
5
|
-
# fetch user
|
3
|
+
def authorized_user
|
4
|
+
return unless authorization_token
|
5
|
+
# fetch user, e.g. User.find_by(authorization_token: authorization_token)
|
6
|
+
end
|
7
|
+
|
8
|
+
def authorized_user!
|
9
|
+
authorized_user || error(401)
|
10
|
+
end
|
11
|
+
|
12
|
+
def authorized_user_id
|
13
|
+
return unless authorization_token
|
14
|
+
# fetch user, e.g. User.where(authorization_token: authorization_token).pluck(:id)[0]
|
15
|
+
end
|
16
|
+
|
17
|
+
def authorized_user_id!
|
18
|
+
authorized_user_id || error(401)
|
19
|
+
end
|
20
|
+
|
21
|
+
def authorization_token
|
22
|
+
params[:__authorization_token__] || cookies[:__authorization_token__]
|
6
23
|
end
|
7
24
|
end
|
@@ -9,8 +9,6 @@ export default function(component, constructor) {
|
|
9
9
|
if (layout.default)
|
10
10
|
layout = layout.default
|
11
11
|
|
12
|
-
delete constructor.layout
|
13
|
-
|
14
12
|
/** comment or delete this line to pipe component through Crudle builder
|
15
13
|
const Crudle = require('crudle').default
|
16
14
|
Crudle.Menu = {
|
data/app/base/store/mutations.js
CHANGED
data/app/base/store/state.js
CHANGED
data/lib/appril-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appril-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slee Woo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Appril CLI
|
14
14
|
email:
|
@@ -129,5 +129,5 @@ rubyforge_project:
|
|
129
129
|
rubygems_version: 2.5.1
|
130
130
|
signing_key:
|
131
131
|
specification_version: 4
|
132
|
-
summary: '["appril-cli-0.4.
|
132
|
+
summary: '["appril-cli-0.4.1", "Appril CLI"]'
|
133
133
|
test_files: []
|