rboss 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +6 -0
- data/lib/rboss/cli/invoker.rb +15 -3
- data/lib/rboss/cli/mappings/resources/server.yaml +5 -5
- data/lib/rboss/cli/resource.rb +1 -1
- data/lib/rboss/version.rb +1 -1
- data/lib/rboss/view/colorizers.rb +1 -1
- data/lib/rboss/view/table_builder.rb +2 -2
- data/rboss.gemspec +2 -2
- metadata +4 -4
data/README.md
CHANGED
@@ -14,6 +14,12 @@ Installation
|
|
14
14
|
|
15
15
|
* yummi
|
16
16
|
|
17
|
+
### Configuration
|
18
|
+
|
19
|
+
Set a RBOSS_CLI_JBOSS_HOME variable pointing to your JBoss AS home location that has jboss-cli
|
20
|
+
for using rboss-cli, for using twiddle, set a TWIDDLE_HOME variable pointing to you JBoss AS
|
21
|
+
that has twiddle.
|
22
|
+
|
17
23
|
Using rboss-cli
|
18
24
|
-----------
|
19
25
|
|
data/lib/rboss/cli/invoker.rb
CHANGED
@@ -96,6 +96,7 @@ module RBoss
|
|
96
96
|
info = Yummi::colorize("Please input the requested parameters", :yellow)
|
97
97
|
props.each do |name, detail|
|
98
98
|
next if (@skip_optional and not detail['required'] or detail['default'])
|
99
|
+
parameter_type = detail['type']
|
99
100
|
input = parameters[name]
|
100
101
|
unless input
|
101
102
|
puts info unless help_printed
|
@@ -103,7 +104,7 @@ module RBoss
|
|
103
104
|
input_message = Yummi::colorize(name, :intense_blue)
|
104
105
|
required = detail['required']
|
105
106
|
default_value = detail['default']
|
106
|
-
input_message << ' | ' << RBoss::Colorizers.type(
|
107
|
+
input_message << ' | ' << RBoss::Colorizers.type(parameter_type).colorize(parameter_type)
|
107
108
|
input_message << ' | ' << Yummi::colorize("Required", :red) if required
|
108
109
|
input_message << ' | ' << Yummi::colorize("Optional", :cyan) unless required
|
109
110
|
input_message << ' | ' << Yummi::colorize("Default: #{default_value}", :blue) if default_value
|
@@ -115,8 +116,19 @@ module RBoss
|
|
115
116
|
input = get_input
|
116
117
|
end
|
117
118
|
end
|
118
|
-
|
119
|
-
|
119
|
+
if input.empty?
|
120
|
+
puts Yummi::colorize("Parameter skipped!", :yellow)
|
121
|
+
next
|
122
|
+
end
|
123
|
+
begin
|
124
|
+
builder << {:name => name, :value => parameter_type.convert(input)}
|
125
|
+
rescue Exception => e
|
126
|
+
puts Yummi::colorize("Your input could not be converted:", :yellow)
|
127
|
+
puts Yummi::colorize(e.message, :red)
|
128
|
+
puts Yummi::colorize("This will not affect other inputs, you can continue to input other values.", :yellow)
|
129
|
+
puts "Press ENTER to continue"
|
130
|
+
gets
|
131
|
+
end
|
120
132
|
end
|
121
133
|
result = result("#{path}:#{builder}")
|
122
134
|
puts Yummi::colorize("Result:", :yellow)
|
@@ -21,7 +21,7 @@ print:
|
|
21
21
|
system_load: percentage
|
22
22
|
color:
|
23
23
|
name:
|
24
|
-
with:
|
24
|
+
with: bold_white
|
25
25
|
system_load:
|
26
26
|
threshold:
|
27
27
|
0.8: intense_red
|
@@ -47,7 +47,7 @@ print:
|
|
47
47
|
- Launch Type
|
48
48
|
color:
|
49
49
|
server_name:
|
50
|
-
with:
|
50
|
+
with: bold_white
|
51
51
|
|
52
52
|
- id: memory
|
53
53
|
title: Server Memory Usage
|
@@ -92,10 +92,10 @@ print:
|
|
92
92
|
|
93
93
|
color:
|
94
94
|
max_heap:
|
95
|
-
with:
|
95
|
+
with: bold_white
|
96
96
|
|
97
97
|
max_non_heap:
|
98
|
-
with:
|
98
|
+
with: bold_white
|
99
99
|
|
100
100
|
health:
|
101
101
|
used_heap:
|
@@ -187,4 +187,4 @@ print:
|
|
187
187
|
- Temp Directory
|
188
188
|
color:
|
189
189
|
server_name:
|
190
|
-
with:
|
190
|
+
with: bold_white
|
data/lib/rboss/cli/resource.rb
CHANGED
data/lib/rboss/version.rb
CHANGED
@@ -50,7 +50,7 @@ module RBoss
|
|
50
50
|
|
51
51
|
builder = Yummi::TableBuilder::new(@config).defaults
|
52
52
|
|
53
|
-
builder.repositories[:
|
53
|
+
builder.repositories[:row_colorizers] << RBoss::HealthCheckers
|
54
54
|
builder.repositories[:colorizers] << RBoss::Colorizers
|
55
55
|
builder.repositories[:formatters] << RBoss::Formatters
|
56
56
|
|
@@ -59,7 +59,7 @@ module RBoss
|
|
59
59
|
table.format_null :with => 'undefined'
|
60
60
|
table.colorize_null :with => :red
|
61
61
|
|
62
|
-
table.colorize :name, :with => :
|
62
|
+
table.colorize :name, :with => :bold_white if @name_column
|
63
63
|
|
64
64
|
table
|
65
65
|
end
|
data/rboss.gemspec
CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.email = ["ataxexe@gmail.com"]
|
10
10
|
s.homepage = "https://github.com/ataxexe/rboss"
|
11
11
|
s.summary = %q{A Ruby way to do a JBoss work!}
|
12
|
-
s.description = %q{
|
13
|
-
|
12
|
+
s.description = %q{Rboss gives you an automate tool to configure a JBoss instance
|
13
|
+
and a nice command line front end to use jboss-cli and twiddle}
|
14
14
|
|
15
15
|
s.rubyforge_project = "rboss"
|
16
16
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rboss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,10 +9,10 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-11-13 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
|
-
description: ! "
|
15
|
-
to
|
14
|
+
description: ! "Rboss gives you an automate tool to configure a JBoss instance\n and
|
15
|
+
a nice command line front end to use jboss-cli and twiddle"
|
16
16
|
email:
|
17
17
|
- ataxexe@gmail.com
|
18
18
|
executables:
|