devdnsd 3.1.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (53) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.rubocop.yml +82 -0
  4. data/.travis-gemfile +4 -10
  5. data/.travis.yml +11 -5
  6. data/CHANGELOG.md +11 -0
  7. data/Gemfile +9 -8
  8. data/README.md +4 -5
  9. data/Rakefile +22 -6
  10. data/bin/devdnsd +42 -36
  11. data/config/devdnsd_config.sample +11 -11
  12. data/devdnsd.gemspec +7 -6
  13. data/doc/DevDNSd.html +6 -6
  14. data/doc/DevDNSd/{ApplicationMethods/Aliases.html → Aliases.html} +96 -100
  15. data/doc/DevDNSd/Application.html +2170 -1084
  16. data/doc/DevDNSd/Configuration.html +63 -33
  17. data/doc/DevDNSd/Errors.html +3 -3
  18. data/doc/DevDNSd/Errors/InvalidRule.html +3 -3
  19. data/doc/DevDNSd/{ApplicationMethods/System.html → OSX.html} +116 -489
  20. data/doc/DevDNSd/Rule.html +448 -749
  21. data/doc/DevDNSd/{ApplicationMethods/Server.html → Server.html} +77 -73
  22. data/doc/DevDNSd/System.html +895 -0
  23. data/doc/DevDNSd/Version.html +6 -6
  24. data/doc/_index.html +28 -27
  25. data/doc/class_list.html +6 -2
  26. data/doc/file.README.html +8 -9
  27. data/doc/file_list.html +5 -1
  28. data/doc/frames.html +1 -1
  29. data/doc/index.html +8 -9
  30. data/doc/js/full_list.js +4 -1
  31. data/doc/method_list.html +106 -84
  32. data/doc/top-level-namespace.html +3 -3
  33. data/lib/devdnsd.rb +10 -8
  34. data/lib/devdnsd/aliases.rb +171 -0
  35. data/lib/devdnsd/application.rb +93 -704
  36. data/lib/devdnsd/configuration.rb +20 -11
  37. data/lib/devdnsd/errors.rb +1 -1
  38. data/lib/devdnsd/osx.rb +217 -0
  39. data/lib/devdnsd/rule.rb +65 -94
  40. data/lib/devdnsd/server.rb +118 -0
  41. data/lib/devdnsd/system.rb +102 -0
  42. data/lib/devdnsd/version.rb +3 -3
  43. data/locales/en.yml +17 -16
  44. data/locales/it.yml +17 -16
  45. data/spec/devdnsd/application_spec.rb +188 -184
  46. data/spec/devdnsd/configuration_spec.rb +2 -2
  47. data/spec/devdnsd/rule_spec.rb +33 -34
  48. data/spec/resolver_helper.rb +10 -27
  49. data/spec/spec_helper.rb +21 -7
  50. metadata +36 -21
  51. data/doc/DevDNSd/ApplicationMethods.html +0 -125
  52. data/doc/DevDNSd/ApplicationMethods/System/ClassMethods.html +0 -538
  53. data/spec/coverage_helper.rb +0 -20
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Class: DevDNSd::Configuration
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -129,7 +129,7 @@
129
129
  <li class="public ">
130
130
  <span class="summary_signature">
131
131
 
132
- <a href="#add_rule-instance_method" title="#add_rule (instance method)">- (Array) <strong>add_rule</strong>(*args, &amp;block) </a>
132
+ <a href="#add_rule-instance_method" title="#add_rule (instance method)">- (Array) <strong>add_rule</strong>(match: /.+/, reply: &quot;127.0.0.1&quot;, type: :A, options: {}, &amp;block) </a>
133
133
 
134
134
 
135
135
 
@@ -280,11 +280,7 @@ config.add_rule("match.dev", "10.0.0.1")
280
280
  73
281
281
  74
282
282
  75
283
- 76
284
- 77
285
- 78
286
- 79
287
- 80</pre>
283
+ 76</pre>
288
284
  </td>
289
285
  <td>
290
286
  <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 64</span>
@@ -293,18 +289,14 @@ config.add_rule("match.dev", "10.0.0.1")
293
289
  <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>
294
290
 
295
291
  <span class='comment'># Make sure some arguments are of correct type
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'>&quot;</span><span class='tstring_content'>STDOUT</span><span class='tstring_end'>&quot;</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'>&quot;</span><span class='tstring_content'>STDERR</span><span class='tstring_end'>&quot;</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>
292
+ </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='id identifier rubyid_resolve_log_file'>resolve_log_file</span>
301
293
 
302
294
  <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>
303
295
  <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>
304
296
  <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>
305
297
 
306
298
  <span class='comment'># Add a default rule
307
- </span> <span class='id identifier rubyid_add_rule'>add_rule</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='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rules'>rules</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
299
+ </span> <span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='label'>match:</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='label'>reply:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id identifier rubyid_rules'>rules</span><span class='period'>.</span><span class='id identifier rubyid_blank?'>blank?</span>
308
300
  <span class='kw'>end</span></pre>
