cowtech-extensions 2.5.0 → 2.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -347,15 +347,16 @@
347
347
  <td>
348
348
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 290</span>
349
349
 
350
- <span class='kw'>def</span> <span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
351
- <span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='rparen'>)</span> <span class='kw'>do</span>
352
- <span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</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_zone'>zone</span><span class='op'>|</span>
353
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='lbracket'>[</span><span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_s_with_dst'>to_s_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
354
- <span class='kw'>end</span>
355
-
356
- <span class='kw'>nil</span>
357
- <span class='kw'>end</span>
358
- <span class='kw'>end</span></pre>
350
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_find identifier id'>find</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
351
+ <span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
352
+ <span class='colon3 op'>::</span><span class='rubyid_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='dot token'>.</span><span class='rubyid_all identifier id'>all</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_zone identifier id'>zone</span><span class='bitor op'>|</span>
353
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='lbrack token'>[</span><span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_to_s_with_dst identifier id'>to_s_with_dst</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span><span class='rparen token'>)</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_include? fid id'>include?</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span><span class='rparen token'>)</span>
354
+ <span class='rubyid_end end kw'>end</span>
355
+
356
+ <span class='rubyid_nil nil kw'>nil</span>
357
+ <span class='rubyid_end end kw'>end</span>
358
+ <span class='rubyid_end end kw'>end</span>
359
+ </pre>
359
360
  </td>
360
361
  </tr>
361
362
  </table>
@@ -447,10 +448,11 @@
447
448
  <td>
448
449
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 280</span>
449
450
 
450
- <span class='kw'>def</span> <span class='id identifier rubyid_format_offset'>format_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span><span class='comma'>,</span> <span class='id identifier rubyid_colon'>colon</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
451
- <span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span> <span class='op'>*</span> <span class='int'>86400</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='kw'>if</span> <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Rational</span><span class='rparen'>)</span>
452
- <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Fixnum</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_seconds_to_utc_offset'>seconds_to_utc_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span><span class='comma'>,</span> <span class='id identifier rubyid_colon'>colon</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='kw'>nil</span>
453
- <span class='kw'>end</span></pre>
451
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_format_offset identifier id'>format_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='comma token'>,</span> <span class='rubyid_colon identifier id'>colon</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span>
452
+ <span class='rubyid_offset identifier id'>offset</span> <span class='assign token'>=</span> <span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span> <span class='mult op'>*</span> <span class='integer val'>86400</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_i identifier id'>to_i</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Rational constant id'>Rational</span><span class='rparen token'>)</span>
453
+ <span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Fixnum constant id'>Fixnum</span><span class='rparen token'>)</span> <span class='question op'>?</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_seconds_to_utc_offset identifier id'>seconds_to_utc_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='comma token'>,</span> <span class='rubyid_colon identifier id'>colon</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
454
+ <span class='rubyid_end end kw'>end</span>
455
+ </pre>
454
456
  </td>
455
457
  </tr>
456
458
  </table>
@@ -555,21 +557,22 @@
555
557
  <td>
556
558
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 305</span>
557
559
 
