種類
- 文書 (37)
- クラス (22)
- インスタンスメソッド (22)
- 特異メソッド (11)
ライブラリ
-
cgi
/ session (11) -
net
/ http (22) - openssl (22)
クラス
-
CGI
:: Session (11) -
Net
:: HTTPGenericRequest (22)
キーワード
- ExtensionFactory (11)
-
NEWS for Ruby 2
. 0 . 0 (11) -
NEWS for Ruby 3
. 0 . 0 (4) -
body
_ stream (11) -
body
_ stream= (11) -
ruby 1
. 8 . 3 feature (11) - 制御構造 (11)
検索結果
先頭5件
-
CGI
:: Session . new(request , option = {}) -> CGI :: Session (18232.0) -
セッションオブジェクトを新しく作成し返します。
...セッションオブジェクトを新しく作成し返します。
@param request CGI のインスタンスを指定します。
@param option ハッシュを指定することができます。
以下の文字列が option のキーとして認識されます。
: session_key
クッキー......スである FileStore を用いる場合,
値は英数字だけからなる文字列で無ければなりません。
このオプションを指定するとリクエストにセッション ID が含まれても無視します。
(default: ランダムに生成されます)
: new_session......ager
データベースクラスを指定します。
組み込みで CGI::Session::FileStore, CGI::Session::MemoryStore,
CGI::Session::PStore を提供しています。デフォルトは CGI::Session::FileStore です。
: session_expires
セッションの有効期間。
Time オ... -
OpenSSL
:: X509 :: Request (18058.0) -
X.509 の証明書署名要求(Certificate Signing Request, CSR)を表わす クラスです。
...求(Certificate Signing Request, CSR)を表わす
クラスです。
X.509 CSR については 2986 などを参照してください。
=== 例
CSR を生成する例。
require 'openssl'
# ファイルから秘密鍵を読み込む
rsa = OpenSSL::PKey::RSA.new(File.read("privkey.pem"))......# 新しい CSR オブジェクトを生成
csr = OpenSSL::X509::Request.new
# DN を生成
name = OpenSSL::X509::Name.new
name.add_entry('C', 'JP')
name.add_entry('ST', 'Osaka')
name.add_entry('CN', 'Example Name')
csr.subject = name
# バージョンを 0 (v1.7) に
csr.version =......を設定
factory = OpenSSL::X509::ExtensionFactory.new
exts = [ factory.create_ext("subjectAltName", "DNS:foo.example.com") ]
asn1exts = OpenSSL::ASN1::Set([OpenSSL::ASN1::Sequence(exts)])
csr.add_attribute(OpenSSL::X509::Attribute.new("extReq", asn1exts))
# 署名
csr.sign(rsa, "sha1"... -
NEWS for Ruby 2
. 0 . 0 (6108.0) -
NEWS for Ruby 2.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 2.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......* 非互換: Fiber#resume は Fiber#transfer を呼び出したファイバーを再開できなくなりました
* File
* 拡張: File.fnmatch? は File::FNM_EXTGLOB(File::Constants::FNM_EXTGLOB) オプションが与えられていればブレースを展開します
* GC
*......default for system() and exec().
Also, the close-on-exec flag is set by default for all new file descriptors.
This means file descriptors doesn't inherit to spawned process unless
explicitly requested such as system(..., fd=>fd).
* Kernel#respond_to? against a protected method now ret... -
NEWS for Ruby 3
. 0 . 0 (6084.0) -
NEWS for Ruby 3.0.0 このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
...NEWS for Ruby 3.0.0
このドキュメントは前回リリース以降のバグ修正を除くユーザーに影響のある機能の変更のリストです。
それぞれのエントリーは参照情報があるため短いです。
十分な情報と共に書かれた全ての変更のリス......e each second element
# => ["data1", "data2", "data3"]
//}
* Binding
* Binding#eval when called with one argument will use `"(eval)"` for `__FILE__` and `1` for `__LINE__` in the evaluated code. 4352 17419
* ConditionVariable
* ConditionVariable#wait may now invoke the `block`/`unblock`......Add :connect_timeout to TCPSocket.new 17187
* Net::HTTP
* Net::HTTP#verify_hostname= and Net::HTTP#verify_hostname have been added to skip hostname verification. 16555
* Net::HTTP.get, Net::HTTP.get_response, and Net::HTTP.get_print can take the request headers as a Hash in the second ar... -
ruby 1
. 8 . 3 feature (3444.0) -
ruby 1.8.3 feature *((<ruby 1.8 feature>)) *((<ruby 1.8.2 feature>))
...* [ruby]: ruby インタプリタの変更
* [api]: 拡張ライブラリ API
* [lib]: ライブラリ
* レベル
* [bug]: バグ修正
* [new]: 追加されたクラス/メソッドなど
* [compat]: 変更されたクラス/メソッドなど
* 互換性のある変更
* on......=== 2005-09-19
: FileUtils.remove_entry_secure [lib] [new]
: FileUtils.remove_entry [lib] [new]
: FileUtils.chmod_R [lib] [new]
: FileUtils.chown [lib] [new]
: FileUtils.chown_R [lib] [new]
: FileUtils.commands [lib] [new]
: FileUtils.options......[lib] [new]
: Net::HTTPHeader#main_type [lib] [new]
: Net::HTTPHeader#sub_type [lib] [new]
: Net::HTTPHeader#type_params [lib] [new]
: Net::HTTPHeader#content_type= [lib] [new]
: Net::HTTPHeader#set_content_type [lib] [new]
: Net::HTTPRequest#body(=) [lib] [new]
: Net... -
Net
:: HTTPGenericRequest # body _ stream -> object (3024.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...e.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post.body_stream = f
post["Content-Length"] = f.size
end
post.body_stream # => #<File:/path/to/test (closed)>
//}... -
Net
:: HTTPGenericRequest # body _ stream=(f) (3024.0) -
サーバに送るリクエストのエンティティボディを IO オブジェクトなどのストリームで設定します。 f は read(size) メソッドが定義されている必要があります。
...e.com/index.html')
post = Net::HTTP::Post.new(uri.request_uri)
File.open("/path/to/test", 'rb') do |f|
# 大きなファイルを扱う際にメモリ消費を少なくできる
post.body_stream = f
post["Content-Length"] = f.size
end
post.body_stream # => #<File:/path/to/test (closed)>
//}... -
OpenSSL
:: X509 :: ExtensionFactory (48.0) -
OpenSSL::X509::Extension を簡便に生成するための クラスです。
...# req: CSR オブジェクト
# newcert: 新たに生成する証明書のオブジェクト
ca_cert = OpenSSL::X509::Certificate.new(File.read('ca_cert.pem'))
req = OpenSSL::X509::Request.new(File.read('req.pem'))
newcert = OpenSSL::X509::Certificate.new
# 新しい ExtensionFactory オ......トを生成し、 CA の証明書オブジェクト
# を設定
factory = OpenSSL::X509::ExtensionFactory.new(ca_cert)
# CSR オブジェクトを設定
factory.subject_request = req
# basicConstraints 拡張領域を生成
p factory.create_extension("basicConstraints", "CA:FALSE")
#......p factory.create_extension("authorityKeyIdentifier", "keyid,issuer:always")
# => authorityKeyIdentifier = keyid:D1:AB:87:....
# 生成した拡張領域オブジェクトを証明書の拡張領域に追加
newcert.add_extension(factory.create_extension("basicConstraints", "CA:FALSE"))... -
制御構造 (42.0)
-
制御構造 条件分岐: * if * unless * case 繰り返し: * while * until * for * break * next * redo * retry 例外処理: * raise * begin その他: * return * BEGIN * END
...す。
左辺の式が begin 節である場合にはそれを最初に一回評価してから繰り返します。
//emlist[例][ruby]{
send_request(data)
begin
res = get_response()
end while res == 'Continue'
//}
while 修飾した式は nil を返します。
また、引数を伴った bre......# 例外 RuntimeError を発生させる
# 以下の二つは SyntaxError を発生させる
raise SyntaxError, "invalid syntax"
raise SyntaxError.new("invalid syntax")
raise # 最後の例外の再発生
//}
文法:
raise
raise messageまたはexception......ure 節を定義でき、これにより例外を処理することが
できます。
==== rescue修飾子
//emlist[例][ruby]{
open("nonexistent file") rescue STDERR.puts "Warning: #$!"
//}
文法:
式1 rescue 式2
式1で例外が発生したとき、式2を評価します。
以...