devdnsd 1.5.0 → 1.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -129,7 +129,8 @@
129
129
 
130
130
  </div>
131
131
  </dt>
132
- <dd><pre class="code"><span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>ANY</span></pre></dd>
132
+ <dd><pre class="code"><span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_ANY constant id'>ANY</span>
133
+ </pre></dd>
133
134
 
134
135
  <dt id="ANY_CLASSES-constant" class="">ANY_CLASSES =
135
136
  <div class="docstring">
@@ -144,7 +145,8 @@
144
145
 
145
146
  </div>
146
147
  </dt>
147
- <dd><pre class="code"><span class='lbracket'>[</span><span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>A</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>AAAA</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>ANY</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>CNAME</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>HINFO</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>MINFO</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>MX</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>NS</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>PTR</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>SOA</span><span class='comma'>,</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Resource</span><span class='op'>::</span><span class='const'>IN</span><span class='op'>::</span><span class='const'>TXT</span><span class='rbracket'>]</span></pre></dd>
148
+ <dd><pre class="code"><span class='lbrack token'>[</span><span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_A constant id'>A</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_AAAA constant id'>AAAA</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_ANY constant id'>ANY</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_CNAME constant id'>CNAME</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_HINFO constant id'>HINFO</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_MINFO constant id'>MINFO</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_MX constant id'>MX</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_NS constant id'>NS</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_PTR constant id'>PTR</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_SOA constant id'>SOA</span><span class='comma token'>,</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Resource constant id'>Resource</span><span class='colon2 op'>::</span><span class='rubyid_IN constant id'>IN</span><span class='colon2 op'>::</span><span class='rubyid_TXT constant id'>TXT</span><span class='rbrack token'>]</span>
149
+ </pre></dd>
148
150
 
149
151
  </dl>
150
152
 
@@ -759,35 +761,36 @@
759
761
  <td>
760
762
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 29</span>
761
763
 
762
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
763
- <span class='ivar'>@command</span> <span class='op'>=</span> <span class='id identifier rubyid_command'>command</span>
764
- <span class='id identifier rubyid_application'>application</span> <span class='op'>=</span> <span class='ivar'>@command</span><span class='period'>.</span><span class='id identifier rubyid_application'>application</span>
765
-
766
- <span class='comment'># Setup logger
767
- </span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_start_time'>start_time</span> <span class='op'>=</span> <span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_now'>now</span>
768
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_get_real_file'>get_real_file</span><span class='lparen'>(</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>log-file</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span><span class='comma'>,</span> <span class='const'>Logger</span><span class='op'>::</span><span class='const'>INFO</span><span class='rparen'>)</span>
769
-
770
- <span class='comment'># Open configuration
771
- </span> <span class='kw'>begin</span>
772
- <span class='id identifier rubyid_overrides'>overrides</span> <span class='op'>=</span> <span class='lbrace'>{</span>
773
- <span class='symbol'>:foreground</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_name'>name</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>start</span><span class='tstring_end'>&quot;</span></span> <span class='op'>?</span> <span class='id identifier rubyid_command'>command</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>foreground</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='op'>:</span> <span class='kw'>false</span><span class='comma'>,</span>
774
- <span class='symbol'>:log_file</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>log-file</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
775
- <span class='symbol'>:log_level</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>log-level</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
776
- <span class='symbol'>:tld</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>tld</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span>
777
- <span class='symbol'>:port</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>port</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
778
- <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_k'>k</span><span class='comma'>,</span><span class='id identifier rubyid_v'>v</span><span class='op'>|</span> <span class='id identifier rubyid_v'>v</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='rbrace'>}</span>
779
-
780
- <span class='ivar'>@config</span> <span class='op'>=</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Configuration</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_application'>application</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>configuration</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span><span class='comma'>,</span> <span class='id identifier rubyid_overrides'>overrides</span><span class='comma'>,</span> <span class='ivar'>@logger</span><span class='rparen'>)</span>
781
-
782
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='kw'>nil</span>
783
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_logger'>get_logger</span>
784
- <span class='kw'>rescue</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>InvalidConfiguration</span><span class='comma'>,</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Errors</span><span class='op'>::</span><span class='const'>InvalidRule</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
785
- <span class='ivar'>@logger</span> <span class='op'>?</span> <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='id identifier rubyid_e'>e</span><span class='period'>.</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span> <span class='op'>:</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot log to </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span><span class='rbrace'>}</span><span class='tstring_content'>. Exiting...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
786
- <span class='id identifier rubyid_raise'>raise</span> <span class='op'>::</span><span class='const'>SystemExit</span>
787
- <span class='kw'>end</span>
788
-
789
- <span class='kw'>self</span>
790
- <span class='kw'>end</span></pre>
764
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
765
+ <span class='rubyid_@command ivar id'>@command</span> <span class='assign token'>=</span> <span class='rubyid_command identifier id'>command</span>
766
+ <span class='rubyid_application identifier id'>application</span> <span class='assign token'>=</span> <span class='rubyid_@command ivar id'>@command</span><span class='dot token'>.</span><span class='rubyid_application identifier id'>application</span>
767
+
768
+ <span class='comment val'># Setup logger</span>
769
+ <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_start_time identifier id'>start_time</span> <span class='assign token'>=</span> <span class='rubyid_Time constant id'>Time</span><span class='dot token'>.</span><span class='rubyid_now identifier id'>now</span>
770
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='assign token'>=</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_get_real_file identifier id'>get_real_file</span><span class='lparen token'>(</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;log-file&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='rparen token'>)</span> <span class='orop op'>||</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_default_file identifier id'>default_file</span><span class='comma token'>,</span> <span class='rubyid_Logger constant id'>Logger</span><span class='colon2 op'>::</span><span class='rubyid_INFO constant id'>INFO</span><span class='rparen token'>)</span>
771
+
772
+ <span class='comment val'># Open configuration</span>
773
+ <span class='rubyid_begin begin kw'>begin</span>
774
+ <span class='rubyid_overrides identifier id'>overrides</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span>
775
+ <span class='symbol val'>:foreground</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_command identifier id'>command</span><span class='dot token'>.</span><span class='rubyid_name identifier id'>name</span> <span class='eq op'>==</span> <span class='string val'>&quot;start&quot;</span> <span class='question op'>?</span> <span class='rubyid_command identifier id'>command</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;foreground&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span> <span class='colon op'>:</span> <span class='rubyid_false false kw'>false</span><span class='comma token'>,</span>
776
+ <span class='symbol val'>:log_file</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;log-file&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
777
+ <span class='symbol val'>:log_level</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;log-level&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
778
+ <span class='symbol val'>:tld</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;tld&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span>
779
+ <span class='symbol val'>:port</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;port&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span>
780
+ <span class='rbrace token'>}</span><span class='dot token'>.</span><span class='rubyid_reject identifier id'>reject</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_k identifier id'>k</span><span class='comma token'>,</span><span class='rubyid_v identifier id'>v</span><span class='bitor op'>|</span> <span class='rubyid_v identifier id'>v</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rbrace token'>}</span>
781
+
782
+ <span class='rubyid_@config ivar id'>@config</span> <span class='assign token'>=</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Configuration constant id'>Configuration</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_application identifier id'>application</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span><span class='lbrack token'>[</span><span class='string val'>&quot;configuration&quot;</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_value identifier id'>value</span><span class='comma token'>,</span> <span class='rubyid_overrides identifier id'>overrides</span><span class='comma token'>,</span> <span class='rubyid_@logger ivar id'>@logger</span><span class='rparen token'>)</span>
783
+
784
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span>
785
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_get_logger identifier id'>get_logger</span>
786
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Errors constant id'>Errors</span><span class='colon2 op'>::</span><span class='rubyid_InvalidConfiguration constant id'>InvalidConfiguration</span><span class='comma 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='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
787
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='question op'>?</span> <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='rubyid_e identifier id'>e</span><span class='dot token'>.</span><span class='rubyid_message identifier id'>message</span><span class='rparen token'>)</span> <span class='colon op'>:</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='string val'>&quot;STDERR&quot;</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Cannot log to #{config.log_file}. Exiting...&quot;</span><span class='rparen token'>)</span>
788
+ <span class='rubyid_raise identifier id'>raise</span> <span class='colon3 op'>::</span><span class='rubyid_SystemExit constant id'>SystemExit</span>
789
+ <span class='rubyid_end end kw'>end</span>
790
+
791
+ <span class='rubyid_self self kw'>self</span>
792
+ <span class='rubyid_end end kw'>end</span>
793
+ </pre>
791
794
  </td>