558
- <span class='kw'>def</span> <span class='id identifier rubyid_list_all'>list_all</span><span class='lparen'>(</span><span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>=</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
559
- <span class='id identifier rubyid_dst_key'>dst_key</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>DST-</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
560
- <span class='ivar'>@zones_names</span> <span class='op'>||=</span> <span class='lbrace'>{</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</span><span class='period'>.</span><span class='id identifier rubyid_collect'>collect</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:to_s</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
560
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_list_all identifier id'>list_all</span><span class='lparen token'>(</span><span class='rubyid_with_dst identifier id'>with_dst</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
561
+ <span class='rubyid_dst_key identifier id'>dst_key</span> <span class='assign token'>=</span> <span class='dstring node'>&quot;DST-#{dst_label}&quot;</span>
562
+ <span class='rubyid_@zones_names ivar id'>@zones_names</span> <span class='opasgn op'>||=</span> <span class='lbrace token'>{</span> <span class='string val'>&quot;STANDARD&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='dot token'>.</span><span class='rubyid_all identifier id'>all</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span><span class='lparen token'>(</span><span class='bitand op'>&amp;</span><span class='symbol val'>:to_s</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span>
561
563
 
562
- <span class='kw'>if</span> <span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span> <span class='kw'>then</span>
563
- <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
564
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_with_dst identifier id'>with_dst</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='rubyid_then then kw'>then</span>
565
+ <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
564
566
 
565
- <span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_all'>all</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_zone'>zone</span><span class='op'>|</span>
566
- <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
567
- <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_dst_key'>dst_key</span><span class='rbracket'>]</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_zone'>zone</span><span class='period'>.</span><span class='id identifier rubyid_to_s_with_dst'>to_s_with_dst</span><span class='lparen'>(</span><span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</span>
568
- <span class='kw'>end</span>
569
- <span class='kw'>end</span>
567
+ <span class='colon3 op'>::</span><span class='rubyid_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='dot token'>.</span><span class='rubyid_all identifier id'>all</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_zone identifier id'>zone</span><span class='bitor op'>|</span>
568
+ <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span>
569
+ <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_dst_key identifier id'>dst_key</span><span class='rbrack token'>]</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_zone identifier id'>zone</span><span class='dot token'>.</span><span class='rubyid_to_s_with_dst identifier id'>to_s_with_dst</span><span class='lparen token'>(</span><span class='rubyid_dst_label identifier id'>dst_label</span><span class='rparen token'>)</span>
570
+ <span class='rubyid_end end kw'>end</span>
571
+ <span class='rubyid_end end kw'>end</span>
570
572
 
571
- <span class='ivar'>@zones_names</span><span class='lbracket'>[</span><span class='id identifier rubyid_with_dst'>with_dst</span> <span class='op'>?</span> <span class='id identifier rubyid_dst_key'>dst_key</span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STANDARD</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
572
- <span class='kw'>end</span></pre>
573
+ <span class='rubyid_@zones_names ivar id'>@zones_names</span><span class='lbrack token'>[</span><span class='rubyid_with_dst identifier id'>with_dst</span> <span class='integer val'>? </span><span class='rubyid_dst_key identifier id'>dst_key</span> <span class='colon op'>:</span> <span class='string val'>&quot;STANDARD&quot;</span><span class='rbrack token'>]</span>
574
+ <span class='rubyid_end end kw'>end</span>
575
+ </pre>
573
576
  </td>
574
577
  </tr>
575
578
  </table>
@@ -588,9 +591,9 @@
588
591
  <div class="discussion">
589
592
  <p>Returns a string representation of a timezone.</p>
590
593
 
591
- <pre class="code ruby"><code><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Pacific Time (US &amp; Canada)</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
592
- <span class='comment'># =&gt; &quot;-0800@pacific-time-us-canada&quot;
593
- </span></code></pre>
594
+ <pre class="code ruby"><code><span class='rubyid_DateTime constant id'>DateTime</span><span class='dot token'>.</span><span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_ActiveSupport constant id'>ActiveSupport</span><span class='colon2 op'>::</span><span class='rubyid_TimeZone constant id'>TimeZone</span><span class='lbrack token'>[</span><span class='string val'>&quot;Pacific Time (US &amp; Canada)&quot;</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
595
+ <span class='comment val'># =&gt; &quot;-0800@pacific-time-us-canada&quot;</span>
596
+ </code></pre>
594
597
 
595
598
 
596
599
  </div>
@@ -672,17 +675,18 @@
672
675
  <td>
673
676
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 330</span>
674
677
 
675
- <span class='kw'>def</span> <span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='id identifier rubyid_with_offset'>with_offset</span> <span class='op'>=</span> <span class='kw'>true</span><span class='rparen'>)</span>
676
- <span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>String</span><span class='rparen'>)</span>
677
-
678
- <span class='kw'>if</span> <span class='id identifier rubyid_tz'>tz</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^(\([a-z]+([+-])(\d{2})(:?)(\d{2})\)\s(.+))$</span><span class='regexp_end'>/i</span></span> <span class='kw'>then</span>
679
- <span class='id identifier rubyid_with_offset'>with_offset</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='backref'>$2</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='backref'>$3</span><span class='rbrace'>}</span><span class='embexpr_beg'>#{</span><span class='backref'>$5</span><span class='rbrace'>}</span><span class='tstring_content'>@</span><span class='embexpr_beg'>#{</span><span class='backref'>$6</span><span class='period'>.</span><span class='id identifier rubyid_parameterize'>parameterize</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='backref'>$6</span><span class='period'>.</span><span class='id identifier rubyid_parameterize'>parameterize</span>
680
- <span class='kw'>elsif</span> <span class='op'>!</span><span class='id identifier rubyid_with_offset'>with_offset</span> <span class='kw'>then</span>
681
- <span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^([+-]?(\d{2})(:?)(\d{2})@)</span><span class='regexp_end'>/</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>
682
- <span class='kw'>else</span>
683
- <span class='id identifier rubyid_tz'>tz</span><span class='period'>.</span><span class='id identifier rubyid_parameterize'>parameterize</span>
684
- <span class='kw'>end</span>
685
- <span class='kw'>end</span></pre>
678
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_tz identifier id'>tz</span><span class='comma token'>,</span> <span class='rubyid_with_offset identifier id'>with_offset</span> <span class='assign token'>=</span> <span class='rubyid_true true kw'>true</span><span class='rparen token'>)</span>
679
+ <span class='rubyid_tz identifier id'>tz</span> <span class='assign token'>=</span> <span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_String constant id'>String</span><span class='rparen token'>)</span>
680
+
681
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_tz identifier id'>tz</span> <span class='match op'>=~</span> <span class='regexp val'>/^(\([a-z]+([+-])(\d{2})(:?)(\d{2})\)\s(.+))$/i</span> <span class='rubyid_then then kw'>then</span>
682
+ <span class='rubyid_with_offset identifier id'>with_offset</span> <span class='integer val'>? </span><span class='dstring node'>&quot;#{$2}#{$3}#{$5}@#{$6.parameterize}&quot;</span> <span class='colon op'>:</span> <span class='rubyid_$6 nth_ref id'>$6</span><span class='dot token'>.</span><span class='rubyid_parameterize identifier id'>parameterize</span>
683
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='notop op'>!</span><span class='rubyid_with_offset identifier id'>with_offset</span> <span class='rubyid_then then kw'>then</span>
684
+ <span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/^([+-]?(\d{2})(:?)(\d{2})@)/</span><span class='comma token'>,</span> <span class='string val'>&quot;&quot;</span><span class='rparen token'>)</span>
685
+ <span class='rubyid_else else kw'>else</span>
686
+ <span class='rubyid_tz identifier id'>tz</span><span class='dot token'>.</span><span class='rubyid_parameterize identifier id'>parameterize</span>
687
+ <span class='rubyid_end end kw'>end</span>
688
+ <span class='rubyid_end end kw'>end</span>
689
+ </pre>
686
690
  </td>
687
691
  </tr>
688
692
  </table>
@@ -757,10 +761,11 @@
757
761
  <td>
758
762
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 270</span>
759
763
 
760
- <span class='kw'>def</span> <span class='id identifier rubyid_rationalize_offset'>rationalize_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span><span class='rparen'>)</span>
761
- <span class='id identifier rubyid_offset'>offset</span> <span class='op'>=</span> <span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_try'>try</span><span class='lparen'>(</span><span class='symbol'>:offset</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>Fixnum</span><span class='rparen'>)</span>
762
- <span class='op'>::</span><span class='const'>TZInfo</span><span class='op'>::</span><span class='const'>OffsetRationals</span><span class='period'>.</span><span class='id identifier rubyid_rational_for_offset'>rational_for_offset</span><span class='lparen'>(</span><span class='id identifier rubyid_offset'>offset</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='rparen'>)</span>
763
- <span class='kw'>end</span></pre>
764
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_rationalize_offset identifier id'>rationalize_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='rparen token'>)</span>
765
+ <span class='rubyid_offset identifier id'>offset</span> <span class='assign token'>=</span> <span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_try identifier id'>try</span><span class='lparen token'>(</span><span class='symbol val'>:offset</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Fixnum constant id'>Fixnum</span><span class='rparen token'>)</span>
766
+ <span class='colon3 op'>::</span><span class='rubyid_TZInfo constant id'>TZInfo</span><span class='colon2 op'>::</span><span class='rubyid_OffsetRationals constant id'>OffsetRationals</span><span class='dot token'>.</span><span class='rubyid_rational_for_offset identifier id'>rational_for_offset</span><span class='lparen token'>(</span><span class='rubyid_offset identifier id'>offset</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span><span class='rparen token'>)</span>
767
+ <span class='rubyid_end end kw'>end</span>
768
+ </pre>
764
769
  </td>
