85件ヒット
[1-85件を表示]
(0.069秒)
キーワード
-
drb
/ ssl (12) - find (12)
- irb (12)
- logger (12)
- rdoc (12)
-
rubygems
/ commands / generate _ index _ command (12) -
rubygems
/ commands / mirror _ command (12) -
test
/ unit (1)
検索結果
-
logger (109.0)
-
ログを記録するためのライブラリです。
...)
logger.level = Logger::WARN
logger.debug("Created logger")
logger.info("Program started")
logger.warn("Nothing to do!")
path = "a_non_existent_file"
begin
File.foreach(path) do |line|
unless line =~ /^(\w+) = (.*)$/
logger.error("Line in wrong format: #{line.chomp}")
end
end
r......-07T02:22:53.649172 #11601] FATAL -- : Caught exception; exiting
F, [2017-12-07T02:22:53.649222 #11601] FATAL -- : No such file or directory @ rb_sysopen - a_non_existent_file (Errno::ENOENT)
logger_sample.rb:12:in `foreach'
logger_sample.rb:12:in `<main>'
これは log.level が Logger::WARN......'logfile.log')
//}
3. File オブジェクトを指定
//emlist[][ruby]{
require 'logger'
file = File.open('foo.log', File::WRONLY | File::APPEND)
# (古いファイルを削除する)新しいログファイルを作成する場合、以下のよ
# うに File::CREAT を指定。
# file = File.op... -
irb (85.0)
-
irb は Interactive Ruby の略です。 irb を使うと、Ruby の式を標準入力から簡単に入力・実行することができます。
...コマンドライン編集や履歴の機能が使えるようになります。
=== irb のコマンドラインオプション
irb [options] file_name opts
options:
-f ~/.irbrc を読み込まない
-m bc モード (分数と行列の計算ができる)
-......= false
IRB.conf[:BACK_TRACE_LIMIT] = 16
IRB.conf[:DEBUG_LEVEL] = 1
IRB.conf[:ECHO] = nil
IRB.conf[:EVAL_HISTORY] = nil
IRB.conf[:HISTORY_FILE] = nil
IRB.conf[:IGNORE_EOF] = true
IRB.conf[:IGNORE_SIGINT] = true
IRB.conf[:INSPECT_MODE] = nil
IRB.conf[:IRB_NAME] = "irb"
IRB.conf[:I......各インタプリタの self (「irb(obj)」で起動した時の obj)
//}
: source(path)
: irb_source(path)
現在の irb インタプリタ上で、
Ruby スクリプト path を評価します。
path の内容を irb で一行ずつタイプしたかのように、irb 上で一行ず......オプション
irb [options] file_name opts
options:
-f ~/.irbrc を読み込まない
-d $DEBUG を true にする (ruby -d と同じ)
-w ruby -w と同じ
-W[level=2] ruby -W と同じ
-r library ruby -r と同じ
-I... -
find (43.0)
-
ディレクトリ配下のファイルを探索するためのモジュールです。
...人が書き込み可能な危険なコマンドを探す
for dir in ENV['PATH'].split(File::PATH_SEPARATOR)
Find.find(dir) do |fpath|
if File.file?(fpath) and (File.stat(fpath).mode & 022) != 0
printf("file %s is writable from other users\n", fpath)
end
end
end... -
rubygems
/ commands / generate _ index _ command (31.0) -
ある Gem サーバに対するインデックスを作成するためのライブラリです。
...g-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します
--debug Ruby 自体のデバッグオプションを有効にします
Summary:
Generates the index files......statically. The command expects a 'gems' directory under the path given to
the --directory option. When done, it will generate a set of files like
this:
gems/ # .gem files you want to
index
quick/index
quick/ind......gacy YAML quick index
file
quick/Marshal.<version>/<gemname>.gemspec.rz # Marshal quick index file
Marshal.<version>
Marshal.<version>.Z # Marshal full index
yaml
yaml.Z # legacy YAML full index
The .Z and .rz extension files are compressed with... -
rdoc (25.0)
-
RDoc は Ruby のドキュメント生成を行うためのライブラリです。rdoc という ドキュメント生成のためのコマンドも含んでいます。
...例えば '--extension cgi=rb' とすれば、RDoc は ".cgi" で
終わるファイルを Ruby のソースとして取り扱います。
: --fileboxes
--diagram を指定した場合生成された図において、クラスがどのソースファ
イルで定義されているかを四......レクトリにすでにファイルが存在すれば、
そのファイルを上書きせずに、マージするようにします。
: --one-file
すべての出力を一つのファイルに書きだします。
: --output dir, --op dir
出力先のディレクトリを dir に設定......r pages not associated with
a class live. Set this when you don't store such files at your
project root. NOTE: Do not use the same file name in the page dir
and the root of your project
: --copy-files path
path で指定したファイルかディレクトリを出力先のディレクト... -
rubygems
/ commands / mirror _ command (19.0) -
リモートリポジトリをローカルリポジトリにミラーするためのライブラリです。
...-V, --[no-]verbose 表示を詳細にします
-q, --quiet 静かに実行します
--config-file FILE 指定された設定ファイルを使用します
--backtrace バックトレースを表示します......す。設定ファイルは YAML で以下のように書きます。
---
- from: http://gems.example.com # source repository URI
to: /path/to/mirror # destination directory
複数の取得元と配置先を指定することができます。... -
test
/ unit (19.0) -
ユニットテストを行うためのライブラリです。
...seed
-v, --verbose Verbose. Show progress processing files.
-n, --name PATTERN Filter test names on pattern.
--jobs-status [TYPE] Show status of jobs every file; Disabled when --jobs isn't specified.
-j, --jobs N......cified
--ruby VAL Path to ruby; It'll have used at -j option
-q, --hide-skip Hide skipped tests
-b, --basedir=DIR Base directory of test suites.
-x, --exclude PATTERN Exclude test files on pattern.
-Idirec......tory Add library load path
--[no-]gc-stress Set GC.stress as true
複数のテストを一度に行う場合、以下のように書いただけのファイルを実行します。
require 'test/unit'
require 'test_foo.rb'
require 'test_bar.rb'
===... -
drb
/ ssl (13.0) -
DRb のプロトコルとして SSL/TLS 上で通信する drbssl が使えるようになります。
...CertificatePath
接続相手の証明書の検証のために用いる信頼済みCA証明書
ファイルのディレクトリパスを指定します。
OpenSSL::SSL::SSLContext#ca_path= で利用します。
デフォルトは nil (指定なし)です。
: :SSLCACertificateFile
接続......相手の証明書の検証のために用いる信頼済みCA証明書
ファイルのパスを指定します。
OpenSSL::SSL::SSLContext#ca_file= で利用します。
デフォルトは nil (指定なし)です。
: :SSLTmpDhCallback
一時的 DH 鍵を生成するためのコールバ...