Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

mongrel_service will no longer change it's registration 'space' in ge…

…m_plugin due win32-service pollution.

git-svn-id: svn://rubyforge.org/var/svn/mongrel/trunk@949 19e92222-5c0b-0410-8929-a290d50e31e9
  • Loading branch information...
commit a2cb768192cba8a0ccae556bc2be0c8f95e0ba04 1 parent 1a60a2b
luislavena authored
View
5 projects/mongrel_service/CHANGELOG
@@ -3,7 +3,10 @@
* Strict Gem dependencies for mongrel_service. This version is compatible
only with mongrel 1.0.x, 1.1.x and with win32-service 0.5.x.
-
+
+ * Fixed issues realted to Win32::Service and gem_plugin being registered with
+ different names due win32-service changes.
+
* 0.3.3 *
* Properly display package/gem version for mongrel_service. Closes #13823.
View
15 projects/mongrel_service/lib/mongrel_service/init.rb
@@ -2,8 +2,6 @@
require 'mongrel'
require 'mongrel/rails'
require 'rbconfig'
-gem 'win32-service', '>=0.5.2', '<0.6.0'
-require 'win32/service'
require 'fileutils'
module Service
@@ -35,6 +33,10 @@ def configure
# of the rails application we wanted to serve, because later "as service" no error
# show to trace this.
def validate
+ # TODO: investigate why Win32::Service interfere with gem_plugin
+ gem 'win32-service', '>= 0.5.2', '< 0.6.0'
+ require 'win32/service'
+
@cwd = File.expand_path(@cwd)
valid_dir? @cwd, "Invalid path to change to: #@cwd"
@@ -75,6 +77,9 @@ def validate
end
def run
+ gem 'win32-service', '>= 0.5.2', '< 0.6.0'
+ require 'win32/service'
+
# check if mongrel_service.exe is in ruby bindir.
gem_root = File.join(File.dirname(__FILE__), "..", "..")
gem_executable = File.join(gem_root, "bin/mongrel_service.exe")
@@ -165,6 +170,9 @@ def configure
def validate
valid? @svc_name != nil, "A service name is mandatory."
+
+ gem 'win32-service', '>= 0.5.2', '< 0.6.0'
+ require 'win32/service'
# Validate that the service exists
begin
@@ -184,6 +192,9 @@ class Remove < GemPlugin::Plugin "/commands"
include ServiceValidation
def run
+ gem 'win32-service', '>= 0.5.2', '< 0.6.0'
+ require 'win32/service'
+
display_name = Win32::Service.getdisplayname(@svc_name)
begin
Please sign in to comment.
Something went wrong with that request. Please try again.