Michael Granger avatar Michael Granger committed 43fde1b

Converted to Hoe + Rspec2.

Comments (0)

Files changed (16)

 ^pkg/
 ^release\.(notes|ann)$
 ~$
+\.DS_Store$

.hgsub

-rake = http://repo.deveiate.org/rake-tasklibs

.hgsubstate

-e5b6ca952d1ee20217890e89bbc897f28d1ebf96 rake
-e5b6ca952d1ee20217890e89bbc897f28d1ebf96 rake
+## 0.0.1 [2011-03-22] Michael Granger <ged@FaerieMUD.org>
+
+Initial release.
+
+ChangeLog
+History.md
+LICENSE
+Manifest.txt
+README.md
+Rakefile
+examples/homedirservice.rb
+examples/rubyversion.rb
+lib/drb/authsslprotocol.rb
+lib/drbservice.rb
+lib/drbservice/ldapauth.rb
+lib/drbservice/passwordauth.rb
+lib/drbservice/utils.rb
+spec/drb/authsslprotocol_spec.rb
+spec/drbservice/ldapauth_spec.rb
+spec/drbservice/passwordauth_spec.rb
+spec/drbservice_spec.rb
+spec/lib/helpers.rb

README

-= DRbService
-
-DRbService is a framework for creating SSL-encrypted DRb services 
-and authentication with a minimum of effort, along with a tool that 
-can easily set up the service in an environment intended to be run
-via one of several different deployment strategies.
-
-You can check out the current development source with Mercurial 
-like so:
-
-    hg clone http://bitbucket.org/ged/drbservice
-
-You can submit bug reports, suggestions, and read more about future plans at the
-project page:
-
-    http://deveiate.org/drbservice.html
-
-== License
-
-See the included LICENSE file for licensing details.
-
+# drbservice
+
+* https://bitbucket.org/ged/drbservice
+
+## Description
+
+DRbService is a framework we use at LAIKA for creating authenticated
+SSL-encrypted DRb services that provide access to privileged operations
+without the need to give shell access to everyone.
+
+There are a few examples in the `examples/` directory of the gem, which
+are stripped-down versions of the services we actually use.
+
+The current implementation is kind of a hack, but I intend to 
+eventually finish a DRb protocol that does the same thing in a more
+elegant, less-hackish way, as well as a tool that can generate 
+a new service along with support files for one of several different 
+runtime environments.
+
+If you're curious, see the `drb/authsslprotocol.rb` file for the 
+protocol. This will replace the current method-hiding code in 
+`drbservice.rb`, but existing services should be able to switch over
+quite easily. Or that's the intention.
+
+
+## Installation
+
+    gem install drbservice
+
+
+## Contributing
+
+You can check out the current development source with Mercurial via its
+[Bitbucket project][bitbucket]. Or if you prefer Git, via 
+[its Github mirror][github].
+
+After checking out the source, run:
+
+    $ rake newb
+
+This task will install any missing dependencies, run the tests/specs,
+and generate the API documentation.
+
+
+## License
+
+Copyright (c) 2010, 2011, Michael Granger
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice,
+  this list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the author/s, nor the names of the project's
+  contributors may be used to endorse or promote products derived from this
+  software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+[bitbucket]: https://bitbucket.org/ged/drbservice
+[github]: https://github.com/ged/drbservice
-#!rake -*- ruby -*-
-#
-# drbservice rakefile
-#
-# Based on various other Rakefiles, especially one by Ben Bleything
-#
-# Copyright (c) 2007-2010 The FaerieMUD Consortium
-#
-# Authors:
-#  * Michael Granger <ged@FaerieMUD.org>
-#
+#!/usr/bin/env rake
 
