rboss 0.5.5 → 0.5.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -2,4 +2,4 @@ source "http://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'yummi'
5
+ gem 'yummi', '>=0.3'
@@ -125,8 +125,8 @@ module JBoss
125
125
  unless @logger
126
126
  @logger = Logger::new STDOUT
127
127
  @logger.level = opts[:log_level] || Logger::INFO
128
- formatter = Yummi::Formatter::LogFormatter.new do |severity, time, program_name, message|
129
- "#{severity} : #{message}\n"
128
+ formatter = Yummi::Formatter::LogFormatter.new do |severity, message|
129
+ "#{severity} : #{message}"
130
130
  end
131
131
 
132
132
  @logger.formatter = formatter
@@ -36,11 +36,9 @@ class TableBuilder
36
36
  if params[:health]
37
37
  @table.row_colorizer HealthColorizer::new params[:health]
38
38
  end
39
- if params[:formatter]
40
- params[:formatter].each do |column|
41
- @table.format column do |value|
42
- Yummi::Formatter::Unit.format :byte, value.to_i
43
- end
39
+ if params[:byte_formatter]
40
+ params[:byte_formatter].each do |column|
41
+ @table.format column, :using => Yummi::Formatters::byte
44
42
  end
45
43
  end
46
44
  end
@@ -67,7 +65,7 @@ class HealthColorizer
67
65
  @using = params[:using]
68
66
  end
69
67
 
70
- def call index, data
68
+ def call data, index
71
69
  max = data[@max].to_f
72
70
  free = @using ? max - data[@using].to_f : data[@free].to_f
73
71
 
@@ -100,7 +100,7 @@ module JBoss
100
100
  :header => ["Active Threads", "Max Memory", "Free Memory",
101
101
  "Processors", "Java Vendor", "Java Version", "OS Name", "OS Arch"],
102
102
  :layout => :vertical,
103
- :formatter => [:max_memory, :free_memory],
103
+ :byte_formatter => [:max_memory, :free_memory],
104
104
  :health => {
105
105
  :max => :max_memory,
106
106
  :free => :free_memory
data/lib/rboss/version.rb CHANGED
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module RBoss
24
- VERSION = "0.5.5"
24
+ VERSION = "0.5.6"
25
25
  end
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.5.5
4
+ version: 0.5.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-16 00:00:00.000000000Z
12
+ date: 2012-05-17 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: ! "A tool to create profiles for JBoss Application Server and use\n twiddle
15
15
  to manage a running JBoss AS."