2014-05-07 :-(
_ 午後
1300 デバッグしTARI
_ [ruby][配布][ocra][exerb]ruby スクリプト配布方法
- Exerb ruby 1.9 未対応
- edvakf/RBat gem は回収してくれない
- ocra ruby 1.9 対応。gem 回収してくれる
ocra
例
# coding: utf-8 require 'rubygems' require 'mail' require 'pp' options = { :address => "smtp.example.jp", :port => 25, :domain => 'hogehoge.example.gr.jp', :user_name => 'hogehoge', :password => 'hogehoge', :authentication => 'plain', } Mail.defaults do delivery_method :smtp, options end mail = Mail.new mail.from = 'user1@example.jp' mail.to = 'user2@example.jp' mail.subject = '日本語タイトル' mail.charset ='iso-2022-jp' mail.add_content_transfer_encoding mail.body = '日本語本文' mail.deliver
インストール
gem install ocra
作る
>ocra send8.rb === Loading script to check dependencies === Detected gem mail-2.5.4 (loaded, files) === 137 files, 1526028 bytes === Detected gem mime-types-1.25.1 (loaded, files) === 32 files, 138537 bytes === Detected gem treetop-1.4.15 (loaded, files) === 13 files, 40028 bytes === Including 53 encoding support files (3349504 bytes, use --no-enc to exclude) DL is deprecated, please use Fiddle === Building send8.exe === Adding user-supplied source files === Adding ruby executable ruby.exe === Adding detected DLL C:/Ruby200-x64/bin/LIBEAY32.dll === Adding detected DLL C:/Ruby200-x64/bin/SSLEAY32.dll === Adding detected DLL C:/Ruby200-x64/bin/ZLIB1.dll === Adding detected DLL C:/Ruby200-x64/bin/libyaml-0-2.dll === Adding detected DLL C:/Ruby200-x64/bin/libffi-6.dll === Adding library files === Compressing 13587421 bytes === Finished building send8.exe (2918896 bytes)
あとは send8.exe を実行するだけ。
参考: