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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3ed668ba5555b406e463acca34c685068e0bffcd3ced2e9c7d664bbe033f389
4
- data.tar.gz: aeec3bf728680aabc02728e260a496f8023f2400098e5239983edba6eafaddcb
3
+ metadata.gz: 2e19f6596fbae0133931683a46de1d0be82a30e113ec10bc46cee91dfaa7f157
4
+ data.tar.gz: 7d47be7f6700f8020229e80104d63faffd0d774c0bc77d9c1c700a159d80b187
5
5
  SHA512:
6
- metadata.gz: 1c069a1df54eec572537f2ea040476c68204bd8f82dde1a4ae4175f33b4a750996fb1919a62aa5fb502a6cda093d746261ed2502fd7a664e6414260150d869c6
7
- data.tar.gz: 88f0fb8c99bdefc20994dae6ba28a7f23d25c0feb6d0eb3fe7f9620e90bc0145eae6eb98310f57d38746982369b5d98cc6e9e5caeab7747f17c5aec3f89703a4
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
@@ -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
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module Nimbu
3
- VERSION = "0.11.5"
3
+ VERSION = "0.11.6"
4
4
  end
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.5
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-03-11 00:00:00.000000000 Z
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.1
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.1
40
+ version: 0.4.4
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubyzip
43
43
  requirement: !ruby/object:Gem::Requirement