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 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
 
@@ -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(detail['type']).colorize(detail['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
- next if input.empty?
119
- builder << {:name => name, :value => detail['type'].convert(input)}
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: white
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: white
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: white
95
+ with: bold_white
96
96
 
97
97
  max_non_heap:
98
- with: white
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: white
190
+ with: bold_white
@@ -176,7 +176,7 @@ module RBoss
176
176
  data = get_data(params)
177
177
  return unless data
178
178
  data = [@context[:name]] + data if scannable?
179
- @tables[@count % @tables.size].data << data
179
+ @tables[@count % @tables.size].add data
180
180
  @count += 1
181
181
  end
182
182
 
data/lib/rboss/version.rb CHANGED
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module RBoss
24
- VERSION = "0.7.0"
24
+ VERSION = "0.7.1"
25
25
  end
@@ -14,7 +14,7 @@ module RBoss
14
14
  # The type to use the color
15
15
  #
16
16
  def self.type type
17
- Yummi::to_colorize do |value|
17
+ Yummi::to_colorize do |ctx|
18
18
  case type
19
19
  when RBoss::Cli::ResultParser::STRING then
20
20
  :green
@@ -50,7 +50,7 @@ module RBoss
50
50
 
51
51
  builder = Yummi::TableBuilder::new(@config).defaults
52
52
 
53
- builder.repositories[:using_row_colorizers] << RBoss::HealthCheckers
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 => :white if @name_column
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{A tool to create profiles for JBoss Application Server and use
13
- twiddle to manage a running JBoss AS.}
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.0
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-10-14 00:00:00.000000000 Z
12
+ date: 2012-11-13 00:00:00.000000000 Z
13
13
  dependencies: []
14
- description: ! "A tool to create profiles for JBoss Application Server and use\n twiddle
15
- to manage a running JBoss AS."
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: