Instiki 0.16.3: Rails 2.3.0

Instiki now runs on the Rails 2.3.0 Candidate Release.
Among other improvements, this means that it now 
automagically selects between WEBrick and Mongrel.

Just run

    ./instiki --daemon
This commit is contained in:
Jacques Distler 2009-02-04 14:26:08 -06:00
parent 43aadecc99
commit 4e14ccc74d
893 changed files with 71965 additions and 28511 deletions

View file

@ -1,14 +1,10 @@
Dir[File.dirname(__FILE__) + "/state_machine/*.rb"].sort.each do |path|
filename = File.basename(path)
require "active_model/state_machine/#{filename}"
end
module ActiveModel
module StateMachine
class InvalidTransition < Exception
end
def self.included(base)
require 'active_model/state_machine/machine'
base.extend ClassMethods
end
@ -35,6 +31,12 @@ module ActiveModel
state_machines[name] ||= Machine.new(self, name)
block ? state_machines[name].update(options, &block) : state_machines[name]
end
def define_state_query_method(state_name)
name = "#{state_name}?"
undef_method(name) if method_defined?(name)
class_eval "def #{name}; current_state.to_s == %(#{state_name}) end"
end
end
def current_state(name = nil, new_state = nil, persist = false)
@ -63,4 +65,4 @@ module ActiveModel
end
end
end
end
end