792
795
  </tr>
793
796
  </table>
@@ -832,9 +835,10 @@
832
835
  <td>
833
836
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 21</span>
834
837
 
835
- <span class='kw'>def</span> <span class='id identifier rubyid_command'>command</span>
836
- <span class='ivar'>@command</span>
837
- <span class='kw'>end</span></pre>
838
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_command identifier id'>command</span>
839
+ <span class='rubyid_@command ivar id'>@command</span>
840
+ <span class='rubyid_end end kw'>end</span>
841
+ </pre>
838
842
  </td>
839
843
  </tr>
840
844
  </table>
@@ -874,9 +878,10 @@
874
878
  <td>
875
879
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 18</span>
876
880
 
877
- <span class='kw'>def</span> <span class='id identifier rubyid_config'>config</span>
878
- <span class='ivar'>@config</span>
879
- <span class='kw'>end</span></pre>
881
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_config identifier id'>config</span>
882
+ <span class='rubyid_@config ivar id'>@config</span>
883
+ <span class='rubyid_end end kw'>end</span>
884
+ </pre>
880
885
  </td>
881
886
  </tr>
882
887
  </table>
@@ -916,9 +921,10 @@
916
921
  <td>
917
922
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 24</span>
918
923
 
919
- <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
920
- <span class='ivar'>@logger</span>
921
- <span class='kw'>end</span></pre>
924
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_logger identifier id'>logger</span>
925
+ <span class='rubyid_@logger ivar id'>@logger</span>
926
+ <span class='rubyid_end end kw'>end</span>
927
+ </pre>
922
928
  </td>
923
929
  </tr>
924
930
  </table>
@@ -1020,11 +1026,12 @@
1020
1026
  <td>
1021
1027
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 347</span>
1022
1028
 
1023
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1024
- <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
1025
- <span class='ivar'>@instance</span> <span class='op'>||=</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_command'>command</span>
1026
- <span class='ivar'>@instance</span>
1027
- <span class='kw'>end</span></pre>
1029
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_force identifier id'>force</span> <span class='assign token'>=</span> <span class='rubyid_false false kw'>false</span><span class='rparen token'>)</span>
1030
+ <span class='rubyid_@instance ivar id'>@instance</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_force identifier id'>force</span>
1031
+ <span class='rubyid_@instance ivar id'>@instance</span> <span class='opasgn op'>||=</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_command identifier id'>command</span>
1032
+ <span class='rubyid_@instance ivar id'>@instance</span>
1033
+ <span class='rubyid_end end kw'>end</span>
1034
+ </pre>
1028
1035
  </td>
1029
1036
  </tr>
1030
1037
  </table>
@@ -1062,9 +1069,10 @@
1062
1069
  <td>
1063
1070
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 361</span>
1064
1071
 
1065
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_quit'>quit</span>
1066
- <span class='op'>::</span><span class='const'>EventMachine</span><span class='period'>.</span><span class='id identifier rubyid_stop'>stop</span>
1067
- <span class='kw'>end</span></pre>
1072
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_quit identifier id'>quit</span>
1073
+ <span class='colon3 op'>::</span><span class='rubyid_EventMachine constant id'>EventMachine</span><span class='dot token'>.</span><span class='rubyid_stop identifier id'>stop</span>
1074
+ <span class='rubyid_end end kw'>end</span>
1075
+ </pre>
1068
1076
  </td>
1069
1077
  </tr>
1070
1078
  </table>
@@ -1109,9 +1117,10 @@
1109
1117
  <td>
1110
1118
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 356</span>
1111
1119
 
1112
- <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_run'>run</span>
1113
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_perform_server'>perform_server</span>
1114
- <span class='kw'>end</span></pre>
1120
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_run identifier id'>run</span>
1121
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_perform_server identifier id'>perform_server</span>
1122
+ <span class='rubyid_end end kw'>end</span>
1123
+ </pre>
1115
1124
  </td>
1116
1125
  </tr>
1117
1126
  </table>
@@ -1222,59 +1231,60 @@
1222
1231
  <td>
1223
1232
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 232</span>
1224
1233
 