765
770
  </tr>
766
771
  </table>
@@ -889,23 +894,24 @@
889
894
  <td>
890
895
  <pre class="code"><span class="info file"># File 'lib/cowtech-extensions/datetime.rb', line 349</span>
891
896
 
892
- <span class='kw'>def</span> <span class='id identifier rubyid_unparameterize_zone'>unparameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='id identifier rubyid_as_string'>as_string</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
893
- <span class='id identifier rubyid_tz'>tz</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_tz'>tz</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span>
897
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_unparameterize_zone identifier id'>unparameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_tz identifier id'>tz</span><span class='comma token'>,</span> <span class='rubyid_as_string identifier id'>as_string</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
898
+ <span class='rubyid_tz identifier id'>tz</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_tz identifier id'>tz</span><span class='comma token'>,</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
894
899
 
895
- <span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='id identifier rubyid_catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='rparen'>)</span> <span class='kw'>do</span>
896
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_list_all'>list_all</span><span class='lparen'>(</span><span class='kw'>true</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</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_zone'>zone</span><span class='op'>|</span>
897
- <span class='id identifier rubyid_throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:zone</span><span class='comma'>,</span> <span class='id identifier rubyid_zone'>zone</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_parameterize_zone'>parameterize_zone</span><span class='lparen'>(</span><span class='id identifier rubyid_zone'>zone</span><span class='comma'>,</span> <span class='kw'>false</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='id identifier rubyid_tz'>tz</span>
898
- <span class='kw'>end</span>
900
+ <span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_catch identifier id'>catch</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
901
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_list_all identifier id'>list_all</span><span class='lparen token'>(</span><span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_each identifier id'>each</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_zone identifier id'>zone</span><span class='bitor op'>|</span>
902
+ <span class='rubyid_throw identifier id'>throw</span><span class='lparen token'>(</span><span class='symbol val'>:zone</span><span class='comma token'>,</span> <span class='rubyid_zone identifier id'>zone</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_parameterize_zone identifier id'>parameterize_zone</span><span class='lparen token'>(</span><span class='rubyid_zone identifier id'>zone</span><span class='comma token'>,</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span> <span class='eq op'>==</span> <span class='rubyid_tz identifier id'>tz</span>
903
+ <span class='rubyid_end end kw'>end</span>
899
904
 
900
- <span class='kw'>nil</span>
901
- <span class='kw'>end</span>
905
+ <span class='rubyid_nil nil kw'>nil</span>
906
+ <span class='rubyid_end end kw'>end</span>
902
907
 
903
- <span class='kw'>if</span> <span class='id identifier rubyid_rv'>rv</span> <span class='kw'>then</span>
904
- <span class='lparen'>(</span><span class='id identifier rubyid_as_string'>as_string</span> <span class='op'>?</span> <span class='id identifier rubyid_rv'>rv</span> <span class='op'>:</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_find'>find</span><span class='lparen'>(</span><span class='id identifier rubyid_rv'>rv</span><span class='comma'>,</span> <span class='id identifier rubyid_dst_label'>dst_label</span><span class='rparen'>)</span><span class='rparen'>)</span>
905
- <span class='kw'>else</span>
906
- <span class='kw'>nil</span>
907
- <span class='kw'>end</span>
908
- <span class='kw'>end</span></pre>
908
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_rv identifier id'>rv</span> <span class='rubyid_then then kw'>then</span>
909
+ <span class='lparen token'>(</span><span class='rubyid_as_string identifier id'>as_string</span> <span class='integer val'>? </span><span class='rubyid_rv identifier id'>rv</span> <span class='colon op'>:</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_find identifier id'>find</span><span class='lparen token'>(</span><span class='rubyid_rv identifier id'>rv</span><span class='comma token'>,</span> <span class='rubyid_dst_label identifier id'>dst_label</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
910
+ <span class='rubyid_else else kw'>else</span>
911
+ <span class='rubyid_nil nil kw'>nil</span>
912
+ <span class='rubyid_end end kw'>end</span>
913
+ <span class='rubyid_end end kw'>end</span>
914
+ </pre>
909
915
  </td>
910
916
  </tr>
911
917
  </table>
@@ -916,9 +922,9 @@
916
922
  </div>
917
923
 
918
924
  <div id="footer">
919
- Generated on Thu Jul 19 17:17:51 2012 by
925
+ Generated on Fri Jul 20 10:23:57 2012 by
920
926
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
921
- 0.8.2.1 (ruby-1.9.2).
927
+ 0.8.2.1 (ruby-1.8.7).
922
928
  </div>
923
929
 
924
930
  </body>
@@ -119,7 +119,8 @@
119
119
 
120
120
  </div>
121
121
  </dt>
122
- <dd><pre class="code"><span class='int'>2</span></pre></dd>
122
+ <dd><pre class="code"><span class='integer val'>2</span>
123
+ </pre></dd>
123
124
 
124
125
  <dt id="MINOR-constant" class="">MINOR =
125
126
  <div class="docstring">
@@ -134,7 +135,8 @@
134
135
 
135
136
  </div>
136
137
  </dt>
137
- <dd><pre class="code"><span class='int'>5</span></pre></dd>
138
+ <dd><pre class="code"><span class='integer val'>5</span>
139
+ </pre></dd>
138
140
 
139
141
  <dt id="PATCH-constant" class="">PATCH =
140
142
  <div class="docstring">
@@ -149,7 +151,8 @@
149
151
 
150
152
  </div>
151
153
  </dt>
152
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
154
+ <dd><pre class="code"><span class='integer val'>1</span>
155
+ </pre></dd>
153
156
 
154
157
  <dt id="STRING-constant" class="">STRING =
155
158
  <div class="docstring">
@@ -164,7 +167,8 @@
164
167
 
165
168
  </div>
166
169
  </dt>
167
- <dd><pre class="code"><span class='lbracket'>[</span><span class='const'>MAJOR</span><span class='comma'>,</span> <span class='const'>MINOR</span><span class='comma'>,</span> <span class='const'>PATCH</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span></pre></dd>
170
+ <dd><pre class="code"><span class='lbrack token'>[</span><span class='rubyid_MAJOR constant id'>MAJOR</span><span class='comma token'>,</span> <span class='rubyid_MINOR constant id'>MINOR</span><span class='comma token'>,</span> <span class='rubyid_PATCH constant id'>PATCH</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_join identifier id'>join</span><span class='lparen token'>(</span><span class='string val'>&quot;.&quot;</span><span class='rparen token'>)</span>
171
+ </pre></dd>
168
172
 
169
173
  </dl>
170
174
 
@@ -180,9 +184,9 @@
180
184
  </div>
181
185
 
182
186
  <div id="footer">
183
- Generated on Thu Jul 19 17:17:50 2012 by
187
+ Generated on Fri Jul 20 10:23:56 2012 by
184
188
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
- 0.8.2.1 (ruby-1.9.2).
189
+ 0.8.2.1 (ruby-1.8.7).
186
190
  </div>
187
191
 
188
192
  </body>
data/doc/_index.html CHANGED
@@ -296,9 +296,9 @@
296
296
  </div>
297
297
 
298
298
  <div id="footer">
299
- Generated on Thu Jul 19 17:17:50 2012 by
299
+ Generated on Fri Jul 20 10:23:55 2012 by
300
300
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
301
- 0.8.2.1 (ruby-1.9.2).
301
+ 0.8.2.1 (ruby-1.8.7).
302
302
  </div>
303
303
 
304
304
  </body>
data/doc/file.README.html CHANGED
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -68,8 +68,8 @@
68
68
 
69
69
  <h2>Usage</h2>
70
70
 
71
- <pre class="code ruby"><code><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cowtech-extensions</span><span class='tstring_end'>&quot;</span></span>
72
- <span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_load!'>load!</span>
71
+ <pre class="code ruby"><code><span class='rubyid_require identifier id'>require</span> <span class='string val'>&quot;cowtech-extensions&quot;</span>
72
+ <span class='rubyid_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</span><span class='dot token'>.</span><span class='rubyid_load! fid id'>load!</span>
73
73
  </code></pre>
74
74
 
75
75
  <p>That&#39;s all!
@@ -94,9 +94,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
94
94
  </div></div>
95
95
 
96
96
  <div id="footer">
97
- Generated on Thu Jul 19 17:17:50 2012 by
97
+ Generated on Fri Jul 20 10:23:55 2012 by
98
98
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
99
- 0.8.2.1 (ruby-1.9.2).
99
+ 0.8.2.1 (ruby-1.8.7).
100
100
  </div>
101
101
 
102
102
  </body>
data/doc/index.html CHANGED
@@ -2,7 +2,7 @@
2
2
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
3
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
4
  <head>
5
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
5
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
7
  File: README
8
8
 
@@ -68,8 +68,8 @@
68
68
 
69
69
  <h2>Usage</h2>
70
70
 
71
- <pre class="code ruby"><code><span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>cowtech-extensions</span><span class='tstring_end'>&quot;</span></span>
72
- <span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='period'>.</span><span class='id identifier rubyid_load!'>load!</span>
71
+ <pre class="code ruby"><code><span class='rubyid_require identifier id'>require</span> <span class='string val'>&quot;cowtech-extensions&quot;</span>
72
+ <span class='rubyid_Cowtech constant id'>Cowtech</span><span class='colon2 op'>::</span><span class='rubyid_Extensions constant id'>Extensions</span><span class='dot token'>.</span><span class='rubyid_load! fid id'>load!</span>
73
73
  </code></pre>
74
74
 
75
75
  <p>That&#39;s all!
@@ -94,9 +94,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
94
94
  </div></div>
95
95
 
96
96
  <div id="footer">
97
- Generated on Thu Jul 19 17:17:50 2012 by
97
+ Generated on Fri Jul 20 10:23:55 2012 by
98
98
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
99
- 0.8.2.1 (ruby-1.9.2).
99
+ 0.8.2.1 (ruby-1.8.7).
100
100
  </div>
101
101
 
102
102
  </body>
@@ -103,9 +103,9 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Thu Jul 19 17:17:50 2012 by
106
+ Generated on Fri Jul 20 10:23:55 2012 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.2.1 (ruby-1.9.2).
108
+ 0.8.2.1 (ruby-1.8.7).
109
109
  </div>
110
110
 
111
111
  </body>
@@ -7,6 +7,7 @@
7
7
  $KCODE='UTF8' if RUBY_VERSION < '1.9'
8
8
 
9
9
  require "json"
10
+ require "tzinfo"
10
11
  require "active_support/all"
11
12
  require "action_view"
12
13
 
@@ -53,7 +54,10 @@ module Cowtech
53
54
  what = ["object", "boolean", "string", "hash", "datetime", "math", "pathname"] if what.count == 0
54
55
  what.collect! { |w| w.to_s }
55
56
 
56
- yield if block_given?
57
+ # Dependency resolving
58
+ what << "object" if what.include?("datetime")
59
+ what << "object" if what.include?("math")
60
+ what.compact.uniq!
57
61
 
58
62
  if what.include?("object") then
59
63
  ::Object.class_eval do
@@ -117,6 +121,8 @@ module Cowtech
117
121
  end
118
122
  end
119
123
 
124
+ yield if block_given?
125
+
120
126
  ::Cowtech::Extensions::Settings.instance
121
127
  end
122
128
  end
@@ -24,15 +24,15 @@ module Cowtech
24
24
  #
25
25
  # @return [Settings] The singleton instance of the settings.
26
26
  def self.instance
27
- @instance ||= self.new
27
+ @instance ||= self.new()
28
28
  end
29
29
 
30
30
  # Initializes a new settings object.
31
31
  def initialize
32
- self.setup_format_number
33
- self.setup_boolean_names
34
- self.setup_date_formats
35
- self.setup_date_names
32
+ self.setup_format_number()
33
+ self.setup_boolean_names()
34
+ self.setup_date_formats()
35
+ self.setup_date_names()
36
36
  end
37
37
 
38
38
  # Setups formatters for a number.
@@ -78,7 +78,7 @@ module Cowtech
78
78
  :ct_iso_8601 => "%FT%T%z"
79
79
  } if formats.blank?
80
80
 
81
- if formats.is_a?(Hash) then
81
+ if formats.is_a?(::Hash) then
82
82
  if !replace then
83
83
  @date_formats ||= {}
84
84
  @date_formats.merge!(formats)
@@ -5,22 +5,22 @@
5
5
  #
6
6
 
7
7
  module Cowtech
8
- module Extensions
8
+ module Extensions
9
9
  # The current version of cowtech-extensions, according semantic versioning.
10
10
  #
11
11
  # @see http://semver.org
12
- module Version
12
+ module Version
13
13
  # The major version.
14
- MAJOR = 2
14
+ MAJOR = 2
15
15
 
16
16
  # The minor version.
17
- MINOR = 5
17
+ MINOR = 5
18
18
 
19
19
  # The patch version.
20
- PATCH = 0
20
+ PATCH = 1
21
21
 
22
22
  # The current version of cowtech-extensions.
23
- STRING = [MAJOR, MINOR, PATCH].compact.join(".")
24
- end
25
- end
23
+ STRING = [MAJOR, MINOR, PATCH].compact.join(".")
24
+ end
25
+ end
26
26
  end
@@ -15,6 +15,23 @@ describe Cowtech::Extensions::Settings do
15
15
  Cowtech::Extensions.load!
16
16
  end
17
17
 
18
+ describe "#initialize" do
19
+ it "should create good defaults" do
20
+ settings = ::Cowtech::Extensions::Settings.new
21
+ settings.format_number.should be_a(Hash)
22
+ settings.boolean_names.should be_a(Hash)
23
+ settings.date_names.should be_a(Hash)
24
+ settings.date_formats.should be_a(Hash)
25
+ end
26
+
27
+ it "should create good defaults for the singleton" do
28
+ reference.format_number.should be_a(Hash)
29
+ reference.boolean_names.should be_a(Hash)
30
+ reference.date_names.should be_a(Hash)
31
+ reference.date_formats.should be_a(Hash)
32
+ end
33
+ end
34
+
18
35
  describe "#setup_format_number" do
19
36
  it "should save format numbering options for usage" do
20
37
  reference.setup_format_number(2)
metadata CHANGED
@@ -1,167 +1,176 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: cowtech-extensions
3
- version: !ruby/object:Gem::Version
4
- version: 2.5.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 25
5
5
  prerelease:
6
+ segments:
7
+ - 2
8
+ - 5
9
+ - 1
10
+ version: 2.5.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Shogun
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2012-07-19 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
17
+
18
+ date: 2012-07-20 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: json
16
- requirement: !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
19
- - - ~>
20
- - !ruby/object:Gem::Version
21
- version: 1.7.0
22
- type: :runtime
23
22
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
23
+ requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
- requirements:
25
+ requirements:
27
26
  - - ~>
28
- - !ruby/object:Gem::Version
27
+ - !ruby/object:Gem::Version
28
+ hash: 11
29
+ segments:
30
+ - 1
31
+ - 7
32
+ - 0
29
33
  version: 1.7.0
30
- - !ruby/object:Gem::Dependency
31
- name: actionpack
32
- requirement: !ruby/object:Gem::Requirement
33
- none: false
34
- requirements:
35
- - - ~>
36
- - !ruby/object:Gem::Version
37
- version: '3.0'
38
34
  type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: actionpack
39
38
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ~>
44
- - !ruby/object:Gem::Version
45
- version: '3.0'
46
- - !ruby/object:Gem::Dependency
47
- name: tzinfo
48
- requirement: !ruby/object:Gem::Requirement
39
+ requirement: &id002 !ruby/object:Gem::Requirement
49
40
  none: false
50
- requirements:
41
+ requirements:
51
42
  - - ~>
52
- - !ruby/object:Gem::Version
53
- version: 0.3.0
43
+ - !ruby/object:Gem::Version
44
+ hash: 7
45
+ segments:
46
+ - 3
47
+ - 0
48
+ version: "3.0"
54
49
  type: :runtime
50
+ version_requirements: *id002
51
+ - !ruby/object:Gem::Dependency
52
+ name: tzinfo
55
53
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
54
+ requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
58
- requirements:
56
+ requirements:
59
57
  - - ~>
60
- - !ruby/object:Gem::Version
58
+ - !ruby/object:Gem::Version
59
+ hash: 19
60
+ segments:
61
+ - 0
62
+ - 3
63
+ - 0
61
64
  version: 0.3.0
62
- - !ruby/object:Gem::Dependency
65
+ type: :runtime
66
+ version_requirements: *id003
67
+ - !ruby/object:Gem::Dependency
63
68
  name: rspec
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ~>
68
- - !ruby/object:Gem::Version
69
- version: 2.11.0
70
- type: :development
71
69
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
70
+ requirement: &id004 !ruby/object:Gem::Requirement
73
71
  none: false
74
- requirements:
72
+ requirements:
75
73
  - - ~>
76
- - !ruby/object:Gem::Version
74
+ - !ruby/object:Gem::Version
75
+ hash: 35
76
+ segments:
77
+ - 2
78
+ - 11
79
+ - 0
77
80
  version: 2.11.0
78
- - !ruby/object:Gem::Dependency
79
- name: simplecov
80
- requirement: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ~>
84
- - !ruby/object:Gem::Version
85
- version: 0.6.0
86
81
  type: :development
82
+ version_requirements: *id004
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
87
85
  prerelease: false
88
- version_requirements: !ruby/object:Gem::Requirement
86
+ requirement: &id005 !ruby/object:Gem::Requirement
89
87
  none: false
90
- requirements:
88
+ requirements:
91
89
  - - ~>
92
- - !ruby/object:Gem::Version
90
+ - !ruby/object:Gem::Version
91
+ hash: 7
92
+ segments:
93
+ - 0
94
+ - 6
95
+ - 0
93
96
  version: 0.6.0
94
- - !ruby/object:Gem::Dependency
95
- name: pry
96
- requirement: !ruby/object:Gem::Requirement
97
- none: false
98
- requirements:
99
- - - ~>
100
- - !ruby/object:Gem::Version
101
- version: 0.9.9.0
102
97
  type: :development
98
+ version_requirements: *id005
99
+ - !ruby/object:Gem::Dependency
100
+ name: pry
103
101
  prerelease: false
104
- version_requirements: !ruby/object:Gem::Requirement
102
+ requirement: &id006 !ruby/object:Gem::Requirement
105
103
  none: false
106
- requirements:
104
+ requirements:
107
105
  - - ~>
108
- - !ruby/object:Gem::Version
106
+ - !ruby/object:Gem::Version
107
+ hash: 35
108
+ segments:
109
+ - 0
110
+ - 9
111
+ - 9
112
+ - 0
109
113
  version: 0.9.9.0
110
- - !ruby/object:Gem::Dependency
111
- name: yard
112
- requirement: !ruby/object:Gem::Requirement
113
- none: false
114
- requirements:
115
- - - ~>
116
- - !ruby/object:Gem::Version
117
- version: 0.8.0
118
114
  type: :development
115
+ version_requirements: *id006
116
+ - !ruby/object:Gem::Dependency
117
+ name: yard
119
118
  prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
119
+ requirement: &id007 !ruby/object:Gem::Requirement
121
120
  none: false
122
- requirements:
121
+ requirements:
123
122
  - - ~>
124
- - !ruby/object:Gem::Version
123
+ - !ruby/object:Gem::Version
124
+ hash: 63
125
+ segments:
126
+ - 0
127
+ - 8
128
+ - 0
125
129
  version: 0.8.0
126
- - !ruby/object:Gem::Dependency
127
- name: redcarpet
128
- requirement: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- version: 2.1.0
134
130
  type: :development
131
+ version_requirements: *id007
132
+ - !ruby/object:Gem::Dependency
133
+ name: redcarpet
135
134
  prerelease: false
136
- version_requirements: !ruby/object:Gem::Requirement
135
+ requirement: &id008 !ruby/object:Gem::Requirement
137
136
  none: false
138
- requirements:
137
+ requirements:
139
138
  - - ~>
140
- - !ruby/object:Gem::Version
139
+ - !ruby/object:Gem::Version
140
+ hash: 11
141
+ segments:
142
+ - 2
143
+ - 1
144
+ - 0
141
145
  version: 2.1.0
142
- - !ruby/object:Gem::Dependency
143
- name: github-markup
144
- requirement: !ruby/object:Gem::Requirement
145
- none: false
146
- requirements:
147
- - - ~>
148
- - !ruby/object:Gem::Version
149
- version: 0.7.0
150
146
  type: :development
147
+ version_requirements: *id008
148
+ - !ruby/object:Gem::Dependency
149
+ name: github-markup
151
150
  prerelease: false
152
- version_requirements: !ruby/object:Gem::Requirement
151
+ requirement: &id009 !ruby/object:Gem::Requirement
153
152
  none: false
154
- requirements:
153
+ requirements:
155
154
  - - ~>
156
- - !ruby/object:Gem::Version
155
+ - !ruby/object:Gem::Version
156
+ hash: 3
157
+ segments:
158
+ - 0
159
+ - 7
160
+ - 0
157
161
  version: 0.7.0
162
+ type: :development
163
+ version_requirements: *id009
158
164
  description: Several Ruby object enhancements.
159
- email:
165
+ email:
160
166
  - shogun_panda@me.com
161
167
  executables: []
168
+
162
169
  extensions: []
170
+
163
171
  extra_rdoc_files: []
164
- files:
172
+
173
+ files:
165
174
  - .gitignore
166
175
  - .yardopts
167
176
  - Gemfile
@@ -224,29 +233,38 @@ files:
224
233
  - spec/spec_helper.rb
225
234
  homepage: http://github.com/ShogunPanda/cowtech-extensions
226
235
  licenses: []
236
+
227
237
  post_install_message:
228
238
  rdoc_options: []
229
- require_paths:
239
+
240
+ require_paths:
230
241
  - lib
231
- required_ruby_version: !ruby/object:Gem::Requirement
242
+ required_ruby_version: !ruby/object:Gem::Requirement
232
243
  none: false
233
- requirements:
234
- - - ! '>='
235
- - !ruby/object:Gem::Version
236
- version: '0'
237
- required_rubygems_version: !ruby/object:Gem::Requirement
244
+ requirements:
245
+ - - ">="
246
+ - !ruby/object:Gem::Version
247
+ hash: 3
248
+ segments:
249
+ - 0
250
+ version: "0"
251
+ required_rubygems_version: !ruby/object:Gem::Requirement
238
252
  none: false
239
- requirements:
240
- - - ! '>='
241
- - !ruby/object:Gem::Version
242
- version: '0'
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ hash: 3
257
+ segments:
258
+ - 0
259
+ version: "0"
243
260
  requirements: []
261
+
244
262
  rubyforge_project: cowtech-extensions
245
263
  rubygems_version: 1.8.24
246
264
  signing_key:
247
265
  specification_version: 3
248
266
  summary: Several Ruby object enhancements.
249
- test_files:
267
+ test_files:
250
268
  - spec/coverage_helper.rb
251
269
  - spec/cowtech-extensions/boolean_spec.rb
252
270
  - spec/cowtech-extensions/datetime_spec.rb