309
301
  </td>
310
302
  </tr>
@@ -321,7 +313,7 @@ config.add_rule("match.dev", "10.0.0.1")
321
313
  <div class="method_details first">
322
314
  <h3 class="signature first" id="add_rule-instance_method">
323
315
 
324
- - (<tt>Array</tt>) <strong>add_rule</strong>(*args, &amp;block)
316
+ - (<tt>Array</tt>) <strong>add_rule</strong>(match: /.+/, reply: &quot;127.0.0.1&quot;, type: :A, options: {}, &amp;block)
325
317
 
326
318
 
327
319
 
@@ -340,15 +332,60 @@ config.add_rule("match.dev", "10.0.0.1")
340
332
 
341
333
  <li>
342
334
 
343
- <span class='name'>args</span>
335
+ <span class='name'>match</span>
344
336
 
345
337
 
346
- <span class='type'>(<tt>Array</tt>)</span>
338
+ <span class='type'>(<tt>String|Regexp</tt>)</span>
347
339
 
348
340
 
349
341
 
350
342
  &mdash;
351
- <div class='inline'><p>The rule’s arguments.</p>
343
+ <div class='inline'><p>The pattern to match.</p>
344
+ </div>
345
+
346
+ </li>
347
+
348
+ <li>
349
+
350
+ <span class='name'>reply</span>
351
+
352
+
353
+ <span class='type'>(<tt>String|Symbol</tt>)</span>
354
+
355
+
356
+
357
+ &mdash;
358
+ <div class='inline'><p>The IP or hostname to reply back to the client. It can be omitted (and it will be ignored) if a block is provided.</p>
359
+ </div>
360
+
361
+ </li>
362
+
363
+ <li>
364
+
365
+ <span class='name'>type</span>
366
+
367
+
368
+ <span class='type'>(<tt>Symbol</tt>)</span>
369
+
370
+
371
+
372
+ &mdash;
373
+ <div class='inline'><p>The type of request to match.</p>
374
+ </div>
375
+
376
+ </li>
377
+
378
+ <li>
379
+
380
+ <span class='name'>options</span>
381
+
382
+
383
+ <span class='type'>(<tt>Hash</tt>)</span>
384
+
385
+
386
+
387
+ &mdash;
388
+ <div class='inline'><p>A list of options for the request.</p>
352
389
  </div>
353
390
 
354
391
  </li>
@@ -363,7 +400,7 @@ config.add_rule("match.dev", "10.0.0.1")
363
400
 
364
401
 
365
402
  &mdash;
366
- <div class='inline'><p>An optional block for the rule.</p>
403
+ <div class='inline'><p>An optional block to compute the reply instead of using the <code>reply</code> parameter.</p>
367
404
  </div>
368
405
 
369
406
  </li>
@@ -388,28 +425,21 @@ config.add_rule("match.dev", "10.0.0.1")
388
425
 
389
426
  </ul>
390
427
 
391
- <p class="tag_title">See Also:</p>
392
- <ul class="see">
393
-
394
- <li><span class='object_link'><a href="Rule.html#create-class_method" title="DevDNSd::Rule.create (method)">Rule.create</a></span></li>
395
-
396
- </ul>
397
-
398
428
  </div><table class="source_code">
399
429
  <tr>
400
430
  <td>
401
431
  <pre class="lines">
402
432
 
403
433
 
404
- 88
405
- 89
406
- 90</pre>
434
+ 86
435
+ 87
436
+ 88</pre>
407
437
  </td>
408
438
  <td>