1225
- <span class='kw'>def</span> <span class='id identifier rubyid_action_install'>action_install</span>
1226
- <span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='id identifier rubyid_get_logger'>get_logger</span>
1227
-
1228
- <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_osx?'>is_osx?</span> <span class='kw'>then</span>
1229
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Install DevDNSd as a local resolver is only available on MacOSX.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1230
- <span class='kw'>return</span> <span class='kw'>false</span>
1231
- <span class='kw'>end</span>
1232
-
1233
- <span class='id identifier rubyid_resolver_file'>resolver_file</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_resolver_path'>resolver_path</span>
1234
- <span class='id identifier rubyid_launch_agent'>launch_agent</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span>
1235
-
1236
- <span class='comment'># Installs the resolver
1237
- </span> <span class='kw'>begin</span>
1238
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Installing the resolver in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_resolver_file'>resolver_file</span><span class='rbrace'>}</span><span class='tstring_content'> ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1239
-
1240
- <span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_resolver_file'>resolver_file</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
1241
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>nameserver 127.0.0.1\n</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1242
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>port </span><span class='embexpr_beg'>#{</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1243
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span>
1244
- <span class='rbrace'>}</span>
1245
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1246
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot create the resolver file.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1247
- <span class='kw'>return</span> <span class='kw'>false</span>
1248
- <span class='kw'>end</span>
1249
-
1250
- <span class='kw'>begin</span>
1251
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Creating the launch agent in </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'> ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1252
-
1253
- <span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='gvar'>$ARGV</span> <span class='op'>?</span> <span class='gvar'>$ARGV</span><span class='lbracket'>[</span><span class='int'>0</span><span class='comma'>,</span> <span class='gvar'>$ARGV</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>-</span> <span class='int'>1</span><span class='rbracket'>]</span> <span class='op'>:</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
1254
-
1255
- <span class='id identifier rubyid_plist'>plist</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>KeepAlive</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Label</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>it.cowtech.devdnsd</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Program</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='lparen'>(</span><span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>Dir</span><span class='period'>.</span><span class='id identifier rubyid_pwd'>pwd</span><span class='rparen'>)</span> <span class='op'>+</span> <span class='gvar'>$0</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>ProgramArguments</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>RunAtLoad</span><span class='tstring_end'>&quot;</span></span> <span class='op'>=&gt;</span> <span class='kw'>true</span><span class='rbrace'>}</span>
1256
- <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_open'>open</span><span class='lparen'>(</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>w</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span><span class='op'>|</span><span class='id identifier rubyid_f'>f</span><span class='op'>|</span>
1257
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='id identifier rubyid_plist'>plist</span><span class='period'>.</span><span class='id identifier rubyid_to_json'>to_json</span><span class='rparen'>)</span>
1258
- <span class='id identifier rubyid_f'>f</span><span class='period'>.</span><span class='id identifier rubyid_flush'>flush</span>
1259
- <span class='rbrace'>}</span>
1260
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>plutil -convert binary1 \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1261
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1262
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot create the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1263
- <span class='kw'>return</span> <span class='kw'>false</span>
1264
- <span class='kw'>end</span>
1265
-
1266
- <span class='kw'>begin</span>
1267
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Loading the launch agent ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1268
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>launchctl load -w \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot; &gt; /dev/null 2&gt;&amp;1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1269
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1270
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_error'>error</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot load the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1271
- <span class='kw'>return</span> <span class='kw'>false</span>
1272
- <span class='kw'>end</span>
1273
-
1274
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dns_update'>dns_update</span>
1275
-
1276
- <span class='kw'>true</span>
1277
- <span class='kw'>end</span></pre>
1234
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_install identifier id'>action_install</span>
1235
+ <span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_get_logger identifier id'>get_logger</span>
1236
+
1237
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_osx? fid id'>is_osx?</span> <span class='rubyid_then then kw'>then</span>
1238
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='string val'>&quot;Install DevDNSd as a local resolver is only available on MacOSX.&quot;</span><span class='rparen token'>)</span>
1239
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1240
+ <span class='rubyid_end end kw'>end</span>
1241
+
1242
+ <span class='rubyid_resolver_file identifier id'>resolver_file</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_resolver_path identifier id'>resolver_path</span>
1243
+ <span class='rubyid_launch_agent identifier id'>launch_agent</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_launch_agent_path identifier id'>launch_agent_path</span>
1244
+
1245
+ <span class='comment val'># Installs the resolver</span>
1246
+ <span class='rubyid_begin begin kw'>begin</span>
1247
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Installing the resolver in #{resolver_file} ...&quot;</span><span class='rparen token'>)</span>
1248
+
1249
+ <span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_resolver_file identifier id'>resolver_file</span><span class='comma token'>,</span> <span class='string val'>&quot;w&quot;</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
1250
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='string val'>&quot;nameserver 127.0.0.1\n&quot;</span><span class='rparen token'>)</span>
1251
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='dstring node'>&quot;port #{@config.port}&quot;</span><span class='rparen token'>)</span>
1252
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_flush identifier id'>flush</span>
1253
+ <span class='rbrace token'>}</span>
1254
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1255
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot create the resolver file.&quot;</span><span class='rparen token'>)</span>
1256
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1257
+ <span class='rubyid_end end kw'>end</span>
1258
+
1259
+ <span class='rubyid_begin begin kw'>begin</span>
1260
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Creating the launch agent in #{launch_agent} ...&quot;</span><span class='rparen token'>)</span>
1261
+
1262
+ <span class='rubyid_args identifier id'>args</span> <span class='assign token'>=</span> <span class='rubyid_$ARGV gvar id'>$ARGV</span> <span class='question op'>?</span> <span class='rubyid_$ARGV gvar id'>$ARGV</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='comma token'>,</span> <span class='rubyid_$ARGV gvar id'>$ARGV</span><span class='dot token'>.</span><span class='rubyid_length identifier id'>length</span> <span class='minus op'>-</span> <span class='integer val'>1</span><span class='rbrack token'>]</span> <span class='colon op'>:</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
1263
+
1264
+ <span class='rubyid_plist identifier id'>plist</span> <span class='assign token'>=</span> <span class='lbrace token'>{</span><span class='string val'>&quot;KeepAlive&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_true true kw'>true</span><span class='comma token'>,</span> <span class='string val'>&quot;Label&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='string val'>&quot;it.cowtech.devdnsd&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;Program&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lparen token'>(</span><span class='colon3 op'>::</span><span class='rubyid_Pathname constant id'>Pathname</span><span class='dot token'>.</span><span class='rubyid_new identifier id'>new</span><span class='lparen token'>(</span><span class='rubyid_Dir constant id'>Dir</span><span class='dot token'>.</span><span class='rubyid_pwd identifier id'>pwd</span><span class='rparen token'>)</span> <span class='plus op'>+</span> <span class='rubyid_$0 gvar id'>$0</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='rubyid_to_s identifier id'>to_s</span><span class='comma token'>,</span> <span class='string val'>&quot;ProgramArguments&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_args identifier id'>args</span><span class='comma token'>,</span> <span class='string val'>&quot;RunAtLoad&quot;</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_true true kw'>true</span><span class='rbrace token'>}</span>
1265
+ <span class='colon3 op'>::</span><span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_open identifier id'>open</span><span class='lparen token'>(</span><span class='rubyid_launch_agent identifier id'>launch_agent</span><span class='comma token'>,</span> <span class='string val'>&quot;w&quot;</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='rubyid_f identifier id'>f</span><span class='bitor op'>|</span>
1266
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_write identifier id'>write</span><span class='lparen token'>(</span><span class='rubyid_plist identifier id'>plist</span><span class='dot token'>.</span><span class='rubyid_to_json identifier id'>to_json</span><span class='rparen token'>)</span>
1267
+ <span class='rubyid_f identifier id'>f</span><span class='dot token'>.</span><span class='rubyid_flush identifier id'>flush</span>
1268
+ <span class='rbrace token'>}</span>
1269
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='dstring node'>&quot;plutil -convert binary1 \&quot;#{launch_agent}\&quot;&quot;</span><span class='rparen token'>)</span>
1270
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1271
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot create the launch agent.&quot;</span><span class='rparen token'>)</span>
1272
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1273
+ <span class='rubyid_end end kw'>end</span>
1274
+
1275
+ <span class='rubyid_begin begin kw'>begin</span>
1276
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='string val'>&quot;Loading the launch agent ...&quot;</span><span class='rparen token'>)</span>
1277
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='dstring node'>&quot;launchctl load -w \&quot;#{launch_agent}\&quot; &gt; /dev/null 2&gt;&amp;1&quot;</span><span class='rparen token'>)</span>
1278
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1279
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_error identifier id'>error</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot load the launch agent.&quot;</span><span class='rparen token'>)</span>
1280
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1281
+ <span class='rubyid_end end kw'>end</span>
1282
+
1283
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dns_update identifier id'>dns_update</span>
1284
+
1285
+ <span class='rubyid_true true kw'>true</span>
1286
+ <span class='rubyid_end end kw'>end</span>
1287
+ </pre>
1278
1288
  </td>
1279
1289
  </tr>
1280
1290
  </table>
@@ -1339,19 +1349,20 @@
1339
1349
  <td>
1340
1350
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 206</span>
1341
1351
 
1342
- <span class='kw'>def</span> <span class='id identifier rubyid_action_start'>action_start</span>
1343
- <span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_logger'>get_logger</span>
1352
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_start identifier id'>action_start</span>
1353
+ <span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_get_logger identifier id'>get_logger</span>
1344
1354
 
1345
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Starting DevDNSd ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1355
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='string val'>&quot;Starting DevDNSd ...&quot;</span><span class='rparen token'>)</span>
1346
1356
 
1347
- <span class='kw'>if</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='kw'>then</span>
1348
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_perform_server'>perform_server</span>
1349
- <span class='kw'>else</span>
1350
- <span class='const'>RExec</span><span class='op'>::</span><span class='const'>Daemon</span><span class='op'>::</span><span class='const'>Controller</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
1351
- <span class='kw'>end</span>
1357
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_foreground identifier id'>foreground</span> <span class='rubyid_then then kw'>then</span>
1358
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_perform_server identifier id'>perform_server</span>
1359
+ <span class='rubyid_else else kw'>else</span>
1360
+ <span class='rubyid_RExec constant id'>RExec</span><span class='colon2 op'>::</span><span class='rubyid_Daemon constant id'>Daemon</span><span class='colon2 op'>::</span><span class='rubyid_Controller constant id'>Controller</span><span class='dot token'>.</span><span class='rubyid_start identifier id'>start</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='rparen token'>)</span>
1361
+ <span class='rubyid_end end kw'>end</span>
1352
1362
 
1353
- <span class='kw'>true</span>
1354
- <span class='kw'>end</span></pre>
1363
+ <span class='rubyid_true true kw'>true</span>
1364
+ <span class='rubyid_end end kw'>end</span>
1365
+ </pre>
1355
1366
  </td>
1356
1367
  </tr>
1357
1368
  </table>
@@ -1408,11 +1419,12 @@
1408
1419
  <td>
1409
1420
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 223</span>
1410
1421
 
