devdnsd 3.0.4 → 3.0.5

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.
data/doc/method_list.html CHANGED
@@ -156,20 +156,20 @@
156
156
 
157
157
 
158
158
  <li class="r1 ">
159
- <span class='object_link'><a href="DevDNSd/Application.html#initialize-instance_method" title="DevDNSd::Application#initialize (method)">#initialize</a></span>
160
- <small>DevDNSd::Application</small>
159
+ <span class='object_link'><a href="DevDNSd/Configuration.html#initialize-instance_method" title="DevDNSd::Configuration#initialize (method)">#initialize</a></span>
160
+ <small>DevDNSd::Configuration</small>
161
161
  </li>
162
162
 
163
163
 
164
164
  <li class="r2 ">
165
- <span class='object_link'><a href="DevDNSd/Rule.html#initialize-instance_method" title="DevDNSd::Rule#initialize (method)">#initialize</a></span>
166
- <small>DevDNSd::Rule</small>
165
+ <span class='object_link'><a href="DevDNSd/Application.html#initialize-instance_method" title="DevDNSd::Application#initialize (method)">#initialize</a></span>
166
+ <small>DevDNSd::Application</small>
167
167
  </li>
168
168
 
169
169
 
170
170
  <li class="r1 ">
171
- <span class='object_link'><a href="DevDNSd/Configuration.html#initialize-instance_method" title="DevDNSd::Configuration#initialize (method)">#initialize</a></span>
172
- <small>DevDNSd::Configuration</small>
171
+ <span class='object_link'><a href="DevDNSd/Rule.html#initialize-instance_method" title="DevDNSd::Rule#initialize (method)">#initialize</a></span>
172
+ <small>DevDNSd::Rule</small>
173
173
  </li>
174
174
 
175
175
 
@@ -215,6 +215,18 @@
215
215
  </li>
216
216
 
217
217
 
218
+ <li class="r1 ">
219
+ <span class='object_link'><a href="DevDNSd/ApplicationMethods/System/ClassMethods.html#log_directory-instance_method" title="DevDNSd::ApplicationMethods::System::ClassMethods#log_directory (method)">#log_directory</a></span>
220
+ <small>DevDNSd::ApplicationMethods::System::ClassMethods</small>
221
+ </li>
222
+
223
+
224
+ <li class="r2 ">
225
+ <span class='object_link'><a href="DevDNSd/ApplicationMethods/System/ClassMethods.html#log_file_path-instance_method" title="DevDNSd::ApplicationMethods::System::ClassMethods#log_file_path (method)">#log_file_path</a></span>
226
+ <small>DevDNSd::ApplicationMethods::System::ClassMethods</small>
227
+ </li>
228
+
229
+
218
230
  <li class="r1 ">
219
231
  <span class='object_link'><a href="DevDNSd/Application.html#logger-instance_method" title="DevDNSd::Application#logger (method)">#logger</a></span>
220
232
  <small>DevDNSd::Application</small>
@@ -270,77 +282,77 @@
270
282
 
271
283
 
272
284
  <li class="r2 ">
273
- <span class='object_link'><a href="DevDNSd/ApplicationMethods/System/ClassMethods.html#pid_directory-instance_method" title="DevDNSd::ApplicationMethods::System::ClassMethods#pid_directory (method)">#pid_directory</a></span>
285
+ <span class='object_link'><a href="DevDNSd/ApplicationMethods/System/ClassMethods.html#process_file_path-instance_method" title="DevDNSd::ApplicationMethods::System::ClassMethods#process_file_path (method)">#process_file_path</a></span>
274
286
  <small>DevDNSd::ApplicationMethods::System::ClassMethods</small>
275
287
  </li>
276
288
 
277
289
 
278
290
  <li class="r1 ">
279
- <span class='object_link'><a href="DevDNSd/ApplicationMethods/System/ClassMethods.html#pid_fn-instance_method" title="DevDNSd::ApplicationMethods::System::ClassMethods#pid_fn (method)">#pid_fn</a></span>
280
- <small>DevDNSd::ApplicationMethods::System::ClassMethods</small>
281
- </li>
282
-
283
-
284
- <li class="r2 ">
285
291
  <span class='object_link'><a href="DevDNSd/ApplicationMethods/Server.html#process_rule-instance_method" title="DevDNSd::ApplicationMethods::Server#process_rule (method)">#process_rule</a></span>
286
292
  <small>DevDNSd::ApplicationMethods::Server</small>
287
293
  </li>
288
294
 
289
295
 
