devdnsd 1.5.0 → 1.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +15 -15
- data/README.md +1 -0
- data/devdnsd.gemspec +1 -1
- data/doc/DevDNSd/Application.html +291 -268
- data/doc/DevDNSd/Configuration.html +19 -17
- data/doc/DevDNSd/Errors/InvalidRule.html +2 -2
- data/doc/DevDNSd/Errors.html +2 -2
- data/doc/DevDNSd/Rule.html +84 -71
- data/doc/DevDNSd/Version.html +10 -6
- data/doc/DevDNSd.html +2 -2
- data/doc/_index.html +2 -2
- data/doc/file.README.html +5 -4
- data/doc/index.html +5 -4
- data/doc/top-level-namespace.html +2 -2
- data/lib/devdnsd/version.rb +1 -1
- metadata +169 -160
@@ -197,7 +197,7 @@ A configuration file is a plain Ruby file with a top-level <span class='object_l
|
|
197
197
|
|
198
198
|
<p>Example:</p>
|
199
199
|
|
200
|
-
<pre class="code ruby"><code><span class='
|
200
|
+
<pre class="code ruby"><code><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_add_rule identifier id'>add_rule</span><span class='lparen token'>(</span><span class='string val'>"match.dev"</span><span class='comma token'>,</span> <span class='string val'>"10.0.0.1"</span><span class='rparen token'>)</span>
|
201
201
|
</code></pre>
|
202
202
|
|
203
203
|
|
@@ -283,18 +283,19 @@ A configuration file is a plain Ruby file with a top-level <span class='object_l
|
|
283
283
|
<td>
|
284
284
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 43</span>
|
285
285
|
|
286
|
-
<span class='kw'>def</span> <span class='
|
287
|
-
<span class='kw'>super</span><span class='lparen'>(</span><span class='
|
286
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_file identifier id'>file</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_overrides identifier id'>overrides</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
|
287
|
+
<span class='rubyid_super super kw'>super</span><span class='lparen token'>(</span><span class='rubyid_file identifier id'>file</span><span class='comma token'>,</span> <span class='rubyid_overrides identifier id'>overrides</span><span class='comma token'>,</span> <span class='rubyid_logger identifier id'>logger</span><span class='rparen token'>)</span>
|
288
288
|
|
289
|
-
<span class='comment'># Make sure some arguments are of correct type
|
290
|
-
|
291
|
-
<span class='kw'>self</span><span class='
|
292
|
-
<span class='kw'>self</span><span class='
|
293
|
-
<span class='kw'>self</span><span class='
|
289
|
+
<span class='comment val'># Make sure some arguments are of correct type</span>
|
290
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_log_file identifier id'>log_file</span> <span class='assign token'>=</span> <span class='rubyid_$stdout gvar id'>$stdout</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_log_file identifier id'>log_file</span> <span class='eq op'>==</span> <span class='string val'>"STDOUT"</span>
|
291
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_log_file identifier id'>log_file</span> <span class='assign token'>=</span> <span class='rubyid_$stderr gvar id'>$stderr</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_log_file identifier id'>log_file</span> <span class='eq op'>==</span> <span class='string val'>"STDERR"</span>
|
292
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_port identifier id'>port</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_port identifier id'>port</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span>
|
293
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_log_level identifier id'>log_level</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_log_level identifier id'>log_level</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span>
|
294
294
|
|
295
|
-
<span class='comment'># Add a default rule
|
296
|
-
|
297
|
-
<span class='kw'>end</span
|
295
|
+
<span class='comment val'># Add a default rule</span>
|
296
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_add_rule identifier id'>add_rule</span><span class='lparen token'>(</span><span class='regexp val'>/.+/</span><span class='comma token'>,</span> <span class='string val'>"127.0.0.1"</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_rules identifier id'>rules</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span>
|
297
|
+
<span class='rubyid_end end kw'>end</span>
|
298
|
+
</pre>
|
298
299
|
</td>
|
299
300
|
</tr>
|
300
301
|
</table>
|
@@ -398,10 +399,11 @@ A configuration file is a plain Ruby file with a top-level <span class='object_l
|
|
398
399
|
<td>
|
399
400
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 62</span>
|
400
401
|
|
401
|
-
<span class='kw'>def</span> <span class='
|
402
|
-
<span class='ivar'>@rules</span> <span class='op'>||=</span> <span class='
|
403
|
-
<span class='ivar'>@rules</span> <span class='op'><<</span> <span class='
|
404
|
-
<span class='kw'>end</span
|
402
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_add_rule identifier id'>add_rule</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
403
|
+
<span class='rubyid_@rules ivar id'>@rules</span> <span class='opasgn op'>||=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
404
|
+
<span class='rubyid_@rules ivar id'>@rules</span> <span class='lshft op'><<</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Rule constant id'>Rule</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
405
|
+
<span class='rubyid_end end kw'>end</span>
|
406
|
+
</pre>
|
405
407
|
</td>
|
406
408
|
</tr>
|
407
409
|
</table>
|
@@ -412,9 +414,9 @@ A configuration file is a plain Ruby file with a top-level <span class='object_l
|
|
412
414
|
</div>
|
413
415
|
|
414
416
|
<div id="footer">
|
415
|
-
Generated on
|
417
|
+
Generated on Sat Oct 6 08:58:34 2012 by
|
416
418
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
417
|
-
0.8.2.1 (ruby-1.
|
419
|
+
0.8.2.1 (ruby-1.8.7).
|
418
420
|
</div>
|
419
421
|
|
420
422
|
</body>
|
@@ -124,9 +124,9 @@
|
|
124
124
|
</div>
|
125
125
|
|
126
126
|
<div id="footer">
|
127
|
-
Generated on
|
127
|
+
Generated on Sat Oct 6 08:58:33 2012 by
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
|
-
0.8.2.1 (ruby-1.
|
129
|
+
0.8.2.1 (ruby-1.8.7).
|
130
130
|
</div>
|
131
131
|
|
132
132
|
</body>
|
data/doc/DevDNSd/Errors.html
CHANGED
@@ -116,9 +116,9 @@
|
|
116
116
|
</div>
|
117
117
|
|
118
118
|
<div id="footer">
|
119
|
-
Generated on
|
119
|
+
Generated on Sat Oct 6 08:58:33 2012 by
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
-
0.8.2.1 (ruby-1.
|
121
|
+
0.8.2.1 (ruby-1.8.7).
|
122
122
|
</div>
|
123
123
|
|
124
124
|
</body>
|
data/doc/DevDNSd/Rule.html
CHANGED
@@ -608,18 +608,19 @@
|
|
608
608
|
<td>
|
609
609
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 39</span>
|
610
610
|
|
611
|
-
<span class='kw'>def</span> <span class='
|
612
|
-
<span class='
|
613
|
-
<span class='
|
614
|
-
<span class='ivar'>@match</span> <span class='
|
615
|
-
<span class='ivar'>@type</span> <span class='
|
616
|
-
<span class='ivar'>@reply</span> <span class='
|
617
|
-
<span class='ivar'>@options</span> <span class='
|
618
|
-
<span class='ivar'>@block</span> <span class='
|
619
|
-
|
620
|
-
<span class='
|
621
|
-
<span class='
|
622
|
-
<span class='kw'>end</span
|
611
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_match identifier id'>match</span> <span class='assign token'>=</span> <span class='regexp val'>/.+/</span><span class='comma token'>,</span> <span class='rubyid_reply identifier id'>reply</span> <span class='assign token'>=</span> <span class='string val'>"127.0.0.1"</span><span class='comma token'>,</span> <span class='rubyid_type identifier id'>type</span> <span class='assign token'>=</span> <span class='symbol val'>:A</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
612
|
+
<span class='rubyid_reply identifier id'>reply</span> <span class='opasgn op'>||=</span> <span class='string val'>"127.0.0.1"</span>
|
613
|
+
<span class='rubyid_type identifier id'>type</span> <span class='opasgn op'>||=</span> <span class='symbol val'>:A</span>
|
614
|
+
<span class='rubyid_@match ivar id'>@match</span> <span class='assign token'>=</span> <span class='rubyid_match identifier id'>match</span>
|
615
|
+
<span class='rubyid_@type ivar id'>@type</span> <span class='assign token'>=</span> <span class='rubyid_type identifier id'>type</span>
|
616
|
+
<span class='rubyid_@reply ivar id'>@reply</span> <span class='assign token'>=</span> <span class='rubyid_block identifier id'>block</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='integer val'>? </span><span class='rubyid_reply identifier id'>reply</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span>
|
617
|
+
<span class='rubyid_@options ivar id'>@options</span> <span class='assign token'>=</span> <span class='rubyid_options identifier id'>options</span>
|
618
|
+
<span class='rubyid_@block ivar id'>@block</span> <span class='assign token'>=</span> <span class='rubyid_block identifier id'>block</span>
|
619
|
+
|
620
|
+
<span class='rubyid_raise identifier id'>raise</span><span class='lparen token'>(</span><span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidRule constant id'>InvalidRule</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"You must specify at least a rule and a host (also via a block). Optionally you can add a record type (default: A) and the options."</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_@reply ivar id'>@reply</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='andop op'>&&</span> <span class='rubyid_@block ivar id'>@block</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
621
|
+
<span class='rubyid_raise identifier id'>raise</span><span class='lparen token'>(</span><span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidRule constant id'>InvalidRule</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"You can only use hashs for options."</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_@options ivar id'>@options</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_Hash constant id'>Hash</span><span class='rparen token'>)</span>
|
622
|
+
<span class='rubyid_end end kw'>end</span>
|
623
|
+
</pre>
|
623
624
|
</td>
|
624
625
|
</tr>
|
625
626
|
</table>
|
@@ -671,9 +672,10 @@
|
|
671
672
|
<td>
|
672
673
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 29</span>
|
673
674
|
|
674
|
-
<span class='kw'>def</span> <span class='
|
675
|
-
<span class='ivar'>@block</span>
|
676
|
-
<span class='kw'>end</span
|
675
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_block identifier id'>block</span>
|
676
|
+
<span class='rubyid_@block ivar id'>@block</span>
|
677
|
+
<span class='rubyid_end end kw'>end</span>
|
678
|
+
</pre>
|
677
679
|
</td>
|
678
680
|
</tr>
|
679
681
|
</table>
|
@@ -713,9 +715,10 @@
|
|
713
715
|
<td>
|
714
716
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 11</span>
|
715
717
|
|
716
|
-
<span class='kw'>def</span> <span class='
|
717
|
-
<span class='ivar'>@match</span>
|
718
|
-
<span class='kw'>end</span
|
718
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_match identifier id'>match</span>
|
719
|
+
<span class='rubyid_@match ivar id'>@match</span>
|
720
|
+
<span class='rubyid_end end kw'>end</span>
|
721
|
+
</pre>
|
719
722
|
</td>
|
720
723
|
</tr>
|
721
724
|
</table>
|
@@ -755,9 +758,10 @@
|
|
755
758
|
<td>
|
756
759
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 24</span>
|
757
760
|
|
758
|
-
<span class='kw'>def</span> <span class='
|
759
|
-
<span class='ivar'>@options</span>
|
760
|
-
<span class='kw'>end</span
|
761
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_options identifier id'>options</span>
|
762
|
+
<span class='rubyid_@options ivar id'>@options</span>
|
763
|
+
<span class='rubyid_end end kw'>end</span>
|
764
|
+
</pre>
|
761
765
|
</td>
|
762
766
|
</tr>
|
763
767
|
</table>
|
@@ -804,9 +808,10 @@
|
|
804
808
|
<td>
|
805
809
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 21</span>
|
806
810
|
|
807
|
-
<span class='kw'>def</span> <span class='
|
808
|
-
<span class='ivar'>@reply</span>
|
809
|
-
<span class='kw'>end</span
|
811
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_reply identifier id'>reply</span>
|
812
|
+
<span class='rubyid_@reply ivar id'>@reply</span>
|
813
|
+
<span class='rubyid_end end kw'>end</span>
|
814
|
+
</pre>
|
810
815
|
</td>
|
811
816
|
</tr>
|
812
817
|
</table>
|
@@ -853,9 +858,10 @@
|
|
853
858
|
<td>
|
854
859
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 16</span>
|
855
860
|
|
856
|
-
<span class='kw'>def</span> <span class='
|
857
|
-
<span class='ivar'>@type</span>
|
858
|
-
<span class='kw'>end</span
|
861
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_type identifier id'>type</span>
|
862
|
+
<span class='rubyid_@type ivar id'>@type</span>
|
863
|
+
<span class='rubyid_end end kw'>end</span>
|
864
|
+
</pre>
|
859
865
|
</td>
|
860
866
|
</tr>
|
861
867
|
</table>
|
@@ -1013,24 +1019,25 @@
|
|
1013
1019
|
<td>
|
1014
1020
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 89</span>
|
1015
1021
|
|
1016
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='
|
1017
|
-
<span class='
|
1018
|
-
<span class='
|
1019
|
-
|
1020
|
-
<span class='
|
1021
|
-
<span class='
|
1022
|
-
|
1023
|
-
<span class='kw'>if</span> <span class='
|
1024
|
-
|
1025
|
-
<span class='
|
1026
|
-
<span class='
|
1027
|
-
<span class='kw'>else</span> <span class='comment'># reply_or_type acts like a reply
|
1028
|
-
|
1029
|
-
<span class='
|
1030
|
-
<span class='kw'>end</span>
|
1031
|
-
|
1032
|
-
<span class='
|
1033
|
-
<span class='kw'>end</span
|
1022
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_match identifier id'>match</span><span class='comma token'>,</span> <span class='rubyid_reply_or_type identifier id'>reply_or_type</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_type identifier id'>type</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_options identifier id'>options</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='comma token'>,</span> <span class='bitand op'>&</span><span class='rubyid_block identifier id'>block</span><span class='rparen token'>)</span>
|
1023
|
+
<span class='rubyid_raise identifier id'>raise</span><span class='lparen token'>(</span><span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidRule constant id'>InvalidRule</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"You must specify at least a rule and a host (also via a block). Optionally you can add a record type (default: A) and the options."</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_reply_or_type identifier id'>reply_or_type</span><span class='dot token'>.</span><span class='rubyid_blank? fid id'>blank?</span> <span class='andop op'>&&</span> <span class='rubyid_block identifier id'>block</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span>
|
1024
|
+
<span class='rubyid_raise identifier id'>raise</span><span class='lparen token'>(</span><span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidRule constant id'>InvalidRule</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='string val'>"You can only use hashs for options."</span><span class='rparen token'>)</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='notop op'>!</span><span class='rubyid_options identifier id'>options</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_Hash constant id'>Hash</span><span class='rparen token'>)</span>
|
1025
|
+
|
1026
|
+
<span class='rubyid_rv identifier id'>rv</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_match identifier id'>match</span><span class='rparen token'>)</span>
|
1027
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span> <span class='assign token'>=</span> <span class='rubyid_options identifier id'>options</span>
|
1028
|
+
|
1029
|
+
<span class='rubyid_if if kw'>if</span> <span class='rubyid_block identifier id'>block</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='rubyid_then then kw'>then</span> <span class='comment val'># reply_or_type acts like a type, type is ignored</span>
|
1030
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_type identifier id'>type</span> <span class='assign token'>=</span> <span class='rubyid_reply_or_type identifier id'>reply_or_type</span> <span class='orop op'>||</span> <span class='symbol val'>:A</span>
|
1031
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_reply identifier id'>reply</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
|
1032
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_block identifier id'>block</span> <span class='assign token'>=</span> <span class='rubyid_block identifier id'>block</span>
|
1033
|
+
<span class='rubyid_else else kw'>else</span> <span class='comment val'># reply_or_type acts like a reply</span>
|
1034
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_reply identifier id'>reply</span> <span class='assign token'>=</span> <span class='rubyid_reply_or_type identifier id'>reply_or_type</span> <span class='orop op'>||</span> <span class='string val'>"127.0.0.1"</span>
|
1035
|
+
<span class='rubyid_rv identifier id'>rv</span><span class='dot token'>.</span><span class='rubyid_type identifier id'>type</span> <span class='assign token'>=</span> <span class='rubyid_type identifier id'>type</span> <span class='orop op'>||</span> <span class='symbol val'>:A</span>
|
1036
|
+
<span class='rubyid_end end kw'>end</span>
|
1037
|
+
|
1038
|
+
<span class='rubyid_rv identifier id'>rv</span>
|
1039
|
+
<span class='rubyid_end end kw'>end</span>
|
1040
|
+
</pre>
|
1034
1041
|
</td>
|
1035
1042
|
</tr>
|
1036
1043
|
</table>
|
@@ -1104,9 +1111,10 @@
|
|
1104
1111
|
<td>
|
1105
1112
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 112</span>
|
1106
1113
|
|
1107
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='
|
1108
|
-
<span class='
|
1109
|
-
<span class='kw'>end</span
|
1114
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_resource_class_to_symbol identifier id'>resource_class_to_symbol</span><span class='lparen token'>(</span><span class='rubyid_klass identifier id'>klass</span><span class='rparen token'>)</span>
|
1115
|
+
<span class='rubyid_klass identifier id'>klass</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='regexp val'>/(.+::)?(.+)/</span><span class='comma token'>,</span> <span class='string val'>"\\2"</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_sym identifier id'>to_sym</span>
|
1116
|
+
<span class='rubyid_end end kw'>end</span>
|
1117
|
+
</pre>
|
1110
1118
|
</td>
|
1111
1119
|
</tr>
|
1112
1120
|
</table>
|
@@ -1186,15 +1194,16 @@
|
|
1186
1194
|
<td>
|
1187
1195
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 120</span>
|
1188
1196
|
|
1189
|
-
<span class='kw'>def</span> <span class='kw'>self</span><span class='
|
1190
|
-
<span class='
|
1197
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_symbol_to_resource_class identifier id'>symbol_to_resource_class</span><span class='lparen token'>(</span><span class='rubyid_symbol identifier id'>symbol</span><span class='rparen token'>)</span>
|
1198
|
+
<span class='rubyid_symbol identifier id'>symbol</span> <span class='assign token'>=</span> <span class='rubyid_symbol identifier id'>symbol</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='dot token'>.</span><span class='rubyid_upcase identifier id'>upcase</span>
|
1191
1199
|
|
1192
|
-
<span class='kw'>begin</span>
|
1193
|
-
<span class='
|
1194
|
-
<span class='kw'>rescue</span> <span class='op'>::</span><span class='
|
1195
|
-
<span class='
|
1196
|
-
<span class='kw'>end</span>
|
1197
|
-
<span class='kw'>end</span
|
1200
|
+
<span class='rubyid_begin begin kw'>begin</span>
|
1201
|
+
<span class='dstring node'>"Resolv::DNS::Resource::IN::#{symbol}"</span><span class='dot token'>.</span><span class='rubyid_constantize identifier id'>constantize</span>
|
1202
|
+
<span class='rubyid_rescue rescue kw'>rescue</span> <span class='colon2 op'>::</span><span class='rubyid_NameError constant id'>NameError</span>
|
1203
|
+
<span class='rubyid_raise identifier id'>raise</span><span class='lparen token'>(</span><span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidRule constant id'>InvalidRule</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='dstring node'>"Invalid resource class #{symbol}."</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
|
1204
|
+
<span class='rubyid_end end kw'>end</span>
|
1205
|
+
<span class='rubyid_end end kw'>end</span>
|
1206
|
+
</pre>
|
1198
1207
|
</td>
|
1199
1208
|
</tr>
|
1200
1209
|
</table>
|
@@ -1255,9 +1264,10 @@
|
|
1255
1264
|
<td>
|
1256
1265
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 70</span>
|
1257
1266
|
|
1258
|
-
<span class='kw'>def</span> <span class='
|
1259
|
-
<span class='kw'>self</span><span class='
|
1260
|
-
<span class='kw'>end</span
|
1267
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_has_block? fid id'>has_block?</span>
|
1268
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_block identifier id'>block</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span>
|
1269
|
+
<span class='rubyid_end end kw'>end</span>
|
1270
|
+
</pre>
|
1261
1271
|
</td>
|
1262
1272
|
</tr>
|
1263
1273
|
</table>
|
@@ -1312,9 +1322,10 @@
|
|
1312
1322
|
<td>
|
1313
1323
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 63</span>
|
1314
1324
|
|
1315
|
-
<span class='kw'>def</span> <span class='
|
1316
|
-
<span class='kw'>self</span><span class='
|
1317
|
-
<span class='kw'>end</span
|
1325
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_is_regexp? fid id'>is_regexp?</span>
|
1326
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</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_Regexp constant id'>Regexp</span><span class='rparen token'>)</span>
|
1327
|
+
<span class='rubyid_end end kw'>end</span>
|
1328
|
+
</pre>
|
1318
1329
|
</td>
|
1319
1330
|
</tr>
|
1320
1331
|
</table>
|
@@ -1388,9 +1399,10 @@
|
|
1388
1399
|
<td>
|
1389
1400
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 78</span>
|
1390
1401
|
|
1391
|
-
<span class='kw'>def</span> <span class='
|
1392
|
-
<span class='kw'>self</span><span class='
|
1393
|
-
<span class='kw'>end</span
|
1402
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_match_host identifier id'>match_host</span><span class='lparen token'>(</span><span class='rubyid_hostname identifier id'>hostname</span><span class='rparen token'>)</span>
|
1403
|
+
<span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_regexp? fid id'>is_regexp?</span> <span class='integer val'>? </span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='rubyid_hostname identifier id'>hostname</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span> <span class='eq op'>==</span> <span class='rubyid_hostname identifier id'>hostname</span><span class='rparen token'>)</span>
|
1404
|
+
<span class='rubyid_end end kw'>end</span>
|
1405
|
+
</pre>
|
1394
1406
|
</td>
|
1395
1407
|
</tr>
|
1396
1408
|
</table>
|
@@ -1446,10 +1458,11 @@
|
|
1446
1458
|
<td>
|
1447
1459
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/rule.rb', line 55</span>
|
1448
1460
|
|
1449
|
-
<span class='kw'>def</span> <span class='
|
1450
|
-
<span class='
|
1451
|
-
<span class='
|
1452
|
-
<span class='kw'>end</span
|
1461
|
+
<span class='rubyid_def def kw'>def</span> <span class='rubyid_resource_class identifier id'>resource_class</span>
|
1462
|
+
<span class='rubyid_classes identifier id'>classes</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_type identifier id'>type</span><span class='dot token'>.</span><span class='rubyid_ensure_array identifier id'>ensure_array</span><span class='dot token'>.</span><span class='rubyid_collect identifier id'>collect</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_cls identifier id'>cls</span><span class='bitor op'>|</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='dot token'>.</span><span class='rubyid_symbol_to_resource_class identifier id'>symbol_to_resource_class</span><span class='lparen token'>(</span><span class='rubyid_cls identifier id'>cls</span><span class='rparen token'>)</span> <span class='rbrace token'>}</span><span class='dot token'>.</span><span class='rubyid_compact identifier id'>compact</span><span class='dot token'>.</span><span class='rubyid_uniq identifier id'>uniq</span>
|
1463
|
+
<span class='rubyid_classes identifier id'>classes</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span> <span class='eq op'>==</span> <span class='integer val'>1</span> <span class='question op'>?</span> <span class='rubyid_classes identifier id'>classes</span><span class='dot token'>.</span><span class='rubyid_first identifier id'>first</span> <span class='colon op'>:</span> <span class='rubyid_classes identifier id'>classes</span>
|
1464
|
+
<span class='rubyid_end end kw'>end</span>
|
1465
|
+
</pre>
|
1453
1466
|
</td>
|
1454
1467
|
</tr>
|
1455
1468
|
</table>
|
@@ -1460,9 +1473,9 @@
|
|
1460
1473
|
</div>
|
1461
1474
|
|
1462
1475
|
<div id="footer">
|
1463
|
-
Generated on
|
1476
|
+
Generated on Sat Oct 6 08:58:33 2012 by
|
1464
1477
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1465
|
-
0.8.2.1 (ruby-1.
|
1478
|
+
0.8.2.1 (ruby-1.8.7).
|
1466
1479
|
</div>
|
1467
1480
|
|
1468
1481
|
</body>
|
data/doc/DevDNSd/Version.html
CHANGED
@@ -119,7 +119,8 @@
|
|
119
119
|
|
120
120
|
</div>
|
121
121
|
</dt>
|
122
|
-
<dd><pre class="code"><span class='
|
122
|
+
<dd><pre class="code"><span class='integer val'>1</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='
|
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='
|
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='
|
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'>"."</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
|
187
|
+
Generated on Sat Oct 6 08:58:33 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.
|
189
|
+
0.8.2.1 (ruby-1.8.7).
|
186
190
|
</div>
|
187
191
|
|
188
192
|
</body>
|
data/doc/DevDNSd.html
CHANGED
@@ -121,9 +121,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
121
121
|
</div>
|
122
122
|
|
123
123
|
<div id="footer">
|
124
|
-
Generated on
|
124
|
+
Generated on Sat Oct 6 08:58:33 2012 by
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
126
|
-
0.8.2.1 (ruby-1.
|
126
|
+
0.8.2.1 (ruby-1.8.7).
|
127
127
|
</div>
|
128
128
|
|
129
129
|
</body>
|
data/doc/_index.html
CHANGED
@@ -191,9 +191,9 @@
|
|
191
191
|
</div>
|
192
192
|
|
193
193
|
<div id="footer">
|
194
|
-
Generated on
|
194
|
+
Generated on Sat Oct 6 08:58:33 2012 by
|
195
195
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
196
|
-
0.8.2.1 (ruby-1.
|
196
|
+
0.8.2.1 (ruby-1.8.7).
|
197
197
|
</div>
|
198
198
|
|
199
199
|
</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=
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
6
6
|
<title>
|
7
7
|
File: README
|
8
8
|
|
@@ -64,7 +64,8 @@
|
|
64
64
|
<div id="content"><div id='filecontents'><h1>devdnsd</h1>
|
65
65
|
|
66
66
|
<p><a href="http://travis-ci.org/ShogunPanda/devdnsd"><img src="https://secure.travis-ci.org/ShogunPanda/devdnsd.png?branch=master" alt="Build Status"></a>
|
67
|
-
<a href="https://gemnasium.com/ShogunPanda/devdnsd"><img src="https://gemnasium.com/ShogunPanda/devdnsd.png?travis" alt="Dependency Status"></a
|
67
|
+
<a href="https://gemnasium.com/ShogunPanda/devdnsd"><img src="https://gemnasium.com/ShogunPanda/devdnsd.png?travis" alt="Dependency Status"></a>
|
68
|
+
<a href="https://codeclimate.com/github/ShogunPanda/devdnsd"><img src="https://codeclimate.com/badge.png" alt="Code Climate"></a></p>
|
68
69
|
|
69
70
|
<p>A small DNS server to enable local .dev domain resolution.</p>
|
70
71
|
|
@@ -152,9 +153,9 @@ Licensed under the MIT license, which can be found at <a href="http://www.openso
|
|
152
153
|
</div></div>
|
153
154
|
|
154
155
|
<div id="footer">
|
155
|
-
Generated on
|
156
|
+
Generated on Sat Oct 6 08:58:33 2012 by
|
156
157
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
157
|
-
0.8.2.1 (ruby-1.
|
158
|
+
0.8.2.1 (ruby-1.8.7).
|
158
159
|
</div>
|
159
160
|
|
160
161
|
</body>
|