This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
<Directory C:\Users\zdavatz\de.oddb.org\doc> | |
Options ExecCGI | |
<Files "*"> | |
SetHandler ruby-object | |
</Files> | |
AllowOverride None | |
Order allow,deny | |
Allow from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
DocumentRoot /var/www/de.oddb.org/doc | |
ServerName de.oddb.org | |
DirectoryIndex index.rbx | |
RubyAddPath /var/www/de.oddb.org/lib | |
RubyRequire 'sbsm/trans_handler' | |
SetHandler ruby-object | |
RubyTransHandler SBSM::ZoneTransHandler.instance | |
SetEnv DEFAULT_FLAVOR oddb | |
SetEnv DRB_SERVER druby://localhost:11000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NameVirtualHost *:80 | |
<VirtualHost *:80> | |
ServerName de.oddb.win | |
DocumentRoot C:\Ruby-1.8.6-oniguruma\lib\ruby\gems\1.8\gems\de.oddb-2.0.0\doc | |
DirectoryIndex index.rbx | |
RubyAddPath 'C:/Ruby-1.8.6-oniguruma/lib/ruby/gems/1.8/gems/de.oddb-2.0.0/lib' | |
RubyRequire 'sbsm/trans_handler' | |
RubyTransHandler SBSM::ZoneTransHandler.instance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Directory /var/www/de.oddb.org/doc> | |
Options ExecCGI | |
AllowOverride None | |
Order allow,deny | |
Allow from all | |
</Directory> | |
<Directory /var/www/de.oddb.org/var/images> | |
AllowOverride None | |
Order allow,deny | |
Allow from all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LoadModule ruby_module modules/mod_ruby.so | |
<IfModule mod_ruby.c> | |
RubyRequire apache/ruby-run | |
<Location /ruby> | |
SetHandler ruby-object | |
RubyHandler Apache::RubyRun.instance | |
Options ExecCGI | |
</Location> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- ruby -*- | |
require 'rubygems' | |
require 'hoe' | |
## To run 'rake git:manifest' you will need the 'hoe-git' gem. | |
Hoe.plugin :git | |
Hoe.plugins.delete :clean |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tip(msg); puts; puts msg; puts "-"*100; end | |
# | |
# 30 Ruby 1.9 Tips, Tricks & Features: | |
# http://www.igvita.com/2011/02/03/new-ruby-19-features-tips-tricks/ | |
# | |
tip "Upgrading to Ruby 1.9 is simple: rvm install 1.9.2 && rvm --default 1.9.2" | |
tip "Ruby 1.9 supports named captures in regular expressions!" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Returns all objects designated by _bulk_fetch_ids_ and registers | |
# _odba_caller_ for each of them. Objects which are not yet loaded are loaded | |
# from ODBA#storage. | |
def bulk_fetch(bulk_fetch_ids, odba_caller) | |
instances = [] | |
loaded_ids = [] | |
bulk_fetch_ids.each { |id| | |
if(entry = fetch_cache_entry(id)) | |
entry.odba_add_reference(odba_caller) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def odba_cut_connections! | |
@accessed_by.each { |object_id, odba_id| | |
if((item = odba_id2ref(odba_id) || object_id2ref(object_id, odba_id)) \ | |
&& item.respond_to?(:odba_cut_connection)) | |
item.odba_cut_connection(_odba_object) | |
end | |
} | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def odba_retire opts={} | |
# replace with stubs in accessed_by | |
instance = _odba_object | |
if opts[:force] | |
@accessed_by.each do |object_id, odba_id| | |
if item = odba_id2ref(odba_id) | |
item.odba_stubize instance, opts | |
elsif(item = object_id2ref(object_id, odba_id)) | |
if item.is_a?(Persistable) && !item.is_a?(Stub) | |
item.odba_stubize instance, opts |