rboss 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. data/README.md +2 -2
  2. data/bin/jboss-profile +1 -1
  3. data/bin/rboss-cli +8 -2
  4. data/bin/twiddle +3 -3
  5. data/lib/rboss.rb +6 -2
  6. data/lib/rboss/bin/command_actions.rb +3 -2
  7. data/lib/rboss/cli/jboss_cli.rb +3 -3
  8. data/lib/rboss/cli/mappings.rb +12 -2
  9. data/lib/rboss/cli/mappings/resources/connector.yaml +10 -35
  10. data/lib/rboss/cli/mappings/resources/datasource.yaml +19 -26
  11. data/lib/rboss/cli/mappings/resources/jdbc_driver.yaml +0 -1
  12. data/lib/rboss/cli/mappings/resources/server.yaml +151 -34
  13. data/lib/rboss/cli/resource.rb +18 -10
  14. data/lib/rboss/component_processor.rb +87 -85
  15. data/lib/rboss/components/component.rb +2 -2
  16. data/lib/rboss/components/datasource.rb +1 -1
  17. data/lib/rboss/components/deploy_folder.rb +1 -1
  18. data/lib/rboss/components/hypersonic_replacer.rb +1 -1
  19. data/lib/rboss/components/jbossweb.rb +1 -1
  20. data/lib/rboss/components/jmx.rb +1 -1
  21. data/lib/rboss/components/mod_cluster.rb +1 -1
  22. data/lib/rboss/components/org/6.0/deploy_folder.rb +1 -1
  23. data/lib/rboss/components/org/jmx.rb +1 -1
  24. data/lib/rboss/components/profile_folder.rb +1 -1
  25. data/lib/rboss/components/resource.rb +1 -1
  26. data/lib/rboss/components/restore_slimming.rb +3 -3
  27. data/lib/rboss/components/run_conf.rb +4 -4
  28. data/lib/rboss/components/service_script.rb +1 -1
  29. data/lib/rboss/components/slimming.rb +1 -1
  30. data/lib/rboss/components/soa-p/hypersonic_replacer.rb +1 -1
  31. data/lib/rboss/components/soa-p/jmx.rb +1 -1
  32. data/lib/rboss/components/xadatasource.rb +2 -2
  33. data/lib/rboss/file_processor.rb +70 -66
  34. data/lib/rboss/jboss_path.rb +1 -1
  35. data/lib/rboss/jboss_profile.rb +28 -27
  36. data/lib/rboss/plaftorm.rb +64 -0
  37. data/lib/rboss/resources/run.conf.bat.erb +60 -0
  38. data/lib/rboss/twiddle/base_monitor.rb +2 -2
  39. data/lib/rboss/twiddle/mbean.rb +1 -1
  40. data/lib/rboss/twiddle/monitor.rb +26 -39
  41. data/lib/rboss/twiddle/twiddle.rb +3 -2
  42. data/lib/rboss/utils.rb +0 -62
  43. data/lib/rboss/version.rb +1 -1
  44. data/lib/rboss/view/colorizers.rb +20 -0
  45. data/lib/rboss/view/formatters.rb +21 -0
  46. data/lib/rboss/view/health_checkers.rb +41 -0
  47. data/lib/rboss/view/table_builder.rb +93 -0
  48. data/test/test_helper.rb +1 -1
  49. metadata +8 -6
  50. data/lib/rboss/cli.rb +0 -22
  51. data/lib/rboss/cli/colorizers.rb +0 -22
  52. data/lib/rboss/cli/formatters.rb +0 -17
  53. data/lib/rboss/cli/health_checkers.rb +0 -43
@@ -103,7 +103,7 @@ module TestHelper
103
103
  end
104
104
 
105
105
  def create_file_processor
106
- FileProcessor::new :logger => @logger, :var => @jboss
106
+ RBoss::FileProcessor::new :logger => @logger, :var => @jboss
107
107
  end
108
108
 
109
109
  private
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.6.0
4
+ version: 0.6.1
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-07-13 00:00:00.000000000 Z
12
+ date: 2012-07-15 00:00:00.000000000 Z
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."
@@ -31,10 +31,6 @@ files:
31
31
  - bin/twiddle
32
32
  - lib/rboss.rb
33
33
  - lib/rboss/bin/command_actions.rb