-BEGIN {
-	require 'rbconfig'
-	require 'pathname'
-	basedir = Pathname.new( __FILE__ ).dirname
+require 'hoe'
 
-	libdir = basedir + "lib"
-	extdir = libdir + Config::CONFIG['sitearch']
+Hoe.plugin :mercurial
+Hoe.plugin :yard
+Hoe.plugin :signing
 
-	$LOAD_PATH.unshift( basedir.to_s ) unless $LOAD_PATH.include?( basedir.to_s )
-	$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
-	$LOAD_PATH.unshift( extdir.to_s ) unless $LOAD_PATH.include?( extdir.to_s )
-}
+Hoe.plugins.delete :rubyforge
 
-begin
-	require 'readline'
-	include Readline
-rescue LoadError
-	# Fall back to a plain prompt
-	def readline( text )
-		$stderr.print( text.chomp )
-		return $stdin.gets
-	end
+hoespec = Hoe.spec 'drbservice' do
+	self.readme_file = 'README.md'
+	self.history_file = 'History.md'
+
+	self.developer 'Michael Granger', 'ged@FaerieMUD.org'
+
+	self.extra_dev_deps.push *{
+		'rspec' => '~> 2.4',
+	}
+
+	self.spec_extras[:licenses] = ["BSD"]
+	self.spec_extras[:post_install_message] = %{
+
+		This library isn't really ready for production use yet, but
+		feel free to experiment with it.
+		
+	}.gsub( /^\t{2}/, '' )
+
+	self.require_ruby_version( '>=1.8.7' )
+
+	self.hg_sign_tags = true if self.respond_to?( :hg_sign_tags= )
+	self.rdoc_locations << "deveiate:/usr/local/www/public/code/#{remote_rdoc_dir}"
 end
 
-begin
-	require 'rubygems'
-rescue LoadError
-	module Gem
-		class Specification; end
-	end
-end
+ENV['VERSION'] ||= hoespec.spec.version.to_s
 
