Permalink
Browse files

Misc. cleanups

  • Loading branch information...
1 parent 1c4b776 commit 080ad58faf2a8dd793090778bfaa63e5b2cdb950 @methodmissing committed Feb 19, 2009
@@ -2,7 +2,7 @@ module Scrooge
module Core
module Symbol
- # See Scrooge::Core::Symbol
+ # See Scrooge::Core::String
def to_const
to_s.to_const
@@ -1,7 +1,6 @@
module Scrooge
module Storage
- autoload :Buffer, 'scrooge/storage/buffer'
autoload :Memory, 'scrooge/storage/memory'
class Base < Scrooge::Base
@@ -9,6 +9,8 @@ def initialize( strategy )
@strategy = strategy
end
+ # Execute a given strategy
+ #
def run!
@thread = Thread.new do
Thread.current.abort_on_exception = true
@@ -3,6 +3,7 @@ module Strategy
class Scope < Base
stage :scope do
+
log( "Scope ...", true )
self.scope = scope if framework.scope?( scope )
framework.install_scope_middleware( tracker )
@@ -143,7 +143,7 @@ def environment #:nodoc:
def restored_resources( data ) #:nodoc:
GUARD.synchronize do
data.map do |resource|
- Resource.new.marshal_load( resource )
+ Resource.load( resource )
end
end
end
View
@@ -11,9 +11,13 @@
Spec::Runner.configure do |config|
- Kernel.const_set :FIXTURES, "#{Dir.pwd}/spec/fixtures" unless defined?(FIXTURES)
- Kernel.const_set :TMP, "#{Dir.pwd}/spec/tmp" unless defined?(TMP)
- Kernel.const_set :CONFIG, "#{Dir.pwd}/spec/config" unless defined?(CONFIG)
+ def self.set_constant( const, value )
+ eval( "Kernel.const_set :#{const.to_s}, #{value.inspect} unless defined?( #{const.to_s} )" )
+ end
+
+ set_constant( :FIXTURES, "#{Dir.pwd}/spec/fixtures" )
+ set_constant( :TMP, "#{Dir.pwd}/spec/tmp" )
+ set_constant( :CONFIG, "#{Dir.pwd}/spec/config" )
config.before :all do
[TMP, CONFIG].each do |dir|

0 comments on commit 080ad58

Please sign in to comment.