34
- - lib/rboss/cli.rb
35
- - lib/rboss/cli/colorizers.rb
36
- - lib/rboss/cli/formatters.rb
37
- - lib/rboss/cli/health_checkers.rb
38
34
  - lib/rboss/cli/jboss_cli.rb
39
35
  - lib/rboss/cli/mappings.rb
40
36
  - lib/rboss/cli/mappings/resources/connector.yaml
@@ -66,9 +62,11 @@ files:
66
62
  - lib/rboss/file_processor.rb
67
63
  - lib/rboss/jboss_path.rb
68
64
  - lib/rboss/jboss_profile.rb
65
+ - lib/rboss/plaftorm.rb
69
66
  - lib/rboss/resources/jboss_init_redhat.sh.erb
70
67
  - lib/rboss/resources/mod_cluster.sar/META-INF/mod_cluster-jboss-beans.xml
71
68
  - lib/rboss/resources/mod_cluster.sar/mod_cluster-1.1.2.Final.jar
69
+ - lib/rboss/resources/run.conf.bat.erb
72
70
  - lib/rboss/resources/run.conf.erb
73
71
  - lib/rboss/twiddle.rb
74
72
  - lib/rboss/twiddle/base_monitor.rb
@@ -77,6 +75,10 @@ files:
77
75
  - lib/rboss/twiddle/twiddle.rb
78
76
  - lib/rboss/utils.rb
79
77
  - lib/rboss/version.rb
78
+ - lib/rboss/view/colorizers.rb
79
+ - lib/rboss/view/formatters.rb
80
+ - lib/rboss/view/health_checkers.rb
81
+ - lib/rboss/view/table_builder.rb
80
82
  - rboss.gemspec
81
83
  - test/datasource_test.rb
82
84
  - test/deploy_folder_test.rb
@@ -1,22 +0,0 @@
1
- require_relative 'cli/jboss_cli'
2
-
3
- if RUBY_PLATFORM['linux']
4
- class JBoss::Cli::Invoker
5
-
6
- def jboss_cli
7
- "#@jboss_home/bin/jboss-cli.sh"
8
- end
9
-
10
- end
11
- elsif RUBY_PLATFORM['mingw'] #Windows
12
- class JBoss::Cli::Invoker
13
-
14
- def jboss_cli
15
- "#@jboss_home/bin/jboss-cli.bat"
16
- end
17
-
18
- end
19
- else
20
- puts "Platform #{RUBY_PLATFORM} not supported"
21
- end
22
-
@@ -1,22 +0,0 @@
1
- require 'yummi'
2
-
3
- module JBoss
4
- module Cli
5
- module Colorizers
6
-
7
- def self.boolean params
8
- lambda do |value|
9
- return params[:if_true] if value
10
- params[:if_false]
11
- end
12
- end
13
-
14
- def self.with params
15
- lambda do |value|
16
- params[:color]
17
- end
18
- end
19
-
20
- end
21
- end
22
- end
@@ -1,17 +0,0 @@
1
- require 'yummi'
2
-
3
- module JBoss
4
- module Cli
5
- module Formatters
6
-
7
- def self.yes_or_no
8
- Yummi::Formatters.yes_or_no
9
- end
10
-
11
- def self.byte params = {}
12
- Yummi::Formatters.byte params
13
- end
14
-
15
- end
16
- end
17
- end
@@ -1,43 +0,0 @@
1
- require 'yummi'
2
-
3
- module JBoss
4
- module Cli
5
- module HealthCheckers
6
-
7
- def self.percentage params
8
- PercentageColorizer::new params
9
- end
10
-
11
- class PercentageColorizer
12
-
13
- def initialize(params)
14
- @max = params[:max]
15
- @free = params[:free]
16
- @using = params[:using]
17
- @color = params[:color] || {
18
- :bad => :red,
19
- :warn => :brown,
20
- :good => :green
21
- }
22
- @threshold = params[:threshold] || {
23
- :warn => 0.15,
24
- :bad => 0.30
25
- }
26
- end
27
-
28
- def call(data)
29
- max = data[@max.to_sym].to_f
30
- free = @using ? max - data[@using.to_sym].to_f : data[@free.to_sym].to_f
31
-
32
- percentage = free / max
33
-
34
- return @color[:bad] if percentage <= @threshold[:bad]
35
- return @color[:warn] if percentage <= @threshold[:warn]
36
- @color[:good]
37
- end
38
-
39
- end
40
-
41
- end
42
- end
43
- end