1411
- <span class='kw'>def</span> <span class='id identifier rubyid_action_stop'>action_stop</span>
1412
- <span class='const'>RExec</span><span class='op'>::</span><span class='const'>Daemon</span><span class='op'>::</span><span class='const'>Controller</span><span class='period'>.</span><span class='id identifier rubyid_stop'>stop</span><span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span><span class='rparen'>)</span>
1422
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_stop identifier id'>action_stop</span>
1423
+ <span class='rubyid_RExec constant id'>RExec</span><span class='colon2 op'>::</span><span class='rubyid_Daemon constant id'>Daemon</span><span class='colon2 op'>::</span><span class='rubyid_Controller constant id'>Controller</span><span class='dot token'>.</span><span class='rubyid_stop identifier id'>stop</span><span class='lparen token'>(</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_class identifier id'>class</span><span class='rparen token'>)</span>
1413
1424
 
1414
- <span class='kw'>true</span>
1415
- <span class='kw'>end</span></pre>
1425
+ <span class='rubyid_true true kw'>true</span>
1426
+ <span class='rubyid_end end kw'>end</span>
1427
+ </pre>
1416
1428
  </td>
1417
1429
  </tr>
1418
1430
  </table>
@@ -1504,46 +1516,47 @@
1504
1516
  <td>
1505
1517
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 289</span>
1506
1518
 
1507
- <span class='kw'>def</span> <span class='id identifier rubyid_action_uninstall'>action_uninstall</span>
1508
- <span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_get_logger'>get_logger</span>
1509
-
1510
- <span class='kw'>if</span> <span class='op'>!</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_osx?'>is_osx?</span> <span class='kw'>then</span>
1511
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_fatal'>fatal</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Install DevDNSd as a local resolver is only available on MacOSX.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1512
- <span class='kw'>return</span> <span class='kw'>false</span>
1513
- <span class='kw'>end</span>
1514
-
1515
- <span class='id identifier rubyid_resolver_file'>resolver_file</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_resolver_path'>resolver_path</span>
1516
- <span class='id identifier rubyid_launch_agent'>launch_agent</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span>
1517
-
1518
- <span class='comment'># Remove the resolver
1519
- </span> <span class='kw'>begin</span>
1520
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Deleting the resolver </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_resolver_file'>resolver_file</span><span class='rbrace'>}</span><span class='tstring_content'> ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1521
- <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_resolver_file'>resolver_file</span><span class='rparen'>)</span>
1522
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1523
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot delete the resolver file.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1524
- <span class='kw'>return</span> <span class='kw'>false</span>
1525
- <span class='kw'>end</span>
1526
-
1527
- <span class='comment'># Unload the launch agent.
1528
- </span> <span class='kw'>begin</span>
1529
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>launchctl unload -w \&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'>\&quot; &gt; /dev/null 2&gt;&amp;1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1530
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1531
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot unload the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1532
- <span class='kw'>end</span>
1533
-
1534
- <span class='comment'># Delete the launch agent.
1535
- </span> <span class='kw'>begin</span>
1536
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Deleting the launch agent </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rbrace'>}</span><span class='tstring_content'> ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1537
- <span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_launch_agent'>launch_agent</span><span class='rparen'>)</span>
1538
- <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
1539
- <span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_warn'>warn</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Cannot delete the launch agent.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1540
- <span class='kw'>return</span> <span class='kw'>false</span>
1541
- <span class='kw'>end</span>
1542
-
1543
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_dns_update'>dns_update</span>
1544
-
1545
- <span class='kw'>true</span>
1546
- <span class='kw'>end</span></pre>
1519
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_action_uninstall identifier id'>action_uninstall</span>
1520
+ <span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_get_logger identifier id'>get_logger</span>
1521
+
1522
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_is_osx? fid id'>is_osx?</span> <span class='rubyid_then then kw'>then</span>
1523
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_fatal identifier id'>fatal</span><span class='lparen token'>(</span><span class='string val'>&quot;Install DevDNSd as a local resolver is only available on MacOSX.&quot;</span><span class='rparen token'>)</span>
1524
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1525
+ <span class='rubyid_end end kw'>end</span>
1526
+
1527
+ <span class='rubyid_resolver_file identifier id'>resolver_file</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_resolver_path identifier id'>resolver_path</span>
1528
+ <span class='rubyid_launch_agent identifier id'>launch_agent</span> <span class='assign token'>=</span> <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_launch_agent_path identifier id'>launch_agent_path</span>
1529
+
1530
+ <span class='comment val'># Remove the resolver</span>
1531
+ <span class='rubyid_begin begin kw'>begin</span>
1532
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Deleting the resolver #{resolver_file} ...&quot;</span><span class='rparen token'>)</span>
1533
+ <span class='colon3 op'>::</span><span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='rubyid_resolver_file identifier id'>resolver_file</span><span class='rparen token'>)</span>
1534
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1535
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_warn identifier id'>warn</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot delete the resolver file.&quot;</span><span class='rparen token'>)</span>
1536
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1537
+ <span class='rubyid_end end kw'>end</span>
1538
+
1539
+ <span class='comment val'># Unload the launch agent.</span>
1540
+ <span class='rubyid_begin begin kw'>begin</span>
1541
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='dstring node'>&quot;launchctl unload -w \&quot;#{launch_agent}\&quot; &gt; /dev/null 2&gt;&amp;1&quot;</span><span class='rparen token'>)</span>
1542
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1543
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_warn identifier id'>warn</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot unload the launch agent.&quot;</span><span class='rparen token'>)</span>
1544
+ <span class='rubyid_end end kw'>end</span>
1545
+
1546
+ <span class='comment val'># Delete the launch agent.</span>
1547
+ <span class='rubyid_begin begin kw'>begin</span>
1548
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Deleting the launch agent #{launch_agent} ...&quot;</span><span class='rparen token'>)</span>
1549
+ <span class='colon3 op'>::</span><span class='rubyid_File constant id'>File</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='rubyid_launch_agent identifier id'>launch_agent</span><span class='rparen token'>)</span>
1550
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
1551
+ <span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_warn identifier id'>warn</span><span class='lparen token'>(</span><span class='string val'>&quot;Cannot delete the launch agent.&quot;</span><span class='rparen token'>)</span>
1552
+ <span class='rubyid_return return kw'>return</span> <span class='rubyid_false false kw'>false</span>
1553
+ <span class='rubyid_end end kw'>end</span>
1554
+
1555
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_dns_update identifier id'>dns_update</span>
1556
+
1557
+ <span class='rubyid_true true kw'>true</span>
1558
+ <span class='rubyid_end end kw'>end</span>
1559
+ </pre>
1547
1560
  </td>
1548
1561
  </tr>
1549
1562
  </table>
@@ -1599,10 +1612,11 @@
1599
1612
  <td>
1600
1613
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 102</span>
1601
1614
 
1602
- <span class='kw'>def</span> <span class='id identifier rubyid_dns_update'>dns_update</span>
1603
- <span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Flushing DNS cache and resolvers ...</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1604
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>dscacheutil -flushcache</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1605
- <span class='kw'>end</span></pre>
1615
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_dns_update identifier id'>dns_update</span>
1616
+ <span class='rubyid_@logger ivar id'>@logger</span><span class='dot token'>.</span><span class='rubyid_info identifier id'>info</span><span class='lparen token'>(</span><span class='string val'>&quot;Flushing DNS cache and resolvers ...&quot;</span><span class='rparen token'>)</span>
1617
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='string val'>&quot;dscacheutil -flushcache&quot;</span><span class='rparen token'>)</span>
1618
+ <span class='rubyid_end end kw'>end</span>
1619
+ </pre>
1606
1620
  </td>
1607
1621
  </tr>
1608
1622
  </table>
@@ -1676,9 +1690,10 @@
1676
1690
  <td>
1677
1691
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 95</span>
1678
1692
 
1679
- <span class='kw'>def</span> <span class='id identifier rubyid_execute_command'>execute_command</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
1680
- <span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
1681
- <span class='kw'>end</span></pre>
1693
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_execute_command identifier id'>execute_command</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
1694
+ <span class='rubyid_system identifier id'>system</span><span class='lparen token'>(</span><span class='rubyid_command identifier id'>command</span><span class='rparen token'>)</span>
1695
+ <span class='rubyid_end end kw'>end</span>
1696
+ </pre>
1682
1697
  </td>