409
- <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 88</span>
439
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/configuration.rb', line 86</span>
410
440
 
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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
412
- <span class='id identifier rubyid_rules'>rules</span> <span class='op'>&lt;&lt;</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'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
441
+ <span class='kw'>def</span> <span class='id identifier rubyid_add_rule'>add_rule</span><span class='lparen'>(</span><span class='label'>match:</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='label'>reply:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>127.0.0.1</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='label'>type:</span> <span class='symbol'>:A</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
442
+ <span class='id identifier rubyid_rules'>rules</span> <span class='op'>&lt;&lt;</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='label'>match:</span> <span class='id identifier rubyid_match'>match</span><span class='comma'>,</span> <span class='label'>reply:</span> <span class='id identifier rubyid_reply'>reply</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='id identifier rubyid_type'>type</span><span class='comma'>,</span> <span class='label'>options:</span> <span class='id identifier rubyid_options'>options</span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
413
443
  <span class='kw'>end</span></pre>
414
444
  </td>
415
445
  </tr>
@@ -421,9 +451,9 @@ config.add_rule("match.dev", "10.0.0.1")
421
451
  </div>
422
452
 
423
453
  <div id="footer">
424
- Generated on Sat Mar 29 11:53:14 2014 by
454
+ Generated on Wed Mar 30 19:23:43 2016 by
425
455
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
426
- 0.8.7.4 (ruby-2.1.0).
456
+ 0.8.7.6 (ruby-2.3.0).
427
457
  </div>
428
458
 
429
459
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Module: DevDNSd::Errors
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -116,9 +116,9 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Sat Mar 29 11:53:13 2014 by
119
+ Generated on Wed Mar 30 19:23:43 2016 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
- 0.8.7.4 (ruby-2.1.0).
121
+ 0.8.7.6 (ruby-2.3.0).
122
122
  </div>
123
123
 
124
124
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Exception: DevDNSd::Errors::InvalidRule
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
@@ -124,9 +124,9 @@
124
124
  </div>
125
125
 
126
126
  <div id="footer">
127
- Generated on Sat Mar 29 11:53:13 2014 by
127
+ Generated on Wed Mar 30 19:23:43 2016 by
128
128
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
129
- 0.8.7.4 (ruby-2.1.0).
129
+ 0.8.7.6 (ruby-2.3.0).
130
130
  </div>
131
131
 
132
132
  </body>
@@ -4,26 +4,26 @@
4
4
  <head>
5
5
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
6
  <title>
7
- Module: DevDNSd::ApplicationMethods::System
7
+ Module: DevDNSd::OSX
8
8
 
9
- &mdash; Documentation by YARD 0.8.7.4
9
+ &mdash; Documentation by YARD 0.8.7.6
10
10
 
11
11
  </title>
12
12
 
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
13
+ <link rel="stylesheet" href="../css/style.css" type="text/css" charset="utf-8" />
14
14
 
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
15
+ <link rel="stylesheet" href="../css/common.css" type="text/css" charset="utf-8" />
16
16
 
17
17
  <script type="text/javascript" charset="utf-8">
18
18
  hasFrames = window.top.frames.main ? true : false;
19
- relpath = '../../';
20
- framesUrl = "../../frames.html#!DevDNSd/ApplicationMethods/System.html";
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!DevDNSd/OSX.html";
21
21
  </script>
22
22
 
23
23
 
24
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
24
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
25
25
 
26
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
26
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
27
27
 
28
28
 
29
29
  </head>
@@ -31,10 +31,10 @@
31
31
  <div id="header">
32
32
  <div id="menu">
33
33
 
34
- <a href="../../_index.html">Index (S)</a> &raquo;
35
- <span class='title'><span class='object_link'><a href="../../DevDNSd.html" title="DevDNSd (module)">DevDNSd</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ApplicationMethods.html" title="DevDNSd::ApplicationMethods (module)">ApplicationMethods</a></span></span>
34
+ <a href="../_index.html">Index (O)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../DevDNSd.html" title="DevDNSd (module)">DevDNSd</a></span></span>
36
36
  &raquo;
37
- <span class="title">System</span>
37
+ <span class="title">OSX</span>
38
38
 
39
39
 
40
40
  <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
@@ -43,17 +43,17 @@
43
43
  <div id="search">
44
44
 
45
45
  <a class="full_list_link" id="class_list_link"
46
- href="../../class_list.html">
46
+ href="../class_list.html">
47
47
  Class List
48
48
  </a>
49
49
 
50
50
  <a class="full_list_link" id="method_list_link"
51
- href="../../method_list.html">
51
+ href="../method_list.html">
52
52
  Method List
53
53
  </a>
54
54
 
55
55
  <a class="full_list_link" id="file_list_link"
56
- href="../../file_list.html">
56
+ href="../file_list.html">
57
57
  File List
58
58
  </a>
59
59
 
@@ -63,7 +63,7 @@
63
63
 
64
64
  <iframe id="search_frame"></iframe>
65
65
 
66
- <div id="content"><h1>Module: DevDNSd::ApplicationMethods::System
66
+ <div id="content"><h1>Module: DevDNSd::OSX
67
67
 
68
68
 
69
69
 
@@ -73,28 +73,24 @@
73
73
 
74
74
 
75
75
 
76
- <dt class="r1">Extended by:</dt>
77
- <dd class="r1">ActiveSupport::Concern</dd>
78
-
79
-
80
76
 
81
77
 
82
78
 
83
79
 
84
- <dt class="r2">Included in:</dt>
85
- <dd class="r2"><span class='object_link'><a href="../Application.html" title="DevDNSd::Application (class)">DevDNSd::Application</a></span></dd>
80
+ <dt class="r1">Included in:</dt>
81
+ <dd class="r1"><span class='object_link'><a href="Application.html" title="DevDNSd::Application (class)">Application</a></span></dd>
86
82
 
87
83
 
88
84
 
89
- <dt class="r1 last">Defined in:</dt>
90
- <dd class="r1 last">lib/devdnsd/application.rb</dd>
85
+ <dt class="r2 last">Defined in:</dt>
86
+ <dd class="r2 last">lib/devdnsd/osx.rb</dd>
91
87
 
92
88
  </dl>
93
89
  <div class="clear"></div>
94
90
 
95
91
  <h2>Overview</h2><div class="docstring">
96
92
  <div class="discussion">
97
- <p>System management methods.</p>
93
+ <p>OSX management methods.</p>
98
94
 
99
95
 
100
96
  </div>
@@ -102,17 +98,7 @@
102
98
  <div class="tags">
103
99
 
104
100
 
105
- </div><h2>Defined Under Namespace</h2>
106
- <p class="children">
107
-
108
-
109
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="System/ClassMethods.html" title="DevDNSd::ApplicationMethods::System::ClassMethods (module)">ClassMethods</a></span>
110
-
111
-
112
-
113
-
114
- </p>
115
-
101
+ </div>
116
102
 
117
103
 
118
104
 
@@ -193,98 +179,6 @@
193
179
  <span class="summary_desc"><div class='inline'><p>Removes aliases from an interface.</p>
194
180
  </div></span>
195
181
 
196
- </li>
197
-
198
-
199
- <li class="public ">
200
- <span class="summary_signature">
201
-
202
- <a href="#action_restart-instance_method" title="#action_restart (instance method)">- (Boolean) <strong>action_restart</strong> </a>
203
-
204
-
205
-
206
- </span>
207
-
208
-
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
- <span class="summary_desc"><div class='inline'><p>Restarts the server in background.</p>
217
- </div></span>
218
-
219
- </li>
220
-
221
-
222
- <li class="public ">
223
- <span class="summary_signature">
224
-
225
- <a href="#action_start-instance_method" title="#action_start (instance method)">- (Boolean) <strong>action_start</strong> </a>
226
-
227
-
228
-
229
- </span>
230
-
231
-
232
-
233
-
234
-
235
-
236
-
237
-
238
-
239
- <span class="summary_desc"><div class='inline'><p>Starts the server in background.</p>
240
- </div></span>
241
-
242
- </li>
243
-
244
-
245
- <li class="public ">
246
- <span class="summary_signature">
247
-
248
- <a href="#action_status-instance_method" title="#action_status (instance method)">- (Boolean) <strong>action_status</strong> </a>
249
-
250
-
251
-
252
- </span>
253
-
254
-
255
-
256
-
257
-
258
-
259
-
260
-
261
-
262
- <span class="summary_desc"><div class='inline'><p>Shows the status of the server.</p>
263
- </div></span>
264
-
265
- </li>
266
-
267
-
268
- <li class="public ">
269
- <span class="summary_signature">
270
-
271
- <a href="#action_stop-instance_method" title="#action_stop (instance method)">- (Boolean) <strong>action_stop</strong> </a>
272
-
273
-
274
-
275
- </span>
276
-
277
-
278
-
279
-
280
-
281
-
282
-
283
-
284
-
285
- <span class="summary_desc"><div class='inline'><p>Stops the server in background.</p>
286
- </div></span>
287
-
288
182
  </li>
289
183
 
290
184
 
@@ -360,7 +254,7 @@
360
254
  <li class="public ">
361
255
  <span class="summary_signature">
362
256
 
363
- <a href="#is_osx%3F-instance_method" title="#is_osx? (instance method)">- (Boolean) <strong>is_osx?</strong> </a>
257
+ <a href="#launch_agent_path-instance_method" title="#launch_agent_path (instance method)">- (String) <strong>launch_agent_path</strong>(name = &quot;it.cowtech.devdnsd&quot;) </a>
364
258
 
365
259
 
366
260
 
@@ -374,7 +268,7 @@
374
268
 
375
269
 
376
270
 
377
- <span class="summary_desc"><div class='inline'><p>Checks if we are running on MacOS X.</p>
271
+ <span class="summary_desc"><div class='inline'><p>Gets the path for the launch agent file.</p>
378
272
  </div></span>
379
273
 
380
274
  </li>
@@ -383,10 +277,12 @@
383
277
  <li class="public ">
384
278
  <span class="summary_signature">
385
279
 
386
- <a href="#launch_agent_path-instance_method" title="#launch_agent_path (instance method)">- (String) <strong>launch_agent_path</strong>(name = &quot;it.cowtech.devdnsd&quot;) </a>
280
+ <a href="#osx%3F-instance_method" title="#osx? (instance method)">- (Boolean) <strong>osx?</strong> </a>
387
281
 
388
282
 
389
283
 
284
+ (also: #is_osx?)
285
+
390
286
  </span>
391
287
 
392
288
 
@@ -397,7 +293,7 @@
397
293
 
398
294
 
399
295
 
400
- <span class="summary_desc"><div class='inline'><p>Gets the path for the launch agent file.</p>
296
+ <span class="summary_desc"><div class='inline'><p>Checks if we are running on MacOS X.</p>
401
297
  </div></span>
402
298
 
403
299
  </li>
@@ -430,7 +326,6 @@
430
326
 
431
327
 
432
328
 
433
-
434
329
 
435
330
  <div id="instance_method_details" class="method_details_list">
436
331
  <h2>Instance Method Details</h2>
@@ -497,12 +392,12 @@
497
392
  <pre class="lines">
498
393
 
499
394
 
500
- 158
501
- 159
502
- 160</pre>
395
+ 64
396
+ 65
397
+ 66</pre>
503
398
  </td>
504
399
  <td>
505
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 158</span>
400
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 64</span>
506
401
 
507
402
  <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>
508
403
  <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>
@@ -554,12 +449,12 @@
554
449
  <pre class="lines">
555
450
 
556
451
 
557
- 174
558
- 175
559
- 176</pre>
452
+ 79
453
+ 80
454
+ 81</pre>
560
455
  </td>
561
456
  <td>
562
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 174</span>
457
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 79</span>
563
458
 
564
459
  <span class='kw'>def</span> <span class='id identifier rubyid_action_install'>action_install</span>
565
460
  <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>
@@ -630,12 +525,12 @@
630
525
  <pre class="lines">
631
526
 
632
527
 
633
- 166
634
- 167
635
- 168</pre>
528
+ 72
529
+ 73
530
+ 74</pre>
636
531
  </td>
637
532
  <td>
638
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 166</span>
533
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 72</span>
639
534
 
640
535
  <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>
641
536
  <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>
@@ -643,278 +538,6 @@
643
538
  </td>
644
539
  </tr>
645
540
  </table>
646
- </div>
647
-
648
- <div class="method_details ">
649
- <h3 class="signature " id="action_restart-instance_method">
650
-
651
- - (<tt>Boolean</tt>) <strong>action_restart</strong>
652
-
653
-
654
-
655
-
656
-
657
- </h3><div class="docstring">
658
- <div class="discussion">
659
- <p>Restarts the server in background.</p>
660
-
661
-
662
- </div>
663
- </div>
664
- <div class="tags">
665
-
666
- <p class="tag_title">Returns:</p>
667
- <ul class="return">
668
-
669
- <li>
670
-
671
-
672
- <span class='type'>(<tt>Boolean</tt>)</span>
673
-
674
-
675
-
676
- &mdash;
677
- <div class='inline'><p><code>true</code> if action succeeded, <code>false</code> otherwise.</p>
678
- </div>
679
-
680
- </li>
681
-
682
- </ul>
683
-
684
- </div><table class="source_code">
685
- <tr>
686
- <td>
687
- <pre class="lines">
688
-
689
-
690
- 132
691
- 133
692
- 134
693
- 135
694
- 136</pre>
695
- </td>
696
- <td>
697
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 132</span>
698
-
699
- <span class='kw'>def</span> <span class='id identifier rubyid_action_restart'>action_restart</span>
700
- <span class='id identifier rubyid_action_stop'>action_stop</span>
701
- <span class='id identifier rubyid_action_start'>action_start</span>
702
- <span class='kw'>true</span>
703
- <span class='kw'>end</span></pre>
704
- </td>
705
- </tr>
706
- </table>
707
- </div>
708
-
709
- <div class="method_details ">
710
- <h3 class="signature " id="action_start-instance_method">
711
-
712
- - (<tt>Boolean</tt>) <strong>action_start</strong>
713
-
714
-
715
-
716
-
717
-
718
- </h3><div class="docstring">
719
- <div class="discussion">
720
- <p>Starts the server in background.</p>
721
-
722
-
723
- </div>
724
- </div>
725
- <div class="tags">
726
-
727
- <p class="tag_title">Returns:</p>
728
- <ul class="return">
729
-
730
- <li>
731
-
732
-
733
- <span class='type'>(<tt>Boolean</tt>)</span>
734
-
735
-
736
-
737
- &mdash;
738
- <div class='inline'><p><code>true</code> if action succeeded, <code>false</code> otherwise.</p>
739
- </div>
740
-
741
- </li>
742
-
743
- </ul>
744
-
745
- </div><table class="source_code">
746
- <tr>
747
- <td>
748
- <pre class="lines">
749
-
750
-
751
- 107
752
- 108
753
- 109
754
- 110
755
- 111
756
- 112
757
- 113
758
- 114
759
- 115
760
- 116
761
- 117
762
- 118
763
- 119</pre>
764
- </td>
765
- <td>
766
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 107</span>
767
-
768
- <span class='kw'>def</span> <span class='id identifier rubyid_action_start'>action_start</span>
769
- <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>
770
-
771
- <span class='kw'>if</span> <span class='op'>!</span><span class='const'>Process</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:fork</span><span class='rparen'>)</span> <span class='kw'>then</span>
772
- <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='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_no_fork'>no_fork</span><span class='rparen'>)</span>
773
- <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='op'>=</span> <span class='kw'>true</span>
774
- <span class='kw'>elsif</span> <span class='ivar'>@command</span><span class='period'>.</span><span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:foreground</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span> <span class='kw'>then</span>
775
- <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='op'>=</span> <span class='kw'>true</span>
776
- <span class='kw'>end</span>
777
-
778
- <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_foreground'>foreground</span> <span class='op'>?</span> <span class='id identifier rubyid_perform_server'>perform_server</span> <span class='op'>:</span> <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>
779
- <span class='kw'>true</span>
780
- <span class='kw'>end</span></pre>
781
- </td>
782
- </tr>
783
- </table>
784
- </div>
785
-
786
- <div class="method_details ">
787
- <h3 class="signature " id="action_status-instance_method">
788
-
789
- - (<tt>Boolean</tt>) <strong>action_status</strong>
790
-
791
-
792
-
793
-
794
-
795
- </h3><div class="docstring">
796
- <div class="discussion">
797
- <p>Shows the status of the server</p>
798
-
799
-
800
- </div>
801
- </div>
802
- <div class="tags">
803
-
804
- <p class="tag_title">Returns:</p>
805
- <ul class="return">
806
-
807
- <li>
808
-
809
-
810
- <span class='type'>(<tt>Boolean</tt>)</span>
811
-
812
-
813
-
814
- &mdash;
815
- <div class='inline'><p><code>true</code> if action succeeded, <code>false</code> otherwise.</p>
816
- </div>
817
-
818
- </li>
819
-
820
- </ul>
821
-
822
- </div><table class="source_code">
823
- <tr>
824
- <td>
825
- <pre class="lines">
826
-
827
-
828
- 141
829
- 142
830
- 143
831
- 144
832
- 145
833
- 146
834
- 147
835
- 148
836
- 149
837
- 150
838
- 151
839
- 152</pre>
840
- </td>
841
- <td>
842
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 141</span>
843
-
844
- <span class='kw'>def</span> <span class='id identifier rubyid_action_status'>action_status</span>
845
- <span class='id identifier rubyid_daemon'>daemon</span> <span class='op'>=</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_class'>class</span>
846
- <span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='const'>RExec</span><span class='op'>::</span><span class='const'>Daemon</span><span class='op'>::</span><span class='const'>ProcessFile</span><span class='period'>.</span><span class='id identifier rubyid_status'>status</span><span class='lparen'>(</span><span class='id identifier rubyid_daemon'>daemon</span><span class='rparen'>)</span>
847
- <span class='id identifier rubyid_pid'>pid</span> <span class='op'>=</span> <span class='const'>RExec</span><span class='op'>::</span><span class='const'>Daemon</span><span class='op'>::</span><span class='const'>ProcessFile</span><span class='period'>.</span><span class='id identifier rubyid_recall'>recall</span><span class='lparen'>(</span><span class='id identifier rubyid_daemon'>daemon</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
848
- <span class='id identifier rubyid_status'>status</span> <span class='op'>=</span> <span class='symbol'>:crashed</span> <span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='symbol'>:unknown</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_daemon'>daemon</span><span class='period'>.</span><span class='id identifier rubyid_crashed?'>crashed?</span>
849
-
850
- <span class='kw'>if</span> <span class='id identifier rubyid_status'>status</span> <span class='op'>==</span> <span class='symbol'>:running</span> <span class='kw'>then</span>
851
- <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='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_status_running'>status_running</span><span class='lparen'>(</span><span class='id identifier rubyid_pid'>pid</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span>
852
- <span class='kw'>elsif</span>
853
- <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='id identifier rubyid_replace_markers'>replace_markers</span><span class='lparen'>(</span><span class='id identifier rubyid_i18n'>i18n</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>status_</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_status'>status</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span><span class='rparen'>)</span>
854
- <span class='kw'>end</span>
855
- <span class='kw'>end</span></pre>
856
- </td>
857
- </tr>
858
- </table>
859
- </div>
860
-
861
- <div class="method_details ">
862
- <h3 class="signature " id="action_stop-instance_method">
863
-
864
- - (<tt>Boolean</tt>) <strong>action_stop</strong>
865
-
866
-
867
-
868
-
869
-
870
- </h3><div class="docstring">
871
- <div class="discussion">
872
- <p>Stops the server in background.</p>
873
-
874
-
875
- </div>
876
- </div>
877
- <div class="tags">
878
-
879
- <p class="tag_title">Returns:</p>
880
- <ul class="return">
881
-
882
- <li>
883
-
884
-
885
- <span class='type'>(<tt>Boolean</tt>)</span>
886
-
887
-
888
-
889
- &mdash;
890
- <div class='inline'><p><code>true</code> if action succeeded, <code>false</code> otherwise.</p>
891
- </div>
892
-
893
- </li>
894
-
895
- </ul>
896
-
897
- </div><table class="source_code">
898
- <tr>
899
- <td>
900
- <pre class="lines">
901
-
902
-
903
- 124
904
- 125
905
- 126
906
- 127</pre>
907
- </td>
908
- <td>
909
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 124</span>
910
-
911
- <span class='kw'>def</span> <span class='id identifier rubyid_action_stop'>action_stop</span>
912
- <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>
913
- <span class='kw'>true</span>
914
- <span class='kw'>end</span></pre>
915
- </td>
916
- </tr>
917
- </table>
918
541
  </div>
919
542
 
920
543
  <div class="method_details ">
@@ -959,12 +582,12 @@
959
582
  <pre class="lines">
960
583
 
961
584
 
962
- 181
963
- 182
964
- 183</pre>
585
+ 86
586
+ 87
587
+ 88</pre>
965
588
  </td>
966
589
  <td>
967
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 181</span>
590
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 86</span>
968
591
 
969
592
  <span class='kw'>def</span> <span class='id identifier rubyid_action_uninstall'>action_uninstall</span>
970
593
  <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>
@@ -1016,21 +639,21 @@
1016
639
  <pre class="lines">
1017
640
 
1018
641
 
1019
- 82
1020
- 83
1021
- 84
1022
- 85
1023
- 86
1024
- 87
1025
- 88
1026
- 89
1027
- 90
1028
- 91
1029
- 92
1030
- 93</pre>
642
+ 37
643
+ 38
644
+ 39
645
+ 40
646
+ 41
647
+ 42
648
+ 43
649
+ 44
650
+ 45
651
+ 46
652
+ 47
653
+ 48</pre>
1031
654
  </td>
1032
655
  <td>
1033
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 82</span>
656
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 37</span>
1034
657
 
1035
658
  <span class='kw'>def</span> <span class='id identifier rubyid_dns_update'>dns_update</span>
1036
659
  <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>
@@ -1110,12 +733,12 @@
1110
733
  <pre class="lines">
1111
734
 
1112
735
 
1113
- 75
1114
- 76
1115
- 77</pre>
736
+ 30
737
+ 31
738
+ 32</pre>
1116
739
  </td>
1117
740
  <td>
1118
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 75</span>
741
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 30</span>
1119
742
 
1120
743
  <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>
1121
744
  <span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_command'>command</span><span class='embexpr_end'>}</span><span class='tstring_content'> 2&gt;&amp;1 &gt; /dev/null</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
@@ -1126,9 +749,9 @@
1126
749
  </div>
1127
750
 
1128
751
  <div class="method_details ">
1129
- <h3 class="signature " id="is_osx?-instance_method">
752
+ <h3 class="signature " id="launch_agent_path-instance_method">
1130
753
 
1131
- - (<tt>Boolean</tt>) <strong>is_osx?</strong>
754
+ - (<tt>String</tt>) <strong>launch_agent_path</strong>(name = &quot;it.cowtech.devdnsd&quot;)
1132
755
 
1133
756
 
1134
757
 
@@ -1136,27 +759,46 @@
1136
759
 
1137
760
  </h3><div class="docstring">
1138
761
  <div class="discussion">
1139
- <p>Checks if we are running on MacOS X.</p>
1140
-
1141
- <p>System services are only available on that platform.</p>
762
+ <p>Gets the path for the launch agent file.</p>
1142
763
 
1143
764
 
1144
765
  </div>
1145
766
  </div>
1146
767
  <div class="tags">
768
+ <p class="tag_title">Parameters:</p>
769
+ <ul class="param">
770
+
771
+ <li>
772
+
773
+ <span class='name'>name</span>
774
+
775
+
776
+ <span class='type'>(<tt>String</tt>)</span>
777
+
778
+
779
+ <em class="default">(defaults to: <tt>&quot;it.cowtech.devdnsd&quot;</tt>)</em>
780
+
781
+
782
+ &mdash;
783
+ <div class='inline'><p>The base name for the agent.</p>
784
+ </div>
785
+
786
+ </li>
1147
787
 
788
+ </ul>
789
+
1148
790
  <p class="tag_title">Returns:</p>
1149
791
  <ul class="return">
1150
792
 
1151
793
  <li>
1152
794
 
1153
795
 
1154
- <span class='type'>(<tt>Boolean</tt>)</span>
796
+ <span class='type'>(<tt>String</tt>)</span>
1155
797
 
1156
798
 
1157
799
 
1158
800
  &mdash;
1159
- <div class='inline'><p><code>true</code> if the current platform is MacOS X, <code>false</code> otherwise.</p>
801
+ <div class='inline'><p>The path for the launch agent file.</p>
1160
802
  </div>
1161
803
 
1162
804
  </li>
@@ -1169,15 +811,15 @@
1169
811
  <pre class="lines">
1170
812
 
1171
813
 
1172
- 100
1173
- 101
1174
- 102</pre>
814
+ 22
815
+ 23
816
+ 24</pre>
1175
817
  </td>
1176
818
  <td>
1177
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 100</span>
819
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 22</span>
1178
820
 
1179
- <span class='kw'>def</span> <span class='id identifier rubyid_is_osx?'>is_osx?</span>
1180
- <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'>&#39;</span><span class='tstring_content'>host_os</span><span class='tstring_end'>&#39;</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>
821
+ <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>
822
+ <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='embexpr_end'>}</span><span class='tstring_content'>.plist</span><span class='tstring_end'>&quot;</span></span>
1181
823
  <span class='kw'>end</span></pre>
1182
824
  </td>
1183
825
  </tr>
@@ -1185,56 +827,41 @@
1185
827
  </div>
1186
828
 
1187
829
  <div class="method_details ">
1188
- <h3 class="signature " id="launch_agent_path-instance_method">
830
+ <h3 class="signature " id="osx?-instance_method">
1189
831
 
1190
- - (<tt>String</tt>) <strong>launch_agent_path</strong>(name = &quot;it.cowtech.devdnsd&quot;)
832
+ - (<tt>Boolean</tt>) <strong>osx?</strong>
1191
833
 
1192
834
 
1193
835
 
836
+ <span class="aliases">Also known as:
837
+ <span class="names"><span id='is_osx?-instance_method'>is_osx?</span></span>
838
+ </span>
839
+
1194
840
 
1195
841
 
1196
842
  </h3><div class="docstring">
1197
843
  <div class="discussion">
1198
- <p>Gets the path for the launch agent file.</p>
844
+ <p>Checks if we are running on MacOS X.</p>
845
+
846
+ <p>System services are only available on that platform.</p>
1199
847
 
1200
848
 
1201
849
  </div>
1202
850
  </div>
1203
851
  <div class="tags">
1204
- <p class="tag_title">Parameters:</p>
1205
- <ul class="param">
1206
-
1207
- <li>
1208
-
1209
- <span class='name'>name</span>
1210
-
1211
-
1212
- <span class='type'>(<tt>String</tt>)</span>
1213
-
1214
-
1215
- <em class="default">(defaults to: <tt>&quot;it.cowtech.devdnsd&quot;</tt>)</em>
1216
-
1217
-
1218
- &mdash;
1219
- <div class='inline'><p>The base name for the agent.</p>
1220
- </div>
1221
-
1222
- </li>
1223
852
 
1224
- </ul>
1225
-
1226
853
  <p class="tag_title">Returns:</p>
1227
854
  <ul class="return">
1228
855
 
1229
856
  <li>
1230
857
 
1231
858
 
1232
- <span class='type'>(<tt>String</tt>)</span>
859
+ <span class='type'>(<tt>Boolean</tt>)</span>
1233
860
 
1234
861
 
1235
862
 
1236
863
  &mdash;
1237
- <div class='inline'><p>The path for the launch agent file.</p>
864
+ <div class='inline'><p><code>true</code> if the current platform is MacOS X, <code>false</code> otherwise.</p>
1238
865
  </div>
1239
866
 
1240
867
  </li>
@@ -1247,15 +874,15 @@
1247
874
  <pre class="lines">
1248
875
 
1249
876
 
1250
- 67
1251
- 68
1252
- 69</pre>
877
+ 55
878
+ 56
879
+ 57</pre>
1253
880
  </td>
1254
881
  <td>
1255
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 67</span>
882
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 55</span>
1256
883
 
1257
- <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>
1258
- <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='embexpr_end'>}</span><span class='tstring_content'>.plist</span><span class='tstring_end'>&quot;</span></span>
884
+ <span class='kw'>def</span> <span class='id identifier rubyid_osx?'>osx?</span>
885
+ <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'>&#39;</span><span class='tstring_content'>host_os</span><span class='tstring_end'>&#39;</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>
1259
886
  <span class='kw'>end</span></pre>
1260
887
  </td>
1261
888
  </tr>
@@ -1325,13 +952,13 @@
1325
952
  <pre class="lines">
1326
953
 
1327
954
 
1328
- 58
1329
- 59
1330
- 60
1331
- 61</pre>
955
+ 13
956
+ 14
957
+ 15
958
+ 16</pre>
1332
959
  </td>
1333
960
  <td>
1334
- <pre class="code"><span class="info file"># File 'lib/devdnsd/application.rb', line 58</span>
961
+ <pre class="code"><span class="info file"># File 'lib/devdnsd/osx.rb', line 13</span>
1335
962
 
1336
963
  <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>
1337
964
  <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>
@@ -1347,9 +974,9 @@
1347
974
  </div>
1348
975
 
1349
976
  <div id="footer">
1350
- Generated on Sat Mar 29 11:53:13 2014 by
977
+ Generated on Wed Mar 30 19:23:43 2016 by
1351
978
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1352
- 0.8.7.4 (ruby-2.1.0).
979
+ 0.8.7.6 (ruby-2.3.0).
1353
980
  </div>
1354
981
 
1355
982
  </body>