krl 0.1.51 → 0.1.52

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/krl +2 -1
  2. data/lib/app_info.rb +50 -0
  3. metadata +5 -4
data/bin/krl CHANGED
@@ -16,7 +16,8 @@ COMMANDS = {
16
16
  "note" => lambda { |args| require LIB_DIR + 'note'; KRL_CMD::Note.go(args) },
17
17
  "check" => lambda { |args| require LIB_DIR + 'check'; KRL_CMD::Check.go },
18
18
  "generate" => lambda { |args| require LIB_DIR + 'generate'; KRL_CMD::Generate.go(args) },
19
- "test" => lambda { |args| require LIB_DIR + 'test'; KRL_CMD::Test.go(args) }
19
+ "test" => lambda { |args| require LIB_DIR + 'test'; KRL_CMD::Test.go(args) },
20
+ "app_info" => lambda { |args| require LIB_DIR + 'app_info'; KRL_CMD::AppInfo.go(args) }
20
21
  }
21
22
 
22
23
  banner = "Usage: krl <command> <args>\nUse 'krl help' for more information."
data/lib/app_info.rb ADDED
@@ -0,0 +1,50 @@
1
+ module KRL_CMD
2
+ class AppInfo
3
+ def self.go(args)
4
+ require LIB_DIR + 'user'
5
+ require LIB_DIR + 'common'
6
+ require 'pp'
7
+ user = User.new
8
+ app_info = user.api.get_app_info(args[0])
9
+ app_details = user.api.get_app_details(args[0])
10
+ # pp app_details
11
+ # pp app_info
12
+
13
+ puts "Application Users"
14
+ KRL_COMMON::pretty_table(app_details["users"], [
15
+ {:field => "Login", :value => lambda { |r| r["username"] }},
16
+ {:field => "Last Name", :value => lambda { |r| r["lastname"] }},
17
+ {:field => "First Name", :value => lambda { |r| r["firstname"].to_s }},
18
+ {:field => "Role", :value => lambda { |r| r["role"] }}
19
+ ])
20
+ puts ""
21
+ puts ""
22
+
23
+ puts "Production Version"
24
+ if(app_info["production"])
25
+ puts "Current Production version is #{app_info["production"]["version"]} IE Guid : #{app_details["guid"]}"
26
+ else
27
+ puts "No Production version"
28
+ end
29
+ puts ""
30
+ puts ""
31
+
32
+ puts "Development Version"
33
+ if(app_info["development"])
34
+ puts "Current Production version is #{app_info["development"]["version"]} IE Guid : #{app_details["guid"]}"
35
+ else
36
+ puts "No Production version"
37
+ end
38
+ puts ""
39
+ puts ""
40
+
41
+ KRL_COMMON::pretty_table(app_info["versions"], [
42
+ {:field => "Login", :value => lambda { |r| r["login"] }},
43
+ {:field => "Name", :value => lambda { |r| r["name"] }},
44
+ {:field => "Created", :value => lambda { |r| r["created"].to_s }},
45
+ {:field => "Version", :value => lambda { |r| r["version"] }},
46
+ {:field => "Note", :value => lambda { |r| r["note"] }}
47
+ ])
48
+ end
49
+ end
50
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 51
9
- version: 0.1.51
8
+ - 52
9
+ version: 0.1.52
10
10
  platform: ruby
11
11
  authors:
12
12
  - Michael Farmer, Cid Dennis
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-04 00:00:00 -06:00
17
+ date: 2010-05-11 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -78,6 +78,7 @@ extensions: []
78
78
  extra_rdoc_files:
79
79
  - LICENSE
80
80
  files:
81
+ - lib/app_info.rb
81
82
  - lib/apps.rb
82
83
  - lib/check.rb
83
84
  - lib/checkout.rb
@@ -99,7 +100,7 @@ files:
99
100
  - bin/views/success.erb
100
101
  - LICENSE
101
102
  has_rdoc: true
102
- homepage: http://code.kynetx.com
103
+ homepage: http://github.com/kynetx/krl
103
104
  licenses: []
104
105
 
105
106
  post_install_message: