Skip to content
Browse files

Fixing the broken support for old style plugins.

  • Loading branch information...
1 parent fc93fe7 commit 5b616f9c5ad5c35dca334a0b112eb1f75ff326b0 @JEG2 JEG2 committed Sep 15, 2009
Showing with 23 additions and 24 deletions.
  1. +4 −0 CHANGELOG
  2. +11 −21 Rakefile
  3. +1 −1 lib/scout.rb
  4. +7 −2 lib/scout/server.rb
View
4 CHANGELOG
@@ -1,3 +1,7 @@
+== 4.0.1
+
+* Fixed a regression that broken support for some very old plugins
+
== 4.0.0
* Switched to the new API URL's
View
32 Rakefile
@@ -45,7 +45,7 @@ spec = Gem::Specification.new do |spec|
# spec.test_suite_file = "test/ts_all.rb"
spec.files = Dir.glob("{bin,lib}/**/*.rb") +
Dir.glob("{data,vendor}/**/*") +
- %w[Rakefile setup.rb]
+ %w[Rakefile]
spec.executables = ["scout"]
spec.has_rdoc = true
@@ -79,31 +79,21 @@ task :publish => [:package, :publish_rubyforge]
desc "Publishes Gem to Rubyforge"
task :publish_rubyforge => [:package] do
- pkg = "pkg/#{spec.name}-#{version}"
-
- if $DEBUG then
- puts "release_id = rf.add_release #{spec.rubyforge_project.inspect}, #{spec.name.inspect}, #{spec.version.inspect}, \"#{pkg}.tgz\""
- puts "rf.add_file #{spec.rubyforge_project.inspect}, #{spec.name.inspect}, release_id, \"#{pkg}.gem\""
- end
-
puts "Publishing on RubyForge"
- rf = RubyForge.new
- rf.configure
+ forge = RubyForge.new
+ forge.configure
puts "Logging in"
- puts rf.inspect
- rf.login
+ forge.login
- c = rf.userconfig
- c["release_notes"] = spec.description if spec.description
- c["release_changes"] = changes if changes
- c["preformatted"] = true
+ release = forge.userconfig
+ release["release_changes"] = File.read(File.join(dir, "CHANGELOG"))
+ release["preformatted"] = true
- files = [(need_tar ? "#{pkg}.tgz" : nil),
- (need_zip ? "#{pkg}.zip" : nil),
- "#{pkg}.gem"].compact
+ package = "pkg/#{spec.name}-#{version}"
+ files = %W[#{package}.tgz #{package}.zip #{package}.gem].compact
- puts "Releasing #{spec.name} v. #{version}"
- rf.add_release spec.rubyforge_project, spec.name, version, *files
+ puts "Releasing #{spec.name}-#{version}"
+ forge.add_release(spec.rubyforge_project, spec.name, version, *files)
end
desc "Upload current documentation to Scout Gem Server and RubyForge"
View
2 lib/scout.rb
@@ -1,7 +1,7 @@
#!/usr/bin/env ruby -wKU
module Scout
- VERSION = "4.0.0".freeze
+ VERSION = "4.0.1".freeze
end
require "scout/command"
View
9 lib/scout/server.rb
@@ -151,8 +151,13 @@ def process_plugin(plugin)
info "Plugin completed its run."
%w[report alert error summary].each do |type|
- plural = "#{type}s".sub(/ys\z/, "ies").to_sym
- (Array(data[type.to_sym]) + Array(data[plural])).each do |fields|
+ plural = "#{type}s".sub(/ys\z/, "ies").to_sym
+ reports = data[plural].is_a?(Array) ? data[plural] :
+ [data[plural]].compact
+ if report = data[type.to_sym]
+ reports << report
+ end
+ reports.each do |fields|
@checkin[plural] << build_report(plugin['id'], fields)
end
end

0 comments on commit 5b616f9

Please sign in to comment.
Something went wrong with that request. Please try again.