etna 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/etna/user.rb +7 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcca17011305af65656dd4e432613c75738d9a96d1afeb96ff442f1d4b5fc116
|
4
|
+
data.tar.gz: a166eb3b9f5f1bcaa3d4a6f8fbae742370bfb8a561a4e766c134f51449fe8292
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd1bd5668794b0afb00a99fd39545c24de02677391737caf1c1165562933fe0214f4662b00bf3e7b90b9da05727e11cdc2226103dbdd1ceb6d91223a1e68b766
|
7
|
+
data.tar.gz: 1c5dfa81e6151ec5b2f12d546753e970d081f7b462ff839b525bed7ead4d6079fa296acdb330115ecefc20571aea63767b4f76b739434869553f79429cedaf3c
|
data/lib/etna/user.rb
CHANGED
@@ -7,7 +7,9 @@ module Etna
|
|
7
7
|
}
|
8
8
|
|
9
9
|
def initialize params, token=nil
|
10
|
-
@first, @last, @email, @encoded_permissions = params.values_at(:first, :last, :email, :perm)
|
10
|
+
@first, @last, @email, @encoded_permissions, encoded_flags = params.values_at(:first, :last, :email, :perm, :flags)
|
11
|
+
|
12
|
+
@flags = encoded_flags&.split(/;/) || []
|
11
13
|
@token = token unless !token
|
12
14
|
raise ArgumentError, "No email given!" unless @email
|
13
15
|
end
|
@@ -30,6 +32,10 @@ module Etna
|
|
30
32
|
end.inject([],:+).to_h
|
31
33
|
end
|
32
34
|
|
35
|
+
def has_flag?(flag)
|
36
|
+
@flags.include?(flag)
|
37
|
+
end
|
38
|
+
|
33
39
|
def name
|
34
40
|
"#{first} #{last}"
|
35
41
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etna
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Saurabh Asthana
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|