ifad-munin-plugins-rails 0.2.13 → 0.2.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,7 +16,7 @@ module Munin
16
16
  PASSENGER_PLUGIN_CONFIG = <<-DATA
17
17
  [<%= plugin_target_name %>]
18
18
  user root
19
- command <%= ruby_path %> %c
19
+ command ruby %c
20
20
  env.passenger_status passenger-status
21
21
  env.passenger_memory_stats passenger-memory-stats
22
22
  env.graph_category <%= graph_category %>
@@ -26,9 +26,10 @@ DATA
26
26
  [<%= plugin_target_name %>]
27
27
  env.log_file <%= options[:log_file] %>
28
28
  user root
29
- command <%= ruby_path %> %c
29
+ command ruby %c
30
30
  env.request_log_analyzer request-log-analyzer
31
31
  env.graph_category <%= graph_category %>
32
+ env.log_format rails3
32
33
  DATA
33
34
 
34
35
  PASSENGER_CATEGORY = "Passenger"
@@ -36,23 +37,21 @@ DATA
36
37
  def install_application(args)
37
38
  app_name = args.shift
38
39
  log_file = args.shift
39
- ruby_path = "/usr/bin/env GEM_PATH=#{`echo $GEM_PATH`[0...-1]} GEM_HOME=#{`echo $GEM_HOME`[0...-1]} PATH=#{`echo $PATH`[0...-1]} ruby"
40
40
  RAILS_PLUGINS.each do |plugin|
41
41
  plugin_target_name = [app_name, plugin].join("_")
42
42
  add_plugin(plugin, plugin_target_name)
43
- add_plugin_config(plugin_target_name, app_name, ruby_path, RAILS_PLUGIN_CONFIG, :log_file => log_file)
43
+ add_plugin_config(plugin_target_name, app_name, RAILS_PLUGIN_CONFIG, :log_file => log_file)
44
44
  end
45
45
  end
46
46
 
47
47
  def install_passenger_plugins
48
- ruby_path = "/usr/bin/env GEM_PATH=#{`echo $GEM_PATH`[0...-1]} GEM_HOME=#{`echo $GEM_HOME`[0...-1]} PATH=#{`echo $PATH`[0...-1]} ruby"
49
48
  PASSENGER_PLUGINS.each do |plugin|
50
49
  add_plugin(plugin, plugin)
51
- add_plugin_config(plugin, PASSENGER_CATEGORY, ruby_path, PASSENGER_PLUGIN_CONFIG)
50
+ add_plugin_config(plugin, PASSENGER_CATEGORY, PASSENGER_PLUGIN_CONFIG)
52
51
  end
53
52
  end
54
53
 
55
- def add_plugin_config(plugin_target_name, graph_category, ruby_path, config_template, options = {})
54
+ def add_plugin_config(plugin_target_name, graph_category, config_template, options = {})
56
55
  FileUtils.mkdir_p(munin_plugin_config_path)
57
56
  template = ERB.new config_template
58
57
  File.open(File.join(munin_plugin_config_path, plugin_target_name), "w+") do |file|
@@ -62,8 +61,12 @@ DATA
62
61
 
63
62
  def add_plugin(plugin_file, plugin_target_name = nil)
64
63
  FileUtils.mkdir_p(munin_plugins_path)
65
- plugin_target_name ||= plugin_file
66
- `ln -nsf "#{File.join(munin_dir, plugin_file)}" "#{munin_plugins_path}/#{plugin_target_name}"`
64
+
65
+ plugin_source_path = File.join(munin_dir, plugin_file)
66
+ plugin_target_path = File.join(munin_plugins_path, plugin_target_name || plugin_file)
67
+
68
+ File.unlink plugin_target_path if File.symlink?(plugin_target_path)
69
+ File.symlink plugin_source_path, plugin_target_path
67
70
  end
68
71
 
69
72
  def munin_plugins_path
@@ -78,4 +81,4 @@ DATA
78
81
  File.join(File.dirname(__FILE__), "..", "..", "munin")
79
82
  end
80
83
  end
81
- end
84
+ end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "ifad-munin-plugins-rails"
3
- gem.version = "0.2.13"
3
+ gem.version = "0.2.14"
4
4
  gem.authors = ["Andrew Eberbach", "Bart ten Brinke", "Marcello Barnaba"]
5
5
  gem.email = ["andrew@ebertech.ca", "", "vjt@openssl.it" ]
6
6
 
metadata CHANGED
@@ -1,39 +1,50 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: ifad-munin-plugins-rails
3
- version: !ruby/object:Gem::Version
4
- version: 0.2.13
3
+ version: !ruby/object:Gem::Version
4
+ hash: 11
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 2
9
+ - 14
10
+ version: 0.2.14
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Andrew Eberbach
9
14
  - Bart ten Brinke
10
15
  - Marcello Barnaba
11
16
  autorequire:
12
17
  bindir: bin
13
18
  cert_chain: []
14
- date: 2013-03-06 00:00:00.000000000 Z
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
19
+
20
+ date: 2013-03-06 00:00:00 Z
21
+ dependencies:
22
+ - !ruby/object:Gem::Dependency
17
23
  name: request-log-analyzer
18
- requirement: &84285230 !ruby/object:Gem::Requirement
24
+ prerelease: false
25
+ requirement: &id001 !ruby/object:Gem::Requirement
19
26
  none: false
20
- requirements:
27
+ requirements:
21
28
  - - ~>
22
- - !ruby/object:Gem::Version
23
- version: '1'
29
+ - !ruby/object:Gem::Version
30
+ hash: 1
31
+ segments:
32
+ - 1
33
+ version: "1"
24
34
  type: :runtime
25
- prerelease: false
26
- version_requirements: *84285230
35
+ version_requirements: *id001
27
36
  description: Plugins for Munin that use passenger and Request Log Analyzer
28
- email:
37
+ email:
29
38
  - andrew@ebertech.ca
30
- - ''
39
+ - ""
31
40
  - vjt@openssl.it
32
- executables:
41
+ executables:
33
42
  - request-log-analyzer-munin
34
43
  extensions: []
44
+
35
45
  extra_rdoc_files: []
36
- files:
46
+
47
+ files:
37
48
  - .gitignore
38
49
  - Gemfile
39
50
  - Gemfile.lock
@@ -64,26 +75,36 @@ files:
64
75
  - munin/munin_rails_view_render_time
65
76
  homepage:
66
77
  licenses: []
78
+
67
79
  post_install_message:
68
80
  rdoc_options: []
69
- require_paths:
81
+
82
+ require_paths:
70
83
  - lib
71
- required_ruby_version: !ruby/object:Gem::Requirement
84
+ required_ruby_version: !ruby/object:Gem::Requirement
72
85
  none: false
73
- requirements:
74
- - - ! '>='
75
- - !ruby/object:Gem::Version
76
- version: '0'
77
- required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
92
+ version: "0"
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
94
  none: false
79
- requirements:
80
- - - ! '>='
81
- - !ruby/object:Gem::Version
82
- version: '0'
95
+ requirements:
96
+ - - ">="
97
+ - !ruby/object:Gem::Version
98
+ hash: 3
99
+ segments:
100
+ - 0
101
+ version: "0"
83
102
  requirements: []
103
+
84
104
  rubyforge_project:
85
- rubygems_version: 1.8.10
105
+ rubygems_version: 1.8.12
86
106
  signing_key:
87
107
  specification_version: 3
88
108
  summary: Plugins for Munin that use passenger and Request Log Analyzer
89
109
  test_files: []
110
+