Revision 90197e7b
Added by Marc Dequènes almost 14 years ago
- ID 90197e7bd70d31f0ef7cd6dde8f2e95b6dc08ab5
bin/mapmaker | ||
---|---|---|
# to allow in-place run for test
|
||
$: << File.join(File.dirname(__FILE__), "..", "lib")
|
||
|
||
require 'needle'
|
||
require 'cyborghood/cyborg'
|
||
require 'cyborghood-mapmaker/dns'
|
||
|
||
|
||
module CyborgHood
|
||
... | ... | |
end
|
||
end
|
||
|
||
module MapMakerHome
|
||
module MapMakerLand
|
||
include I18nTranslation
|
||
bindtextdomain("cyborghood_mapmaker", {:path => Config::L10N_DIR, :charset => "UTF-8"})
|
||
|
||
... | ... | |
end
|
||
end
|
||
|
||
bot = CyborgHood::MapMakerHome::MapMaker.new
|
||
reg = Needle::Registry.new
|
||
reg.define do |b|
|
||
b.require 'cyborghood', CyborgHood
|
||
b.require 'cyborghood-mapmaker/land', CyborgHood::MapMakerLand
|
||
|
||
b.bot { CyborgHood::MapMakerLand::MapMaker.new(b.mapmaker_land) }
|
||
end
|
||
|
||
bot = reg.bot
|
||
|
||
trap('INT') do
|
||
bot.ask_to_stop
|
Also available in: Unified diff
[evol] MapMaker API and internals rework §1, going forward to Dependency Injection using Needle