• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythonwindowsphpgamebathyscaphegui翻訳comegattwitterframeworkbtronvb.net計画中(planning stage)testdomarduinodirectxpreviewerゲームエンジン

Commit MetaInfo

Revision7663d6a40feb23ca6ace6b4f859467f67f0745bd (tree)
Zeit2008-06-26 00:44:30
Autorikeji <ikeji@f836...>
Commiterikeji

Log Message

Merged from pragger_initializer r101:105 to trunk

git-svn-id: http://dev.ikejima.org/src/svn/pragger/trunk@387 f8368ae4-1e99-dc11-9799-0018f35ab5fa

Ändern Zusammenfassung

Diff

--- /dev/null
+++ b/plugin/Initialize/find_plugin.rb
@@ -0,0 +1,15 @@
1+eval <<'EOL',TOPLEVEL_BINDING
2+alias eval_pragger_loggnizer_backup eval_pragger
3+
4+def eval_pragger(command_array,data)
5+ command_array.each do |command|
6+ if ! $plugins.include?(command["module"])
7+ STDERR.puts "Plugin not found : #{command["module"]}"
8+ end
9+ end
10+ eval_pragger_loggnizer_backup(command_array,data)
11+end
12+EOL
13+
14+def find_plugin(config,data)
15+end
--- /dev/null
+++ b/plugin/Initialize/loggnize.rb
@@ -0,0 +1,19 @@
1+require 'logger'
2+
3+$log = Logger.new(STDERR)
4+
5+eval <<'EOL',TOPLEVEL_BINDING
6+alias eval_pragger_loggnizer_backup eval_pragger
7+
8+def eval_pragger(command_array,data)
9+ command_array_new = []
10+ command_array.each do |command|
11+ command_array_new << { "module" => "logout" , "config" => {"mes" => "exec plugin #{command["module"]}"} }
12+ command_array_new << command
13+ end
14+ eval_pragger_loggnizer_backup(command_array_new,data)
15+end
16+EOL
17+
18+def loggnize(config,data)
19+end
--- /dev/null
+++ b/plugin/Initialize/registry.rb
@@ -0,0 +1,7 @@
1+$reg = YAML.load(File.read("regist.yaml").toutf8) rescue Hash.new
2+
3+def registry(config,data)
4+ $reg.update(config["file"]) if config.include?("file")
5+ $reg.update(config) if !config.include("file")
6+ return data
7+end
--- /dev/null
+++ b/plugin/logout.rb
@@ -0,0 +1,7 @@
1+def logout(config,data)
2+ if config.include?("mes")
3+ $log.info(config["mes"])
4+ return data
5+ end
6+ return data
7+end
--- a/pragger.rb
+++ b/pragger.rb
@@ -24,7 +24,6 @@ end
2424
2525 def eval_pragger(command_array,data)
2626 command_array.inject(data) do |data, command|
27- STDERR.puts "exec plugin #{command["module"]}"
2827 $plugins[command["module"]].send(command["module"].sub(/.*::/,""), command["config"] || {}, data.clone)
2928 end
3029 end