-require 'rbconfig'
-require 'rake'
-require 'rake/testtask'
-require 'rake/packagetask'
-require 'rake/clean'
-# require 'rake/191_compat.rb'
-
-$dryrun = false
-
-### Config constants
-BASEDIR       = Pathname.new( __FILE__ ).dirname.relative_path_from( Pathname.getwd )
-BINDIR        = BASEDIR + 'bin'
-LIBDIR        = BASEDIR + 'lib'
-EXTDIR        = BASEDIR + 'ext'
-DOCSDIR       = BASEDIR + 'docs'
-PKGDIR        = BASEDIR + 'pkg'
-DATADIR       = BASEDIR + 'data'
-
-MANUALDIR     = DOCSDIR + 'manual'
-
-PROJECT_NAME  = 'drbservice'
-PKG_NAME      = PROJECT_NAME.downcase
-PKG_SUMMARY   = 'A tool for easing the creation of SSL-encrypted, authenticated DRb services.'
-
-# Cruisecontrol stuff
-CC_BUILD_LABEL     = ENV['CC_BUILD_LABEL']
-CC_BUILD_ARTIFACTS = ENV['CC_BUILD_ARTIFACTS'] || 'artifacts'
-
-VERSION_FILE  = LIBDIR + 'drbservice.rb'
-if VERSION_FILE.exist? && buildrev = ENV['CC_BUILD_LABEL']
-	PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ] + '.' + buildrev
-elsif VERSION_FILE.exist?
-	PKG_VERSION = VERSION_FILE.read[ /VERSION\s*=\s*['"](\d+\.\d+\.\d+)['"]/, 1 ]
-end
-
-PKG_VERSION = '0.0.0' unless defined?( PKG_VERSION ) && !PKG_VERSION.nil?
-
-PKG_FILE_NAME = "#{PKG_NAME.downcase}-#{PKG_VERSION}"
-GEM_FILE_NAME = "#{PKG_FILE_NAME}.gem"
-
-# Universal VCS constants
-DEFAULT_EDITOR  = 'vi'
-COMMIT_MSG_FILE = 'commit-msg.txt'
-FILE_INDENT     = " " * 12
-LOG_INDENT      = " " * 3
-
-EXTCONF       = EXTDIR + 'extconf.rb'
-
-ARTIFACTS_DIR = Pathname.new( CC_BUILD_ARTIFACTS )
-
-TEXT_FILES    = Rake::FileList.new( %w[Rakefile ChangeLog README* LICENSE] )
-BIN_FILES     = Rake::FileList.new( "#{BINDIR}/*" )
-LIB_FILES     = Rake::FileList.new( "#{LIBDIR}/**/*.rb" )
-EXT_FILES     = Rake::FileList.new( "#{EXTDIR}/**/*.{c,h,rb}" )
-DATA_FILES    = Rake::FileList.new( "#{DATADIR}/**/*" )
-
-SPECDIR       = BASEDIR + 'spec'
-SPECLIBDIR    = SPECDIR + 'lib'
-SPEC_FILES    = Rake::FileList.new( "#{SPECDIR}/**/*_spec.rb", "#{SPECLIBDIR}/**/*.rb" )
-
-TESTDIR       = BASEDIR + 'tests'
-TEST_FILES    = Rake::FileList.new( "#{TESTDIR}/**/*.tests.rb" )
-
-RAKE_TASKDIR  = BASEDIR + 'rake'
-RAKE_TASKLIBS = Rake::FileList.new( "#{RAKE_TASKDIR}/*.rb" )
-PKG_TASKLIBS  = Rake::FileList.new( "#{RAKE_TASKDIR}/{191_compat,helpers,packaging,rdoc,testing}.rb" )
-PKG_TASKLIBS.include( "#{RAKE_TASKDIR}/manual.rb" ) if MANUALDIR.exist?
-
-RAKE_TASKLIBS_URL = 'http://repo.deveiate.org/rake-tasklibs'
-
-LOCAL_RAKEFILE = BASEDIR + 'Rakefile.local'
-
-EXTRA_PKGFILES = Rake::FileList.new
-
-RELEASE_FILES = TEXT_FILES + 
-	SPEC_FILES + 
-	TEST_FILES + 
-	BIN_FILES +
-	LIB_FILES + 
-	EXT_FILES + 
-	DATA_FILES + 
-	RAKE_TASKLIBS +
-	EXTRA_PKGFILES
-
-
-RELEASE_FILES << LOCAL_RAKEFILE.to_s if LOCAL_RAKEFILE.exist?
-
-RELEASE_ANNOUNCE_ADDRESSES = [
-	"Ruby-Talk List <ruby-talk@ruby-lang.org>",
-]
-
-COVERAGE_MINIMUM = ENV['COVERAGE_MINIMUM'] ? Float( ENV['COVERAGE_MINIMUM'] ) : 85.0
-RCOV_EXCLUDES = 'spec,tests,/Library/Ruby,/var/lib,/usr/local/lib'
-RCOV_OPTS = [
-	'--exclude', RCOV_EXCLUDES,
-	'--xrefs',
-	'--save',
-	'--callsites',
-	#'--aggregate', 'coverage.data' # <- doesn't work as of 0.8.1.2.0
-  ]
-
-
-### Load some task libraries that need to be loaded early
-if !RAKE_TASKDIR.exist?
-	$stderr.puts "It seems you don't have the build task directory. Shall I fetch it "
-	ans = readline( "for you? [y]" )
-	ans = 'y' if !ans.nil? && ans.empty?
-
-	if ans =~ /^y/i
-		$stderr.puts "Okay, fetching #{RAKE_TASKLIBS_URL} into #{RAKE_TASKDIR}..."
-		system 'hg', 'clone', RAKE_TASKLIBS_URL, "./#{RAKE_TASKDIR}"
-		if ! $?.success?
-			fail "Damn. That didn't work. Giving up; maybe try manually fetching?"
-		end
-	else
-		$stderr.puts "Then I'm afraid I can't continue. Best of luck."
-		fail "Rake tasklibs not present."
-	end
-
-	RAKE_TASKLIBS.include( "#{RAKE_TASKDIR}/*.rb" )
-end
-
-require RAKE_TASKDIR + 'helpers.rb'
-include RakefileHelpers
-
-# Set the build ID if the mercurial executable is available
-if hg = which( 'hg' )
-	id = `#{hg} id -n`.chomp
-	PKG_BUILD = "pre%03d" % [(id.chomp[ /^[[:xdigit:]]+/ ] || '1')]
-else
-	PKG_BUILD = 'pre000'
-end
-SNAPSHOT_PKG_NAME = "#{PKG_FILE_NAME}.#{PKG_BUILD}"
-SNAPSHOT_GEM_NAME = "#{SNAPSHOT_PKG_NAME}.gem"
-
-# Documentation constants
-API_DOCSDIR = DOCSDIR + 'api'
-README_FILE = TEXT_FILES.find {|path| path =~ /^README/ } || 'README'
-RDOC_OPTIONS = [
-	'--tab-width=4',
-	'--show-hash',
-	'--include', BASEDIR.to_s,
-	"--main=#{README_FILE}",
-	"--title=#{PKG_NAME}",
-  ]
-YARD_OPTIONS = [
-	'--use-cache',
-	'--no-private',
-	'--protected',
-	'-r', README_FILE,
-	'--exclude', 'extconf\\.rb',
-	'--files', 'ChangeLog,LICENSE',
-	'--output-dir', API_DOCSDIR.to_s,
-	'--title', "#{PKG_NAME} #{PKG_VERSION}",
-  ]
-
-# Release constants
-SMTP_HOST = "mail.faeriemud.org"
-SMTP_PORT = 465 # SMTP + SSL
-
-# Project constants
-PROJECT_HOST = 'deveiate.org'
-PROJECT_PUBDIR = '/usr/local/www/public/code/'
-PROJECT_DOCDIR = "#{PROJECT_PUBDIR}/#{PKG_NAME}"
-PROJECT_SCPPUBURL = "#{PROJECT_HOST}:#{PROJECT_PUBDIR}"
-PROJECT_SCPDOCURL = "#{PROJECT_HOST}:#{PROJECT_DOCDIR}"
-
-# Gem dependencies: gemname => version
-DEPENDENCIES = {
-	'trollop' => '>=1.15',
-}
-
-# Developer Gem dependencies: gemname => version
-DEVELOPMENT_DEPENDENCIES = {
-	'rake'         => '>= 0.8.7',
-	'rcodetools'   => '>= 0.7.0.0',
-	'rcov'         => '>= 0.8.1.2.0',
-	'rdoc'         => '>= 2.4.3',
-	'RedCloth'     => '>= 4.0.3',
-	'rspec'        => '>= 1.2.6',
-	'ruby-termios' => '>= 0.9.6',
-	'text-format'  => '>= 1.0.0',
-	'tmail'        => '>= 1.2.3.1',
-	'diff-lcs'     => '>= 1.1.2',
-	'treequel' => '>= 1.0.2',
-}
-
-# Non-gem requirements: packagename => version
-REQUIREMENTS = {
-	'drb' => '>=0',
-}
-
-# RubyGem specification
-GEMSPEC   = Gem::Specification.new do |gem|
-	gem.name              = PKG_NAME.downcase
-	gem.version           = PKG_VERSION
-
-	gem.summary           = PKG_SUMMARY
-	gem.description       = [
-		"DRbservice provides a framework for creating a DRb service that uses an SSL-encrypted channel",
-		"and authentication with a minimum of effort, along with a tool that can easily set up the",
-		"service in an environment intended to be run via one of several different deployment strategies.",
-  	  ].join( "\n" )
-	gem.post_install_message = [
-		" ",
-		"To get started, run 'drbservice <name of service>'",
-		" ",
-	  ].join( "\n" )
-
-	gem.authors           = "Michael Granger"
-	gem.email             = ["ged@FaerieMUD.org"]
-	gem.homepage          = 'http://deveiate.org/drbservice.html'
-
-	gem.has_rdoc          = true
-	gem.rdoc_options      = RDOC_OPTIONS
-	gem.extra_rdoc_files  = TEXT_FILES - [ 'Rakefile' ]
-
-	gem.bindir            = BINDIR.relative_path_from(BASEDIR).to_s
-	gem.executables       = BIN_FILES.select {|pn| File.executable?(pn) }.
-	                            collect {|pn| File.basename(pn) }
-	gem.require_paths << EXTDIR.relative_path_from( BASEDIR ).to_s if EXTDIR.exist?
-
-	if EXTCONF.exist?
-		gem.extensions << EXTCONF.relative_path_from( BASEDIR ).to_s
-	end
-
-	gem.files             = RELEASE_FILES
-	gem.test_files        = SPEC_FILES
-
-	# signing key and certificate chain
-	gem.signing_key       = '/Volumes/Keys/ged-private_gem_key.pem'
-	gem.cert_chain        = [File.expand_path('~/.gem/ged-public_gem_cert.pem')]
-
-	DEPENDENCIES.each do |name, version|
-		version = '>= 0' if version.length.zero?
-		gem.add_runtime_dependency( name, version )
-	end
-
-	REQUIREMENTS.each do |name, version|
-		gem.requirements << [ name, version ].compact.join(' ')
-	end
-end
-
-$trace = Rake.application.options.trace ? true : false
-$dryrun = Rake.application.options.dryrun ? true : false
-$include_dev_dependencies = false
-
-# Load any remaining task libraries
-RAKE_TASKLIBS.each do |tasklib|
-	next if tasklib.to_s =~ %r{/helpers\.rb$}
-	begin
-		trace "  loading tasklib %s" % [ tasklib ]
-		import tasklib
-	rescue ScriptError => err
-		fail "Task library '%s' failed to load: %s: %s" %
-			[ tasklib, err.class.name, err.message ]
-		trace "Backtrace: \n  " + err.backtrace.join( "\n  " )
-	rescue => err
-		log "Task library '%s' failed to load: %s: %s. Some tasks may not be available." %
-			[ tasklib, err.class.name, err.message ]
-		trace "Backtrace: \n  " + err.backtrace.join( "\n  " )
-	end
-end
-
-# Load any project-specific rules defined in 'Rakefile.local' if it exists
-import LOCAL_RAKEFILE if LOCAL_RAKEFILE.exist?
-
-
-#####################################################################
-###	T A S K S 	
-#####################################################################
-
-### Default task
-task :default  => [:clean, :local, :spec, :apidocs, :package]
-
-### Task the local Rakefile can append to -- no-op by default
-task :local
-
-### Task: clean
-CLEAN.include 'coverage', '**/*.orig', '**/*.rej'
-CLOBBER.include 'artifacts', 'coverage.info', 'ChangeLog', PKGDIR
-
-### Task: changelog
-file 'ChangeLog' do |task|
-	log "Updating #{task.name}"
-
-	changelog = make_changelog()
-	File.open( task.name, 'w' ) do |fh|
-		fh.print( changelog )
-	end
-end
-
-
-### Task: cruise (Cruisecontrol task)
-desc "Cruisecontrol build"
-task :cruise => [:clean, 'spec:quiet', :package] do |task|
-	raise "Artifacts dir not set." if ARTIFACTS_DIR.to_s.empty?
-	artifact_dir = ARTIFACTS_DIR.cleanpath + (CC_BUILD_LABEL || Time.now.strftime('%Y%m%d-%T'))
-	artifact_dir.mkpath
-
-	coverage = BASEDIR + 'coverage'
-	if coverage.exist? && coverage.directory?
-		$stderr.puts "Copying coverage stats..."
-		FileUtils.cp_r( 'coverage', artifact_dir )
-	end
-
-	$stderr.puts "Copying packages..."
-	FileUtils.cp_r( FileList['pkg/*'].to_a, artifact_dir )
-end
-
-
-desc "Update the build system to the latest version"
-task :update_build do
-	log "Updating the build system"
-	run 'hg', '-R', RAKE_TASKDIR, 'pull', '-u'
-	log "Updating the Rakefile"
-	sh 'rake', '-f', RAKE_TASKDIR + 'Metarakefile'
-end
-

examples/homedirservice.rb

 		:base => 'ou=employees,dc=acme,dc=com',
 		:scope => :one
 
+	# Authorize users who are in the posixGroup called 'sysadmin' under ou=groups
 	ldap_authz_callback do |directory, bound_user|
 		sysadmin_group = directory.ou( :groups ).cn( :sysadmin )
 		return bound_user[:active] &&

lib/drbservice.rb

 	#################################################################
 
 	### Create a new instance of the service.
-	### @raise [ScriptError] if DRbService is instantiated directory
+	### @raise [ScriptError] if DRbService is instantiated directly
 	def initialize( config={} )
 		raise ScriptError,
 			"can't instantiate #{self.class} directly: please subclass it instead" if

project.yml

---- 
-excluded_pkgfiles: []
-
-project_pubdir: /usr/local/www/public/code/
-project_pubhost: deveiate.org
-project_homepage: http://deveiate.org/drbservice.html
-project_requirements: 
-  drb: ">=0"
-release_smtphost: mail.faeriemud.org
-project_description: |-
-  DRbservice provides a framework for creating a DRb service that uses an SSL-encrypted channel
-  and authentication with a minimum of effort, along with a tool that can easily set up the
-  service in an environment intended to be run via one of several different deployment strategies.
-release_mailto: Ruby-Talk List <ruby-talk@ruby-lang.org>
-project_dependencies: 
-  trollop: ">=1.15"
-project_summary: A tool for easing the creation of SSL-encrypted, authenticated DRb services.
-version_file: drbservice.rb
-additional_pkgfiles: []
-
-dev_dependencies: 
-  treequel: >= 1.0.2
-
-authors: 
-  Michael Granger: ged@FaerieMUD.org
-post_install_message: " \n\
-  To get started, run 'drbservice <name of service>'\n "
-project_name: drbservice

spec/drb/authsslprotocol_spec.rb

 	$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
 }
 
-require 'spec'
+require 'rspec'
 require 'spec/lib/helpers'
-
 require 'drb/authsslprotocol'
 
 
 describe DRb::DRbAuthenticatedSSLSocket do
-	include DRbService::SpecHelpers
-
-	VALID_SERVICE_URISTRING = "drbauthssl://localhost:8484"
-	VALID_SERVICE_URI = URI( VALID_SERVICE_URISTRING )
-
 
 	before( :all ) do
 		setup_logging( :fatal )

spec/drbservice/ldapauth_spec.rb

 
 require 'treequel'
 
-require 'spec'
+require 'rspec'
 require 'spec/lib/helpers'
 
 require 'drbservice'

spec/drbservice/passwordauth_spec.rb

 
 require 'digest/sha2'
 
-require 'spec'
+require 'rspec'
 require 'spec/lib/helpers'
 
 require 'drbservice'

spec/drbservice_spec.rb

 	$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
 }
 
-require 'spec'
+require 'rspec'
 require 'spec/lib/helpers'
 
 require 'uri'

spec/lib/helpers.rb

 	$LOAD_PATH.unshift( libdir.to_s ) unless $LOAD_PATH.include?( libdir.to_s )
 }
 
-begin
-	require 'yaml'
-	require 'drbservice'
-rescue LoadError
-	unless Object.const_defined?( :Gem )
-		require 'rubygems'
-		retry
-	end
-	raise
-end
+require 'uri'
+require 'yaml'
+require 'drbservice'
+
+
+module DRbService::TestConstants
+
+	VALID_SERVICE_URISTRING = "drbauthssl://localhost:8484"
+	VALID_SERVICE_URI = URI( VALID_SERVICE_URISTRING )
+
+end # module DRbService::TestConstants
 
 
 ### RSpec helper functions.
 
 end
 
+### Mock with Rspec
+Rspec.configure do |c|
+	include DRbService::SpecHelpers,
+	        DRbService::TestConstants
+
+	c.mock_with :rspec
+
+	c.filter_run_excluding( :ruby_1_9_only => true ) unless vvec( RUBY_VERSION ) >= vvec('1.9.0')
+end
 
 # vim: set nosta noet ts=4 sw=4:
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.