github / github/github-ldap

Net::LDAP.new deprecation warning

オープン
#100 コメント 2 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Ruby
スター
158
フォーク
28
PR マージ指標
30日以内にマージされた PR はありません

説明

When `encryption` parameter is passed as String to Net::LDAP.new

```
ldap_options = {
...
encryption: 'ssl',
}
ldap = GitHub::Ldap.new ldap_options
```

it produces the following [deprecation warning](https://github.com/ruby-ldap/ruby-net-ldap/blob/78e97ed69dc9ebbf06b04e7e70ceb046c23de75c/lib/net/ldap.rb#L622)
`Deprecation warning: please give :encryption option as a Hash to Net::LDAP.new`

At [present](https://github.com/ruby-ldap/ruby-net-ldap/blob/78e97ed69dc9ebbf06b04e7e70ceb046c23de75c/lib/net/ldap.rb#L483), the `encryption` value must be a Hash with parameters, which consists of two keys:
`method:` - `:simple_tls` or `:start_tls`
`tls_options:` - Hash of options for that method

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

Start at the GitHub::Ldap.new entry point and trace how ldap_options reaches Net::LDAP.new. Compare the String form with lib/net/ldap.rb around lines 483 and 622, where the accepted Hash shape and warning are described. Done means the LDAP initialization no longer produces this deprecation warning.

索引モデルが issue の本文から書いたものです。

評価

技術スタック
ruby
領域
authentication
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
48/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。