290
- <li class="r1 ">
296
+ <li class="r2 ">
291
297
  <span class='object_link'><a href="DevDNSd/ApplicationMethods/Server.html#process_rule_in_classes-instance_method" title="DevDNSd::ApplicationMethods::Server#process_rule_in_classes (method)">#process_rule_in_classes</a></span>
292
298
  <small>DevDNSd::ApplicationMethods::Server</small>
293
299
  </li>
294
300
 
295
301
 
296
- <li class="r2 ">
302
+ <li class="r1 ">
297
303
  <span class='object_link'><a href="DevDNSd/Application.html#quit-class_method" title="DevDNSd::Application.quit (method)">quit</a></span>
298
304
  <small>DevDNSd::Application</small>
299
305
  </li>
300
306
 
301
307
 
302
- <li class="r1 ">
308
+ <li class="r2 ">
303
309
  <span class='object_link'><a href="DevDNSd/Rule.html#reply-instance_method" title="DevDNSd::Rule#reply (method)">#reply</a></span>
304
310
  <small>DevDNSd::Rule</small>
305
311
  </li>
306
312
 
307
313
 
308
- <li class="r2 ">
314
+ <li class="r1 ">
309
315
  <span class='object_link'><a href="DevDNSd/ApplicationMethods/System.html#resolver_path-instance_method" title="DevDNSd::ApplicationMethods::System#resolver_path (method)">#resolver_path</a></span>
310
316
  <small>DevDNSd::ApplicationMethods::System</small>
311
317
  </li>
312
318
 
313
319
 
314
- <li class="r1 ">
320
+ <li class="r2 ">
315
321
  <span class='object_link'><a href="DevDNSd/Rule.html#resource_class-instance_method" title="DevDNSd::Rule#resource_class (method)">#resource_class</a></span>
316
322
  <small>DevDNSd::Rule</small>
317
323
  </li>
318
324
 
319
325
 
320
- <li class="r2 ">
326
+ <li class="r1 ">
321
327
  <span class='object_link'><a href="DevDNSd/Rule.html#resource_class_to_symbol-class_method" title="DevDNSd::Rule.resource_class_to_symbol (method)">resource_class_to_symbol</a></span>
322
328
  <small>DevDNSd::Rule</small>
323
329
  </li>
324
330
 
325
331
 
326
- <li class="r1 ">
332
+ <li class="r2 ">
327
333
  <span class='object_link'><a href="DevDNSd/Application.html#run-class_method" title="DevDNSd::Application.run (method)">run</a></span>
328
334
  <small>DevDNSd::Application</small>
329
335
  </li>
330
336
 
331
337
 
332
- <li class="r2 ">
338
+ <li class="r1 ">
333
339
  <span class='object_link'><a href="DevDNSd/Rule.html#symbol_to_resource_class-class_method" title="DevDNSd::Rule.symbol_to_resource_class (method)">symbol_to_resource_class</a></span>
334
340
  <small>DevDNSd::Rule</small>
335
341
  </li>
336
342
 
337
343
 
338
- <li class="r1 ">
344
+ <li class="r2 ">
339
345
  <span class='object_link'><a href="DevDNSd/Rule.html#type-instance_method" title="DevDNSd::Rule#type (method)">#type</a></span>
340
346
  <small>DevDNSd::Rule</small>
341
347
  </li>
342
348
 
343
349
 
350
+ <li class="r1 ">
351
+ <span class='object_link'><a href="DevDNSd/ApplicationMethods/System/ClassMethods.html#working_directory-instance_method" title="DevDNSd::ApplicationMethods::System::ClassMethods#working_directory (method)">#working_directory</a></span>
352
+ <small>DevDNSd::ApplicationMethods::System::ClassMethods</small>
353
+ </li>
354
+
355
+
344
356
  </ul>
345
357
  </div>
346
358
  </body>
@@ -6,7 +6,7 @@
6
6
  <title>
7
7
  Top Level Namespace
8
8
 
9
- &mdash; Documentation by YARD 0.8.7
9
+ &mdash; Documentation by YARD 0.8.7.2
10
10
 
11
11
  </title>
12
12
 
@@ -103,9 +103,9 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Mon Sep 2 15:43:19 2013 by
106
+ Generated on Thu Sep 26 10:55:09 2013 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
- 0.8.7 (ruby-2.0.0).
108
+ 0.8.7.2 (ruby-2.0.0).
109
109
  </div>
110
110
 
111
111
  </body>
@@ -24,16 +24,31 @@ module DevDNSd
24
24
  # Returns the standard location of the PID file.
25
25
  #
26
26
  # @return [String] The standard location of the PID file.
27
- def pid_directory
27
+ def working_directory
28
28
  File.dirname(instance.config.pid_file)
