nimbu 0.11.5 → 0.11.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/nimbu/auth.rb +5 -1
- data/lib/nimbu/command/auth.rb +11 -1
- data/lib/nimbu/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2e19f6596fbae0133931683a46de1d0be82a30e113ec10bc46cee91dfaa7f157
|
4
|
+
data.tar.gz: 7d47be7f6700f8020229e80104d63faffd0d774c0bc77d9c1c700a159d80b187
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24298b4200c9f28a08c6650ae82f3445c315c0502eb2bb0b028371d7959a45b735f039f998562a9531b2ef0753a1f8d41232920e1b2ddec101f13469c91da9ec
|
7
|
+
data.tar.gz: 8a7923f7698a902e0c7050d740bf2df77cfafcbef150dacd93bcb240f7d0d2dab94ce2b85e8293a5c7d4f00055b0ba2a990ccd96eca2889c0b7f7d07eec49061
|
data/lib/nimbu/auth.rb
CHANGED
@@ -37,6 +37,10 @@ class Nimbu::Auth
|
|
37
37
|
delete_credentials
|
38
38
|
end
|
39
39
|
|
40
|
+
def whoami
|
41
|
+
client.users.me
|
42
|
+
end
|
43
|
+
|
40
44
|
# just a stub; will raise if not authenticated
|
41
45
|
def check
|
42
46
|
client.sites.list
|
@@ -172,7 +176,7 @@ class Nimbu::Auth
|
|
172
176
|
end
|
173
177
|
|
174
178
|
def token # :nodoc:
|
175
|
-
get_credentials
|
179
|
+
ENV['NIMBU_API_KEY'] || get_credentials
|
176
180
|
end
|
177
181
|
|
178
182
|
def credentials_file
|
data/lib/nimbu/command/auth.rb
CHANGED
@@ -45,6 +45,17 @@ class Nimbu::Command::Auth < Nimbu::Command::Base
|
|
45
45
|
|
46
46
|
alias_command "logout", "auth:logout"
|
47
47
|
|
48
|
+
# auth:whoami
|
49
|
+
#
|
50
|
+
# check the identity linked to your token
|
51
|
+
#
|
52
|
+
def whoami
|
53
|
+
results = Nimbu::Auth.whoami
|
54
|
+
display " => Logged in as: #{results[:name]} (#{results[:email]})"
|
55
|
+
end
|
56
|
+
alias_command "whoami", "auth:whoami"
|
57
|
+
|
58
|
+
|
48
59
|
# auth:token
|
49
60
|
#
|
50
61
|
# display your api token
|
@@ -54,4 +65,3 @@ class Nimbu::Command::Auth < Nimbu::Command::Base
|
|
54
65
|
end
|
55
66
|
|
56
67
|
end
|
57
|
-
|
data/lib/nimbu/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nimbu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Zenjoy BVBA
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: term-ansicolor
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.4.
|
33
|
+
version: 0.4.4
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.4.
|
40
|
+
version: 0.4.4
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rubyzip
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|