1683
1698
  </tr>
1684
1699
  </table>
@@ -1733,9 +1748,10 @@
1733
1748
  <td>
1734
1749
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 70</span>
1735
1750
 
1736
- <span class='kw'>def</span> <span class='id identifier rubyid_get_logger'>get_logger</span>
1737
- <span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='op'>?</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_default_file'>default_file</span> <span class='op'>:</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span><span class='comma'>,</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='comma'>,</span> <span class='ivar'>@log_formatter</span><span class='rparen'>)</span>
1738
- <span class='kw'>end</span></pre>
1751
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_get_logger identifier id'>get_logger</span>
1752
+ <span class='rubyid_@logger ivar id'>@logger</span> <span class='opasgn op'>||=</span> <span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_foreground identifier id'>foreground</span> <span class='integer val'>? </span><span class='rubyid_Bovem constant id'>Bovem</span><span class='colon2 op'>::</span><span class='rubyid_Logger constant id'>Logger</span><span class='dot token'>.</span><span class='rubyid_default_file identifier id'>default_file</span> <span class='colon op'>:</span> <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_log_file identifier id'>log_file</span><span class='comma token'>,</span> <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_log_level identifier id'>log_level</span><span class='comma token'>,</span> <span class='rubyid_@log_formatter ivar id'>@log_formatter</span><span class='rparen token'>)</span>
1753
+ <span class='rubyid_end end kw'>end</span>
1754
+ </pre>
1739
1755
  </td>
1740
1756
  </tr>
1741
1757
  </table>
@@ -1791,9 +1807,10 @@ System services are only available on that platform.</p>
1791
1807
  <td>
1792
1808
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 63</span>
1793
1809
 
1794
- <span class='kw'>def</span> <span class='id identifier rubyid_is_osx?'>is_osx?</span>
1795
- <span class='op'>::</span><span class='const'>Config</span><span class='op'>::</span><span class='const'>CONFIG</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>host_os</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^darwin</span><span class='regexp_end'>/</span></span>
1796
- <span class='kw'>end</span></pre>
1810
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_is_osx? fid id'>is_osx?</span>
1811
+ <span class='colon3 op'>::</span><span class='rubyid_Config constant id'>Config</span><span class='colon2 op'>::</span><span class='rubyid_CONFIG constant id'>CONFIG</span><span class='lbrack token'>[</span><span class='string val'>'host_os'</span><span class='rbrack token'>]</span> <span class='match op'>=~</span> <span class='regexp val'>/^darwin/</span>
1812
+ <span class='rubyid_end end kw'>end</span>
1813
+ </pre>
1797
1814
  </td>
1798
1815
  </tr>
1799
1816
  </table>
@@ -1869,9 +1886,10 @@ System services are only available on that platform.</p>
1869
1886
  <td>
1870
1887
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 87</span>
1871
1888
 
1872
- <span class='kw'>def</span> <span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>it.cowtech.devdnsd</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1873
- <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HOME</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/Library/LaunchAgents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>.plist</span><span class='tstring_end'>&quot;</span></span>
1874
- <span class='kw'>end</span></pre>
1889
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_launch_agent_path identifier id'>launch_agent_path</span><span class='lparen token'>(</span><span class='rubyid_name identifier id'>name</span> <span class='assign token'>=</span> <span class='string val'>&quot;it.cowtech.devdnsd&quot;</span><span class='rparen token'>)</span>
1890
+ <span class='rubyid_ENV constant id'>ENV</span><span class='lbrack token'>[</span><span class='string val'>&quot;HOME&quot;</span><span class='rbrack token'>]</span> <span class='plus op'>+</span> <span class='dstring node'>&quot;/Library/LaunchAgents/#{name}.plist&quot;</span>
1891
+ <span class='rubyid_end end kw'>end</span>
1892
+ </pre>
1875
1893
  </td>
1876
1894
  </tr>
1877
1895
  </table>
@@ -1925,8 +1943,9 @@ System services are only available on that platform.</p>
1925
1943
  <td>
1926
1944
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 333</span>
1927
1945
 
1928
- <span class='kw'>def</span> <span class='id identifier rubyid_on_start'>on_start</span>
1929
- <span class='kw'>end</span></pre>
1946
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_on_start identifier id'>on_start</span>
1947
+ <span class='rubyid_end end kw'>end</span>
1948
+ </pre>
1930
1949
  </td>
1931
1950
  </tr>
1932
1951
  </table>
@@ -1980,8 +1999,9 @@ System services are only available on that platform.</p>
1980
1999
  <td>
1981
2000
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 339</span>
1982
2001
 
1983
- <span class='kw'>def</span> <span class='id identifier rubyid_on_stop'>on_stop</span>
1984
- <span class='kw'>end</span></pre>
2002
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_on_stop identifier id'>on_stop</span>
2003
+ <span class='rubyid_end end kw'>end</span>
2004
+ </pre>
1985
2005
  </td>
1986
2006
  </tr>
1987
2007
  </table>
@@ -2073,46 +2093,47 @@ System services are only available on that platform.</p>
2073
2093
  <td>
2074
2094
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 110</span>
2075
2095
 
