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:\Users\zdavatz\de.oddb.org\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' | |
SetHandler ruby-object | |
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
# Note: /usr/local/apache/libexec/mod_ruby.so is just an example. | |
# You should specify the correct path to mod_ruby.so. | |
LoadModule ruby_module modules/mod_ruby.so | |
# # If ClearModuleList is used in your httpd.conf, you should use AddModule | |
# # to activate the ruby module. | |
# AddModule mod_ruby.c | |
# If the ruby module is installed, this will be enabled. | |
<IfModule mod_ruby.c> |
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 |