akaer 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -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 Jul 20 13:44:15 2013 by
124
+ Generated on Sat Jul 20 15:44:45 2013 by
125
125
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
126
126
  0.8.6.2 (ruby-1.9.3).
127
127
  </div>
@@ -546,7 +546,6 @@
546
546
  <pre class="lines">
547
547
 
548
548
 
549
- 283
550
549
  284
551
550
  285
552
551
  286
@@ -561,10 +560,11 @@
561
560
  295
562
561
  296
563
562
  297
564
- 298</pre>
563
+ 298
564
+ 299</pre>
565
565
  </td>
566
566
  <td>
567
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 283</span>
567
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 284</span>
568
568
 
569
569
  <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span><span class='rparen'>)</span>
570
570
  <span class='id identifier rubyid_i18n_setup'>i18n_setup</span><span class='lparen'>(</span><span class='symbol'>:akaer</span><span class='comma'>,</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='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='op'>::</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_dirname'>dirname</span><span class='lparen'>(</span><span class='kw'>__FILE__</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/../../locales/</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
@@ -619,7 +619,6 @@
619
619
  <pre class="lines">
620
620
 
621
621
 
622
- 270
623
622
  271
624
623
  272
625
624
  273
@@ -781,10 +780,11 @@
781
780
  429
782
781
  430
783
782
  431
784
- 432</pre>
783
+ 432
784
+ 433</pre>
785
785
  </td>
786
786
  <td>
787
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 270</span>
787
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 271</span>
788
788
 
789
789
  <span class='kw'>class</span> <span class='const'>Application</span>
790
790
  <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:config</span>
@@ -998,7 +998,6 @@
998
998
  <pre class="lines">
999
999
 
1000
1000
 
1001
- 270
1002
1001
  271
1003
1002
  272
1004
1003
  273
@@ -1160,10 +1159,11 @@
1160
1159
  429
1161
1160
  430
1162
1161
  431
1163
- 432</pre>
1162
+ 432
1163
+ 433</pre>
1164
1164
  </td>
1165
1165
  <td>
1166
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 270</span>
1166
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 271</span>
1167
1167
 
1168
1168
  <span class='kw'>class</span> <span class='const'>Application</span>
1169
1169
  <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:config</span>
@@ -1377,7 +1377,6 @@
1377
1377
  <pre class="lines">
1378
1378
 
1379
1379
 
1380
- 270
1381
1380
  271
1382
1381
  272
1383
1382
  273
@@ -1539,10 +1538,11 @@
1539
1538
  429
1540
1539
  430
1541
1540
  431
1542
- 432</pre>
1541
+ 432
1542
+ 433</pre>
1543
1543
  </td>
1544
1544
  <td>
1545
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 270</span>
1545
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 271</span>
1546
1546
 
1547
1547
  <span class='kw'>class</span> <span class='const'>Application</span>
1548
1548
  <span class='id identifier rubyid_attr_reader'>attr_reader</span> <span class='symbol'>:config</span>
@@ -1739,12 +1739,12 @@
1739
1739
  <pre class="lines">
1740
1740
 
1741
1741
 
1742
- 273
1743
1742
  274
1744
- 275</pre>
1743
+ 275
1744
+ 276</pre>
1745
1745
  </td>
1746
1746
  <td>
1747
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 273</span>
1747
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 274</span>
1748
1748
 
1749
1749
  <span class='kw'>def</span> <span class='id identifier rubyid_logger'>logger</span>
1750
1750
  <span class='ivar'>@logger</span>
@@ -1856,13 +1856,13 @@
1856
1856
  <pre class="lines">
1857
1857
 
1858
1858
 
1859
- 380
1860
1859
  381
1861
1860
  382
1862
- 383</pre>
1861
+ 383
1862
+ 384</pre>
1863
1863
  </td>
1864
1864
  <td>
1865
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 380</span>
1865
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 381</span>
1866
1866
 
1867
1867
  <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='comma'>,</span> <span class='id identifier rubyid_locale'>locale</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='id identifier rubyid_force'>force</span> <span class='op'>=</span> <span class='kw'>false</span><span class='rparen'>)</span>
1868
1868
  <span class='ivar'>@instance</span> <span class='op'>=</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_force'>force</span>
@@ -1942,13 +1942,13 @@
1942
1942
  <pre class="lines">
1943
1943
 
1944
1944
 
1945
- 369
1946
1945
  370
1947
1946
  371
1948
- 372</pre>
1947
+ 372
1948
+ 373</pre>
1949
1949
  </td>
1950
1950
  <td>
1951
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 369</span>
1951
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 370</span>
1952
1952
 
1953
1953
  <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>
1954
1954
  <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>
@@ -2020,12 +2020,12 @@
2020
2020
  <pre class="lines">
2021
2021
 
2022
2022
 
2023
- 361
2024
2023
  362
2025
- 363</pre>
2024
+ 363
2025
+ 364</pre>
2026
2026
  </td>
2027
2027
  <td>
2028
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 361</span>
2028
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 362</span>
2029
2029
 
2030
2030
  <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>
2031
2031
  <span class='const'>Kernel</span><span class='period'>.</span><span class='id identifier rubyid_system'>system</span><span class='lparen'>(</span><span class='id identifier rubyid_command'>command</span><span class='rparen'>)</span>
@@ -2077,12 +2077,12 @@
2077
2077
  <pre class="lines">
2078
2078
 
2079
2079
 
2080
- 345
2081
2080
  346
2082
- 347</pre>
2081
+ 347
2082
+ 348</pre>
2083
2083
  </td>
2084
2084
  <td>
2085
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 345</span>
2085
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 346</span>
2086
2086
 
2087
2087
  <span class='kw'>def</span> <span class='id identifier rubyid_get_logger'>get_logger</span>
2088
2088
  <span class='ivar'>@logger</span> <span class='op'>||=</span> <span class='const'>Bovem</span><span class='op'>::</span><span class='const'>Logger</span><span class='period'>.</span><span class='id identifier rubyid_create'>create</span><span class='lparen'>(</span><span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_log_file'>log_file</span><span class='comma'>,</span> <span class='ivar'>@config</span><span class='period'>.</span><span class='id identifier rubyid_log_level'>log_level</span><span class='comma'>,</span> <span class='ivar'>@log_formatter</span><span class='rparen'>)</span>
@@ -2153,15 +2153,15 @@
2153
2153
  <pre class="lines">
2154
2154
 
2155
2155
 
2156
- 304
2157
2156
  305
2158
2157
  306
2159
2158
  307
2160
2159
  308
2161
- 309</pre>
2160
+ 309
2161
+ 310</pre>
2162
2162
  </td>
2163
2163
  <td>
2164
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 304</span>
2164
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 305</span>
2165
2165
 
2166
2166
  <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>
2167
2167
  <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>
@@ -2235,7 +2235,6 @@
2235
2235
  <pre class="lines">
2236
2236
 
2237
2237
 
2238
- 315
2239
2238
  316
2240
2239
  317
2241
2240
  318
@@ -2250,10 +2249,11 @@
2250
2249
  327
2251
2250
  328
2252
2251
  329
2253
- 330</pre>
2252
+ 330
2253
+ 331</pre>
2254
2254
  </td>
2255
2255
  <td>
2256
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 315</span>
2256
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 316</span>
2257
2257
 
2258
2258
  <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>
2259
2259
  <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>
@@ -2339,12 +2339,12 @@
2339
2339
  <pre class="lines">
2340
2340
 
2341
2341
 
2342
- 353
2343
2342
  354
2344
- 355</pre>
2343
+ 355
2344
+ 356</pre>
2345
2345
  </td>
2346
2346
  <td>
2347
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 353</span>
2347
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 354</span>
2348
2348
 
2349
2349
  <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.akaer</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
2350
2350
  <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>HOME</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='op'>+</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>/Library/LaunchAgents/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_name'>name</span><span class='rbrace'>}</span><span class='tstring_content'>.plist</span><span class='tstring_end'>&quot;</span></span>
@@ -2432,12 +2432,12 @@
2432
2432
  <pre class="lines">
2433
2433
 
2434
2434
 
2435
- 338
2436
2435
  339
2437
- 340</pre>
2436
+ 340
2437
+ 341</pre>
2438
2438
  </td>
2439
2439
  <td>
2440
- <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 338</span>
2440
+ <pre class="code"><span class="info file"># File 'lib/akaer/application.rb', line 339</span>
2441
2441
 
2442
2442
  <span class='kw'>def</span> <span class='id identifier rubyid_pad_number'>pad_number</span><span class='lparen'>(</span><span class='id identifier rubyid_num'>num</span><span class='comma'>,</span> <span class='id identifier rubyid_len'>len</span> <span class='op'>=</span> <span class='kw'>nil</span><span class='rparen'>)</span>
2443
2443
  <span class='id identifier rubyid_num'>num</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_rjust'>rjust</span><span class='lparen'>(</span><span class='lbracket'>[</span><span class='id identifier rubyid_len'>len</span><span class='period'>.</span><span class='id identifier rubyid_to_integer'>to_integer</span><span class='comma'>,</span> <span class='int'>2</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_max'>max</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>0</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
@@ -2452,7 +2452,7 @@
2452
2452
  </div>
2453
2453
 
2454
2454
  <div id="footer">
2455
- Generated on Sat Jul 20 13:44:16 2013 by
2455
+ Generated on Sat Jul 20 15:44:46 2013 by
2456
2456
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2457
2457
  0.8.6.2 (ruby-1.9.3).
2458
2458
  </div>
@@ -116,7 +116,7 @@
116
116
  </div>
117
117
 
118
118
  <div id="footer">
119
- Generated on Sat Jul 20 13:44:15 2013 by
119
+ Generated on Sat Jul 20 15:44:45 2013 by
120
120
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
121
121
  0.8.6.2 (ruby-1.9.3).
122
122
  </div>
@@ -356,7 +356,7 @@
356
356
  </div>
357
357
 
358
358
  <div id="footer">
359
- Generated on Sat Jul 20 13:44:15 2013 by
359
+ Generated on Sat Jul 20 15:44:45 2013 by
360
360
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
361
361
  0.8.6.2 (ruby-1.9.3).
362
362
  </div>
@@ -447,7 +447,7 @@
447
447
  </div>
448
448
 
449
449
  <div id="footer">
450
- Generated on Sat Jul 20 13:44:15 2013 by
450
+ Generated on Sat Jul 20 15:44:45 2013 by
451
451
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
452
452
  0.8.6.2 (ruby-1.9.3).
453
453
  </div>
@@ -273,7 +273,7 @@
273
273
  </div>
274
274
 
275
275
  <div id="footer">
276
- Generated on Sat Jul 20 13:44:16 2013 by
276
+ Generated on Sat Jul 20 15:44:46 2013 by
277
277
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
278
278
  0.8.6.2 (ruby-1.9.3).
279
279
  </div>
@@ -149,7 +149,7 @@
149
149
 
150
150
  </div>
151
151
  </dt>
152
- <dd><pre class="code"><span class='int'>0</span></pre></dd>
152
+ <dd><pre class="code"><span class='int'>1</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 Jul 20 13:44:15 2013 by
183
+ Generated on Sat Jul 20 15:44:45 2013 by
184
184
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
185
185
  0.8.6.2 (ruby-1.9.3).
186
186
  </div>
@@ -175,7 +175,7 @@
175
175
  </div>
176
176
 
177
177
  <div id="footer">
178
- Generated on Sat Jul 20 13:44:15 2013 by
178
+ Generated on Sat Jul 20 15:44:45 2013 by
179
179
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
180
180
  0.8.6.2 (ruby-1.9.3).
181
181
  </div>
@@ -145,7 +145,7 @@
145
145
  </div></div>
146
146
 
147
147
  <div id="footer">
148
- Generated on Sat Jul 20 13:44:15 2013 by
148
+ Generated on Sat Jul 20 15:44:45 2013 by
149
149
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
150
150
  0.8.6.2 (ruby-1.9.3).
151
151
  </div>
@@ -145,7 +145,7 @@
145
145
  </div></div>
146
146
 
147
147
  <div id="footer">
148
- Generated on Sat Jul 20 13:44:15 2013 by
148
+ Generated on Sat Jul 20 15:44:45 2013 by
149
149
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
150
150
  0.8.6.2 (ruby-1.9.3).
151
151
  </div>
@@ -103,7 +103,7 @@
103
103
  </div>
104
104
 
105
105
  <div id="footer">
106
- Generated on Sat Jul 20 13:44:15 2013 by
106
+ Generated on Sat Jul 20 15:44:45 2013 by
107
107
  <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
108
108
  0.8.6.2 (ruby-1.9.3).
109
109
  </div>
@@ -226,7 +226,7 @@ module Akaer
226
226
  # @param quiet [Boolean] Whether to show messages.
227
227
  # @return [Boolean] `true` if operation succeeded, `false` otherwise.
228
228
  def load_agent(launch_agent, quiet)
229
- perform_agent_loading(launch_agent, "load", :agent_loading, :agent_loading_error, quiet)
229
+ perform_agent_loading(launch_agent, "load", :agent_loading, :agent_loading_error, :error, quiet)
230
230
  end
231
231
 
232
232
  # Unloads a OSX system agent.
@@ -235,7 +235,7 @@ module Akaer
235
235
  # @param quiet [Boolean] Whether to show messages.
236
236
  # @return [Boolean] `true` if operation succeeded, `false` otherwise.
237
237
  def unload_agent(launch_agent, quiet)
238
- perform_agent_loading(launch_agent, "unload", :agent_unloading, :agent_unloading_error, quiet)
238
+ perform_agent_loading(launch_agent, "unload", :agent_unloading, :agent_unloading_error, :warn, quiet)
239
239
  end
240
240
 
241
241
  # Performs operation on a OSX system agent.
@@ -244,15 +244,16 @@ module Akaer
244
244
  # @param command [String] The command to run.
245
245
  # @param message [String] The message to show.
246
246
  # @param error_message [String] The error message to show.
247
+ # @param error_level [Symbol] The log level for errors.
247
248
  # @param quiet [Boolean] Whether to show messages.
248
249
  # @return [Boolean] `true` if operation succeeded, `false` otherwise.
249
- def perform_agent_loading(launch_agent, command, message, error_message, quiet)
250
+ def perform_agent_loading(launch_agent, command, message, error_message, error_level, quiet)
250
251
  begin
251
252
  logger.info(i18n.send(message, launch_agent)) if !quiet
252
253
  execute_command("launchctl #{command} -w \"#{launch_agent}\" > /dev/null 2>&1")
253
254
  true
254
255
  rescue
255
- logger.send(command == "load" ? :error : :warn, i18n.send(error_message)) if !quiet
256
+ logger.send(error_level, i18n.send(error_message)) if !quiet
256
257
  false
257
258
  end
258
259
  end
@@ -16,7 +16,7 @@ module Akaer
16
16
  MINOR = 3
17
17
 
18
18
  # The patch version.
19
- PATCH = 0
19
+ PATCH = 1
20
20
 
21
21
  # The current version of akaer.
22
22
  STRING = [MAJOR, MINOR, PATCH].compact.join(".")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akaer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -111,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
111
111
  version: '0'
112
112
  segments:
113
113
  - 0
114
- hash: 1362984801852364191
114
+ hash: -4061304892127088428
115
115
  requirements: []
116
116
  rubyforge_project: akaer
117
117
  rubygems_version: 1.8.25