phoseum-cli 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/phoseum-cli +6 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a9472d2d52deb75c37183130fce537c43f87e25d2c5366f73d34e2e39f4b2f67
4
- data.tar.gz: 6e37a6d2768e87133c97e5a7d5257595e39b9a97483be4eddc109f38f15e81e6
3
+ metadata.gz: 54d4c2caa638507e748ded48b8bd2f399118f4c0575d63c79605a30404c52266
4
+ data.tar.gz: 96769e821a7a65173ade5e8f1590243844b0f24cdaf5dac3e72018366e99448c
5
5
  SHA512:
6
- metadata.gz: a249f7bebf5c8621067a8f52a560ad6c24867d09956acd7e1323c79aa60628d8261ae06f73e45e54e1355ba07b673c883176c13273616c7c66683f90536f2f74
7
- data.tar.gz: ea4973b4317ee70af953b628fefda619bbc35bc355434bf9c61f2d037ba058194a57959ffa6ef5c976728ae6298bc966af114e269407bf34dd82eca680de569c
6
+ metadata.gz: 036dfce8b227c96a9dacb497e4e99935fbb4a08187af54e6b886aa29d729773e36a881f6055a1991421e11aadbabb252bbd2035875f1e914ab751f62c5d36b6c
7
+ data.tar.gz: ffcc052629a6b59a3eecec0a9563e8d1248587f039736ef796325acce034aedc2926a553ca971026e0dfd0916ea63d768ae14d4c84c0cf0825cd4f1bbeb3b603
@@ -154,7 +154,8 @@ end
154
154
 
155
155
  def health(what='',name='')
156
156
  headers = {}
157
- if !validate_token($config['TOKEN'])
157
+
158
+ if !validate_token($config['TOKEN']) || !$config['TOKEN']
158
159
  if token = user_login()
159
160
  headers = { "bearer" => token }
160
161
  else
@@ -233,6 +234,10 @@ def user_mgmt(action,user,pass='',role='')
233
234
  post_body={}
234
235
  if action == "add_user"
235
236
  post_body=JSON.generate({"action" => "create-user", "user" => "#{user}", "password" => "#{pass}", "role" => "#{role}"})
237
+ if !$config['DEFAULT_SECRET']
238
+ puts "You must have a DEFAULT_SECRET setting to be able to create a user".red
239
+ exit 1
240
+ end
236
241
  end
237
242
  base = URI.parse("#{$config['SERVERURL']}")
238
243
  puts "\nConnecting to: #{$config['SERVERURL']}".yellow if !$QUIET
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phoseum-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julio C Hegedus
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-16 00:00:00.000000000 Z
11
+ date: 2020-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: yaml