fenris 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/lib/fenris/client.rb CHANGED
@@ -94,7 +94,7 @@ module Fenris
94
94
  end
95
95
 
96
96
  def users
97
- JSON.parse RestClient.get("#{@url}users", :content_type => :json, :accept => :json)
97
+ user["subusers"]
98
98
  end
99
99
 
100
100
  def userdel(name)
@@ -26,6 +26,7 @@ module Fenris
26
26
  end
27
27
  when "userdel"
28
28
  client.userdel(arg)
29
+ puts "ok"
29
30
  when "useradd"
30
31
  new_user = client.useradd(arg)
31
32
  puts "New user created"
@@ -44,15 +45,19 @@ module Fenris
44
45
  when "remove"
45
46
  client.remove(arg)
46
47
  when "info"
47
- puts "INFO:"
48
- puts " #{client.user["name"]} #{client.route}"
48
+ printf "INFO:\n"
49
+ printf " %s\n", client.user["name"]
50
+ unless client.users.empty?
51
+ puts "SUBACCOUNTS:"
52
+ client.users.each { |c| printf " %-20s\n", c["name"] }
53
+ end
49
54
  unless client.consumers.empty?
50
55
  puts "CLIENTS:"
51
- client.consumers.each { |c| puts " #{c["name"]} (#{c["binding"]})" }
56
+ client.consumers.each { |c| printf " %-20s\n", c["name"] }
52
57
  end
53
58
  unless client.providers.empty?
54
59
  puts "SERVICES:"
55
- client.providers.each { |c| puts " #{c["binding"] || "unbound"} #{c["name"]} (#{c["description"]}) #{c["location"]}" }
60
+ client.providers.each { |c| printf " %-20s %s\n", c["name"], c["location"] }
56
61
  end
57
62
  when "provide"
58
63
  external = "#{Socket.gethostname}:#{10001}"
@@ -1,3 +1,3 @@
1
1
  module Fenris
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fenris
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 4
8
+ - 5
9
9
  prerelease: false
10
10
  platform: ruby
11
11
  authors:
@@ -18,7 +18,7 @@ default_executable:
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: eventmachine
21
- requirement: &2166852580 !ruby/object:Gem::Requirement
21
+ requirement: &2155110000 !ruby/object:Gem::Requirement
22
22
  none: false
23
23
  requirements:
24
24
  - - ! '>='
@@ -30,10 +30,10 @@ dependencies:
30
30
  - 10
31
31
  type: :runtime
32
32
  prerelease: false
33
- version_requirements: *2166852580
33
+ version_requirements: *2155110000
34
34
  - !ruby/object:Gem::Dependency
35
35
  name: rest-client
36
- requirement: &2166831320 !ruby/object:Gem::Requirement
36
+ requirement: &2155108480 !ruby/object:Gem::Requirement
37
37
  none: false
38
38
  requirements:
39
39
  - - ! '>='
@@ -45,10 +45,10 @@ dependencies:
45
45
  - 7
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *2166831320
48
+ version_requirements: *2155108480
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: multi_json
51
- requirement: &2166829400 !ruby/object:Gem::Requirement
51
+ requirement: &2155106900 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ! '>='
@@ -60,7 +60,7 @@ dependencies:
60
60
  - 3
61
61
  type: :runtime
62
62
  prerelease: false
63
- version_requirements: *2166829400
63
+ version_requirements: *2155106900
64
64
  description: An authentication and service location service.
65
65
  email: orion.henry@gmail.com
66
66
  executables: