devdnsd 3.0.7 → 3.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.bundle/install.log +44 -0
- data/1 +0 -0
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/bin/devdnsd +13 -7
- data/doc/DevDNSd/Application.html +489 -161
- data/doc/DevDNSd/ApplicationMethods/Aliases.html +61 -61
- data/doc/DevDNSd/ApplicationMethods/Server.html +43 -43
- data/doc/DevDNSd/ApplicationMethods/System/ClassMethods.html +1 -1
- data/doc/DevDNSd/ApplicationMethods/System.html +55 -39
- data/doc/DevDNSd/ApplicationMethods.html +1 -1
- data/doc/DevDNSd/Configuration.html +18 -8
- data/doc/DevDNSd/Errors/InvalidRule.html +1 -1
- data/doc/DevDNSd/Errors.html +1 -1
- data/doc/DevDNSd/Rule.html +1 -1
- data/doc/DevDNSd/Version.html +2 -2
- data/doc/DevDNSd.html +1 -1
- data/doc/_index.html +1 -1
- data/doc/file.README.html +2 -2
- data/doc/index.html +2 -2
- data/doc/top-level-namespace.html +1 -1
- data/lib/devdnsd/application.rb +85 -23
- data/lib/devdnsd/configuration.rb +11 -6
- data/lib/devdnsd/version.rb +1 -1
- data/lib/devdnsd.rb +1 -0
- data/locales/en.yml +3 -1
- data/locales/it.yml +3 -1
- data/spec/devdnsd/application_spec.rb +37 -3
- data/spec/devdnsd/configuration_spec.rb +6 -1
- metadata +2 -1
|
@@ -305,13 +305,13 @@
|
|
|
305
305
|
<pre class="lines">
|
|
306
306
|
|
|
307
307
|
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
382
|
|
309
|
+
383
|
|
310
|
+
384
|
|
311
|
+
385</pre>
|
|
312
312
|
</td>
|
|
313
313
|
<td>
|
|
314
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
314
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 382</span>
|
|
315
315
|
|
|
316
316
|
<span class='kw'>def</span> <span class='id identifier rubyid_compute_addresses'>compute_addresses</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='symbol'>:all</span><span class='rparen'>)</span>
|
|
317
317
|
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span>
|
|
@@ -383,15 +383,15 @@
|
|
|
383
383
|
<pre class="lines">
|
|
384
384
|
|
|
385
385
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
386
|
+
391
|
|
387
|
+
392
|
|
388
|
+
393
|
|
389
|
+
394
|
|
390
|
+
395
|
|
391
|
+
396</pre>
|
|
392
392
|
</td>
|
|
393
393
|
<td>
|
|
394
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
394
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 391</span>
|
|
395
395
|
|
|
396
396
|
<span class='kw'>def</span> <span class='id identifier rubyid_is_ipv4?'>is_ipv4?</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
|
|
397
397
|
<span class='id identifier rubyid_address'>address</span> <span class='op'>=</span> <span class='id identifier rubyid_address'>address</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
|
@@ -465,25 +465,25 @@
|
|
|
465
465
|
<pre class="lines">
|
|
466
466
|
|
|
467
467
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
468
|
+
402
|
|
469
|
+
403
|
|
470
|
+
404
|
|
471
|
+
405
|
|
472
|
+
406
|
|
473
|
+
407
|
|
474
|
+
408
|
|
475
|
+
409
|
|
476
|
+
410
|
|
477
|
+
411
|
|
478
|
+
412
|
|
479
|
+
413
|
|
480
|
+
414
|
|
481
|
+
415
|
|
482
|
+
416
|
|
483
|
+
417</pre>
|
|
484
484
|
</td>
|
|
485
485
|
<td>
|
|
486
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
486
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 402</span>
|
|
487
487
|
|
|
488
488
|
<span class='kw'>def</span> <span class='id identifier rubyid_is_ipv6?'>is_ipv6?</span><span class='lparen'>(</span><span class='id identifier rubyid_address'>address</span><span class='rparen'>)</span>
|
|
489
489
|
<span class='id identifier rubyid_address'>address</span> <span class='op'>=</span> <span class='id identifier rubyid_address'>address</span><span class='period'>.</span><span class='id identifier rubyid_ensure_string'>ensure_string</span>
|
|
@@ -599,24 +599,24 @@
|
|
|
599
599
|
<pre class="lines">
|
|
600
600
|
|
|
601
601
|
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
602
|
+
362
|
|
603
|
+
363
|
|
604
|
+
364
|
|
605
|
+
365
|
|
606
|
+
366
|
|
607
|
+
367
|
|
608
|
+
368
|
|
609
|
+
369
|
|
610
|
+
370
|
|
611
|
+
371
|
|
612
|
+
372
|
|
613
|
+
373
|
|
614
|
+
374
|
|
615
|
+
375
|
|
616
|
+
376</pre>
|
|
617
617
|
</td>
|
|
618
618
|
<td>
|
|
619
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
619
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 362</span>
|
|
620
620
|
|
|
621
621
|
<span class='kw'>def</span> <span class='id identifier rubyid_manage_address'>manage_address</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='id identifier rubyid_address'>address</span><span class='comma'>,</span> <span class='id identifier rubyid_dry_run'>dry_run</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
|
|
622
622
|
<span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='id identifier rubyid_i18n'>i18n</span>
|
|
@@ -729,23 +729,23 @@
|
|
|
729
729
|
<pre class="lines">
|
|
730
730
|
|
|
731
731
|
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
732
|
+
341
|
|
733
|
+
342
|
|
734
|
+
343
|
|
735
|
+
344
|
|
736
|
+
345
|
|
737
|
+
346
|
|
738
|
+
347
|
|
739
|
+
348
|
|
740
|
+
349
|
|
741
|
+
350
|
|
742
|
+
351
|
|
743
|
+
352
|
|
744
|
+
353
|
|
745
|
+
354</pre>
|
|
746
746
|
</td>
|
|
747
747
|
<td>
|
|
748
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
748
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 341</span>
|
|
749
749
|
|
|
750
750
|
<span class='kw'>def</span> <span class='id identifier rubyid_manage_aliases'>manage_aliases</span><span class='lparen'>(</span><span class='id identifier rubyid_operation'>operation</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
751
751
|
<span class='id identifier rubyid_config'>config</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_config'>config</span>
|
|
@@ -771,7 +771,7 @@
|
|
|
771
771
|
</div>
|
|
772
772
|
|
|
773
773
|
<div id="footer">
|
|
774
|
-
Generated on Sat Mar 8
|
|
774
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
775
775
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
776
776
|
0.8.7.3 (ruby-2.1.0).
|
|
777
777
|
</div>
|
|
@@ -233,24 +233,24 @@
|
|
|
233
233
|
<pre class="lines">
|
|
234
234
|
|
|
235
235
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
236
|
+
513
|
|
237
|
+
514
|
|
238
|
+
515
|
|
239
|
+
516
|
|
240
|
+
517
|
|
241
|
+
518
|
|
242
|
+
519
|
|
243
|
+
520
|
|
244
|
+
521
|
|
245
|
+
522
|
|
246
|
+
523
|
|
247
|
+
524
|
|
248
|
+
525
|
|
249
|
+
526
|
|
250
|
+
527</pre>
|
|
251
251
|
</td>
|
|
252
252
|
<td>
|
|
253
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
253
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 513</span>
|
|
254
254
|
|
|
255
255
|
<span class='kw'>def</span> <span class='id identifier rubyid_perform_server'>perform_server</span>
|
|
256
256
|
<span class='id identifier rubyid_application'>application</span> <span class='op'>=</span> <span class='kw'>self</span>
|
|
@@ -361,21 +361,21 @@
|
|
|
361
361
|
<pre class="lines">
|
|
362
362
|
|
|
363
363
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
364
|
+
535
|
|
365
|
+
536
|
|
366
|
+
537
|
|
367
|
+
538
|
|
368
|
+
539
|
|
369
|
+
540
|
|
370
|
+
541
|
|
371
|
+
542
|
|
372
|
+
543
|
|
373
|
+
544
|
|
374
|
+
545
|
|
375
|
+
546</pre>
|
|
376
376
|
</td>
|
|
377
377
|
<td>
|
|
378
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
378
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 535</span>
|
|
379
379
|
|
|
380
380
|
<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>
|
|
381
381
|
<span class='id identifier rubyid_reply'>reply</span><span class='comma'>,</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='id identifier rubyid_perform_process_rule'>perform_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>
|
|
@@ -468,21 +468,21 @@
|
|
|
468
468
|
<pre class="lines">
|
|
469
469
|
|
|
470
470
|
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
471
|
+
553
|
|
472
|
+
554
|
|
473
|
+
555
|
|
474
|
+
556
|
|
475
|
+
557
|
|
476
|
+
558
|
|
477
|
+
559
|
|
478
|
+
560
|
|
479
|
+
561
|
|
480
|
+
562
|
|
481
|
+
563
|
|
482
|
+
564</pre>
|
|
483
483
|
</td>
|
|
484
484
|
<td>
|
|
485
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
485
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 553</span>
|
|
486
486
|
|
|
487
487
|
<span class='kw'>def</span> <span class='id identifier rubyid_process_rule_in_classes'>process_rule_in_classes</span><span class='lparen'>(</span><span class='id identifier rubyid_rule'>rule</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>
|
|
488
488
|
<span class='comment'># Get the subset of handled class that is valid for the rule
|
|
@@ -506,7 +506,7 @@
|
|
|
506
506
|
</div>
|
|
507
507
|
|
|
508
508
|
<div id="footer">
|
|
509
|
-
Generated on Sat Mar 8
|
|
509
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
510
510
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
511
511
|
0.8.7.3 (ruby-2.1.0).
|
|
512
512
|
</div>
|
|
@@ -529,7 +529,7 @@
|
|
|
529
529
|
</div>
|
|
530
530
|
|
|
531
531
|
<div id="footer">
|
|
532
|
-
Generated on Sat Mar 8
|
|
532
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
533
533
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
534
534
|
0.8.7.3 (ruby-2.1.0).
|
|
535
535
|
</div>
|
|
@@ -451,12 +451,12 @@
|
|
|
451
451
|
<pre class="lines">
|
|
452
452
|
|
|
453
453
|
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
454
|
+
133
|
|
455
|
+
134
|
|
456
|
+
135</pre>
|
|
457
457
|
</td>
|
|
458
458
|
<td>
|
|
459
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
459
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 133</span>
|
|
460
460
|
|
|
461
461
|
<span class='kw'>def</span> <span class='id identifier rubyid_action_add'>action_add</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
462
462
|
<span class='id identifier rubyid_manage_aliases'>manage_aliases</span><span class='lparen'>(</span><span class='symbol'>:add</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_add_empty'>add_empty</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
@@ -508,12 +508,12 @@
|
|
|
508
508
|
<pre class="lines">
|
|
509
509
|
|
|
510
510
|
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
511
|
+
149
|
|
512
|
+
150
|
|
513
|
+
151</pre>
|
|
514
514
|
</td>
|
|
515
515
|
<td>
|
|
516
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
516
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 149</span>
|
|
517
517
|
|
|
518
518
|
<span class='kw'>def</span> <span class='id identifier rubyid_action_install'>action_install</span>
|
|
519
519
|
<span class='id identifier rubyid_manage_installation'>manage_installation</span><span class='lparen'>(</span><span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_resolver_path'>resolver_path</span><span class='comma'>,</span> <span class='symbol'>:create_resolver</span><span class='comma'>,</span> <span class='symbol'>:create_agent</span><span class='comma'>,</span> <span class='symbol'>:load_agent</span><span class='rparen'>)</span>
|
|
@@ -584,12 +584,12 @@
|
|
|
584
584
|
<pre class="lines">
|
|
585
585
|
|
|
586
586
|
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
587
|
+
141
|
|
588
|
+
142
|
|
589
|
+
143</pre>
|
|
590
590
|
</td>
|
|
591
591
|
<td>
|
|
592
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
592
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 141</span>
|
|
593
593
|
|
|
594
594
|
<span class='kw'>def</span> <span class='id identifier rubyid_action_remove'>action_remove</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
595
595
|
<span class='id identifier rubyid_manage_aliases'>manage_aliases</span><span class='lparen'>(</span><span class='symbol'>:remove</span><span class='comma'>,</span> <span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_remove_empty'>remove_empty</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
@@ -641,22 +641,22 @@
|
|
|
641
641
|
<pre class="lines">
|
|
642
642
|
|
|
643
643
|
|
|
644
|
-
99
|
|
645
|
-
100
|
|
646
|
-
101
|
|
647
|
-
102
|
|
648
|
-
103
|
|
649
|
-
104
|
|
650
|
-
105
|
|
651
|
-
106
|
|
652
644
|
107
|
|
653
645
|
108
|
|
654
646
|
109
|
|
655
647
|
110
|
|
656
|
-
111
|
|
648
|
+
111
|
|
649
|
+
112
|
|
650
|
+
113
|
|
651
|
+
114
|
|
652
|
+
115
|
|
653
|
+
116
|
|
654
|
+
117
|
|
655
|
+
118
|
|
656
|
+
119</pre>
|
|
657
657
|
</td>
|
|
658
658
|
<td>
|
|
659
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
659
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 107</span>
|
|
660
660
|
|
|
661
661
|
<span class='kw'>def</span> <span class='id identifier rubyid_action_start'>action_start</span>
|
|
662
662
|
<span class='id identifier rubyid_get_logger'>get_logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_starting'>starting</span><span class='rparen'>)</span>
|
|
@@ -718,13 +718,13 @@
|
|
|
718
718
|
<pre class="lines">
|
|
719
719
|
|
|
720
720
|
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
721
|
+
124
|
|
722
|
+
125
|
|
723
|
+
126
|
|
724
|
+
127</pre>
|
|
725
725
|
</td>
|
|
726
726
|
<td>
|
|
727
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
727
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 124</span>
|
|
728
728
|
|
|
729
729
|
<span class='kw'>def</span> <span class='id identifier rubyid_action_stop'>action_stop</span>
|
|
730
730
|
<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>
|
|
@@ -777,12 +777,12 @@
|
|
|
777
777
|
<pre class="lines">
|
|
778
778
|
|
|
779
779
|
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
780
|
+
156
|
|
781
|
+
157
|
|
782
|
+
158</pre>
|
|
783
783
|
</td>
|
|
784
784
|
<td>
|
|
785
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
785
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 156</span>
|
|
786
786
|
|
|
787
787
|
<span class='kw'>def</span> <span class='id identifier rubyid_action_uninstall'>action_uninstall</span>
|
|
788
788
|
<span class='id identifier rubyid_manage_installation'>manage_installation</span><span class='lparen'>(</span><span class='id identifier rubyid_launch_agent_path'>launch_agent_path</span><span class='comma'>,</span> <span class='id identifier rubyid_resolver_path'>resolver_path</span><span class='comma'>,</span> <span class='symbol'>:delete_resolver</span><span class='comma'>,</span> <span class='symbol'>:unload_agent</span><span class='comma'>,</span> <span class='symbol'>:delete_agent</span><span class='rparen'>)</span>
|
|
@@ -837,14 +837,30 @@
|
|
|
837
837
|
82
|
|
838
838
|
83
|
|
839
839
|
84
|
|
840
|
-
85
|
|
840
|
+
85
|
|
841
|
+
86
|
|
842
|
+
87
|
|
843
|
+
88
|
|
844
|
+
89
|
|
845
|
+
90
|
|
846
|
+
91
|
|
847
|
+
92
|
|
848
|
+
93</pre>
|
|
841
849
|
</td>
|
|
842
850
|
<td>
|
|
843
851
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 82</span>
|
|
844
852
|
|
|
845
853
|
<span class='kw'>def</span> <span class='id identifier rubyid_dns_update'>dns_update</span>
|
|
846
854
|
<span class='ivar'>@logger</span><span class='period'>.</span><span class='id identifier rubyid_info'>info</span><span class='lparen'>(</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_dns_update'>dns_update</span><span class='rparen'>)</span>
|
|
847
|
-
|
|
855
|
+
|
|
856
|
+
<span class='id identifier rubyid_script'>script</span> <span class='op'>=</span> <span class='const'>Tempfile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>devdnsd-dns-cache-script</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
857
|
+
<span class='id identifier rubyid_script'>script</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>dscacheutil -flushcache 2&>1 > /dev/null\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
858
|
+
<span class='id identifier rubyid_script'>script</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>killall -9 mDNSResponder 2&>1 > /dev/null\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
859
|
+
<span class='id identifier rubyid_script'>script</span><span class='period'>.</span><span class='id identifier rubyid_write'>write</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>killall -9 mDNSResponderHelper 2&>1 > /dev/null\n</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
860
|
+
<span class='id identifier rubyid_script'>script</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span>
|
|
861
|
+
|
|
862
|
+
<span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/usr/bin/osascript -e 'do shell script \"sh </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_script'>script</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" with administrator privileges' 2&>1 > /dev/null</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
863
|
+
<span class='id identifier rubyid_script'>script</span><span class='period'>.</span><span class='id identifier rubyid_unlink'>unlink</span>
|
|
848
864
|
<span class='kw'>end</span></pre>
|
|
849
865
|
</td>
|
|
850
866
|
</tr>
|
|
@@ -920,7 +936,7 @@
|
|
|
920
936
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 75</span>
|
|
921
937
|
|
|
922
938
|
<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>
|
|
923
|
-
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
|
|
939
|
+
<span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_command'>command</span><span class='embexpr_end'>}</span><span class='tstring_content'> 2&>1 > /dev/null</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
924
940
|
<span class='kw'>end</span></pre>
|
|
925
941
|
</td>
|
|
926
942
|
</tr>
|
|
@@ -971,12 +987,12 @@
|
|
|
971
987
|
<pre class="lines">
|
|
972
988
|
|
|
973
989
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
990
|
+
100
|
|
991
|
+
101
|
|
992
|
+
102</pre>
|
|
977
993
|
</td>
|
|
978
994
|
<td>
|
|
979
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line
|
|
995
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 100</span>
|
|
980
996
|
|
|
981
997
|
<span class='kw'>def</span> <span class='id identifier rubyid_is_osx?'>is_osx?</span>
|
|
982
998
|
<span class='op'>::</span><span class='const'>RbConfig</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>
|
|
@@ -1149,7 +1165,7 @@
|
|
|
1149
1165
|
</div>
|
|
1150
1166
|
|
|
1151
1167
|
<div id="footer">
|
|
1152
|
-
Generated on Sat Mar 8
|
|
1168
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
1153
1169
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1154
1170
|
0.8.7.3 (ruby-2.1.0).
|
|
1155
1171
|
</div>
|
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on Sat Mar 8
|
|
119
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.8.7.3 (ruby-2.1.0).
|
|
122
122
|
</div>
|
|
@@ -279,7 +279,12 @@ config.add_rule("match.dev", "10.0.0.1")
|
|
|
279
279
|
72
|
|
280
280
|
73
|
|
281
281
|
74
|
|
282
|
-
75
|
|
282
|
+
75
|
|
283
|
+
76
|
|
284
|
+
77
|
|
285
|
+
78
|
|
286
|
+
79
|
|
287
|
+
80</pre>
|
|
283
288
|
</td>
|
|
284
289
|
<td>
|
|
285
290
|
<pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 64</span>
|
|
@@ -288,8 +293,13 @@ config.add_rule("match.dev", "10.0.0.1")
|
|
|
288
293
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='id identifier rubyid_file'>file</span><span class='comma'>,</span> <span class='id identifier rubyid_overrides'>overrides</span><span class='comma'>,</span> <span class='id identifier rubyid_logger'>logger</span><span class='rparen'>)</span>
|
|
289
294
|
|
|
290
295
|
<span class='comment'># Make sure some arguments are of correct type
|
|
291
|
-
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span> <span class='op'>=</span> <span class='
|
|
292
|
-
|
|
296
|
+
</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span> <span class='op'>=</span> <span class='kw'>case</span> <span class='id identifier rubyid_log_file'>log_file</span>
|
|
297
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='gvar'>$stdout</span>
|
|
298
|
+
<span class='kw'>when</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>"</span></span> <span class='kw'>then</span> <span class='gvar'>$stderr</span>
|
|
299
|
+
<span class='kw'>else</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_log_file'>log_file</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
300
|
+
<span class='kw'>end</span>
|
|
301
|
+
|
|
302
|
+
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pid_file'>pid_file</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_absolute_path'>absolute_path</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_pid_file'>pid_file</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
293
303
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_port'>port</span> <span class='op'>=</span> <span class='id identifier rubyid_port'>port</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
|
|
294
304
|
<span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span> <span class='op'>=</span> <span class='id identifier rubyid_log_level'>log_level</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span>
|
|
295
305
|
|
|
@@ -391,12 +401,12 @@ config.add_rule("match.dev", "10.0.0.1")
|
|
|
391
401
|
<pre class="lines">
|
|
392
402
|
|
|
393
403
|
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
404
|
+
88
|
|
405
|
+
89
|
|
406
|
+
90</pre>
|
|
397
407
|
</td>
|
|
398
408
|
<td>
|
|
399
|
-
<pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line
|
|
409
|
+
<pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 88</span>
|
|
400
410
|
|
|
401
411
|
<span class='kw'>def</span> <span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
402
412
|
<span class='id identifier rubyid_rules'>rules</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_create'>create</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
@@ -411,7 +421,7 @@ config.add_rule("match.dev", "10.0.0.1")
|
|
|
411
421
|
</div>
|
|
412
422
|
|
|
413
423
|
<div id="footer">
|
|
414
|
-
Generated on Sat Mar 8
|
|
424
|
+
Generated on Sat Mar 8 15:25:57 2014 by
|
|
415
425
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
416
426
|
0.8.7.3 (ruby-2.1.0).
|
|
417
427
|
</div>
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
</div>
|
|
125
125
|
|
|
126
126
|
<div id="footer">
|
|
127
|
-
Generated on Sat Mar 8
|
|
127
|
+
Generated on Sat Mar 8 15:25:57 2014 by
|
|
128
128
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
129
129
|
0.8.7.3 (ruby-2.1.0).
|
|
130
130
|
</div>
|
data/doc/DevDNSd/Errors.html
CHANGED
|
@@ -116,7 +116,7 @@
|
|
|
116
116
|
</div>
|
|
117
117
|
|
|
118
118
|
<div id="footer">
|
|
119
|
-
Generated on Sat Mar 8
|
|
119
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
120
120
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
121
121
|
0.8.7.3 (ruby-2.1.0).
|
|
122
122
|
</div>
|
data/doc/DevDNSd/Rule.html
CHANGED
|
@@ -2927,7 +2927,7 @@
|
|
|
2927
2927
|
</div>
|
|
2928
2928
|
|
|
2929
2929
|
<div id="footer">
|
|
2930
|
-
Generated on Sat Mar 8
|
|
2930
|
+
Generated on Sat Mar 8 15:25:57 2014 by
|
|
2931
2931
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
2932
2932
|
0.8.7.3 (ruby-2.1.0).
|
|
2933
2933
|
</div>
|
data/doc/DevDNSd/Version.html
CHANGED
|
@@ -149,7 +149,7 @@
|
|
|
149
149
|
|
|
150
150
|
</div>
|
|
151
151
|
</dt>
|
|
152
|
-
<dd><pre class="code"><span class='int'>
|
|
152
|
+
<dd><pre class="code"><span class='int'>8</span></pre></dd>
|
|
153
153
|
|
|
154
154
|
<dt id="STRING-constant" class="">STRING =
|
|
155
155
|
<div class="docstring">
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
</div>
|
|
181
181
|
|
|
182
182
|
<div id="footer">
|
|
183
|
-
Generated on Sat Mar 8
|
|
183
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
184
184
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
185
185
|
0.8.7.3 (ruby-2.1.0).
|
|
186
186
|
</div>
|
data/doc/DevDNSd.html
CHANGED
|
@@ -121,7 +121,7 @@ Licensed under the MIT license, which can be found at http://www.opensource.org/
|
|
|
121
121
|
</div>
|
|
122
122
|
|
|
123
123
|
<div id="footer">
|
|
124
|
-
Generated on Sat Mar 8
|
|
124
|
+
Generated on Sat Mar 8 15:25:56 2014 by
|
|
125
125
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
126
126
|
0.8.7.3 (ruby-2.1.0).
|
|
127
127
|
</div>
|