doc/R509/NameSanitizer.html in r509-0.9.2 vs doc/R509/NameSanitizer.html in r509-0.10.0

- old
+ new

@@ -4,17 +4,17 @@ <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title> Class: R509::NameSanitizer - &mdash; Documentation by YARD 0.8.5 + &mdash; Documentation by YARD 0.8.6.1 </title> - <link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" /> + <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" /> - <link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" /> + <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" /> <script type="text/javascript" charset="utf-8"> hasFrames = window.top.frames.main ? true : false; relpath = '../'; framesUrl = "../frames.html#!" + escape(window.location.href); @@ -101,13 +101,13 @@ <h2>Overview</h2><div class="docstring"> <div class="discussion"> <p>Sanitize an X509::Name. The #to_a method replaces unknown OIDs with -"UNDEF", but the #to_s method doesn't. What we want to do is build the -array that would have been produced by #to_a if it didn't throw away the -OID. This method is not required as of ruby-1.9.3p125 and up.</p> +“UNDEF”, but the #to_s method doesn&#39;t. What we want to do is build the +array that would have been produced by #to_a if it didn&#39;t throw away +the OID. This method is not required as of ruby-1.9.3p125 and up.</p> </div> </div> <div class="tags"> @@ -144,11 +144,11 @@ <span class="summary_desc"><div class='inline'> -<p>Array of the form [["OID", "VALUE], ["OID", "VALUE"]] with "UNDEF" replaced +<p>Array of the form [[“OID”, “VALUE], [”OID“, ”VALUE“]] with ”UNDEF“ replaced by the actual OID.</p> </div></span> </li> @@ -172,11 +172,11 @@ </h3><div class="docstring"> <div class="discussion"> -<p>Array of the form [["OID", "VALUE], ["OID", "VALUE"]] with "UNDEF" replaced +<p>Array of the form [[“OID”, “VALUE], [”OID“, ”VALUE“]] with ”UNDEF“ replaced by the actual OID</p> </div> </div> @@ -230,11 +230,11 @@ &mdash; <div class='inline'> -<p>array of the form [["OID", "VALUE], ["OID", "VALUE"]] with "UNDEF" replaced +<p>array of the form [[“OID”, “VALUE], [”OID“, ”VALUE“]] with ”UNDEF“ replaced by the actual OID</p> </div> </li> @@ -244,60 +244,60 @@ <tr> <td> <pre class="lines"> -183 -184 -185 -186 -187 -188 -189 -190 -191 -192 -193 -194 -195 -196 -197 -198 -199 -200 -201 -202 -203 -204 205 206 -207</pre> +207 +208 +209 +210 +211 +212 +213 +214 +215 +216 +217 +218 +219 +220 +221 +222 +223 +224 +225 +226 +227 +228 +229</pre> </td> <td> - <pre class="code"><span class="info file"># File 'lib/r509/subject.rb', line 183</span> + <pre class="code"><span class="info file"># File 'lib/r509/subject.rb', line 205</span> <span class='kw'>def</span> <span class='id identifier rubyid_sanitize'>sanitize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='id identifier rubyid_array'>array</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span> <span class='id identifier rubyid_used_oids'>used_oids</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span> <span class='id identifier rubyid_undefined_components'>undefined_components</span><span class='lparen'>(</span><span class='id identifier rubyid_array'>array</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span> <span class='kw'>begin</span> <span class='comment'># get the OID from the subject line that has this value -</span> <span class='id identifier rubyid_oids'>oids</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/([\d\.]+)=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span> +</span> <span class='id identifier rubyid_oids'>oids</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/([\d\.]+)=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span> <span class='kw'>if</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span> <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='kw'>else</span> <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='kw'>not</span> <span class='id identifier rubyid_used_oids'>used_oids</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='kw'>end</span> <span class='comment'># replace the &quot;UNDEF&quot; OID name in the array at the index the UNDEF was found </span> <span class='id identifier rubyid_array'>array</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:index</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_oid'>oid</span> <span class='comment'># remove the first occurrence of this in the subject line (so we can handle the same oid/value pair multiple times) -</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_oid'>oid</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> - <span class='comment'># we record which OIDs we've used in case two different unknown OIDs have the same value +</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_oid'>oid</span><span class='embexpr_end'>}</span><span class='tstring_content'>=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> + <span class='comment'># we record which OIDs we&#39;ve used in case two different unknown OIDs have the same value </span> <span class='id identifier rubyid_used_oids'>used_oids</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_oid'>oid</span> <span class='kw'>rescue</span> - <span class='comment'># I don't expect this to happen, but if it does we'll just not replace UNDEF and continue + <span class='comment'># I don&#39;t expect this to happen, but if it does we&#39;ll just not replace UNDEF and continue </span> <span class='kw'>end</span> <span class='kw'>end</span> <span class='id identifier rubyid_array'>array</span> <span class='kw'>end</span></pre> </td> @@ -308,12 +308,12 @@ </div> </div> <div id="footer"> - Generated on Tue Apr 23 10:46:05 2013 by + Generated on Sun Jan 26 13:37:26 2014 by <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a> - 0.8.5 (ruby-1.9.3). + 0.8.6.1 (ruby-2.0.0). </div> </body> </html> \ No newline at end of file