29
29
  end
30
+ alias_method :runtime_directory, :working_directory
30
31
 
31
32
  # Returns the complete path of the PID file.
32
33
  #
33
34
  # @return [String] The complete path of the PID file.
34
- def pid_fn
35
+ def process_file_path
35
36
  instance.config.pid_file
36
37
  end
38
+
39
+ # Returns the complete path of the log file.
40
+ #
41
+ # @return [String] The complete path of the log file.
42
+ def log_file_path
43
+ instance.config.log_file
44
+ end
45
+
46
+ # Returns the standard location of the log file.
47
+ #
48
+ # @return [String] The standard location of the log file.
49
+ def log_directory
50
+ File.dirname(instance.config.log_file)
51
+ end
37
52
  end
38
53
 
39
54
  # Gets the path for the resolver file.
@@ -225,7 +240,7 @@ module DevDNSd
225
240
  begin
226
241
  logger.info(i18n.agent_creating(launch_agent))
227
242
  program, args = prepare_agent
228
-
243
+
229
244
  ::File.open(launch_agent, "w") {|f|
230
245
  f.write({"KeepAlive" => true, "Label" => "it.cowtech.devdnsd", "Program" => program, "ProgramArguments" => args, "RunAtLoad" => true}.to_plist)
231
246
  f.flush
@@ -16,7 +16,7 @@ module DevDNSd
16
16
  MINOR = 0
17
17
 
18
18
  # The patch version.
19
- PATCH = 4
19
+ PATCH = 5
20
20
 
21
21
  # The current version number of DevDNSd.
22
22
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
@@ -112,29 +112,55 @@ describe DevDNSd::Application do
112
112
  end
113
113
  end
114
114
 
115
- describe ".pid_fn" do
115
+ describe ".process_file_path" do
116
116
  let(:application){ create_application({"log_file" => log_file, "configuration" => sample_config}) }
117
117
 
118
118
  it "returns the default file" do
119
- expect(DevDNSd::Application.pid_fn).to eq("/var/run/devdnsd.pid")
119
+ expect(DevDNSd::Application.process_file_path).to eq("/var/run/devdnsd.pid")
120
120
  end
121
121
 
122
122
  it "return the set file" do
123
123
  DevDNSd::Application.instance.config.pid_file = "/this/is/a/daemon.pid"
124
- expect(DevDNSd::Application.pid_fn).to eq("/this/is/a/daemon.pid")
124
+ expect(DevDNSd::Application.process_file_path).to eq("/this/is/a/daemon.pid")
125
125
  end
126
126
  end
127
127
 
128
- describe ".pid_directory" do
128
+ describe ".log_file_path" do
129
+ let(:application){ create_application({"log_file" => log_file, "configuration" => sample_config}) }
130
+
131
+ it "returns the default file" do
132
+ expect(DevDNSd::Application.log_file_path).to eq(log_file)
133
+ end
134
+
135
+ it "return the set file" do
136
+ DevDNSd::Application.instance.config.log_file = "/this/is/a/daemon.log"
137
+ expect(DevDNSd::Application.log_file_path).to eq("/this/is/a/daemon.log")
138
+ end
139
+ end
140
+
141
+ describe ".working_directory" do
129
142
  let(:application){ create_application({"log_file" => log_file, "configuration" => sample_config}) }
130
143
 
131
144
  it "returns the default path" do
132
- expect(DevDNSd::Application.pid_directory).to eq("/var/run")
145
+ expect(DevDNSd::Application.working_directory).to eq("/var/run")
133
146
  end
134
147
 
135
148
  it "return the set path basing on the PID file" do
136
149
  DevDNSd::Application.instance.config.pid_file = "/this/is/a/daemon.pid"
137
- expect(DevDNSd::Application.pid_directory).to eq("/this/is/a")
150
+ expect(DevDNSd::Application.working_directory).to eq("/this/is/a")
151
+ end
152
+ end
153
+
154
+ describe ".log_directory" do
155
+ let(:application){ create_application({"log_file" => log_file, "configuration" => sample_config}) }
156
+
157
+ it "returns the default path" do
158
+ expect(DevDNSd::Application.log_directory).to eq(File.dirname(log_file))
159
+ end
160
+
161
+ it "return the set path basing on the PID file" do
162
+ DevDNSd::Application.instance.config.log_file = "/this/is/a/daemon.log"
163
+ expect(DevDNSd::Application.log_directory).to eq("/this/is/a")
138
164
  end
139
165
  end
140
166
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: devdnsd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shogun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-02 00:00:00.000000000 Z
11
+ date: 2013-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bovem