2076
- <span class='kw'>def</span> <span class='id identifier rubyid_perform_server'>perform_server</span>
2077
- <span class='const'>RubyDNS</span><span class='op'>::</span><span class='id identifier rubyid_run_server'>run_server</span><span class='lparen'>(</span><span class='symbol'>:listen</span> <span class='op'>=&gt;</span> <span class='lbracket'>[</span><span class='lbracket'>[</span><span class='symbol'>:udp</span><span class='comma'>,</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_address'>address</span><span class='comma'>,</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span>
2078
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span> <span class='op'>=</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span>
2079
-
2080
- <span class='id identifier rubyid_match'>match</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>.+</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='op'>::</span><span class='const'>ANY_CLASSES</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_match_data'>match_data</span><span class='comma'>,</span> <span class='id identifier rubyid_transaction'>transaction</span><span class='op'>|</span>
2081
- <span class='id identifier rubyid_transaction'>transaction</span><span class='period'>.</span><span class='id identifier rubyid_append_question!'>append_question!</span>
2082
-
2083
- <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span><span class='period'>.</span><span class='id identifier rubyid_rules'>rules</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_rule'>rule</span><span class='op'>|</span>
2084
- <span class='kw'>begin</span>
2085
- <span class='comment'># Get the subset of handled class that is valid for the rule
2086
- </span> <span class='id identifier rubyid_resource_classes'>resource_classes</span> <span class='op'>=</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='op'>::</span><span class='const'>ANY_CLASSES</span> <span class='op'>&amp;</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_resource_class'>resource_class</span><span class='period'>.</span><span class='id identifier rubyid_ensure_array'>ensure_array</span>
2087
- <span class='id identifier rubyid_resource_classes'>resource_classes</span> <span class='op'>=</span> <span class='id identifier rubyid_resource_classes'>resource_classes</span> <span class='op'>&amp;</span> <span class='lbracket'>[</span><span class='id identifier rubyid_transaction'>transaction</span><span class='period'>.</span><span class='id identifier rubyid_resource_class'>resource_class</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_transaction'>transaction</span><span class='period'>.</span><span class='id identifier rubyid_resource_class'>resource_class</span> <span class='op'>!=</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='op'>::</span><span class='const'>ANY_REQUEST</span>
2088
-
2089
- <span class='kw'>if</span> <span class='id identifier rubyid_resource_classes'>resource_classes</span><span class='period'>.</span><span class='id identifier rubyid_present?'>present?</span> <span class='kw'>then</span>
2090
- <span class='id identifier rubyid_resource_classes'>resource_classes</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_resource_class'>resource_class</span><span class='op'>|</span> <span class='comment'># Now for every class
2091
- </span> <span class='id identifier rubyid_matches'>matches</span> <span class='op'>=</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_match_host'>match_host</span><span class='lparen'>(</span><span class='id identifier rubyid_match_data'>match_data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='rparen'>)</span>
2092
- <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_process_rule'>process_rule</span><span class='lparen'>(</span><span class='id identifier rubyid_rule'>rule</span><span class='comma'>,</span> <span class='id identifier rubyid_resource_class'>resource_class</span><span class='comma'>,</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_is_regexp?'>is_regexp?</span> <span class='op'>?</span> <span class='id identifier rubyid_matches'>matches</span> <span class='op'>:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_transaction'>transaction</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_matches'>matches</span>
2093
- <span class='kw'>end</span>
2094
- <span class='kw'>end</span>
2095
- <span class='kw'>rescue</span> <span class='op'>::</span><span class='const'>Exception</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_e'>e</span>
2096
- <span class='id identifier rubyid_raise'>raise</span> <span class='id identifier rubyid_e'>e</span>
2097
- <span class='kw'>end</span>
2098
- <span class='kw'>end</span>
2099
- <span class='kw'>end</span>
2100
-
2101
- <span class='comment'># Default DNS handler
2102
- </span> <span class='id identifier rubyid_otherwise'>otherwise</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_transaction'>transaction</span><span class='op'>|</span>
2103
- <span class='id identifier rubyid_transaction'>transaction</span><span class='period'>.</span><span class='id identifier rubyid_failure!'>failure!</span><span class='lparen'>(</span><span class='symbol'>:NXDomain</span><span class='rparen'>)</span>
2104
- <span class='kw'>end</span>
2105
-
2106
- <span class='comment'># Attach event handlers
2107
- </span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='symbol'>:start</span><span class='rparen'>)</span> <span class='kw'>do</span>
2108
- <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_on_start'>on_start</span>
2109
- <span class='kw'>end</span>
2110
-
2111
- <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='symbol'>:stop</span><span class='rparen'>)</span> <span class='kw'>do</span>
2112
- <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_on_stop'>on_stop</span>
2113
- <span class='kw'>end</span>
2114
- <span class='kw'>end</span>
2115
- <span class='kw'>end</span></pre>
2096
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_perform_server identifier id'>perform_server</span>
2097
+ <span class='rubyid_RubyDNS constant id'>RubyDNS</span><span class='colon2 op'>::</span><span class='rubyid_run_server identifier id'>run_server</span><span class='lparen token'>(</span><span class='symbol val'>:listen</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='lbrack token'>[</span><span class='lbrack token'>[</span><span class='symbol val'>:udp</span><span class='comma token'>,</span> <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_address identifier id'>address</span><span class='comma token'>,</span> <span class='rubyid_@config ivar id'>@config</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><span class='rbrack token'>]</span><span class='rbrack token'>]</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
2098
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_logger identifier id'>logger</span> <span class='assign token'>=</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_logger identifier id'>logger</span>
2099
+
2100
+ <span class='rubyid_match identifier id'>match</span><span class='lparen token'>(</span><span class='regexp val'>/.+/</span><span class='comma token'>,</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='colon2 op'>::</span><span class='rubyid_ANY_CLASSES constant id'>ANY_CLASSES</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_match_data identifier id'>match_data</span><span class='comma token'>,</span> <span class='rubyid_transaction identifier id'>transaction</span><span class='bitor op'>|</span>
2101
+ <span class='rubyid_transaction identifier id'>transaction</span><span class='dot token'>.</span><span class='rubyid_append_question! fid id'>append_question!</span>
2102
+
2103
+ <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_config identifier id'>config</span><span class='dot token'>.</span><span class='rubyid_rules identifier id'>rules</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_rule identifier id'>rule</span><span class='bitor op'>|</span>
2104
+ <span class='rubyid_begin begin kw'>begin</span>
2105
+ <span class='comment val'># Get the subset of handled class that is valid for the rule</span>
2106
+ <span class='rubyid_resource_classes identifier id'>resource_classes</span> <span class='assign token'>=</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='colon2 op'>::</span><span class='rubyid_ANY_CLASSES constant id'>ANY_CLASSES</span> <span class='bitand op'>&amp;</span> <span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_resource_class identifier id'>resource_class</span><span class='dot token'>.</span><span class='rubyid_ensure_array identifier id'>ensure_array</span>
2107
+ <span class='rubyid_resource_classes identifier id'>resource_classes</span> <span class='assign token'>=</span> <span class='rubyid_resource_classes identifier id'>resource_classes</span> <span class='bitand op'>&amp;</span> <span class='lbrack token'>[</span><span class='rubyid_transaction identifier id'>transaction</span><span class='dot token'>.</span><span class='rubyid_resource_class identifier id'>resource_class</span><span class='rbrack token'>]</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_transaction identifier id'>transaction</span><span class='dot token'>.</span><span class='rubyid_resource_class identifier id'>resource_class</span> <span class='neq op'>!=</span> <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='colon2 op'>::</span><span class='rubyid_ANY_REQUEST constant id'>ANY_REQUEST</span>
2108
+
2109
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_resource_classes identifier id'>resource_classes</span><span class='dot token'>.</span><span class='rubyid_present? fid id'>present?</span> <span class='rubyid_then then kw'>then</span>
2110
+ <span class='rubyid_resource_classes identifier id'>resource_classes</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_resource_class identifier id'>resource_class</span><span class='bitor op'>|</span> <span class='comment val'># Now for every class</span>
2111
+ <span class='rubyid_matches identifier id'>matches</span> <span class='assign token'>=</span> <span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_match_host identifier id'>match_host</span><span class='lparen token'>(</span><span class='rubyid_match_data identifier id'>match_data</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='rparen token'>)</span>
2112
+ <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_process_rule identifier id'>process_rule</span><span class='lparen token'>(</span><span class='rubyid_rule identifier id'>rule</span><span class='comma token'>,</span> <span class='rubyid_resource_class identifier id'>resource_class</span><span class='comma token'>,</span> <span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_is_regexp? fid id'>is_regexp?</span> <span class='integer val'>? </span><span class='rubyid_matches identifier id'>matches</span> <span class='colon op'>:</span> <span class='rubyid_nil nil kw'>nil</span><span class='comma token'>,</span> <span class='rubyid_transaction identifier id'>transaction</span><span class='rparen token'>)</span> <span class='rubyid_if if_mod kw'>if</span> <span class='rubyid_matches identifier id'>matches</span>
2113
+ <span class='rubyid_end end kw'>end</span>
2114
+ <span class='rubyid_end end kw'>end</span>
2115
+ <span class='rubyid_rescue rescue kw'>rescue</span> <span class='colon2 op'>::</span><span class='rubyid_Exception constant id'>Exception</span> <span class='assign token'>=</span><span class='gt op'>&gt;</span> <span class='rubyid_e identifier id'>e</span>
2116
+ <span class='rubyid_raise identifier id'>raise</span> <span class='rubyid_e identifier id'>e</span>
2117
+ <span class='rubyid_end end kw'>end</span>
2118
+ <span class='rubyid_end end kw'>end</span>
2119
+ <span class='rubyid_end end kw'>end</span>
2120
+
2121
+ <span class='comment val'># Default DNS handler</span>
2122
+ <span class='rubyid_otherwise identifier id'>otherwise</span> <span class='rubyid_do do kw'>do</span> <span class='bitor op'>|</span><span class='rubyid_transaction identifier id'>transaction</span><span class='bitor op'>|</span>
2123
+ <span class='rubyid_transaction identifier id'>transaction</span><span class='dot token'>.</span><span class='rubyid_failure! fid id'>failure!</span><span class='lparen token'>(</span><span class='symbol val'>:NXDomain</span><span class='rparen token'>)</span>
2124
+ <span class='rubyid_end end kw'>end</span>
2125
+
2126
+ <span class='comment val'># Attach event handlers</span>
2127
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='symbol val'>:start</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
2128
+ <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_on_start identifier id'>on_start</span>
2129
+ <span class='rubyid_end end kw'>end</span>
2130
+
2131
+ <span class='rubyid_self self kw'>self</span><span class='dot token'>.</span><span class='rubyid_on identifier id'>on</span><span class='lparen token'>(</span><span class='symbol val'>:stop</span><span class='rparen token'>)</span> <span class='rubyid_do do kw'>do</span>
2132
+ <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_on_stop identifier id'>on_stop</span>
2133
+ <span class='rubyid_end end kw'>end</span>
2134
+ <span class='rubyid_end end kw'>end</span>
2135
+ <span class='rubyid_end end kw'>end</span>
2136
+ </pre>
2116
2137
  </td>
2117
2138
  </tr>
2118
2139
  </table>
@@ -2272,50 +2293,51 @@ System services are only available on that platform.</p>
2272
2293
  <td>
2273
2294
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 158</span>
2274
2295
 
2275
- <span class='kw'>def</span> <span class='id identifier rubyid_process_rule'>process_rule</span><span class='lparen'>(</span><span class='id identifier rubyid_rule'>rule</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_match_data'>match_data</span><span class='comma'>,</span> <span class='id identifier rubyid_transaction'>transaction</span><span class='rparen'>)</span>
2276
- <span class='id identifier rubyid_is_regex'>is_regex</span> <span class='op'>=</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</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'>Regexp</span><span class='rparen'>)</span>
2277
- <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Rule</span><span class='period'>.</span><span class='id identifier rubyid_resource_class_to_symbol'>resource_class_to_symbol</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
2278
-
2279
- <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Found match on </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='rbrace'>}</span><span class='tstring_content'> with type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2280
-
2281
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='kw'>then</span>
2282
- <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_match_data'>match_data</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_transaction'>transaction</span><span class='rparen'>)</span>
2283
- <span class='kw'>else</span>
2284
- <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_reply'>reply</span>
2285
- <span class='kw'>end</span>
2286
-
2287
- <span class='kw'>if</span> <span class='id identifier rubyid_is_regex'>is_regex</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_reply'>reply</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_match_data'>match_data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='kw'>then</span>
2288
- <span class='id identifier rubyid_reply'>reply</span> <span class='op'>=</span> <span class='id identifier rubyid_match_data'>match_data</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_match'>match</span><span class='comma'>,</span> <span class='id identifier rubyid_reply'>reply</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</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='comma'>,</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><span class='rparen'>)</span>
2289
- <span class='kw'>end</span>
2290
-
2291
- <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Application</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='period'>.</span><span class='id identifier rubyid_logger'>logger</span><span class='period'>.</span><span class='id identifier rubyid_debug'>debug</span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span> <span class='op'>?</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Reply is </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_reply'>reply</span><span class='rbrace'>}</span><span class='tstring_content'> with type </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_type'>type</span><span class='rbrace'>}</span><span class='tstring_content'>.</span><span class='tstring_end'>&quot;</span></span> <span class='op'>:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>No reply found.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2292
-
2293
- <span class='kw'>if</span> <span class='id identifier rubyid_reply'>reply</span> <span class='kw'>then</span>
2294
- <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='id identifier rubyid_rule'>rule</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span>
2295
-
2296
- <span class='id identifier rubyid_final_reply'>final_reply</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
2297
-
2298
- <span class='kw'>case</span> <span class='id identifier rubyid_type'>type</span>
2299
- <span class='kw'>when</span> <span class='symbol'>:MX</span>
2300
- <span class='id identifier rubyid_preference'>preference</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:preference</span><span class='rparen'>)</span>
2301
- <span class='id identifier rubyid_preference'>preference</span> <span class='op'>=</span> <span class='id identifier rubyid_preference'>preference</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>?</span> <span class='int'>10</span> <span class='op'>:</span> <span class='id identifier rubyid_preference'>preference</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='lparen'>(</span><span class='int'>10</span><span class='rparen'>)</span>
2302
- <span class='id identifier rubyid_final_reply'>final_reply</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_preference'>preference</span>
2303
- <span class='kw'>end</span>
2304
-
2305
- <span class='kw'>if</span> <span class='lbracket'>[</span><span class='symbol'>:A</span><span class='comma'>,</span> <span class='symbol'>:AAAA</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_type'>type</span><span class='rparen'>)</span> <span class='kw'>then</span>
2306
- <span class='id identifier rubyid_final_reply'>final_reply</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_reply'>reply</span>
2307
- <span class='kw'>else</span>
2308
- <span class='id identifier rubyid_final_reply'>final_reply</span> <span class='op'>&lt;&lt;</span> <span class='const'>Resolv</span><span class='op'>::</span><span class='const'>DNS</span><span class='op'>::</span><span class='const'>Name</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='id identifier rubyid_reply'>reply</span><span class='rparen'>)</span>
2309
- <span class='kw'>end</span>
2310
-
2311
- <span class='id identifier rubyid_final_reply'>final_reply</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_merge'>merge</span><span class='lparen'>(</span><span class='lbrace'>{</span><span class='symbol'>:resource_class</span> <span class='op'>=&gt;</span> <span class='const'>DevDNSd</span><span class='op'>::</span><span class='const'>Rule</span><span class='period'>.</span><span class='id identifier rubyid_symbol_to_resource_class'>symbol_to_resource_class</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='rparen'>)</span>
2312
- <span class='id identifier rubyid_transaction'>transaction</span><span class='period'>.</span><span class='id identifier rubyid_respond!'>respond!</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_final_reply'>final_reply</span><span class='rparen'>)</span>
2313
- <span class='kw'>elsif</span> <span class='id identifier rubyid_reply'>reply</span> <span class='op'>==</span> <span class='kw'>false</span> <span class='kw'>then</span>
2314
- <span class='kw'>false</span>
2315
- <span class='kw'>else</span>
2316
- <span class='id identifier rubyid_reply'>reply</span>
2317
- <span class='kw'>end</span>
2318
- <span class='kw'>end</span></pre>
2296
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_process_rule identifier id'>process_rule</span><span class='lparen token'>(</span><span class='rubyid_rule identifier id'>rule</span><span class='comma token'>,</span> <span class='rubyid_type identifier id'>type</span><span class='comma token'>,</span> <span class='rubyid_match_data identifier id'>match_data</span><span class='comma token'>,</span> <span class='rubyid_transaction identifier id'>transaction</span><span class='rparen token'>)</span>
2297
+ <span class='rubyid_is_regex identifier id'>is_regex</span> <span class='assign token'>=</span> <span class='rubyid_rule identifier id'>rule</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>
2298
+ <span class='rubyid_type identifier id'>type</span> <span class='assign token'>=</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_resource_class_to_symbol identifier id'>resource_class_to_symbol</span><span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span><span class='rparen token'>)</span>
2299
+
2300
+ <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_debug identifier id'>debug</span><span class='lparen token'>(</span><span class='dstring node'>&quot;Found match on #{rule.match} with type #{type}.&quot;</span><span class='rparen token'>)</span>
2301
+
2302
+ <span class='rubyid_if if kw'>if</span> <span class='notop op'>!</span><span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_block identifier id'>block</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='rubyid_then then kw'>then</span>
2303
+ <span class='rubyid_reply identifier id'>reply</span> <span class='assign token'>=</span> <span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_block identifier id'>block</span><span class='dot token'>.</span><span class='rubyid_call identifier id'>call</span><span class='lparen token'>(</span><span class='rubyid_match_data identifier id'>match_data</span><span class='comma token'>,</span> <span class='rubyid_type identifier id'>type</span><span class='comma token'>,</span> <span class='rubyid_transaction identifier id'>transaction</span><span class='rparen token'>)</span>
2304
+ <span class='rubyid_else else kw'>else</span>
2305
+ <span class='rubyid_reply identifier id'>reply</span> <span class='assign token'>=</span> <span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_reply identifier id'>reply</span>
2306
+ <span class='rubyid_end end kw'>end</span>
2307
+
2308
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_is_regex identifier id'>is_regex</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_reply identifier id'>reply</span> <span class='andop op'>&amp;&amp;</span> <span class='rubyid_match_data identifier id'>match_data</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span> <span class='rubyid_then then kw'>then</span>
2309
+ <span class='rubyid_reply identifier id'>reply</span> <span class='assign token'>=</span> <span class='rubyid_match_data identifier id'>match_data</span><span class='lbrack token'>[</span><span class='integer val'>0</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_match identifier id'>match</span><span class='comma token'>,</span> <span class='rubyid_reply identifier id'>reply</span><span class='dot token'>.</span><span class='rubyid_gsub identifier id'>gsub</span><span class='lparen token'>(</span><span class='string val'>&quot;$&quot;</span><span class='comma token'>,</span> <span class='string val'>&quot;\\&quot;</span><span class='rparen token'>)</span><span class='rparen token'>)</span>
2310
+ <span class='rubyid_end end kw'>end</span>
2311
+
2312
+ <span class='rubyid_DevDNSd constant id'>DevDNSd</span><span class='colon2 op'>::</span><span class='rubyid_Application constant id'>Application</span><span class='dot token'>.</span><span class='rubyid_instance identifier id'>instance</span><span class='dot token'>.</span><span class='rubyid_logger identifier id'>logger</span><span class='dot token'>.</span><span class='rubyid_debug identifier id'>debug</span><span class='lparen token'>(</span><span class='rubyid_reply identifier id'>reply</span> <span class='integer val'>? </span><span class='dstring node'>&quot;Reply is #{reply} with type #{type}.&quot;</span> <span class='colon op'>:</span> <span class='string val'>&quot;No reply found.&quot;</span><span class='rparen token'>)</span>
2313
+
2314
+ <span class='rubyid_if if kw'>if</span> <span class='rubyid_reply identifier id'>reply</span> <span class='rubyid_then then kw'>then</span>
2315
+ <span class='rubyid_options identifier id'>options</span> <span class='assign token'>=</span> <span class='rubyid_rule identifier id'>rule</span><span class='dot token'>.</span><span class='rubyid_options identifier id'>options</span>
2316
+
2317
+ <span class='rubyid_final_reply identifier id'>final_reply</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
2318
+
2319
+ <span class='rubyid_case case kw'>case</span> <span class='rubyid_type identifier id'>type</span>
2320
+ <span class='rubyid_when when kw'>when</span> <span class='symbol val'>:MX</span>
2321
+ <span class='rubyid_preference identifier id'>preference</span> <span class='assign token'>=</span> <span class='rubyid_options identifier id'>options</span><span class='dot token'>.</span><span class='rubyid_delete identifier id'>delete</span><span class='lparen token'>(</span><span class='symbol val'>:preference</span><span class='rparen token'>)</span>
2322
+ <span class='rubyid_preference identifier id'>preference</span> <span class='assign token'>=</span> <span class='rubyid_preference identifier id'>preference</span><span class='dot token'>.</span><span class='rubyid_nil? fid id'>nil?</span> <span class='integer val'>? </span><span class='integer val'>10</span> <span class='colon op'>:</span> <span class='rubyid_preference identifier id'>preference</span><span class='dot token'>.</span><span class='rubyid_to_integer identifier id'>to_integer</span><span class='lparen token'>(</span><span class='integer val'>10</span><span class='rparen token'>)</span>
2323
+ <span class='rubyid_final_reply identifier id'>final_reply</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_preference identifier id'>preference</span>
2324
+ <span class='rubyid_end end kw'>end</span>
2325
+
2326
+ <span class='rubyid_if if kw'>if</span> <span class='lbrack token'>[</span><span class='symbol val'>:A</span><span class='comma token'>,</span> <span class='symbol val'>:AAAA</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_type identifier id'>type</span><span class='rparen token'>)</span> <span class='rubyid_then then kw'>then</span>
2327
+ <span class='rubyid_final_reply identifier id'>final_reply</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_reply identifier id'>reply</span>
2328
+ <span class='rubyid_else else kw'>else</span>
2329
+ <span class='rubyid_final_reply identifier id'>final_reply</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_Resolv constant id'>Resolv</span><span class='colon2 op'>::</span><span class='rubyid_DNS constant id'>DNS</span><span class='colon2 op'>::</span><span class='rubyid_Name constant id'>Name</span><span class='dot token'>.</span><span class='rubyid_create identifier id'>create</span><span class='lparen token'>(</span><span class='rubyid_reply identifier id'>reply</span><span class='rparen token'>)</span>
2330
+ <span class='rubyid_end end kw'>end</span>
2331
+
2332
+ <span class='rubyid_final_reply identifier id'>final_reply</span> <span class='lshft op'>&lt;&lt;</span> <span class='rubyid_options identifier id'>options</span><span class='dot token'>.</span><span class='rubyid_merge identifier id'>merge</span><span class='lparen token'>(</span><span class='lbrace token'>{</span><span class='symbol val'>:resource_class</span> <span class='assign token'>=</span><span class='gt op'>&gt;</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_symbol_to_resource_class identifier id'>symbol_to_resource_class</span><span class='lparen token'>(</span><span class='rubyid_type identifier id'>type</span><span class='rparen token'>)</span><span class='rbrace token'>}</span><span class='rparen token'>)</span>
2333
+ <span class='rubyid_transaction identifier id'>transaction</span><span class='dot token'>.</span><span class='rubyid_respond! fid id'>respond!</span><span class='lparen token'>(</span><span class='mult op'>*</span><span class='rubyid_final_reply identifier id'>final_reply</span><span class='rparen token'>)</span>
2334
+ <span class='rubyid_elsif elsif kw'>elsif</span> <span class='rubyid_reply identifier id'>reply</span> <span class='eq op'>==</span> <span class='rubyid_false false kw'>false</span> <span class='rubyid_then then kw'>then</span>
2335
+ <span class='rubyid_false false kw'>false</span>
2336
+ <span class='rubyid_else else kw'>else</span>
2337
+ <span class='rubyid_reply identifier id'>reply</span>
2338
+ <span class='rubyid_end end kw'>end</span>
2339
+ <span class='rubyid_end end kw'>end</span>
2340
+ </pre>
2319
2341
  </td>
2320
2342
  </tr>
2321
2343
  </table>
@@ -2392,10 +2414,11 @@ System services are only available on that platform.</p>
2392
2414
  <td>
2393
2415
  <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 78</span>
2394
2416
 
2395
- <span class='kw'>def</span> <span class='id identifier rubyid_resolver_path'>resolver_path</span><span class='lparen'>(</span><span class='id identifier rubyid_tld'>tld</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2396
- <span class='id identifier rubyid_tld'>tld</span> <span class='op'>||=</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_tld'>tld</span>
2397
- <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/etc/resolver/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_tld'>tld</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
2398
- <span class='kw'>end</span></pre>
2417
+ <span class='rubyid_def def kw'>def</span> <span class='rubyid_resolver_path identifier id'>resolver_path</span><span class='lparen token'>(</span><span class='rubyid_tld identifier id'>tld</span> <span class='assign token'>=</span> <span class='rubyid_nil nil kw'>nil</span><span class='rparen token'>)</span>
2418
+ <span class='rubyid_tld identifier id'>tld</span> <span class='opasgn op'>||=</span> <span class='rubyid_@config ivar id'>@config</span><span class='dot token'>.</span><span class='rubyid_tld identifier id'>tld</span>
2419
+ <span class='dstring node'>&quot;/etc/resolver/#{tld}&quot;</span>
2420
+ <span class='rubyid_end end kw'>end</span>
2421
+ </pre>
2399
2422
  </td>
2400
2423
  </tr>
2401
2424
  </table>
@@ -2406,9 +2429,9 @@ System services are only available on that platform.</p>
2406
2429
  </div>
2407
2430
 
2408
2431
  <div id="footer">
2409
- Generated on Wed Aug 22 13:48:32 2012 by
2432
+ Generated on Sat Oct 6 08:58:34 2012 by
2410
2433
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2411
- 0.8.2.1 (ruby-1.9.2).
2434
+ 0.8.2.1 (ruby-1.8.7).
2412
2435
  </div>
2413
2436
 
2414
2437
  </body>