私は Aptana を初めて使用するので、明らかな何かを見落としている可能性があります。私が作成したそのバンドルの問題は、Aptana がロードされたときにアクティブ化されません。rubble.rb ファイルを機能させるには、ファイルの日付を更新する必要があります。
touch ~/Documents/Aptana Rubles/ioncubeEncode.ruble
私がそれをした後、そのAptanaセッションの残りの間、物事は桃色です.
私はそれが関連しているとは思いませんが、ここにバンドルコードがあり、うまく機能します(機能する場合):
require 'ruble'
#Ruble::Logger.log_level = :trace
bundle do |bundle|
bundle.author = "Sasha"
bundle.copyright = "None"
bundle.display_name = "Ioncube Encode"
bundle.description = "Encode just saved php file form base_local to base folder"
end
command "Ioncube Encode" do |cmd|
cmd.input = :document
cmd.output = :output_to_console
cmd.trigger = :execution_listener , "org.eclipse.ui.file.save"
cmd.invoke do |ctx|
source_path = ENV['TM_FILEPATH']
ext = File.extname(source_path)
if ext == '.php'
if ( source_path =~ /base_local/)
destination_path = source_path.sub('/base_local/','/base/')
#CONSOLE.puts "Ioncube Encoding: " + source_path + " to " + destination_path
exec="/usr/local/ioncube/ioncube_encoder5 -v --optimize more --without-loader-check " + source_path + " -o " +destination_path + " 2>&1"
IO.popen(exec, 'r+') do |io|
io.close_write
CONSOLE.puts io.read
end
end
end
end
end
これは大したことではないように思えるかもしれませんが、私はとても気になります。