profitably-km 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/CHANGELOG +4 -0
  2. data/Gemfile +4 -0
  3. data/Gemfile.lock +33 -0
  4. data/README.rdoc +14 -0
  5. data/Rakefile +19 -0
  6. data/VERSION +1 -0
  7. data/bin/km_send +42 -0
  8. data/doc/Accept.html +546 -0
  9. data/doc/Gemfile.html +110 -0
  10. data/doc/Hash.html +283 -0
  11. data/doc/Helper.html +318 -0
  12. data/doc/KM.html +493 -0
  13. data/doc/KM/IdentError.html +159 -0
  14. data/doc/KM/InitError.html +159 -0
  15. data/doc/KM/SaaS.html +451 -0
  16. data/doc/KMError.html +159 -0
  17. data/doc/Object.html +211 -0
  18. data/doc/README_rdoc.html +122 -0
  19. data/doc/Rakefile.html +111 -0
  20. data/doc/String.html +244 -0
  21. data/doc/bin/km_send.html +54 -0
  22. data/doc/created.rid +15 -0
  23. data/doc/images/brick.png +0 -0
  24. data/doc/images/brick_link.png +0 -0
  25. data/doc/images/bug.png +0 -0
  26. data/doc/images/bullet_black.png +0 -0
  27. data/doc/images/bullet_toggle_minus.png +0 -0
  28. data/doc/images/bullet_toggle_plus.png +0 -0
  29. data/doc/images/date.png +0 -0
  30. data/doc/images/find.png +0 -0
  31. data/doc/images/loadingAnimation.gif +0 -0
  32. data/doc/images/macFFBgHack.png +0 -0
  33. data/doc/images/package.png +0 -0
  34. data/doc/images/page_green.png +0 -0
  35. data/doc/images/page_white_text.png +0 -0
  36. data/doc/images/page_white_width.png +0 -0
  37. data/doc/images/plugin.png +0 -0
  38. data/doc/images/ruby.png +0 -0
  39. data/doc/images/tag_green.png +0 -0
  40. data/doc/images/wrench.png +0 -0
  41. data/doc/images/wrench_orange.png +0 -0
  42. data/doc/images/zoom.png +0 -0
  43. data/doc/index.html +142 -0
  44. data/doc/js/darkfish.js +116 -0
  45. data/doc/js/jquery.js +32 -0
  46. data/doc/js/quicksearch.js +114 -0
  47. data/doc/js/thickbox-compressed.js +10 -0
  48. data/doc/lib/km/saas_rb.html +54 -0
  49. data/doc/lib/km/version_rb.html +52 -0
  50. data/doc/lib/km_rb.html +60 -0
  51. data/doc/rdoc.css +730 -0
  52. data/doc/spec/accept_rb.html +62 -0
  53. data/doc/spec/km_old_rb.html +54 -0
  54. data/doc/spec/km_saas_spec_rb.html +56 -0
  55. data/doc/spec/km_send_spec_rb.html +54 -0
  56. data/doc/spec/km_spec_rb.html +54 -0
  57. data/doc/spec/setup_rb.html +60 -0
  58. data/doc/spec/watchr_rb.html +52 -0
  59. data/km.gemspec +28 -0
  60. data/lib/km.rb +262 -0
  61. data/lib/km/saas.rb +39 -0
  62. data/lib/km/version.rb +3 -0
  63. data/spec/accept.rb +90 -0
  64. data/spec/km_old.rb +105 -0
  65. data/spec/km_saas_spec.rb +121 -0
  66. data/spec/km_send_spec.rb +89 -0
  67. data/spec/km_spec.rb +186 -0
  68. data/spec/log/.hold +0 -0
  69. data/spec/setup.rb +78 -0
  70. data/spec/watchr.rb +3 -0
  71. metadata +237 -0
data/doc/KM.html ADDED
@@ -0,0 +1,493 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: KM</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="home-metadata">
26
+ <div id="home-section" class="section">
27
+ <h3 class="section-header">
28
+ <a href="./index.html">Home</a>
29
+ <a href="./index.html#classes">Classes</a>
30
+ <a href="./index.html#methods">Methods</a>
31
+ </h3>
32
+ </div>
33
+ </div>
34
+
35
+ <div id="file-metadata">
36
+ <div id="file-list-section" class="section">
37
+ <h3 class="section-header">In Files</h3>
38
+ <div class="section-body">
39
+ <ul>
40
+
41
+ <li><a href="./lib/km/saas_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
42
+ class="thickbox" title="lib/km/saas.rb">lib/km/saas.rb</a></li>
43
+
44
+ <li><a href="./lib/km/version_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
45
+ class="thickbox" title="lib/km/version.rb">lib/km/version.rb</a></li>
46
+
47
+ <li><a href="./lib/km_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
48
+ class="thickbox" title="lib/km.rb">lib/km.rb</a></li>
49
+
50
+ <li><a href="./spec/setup_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
51
+ class="thickbox" title="spec/setup.rb">spec/setup.rb</a></li>
52
+
53
+ </ul>
54
+ </div>
55
+ </div>
56
+
57
+
58
+ </div>
59
+
60
+ <div id="class-metadata">
61
+
62
+ <!-- Parent Class -->
63
+
64
+ <div id="parent-class-section" class="section">
65
+ <h3 class="section-header">Parent</h3>
66
+
67
+ <p class="link"><a href="Object.html">Object</a></p>
68
+
69
+ </div>
70
+
71
+
72
+ <!-- Namespace Contents -->
73
+
74
+ <div id="namespace-list-section" class="section">
75
+ <h3 class="section-header">Namespace</h3>
76
+ <ul class="link-list">
77
+
78
+ <li><span class="type">MODULE</span> <a href="KM/SaaS.html">KM::SaaS</a></li>
79
+
80
+ <li><span class="type">CLASS</span> <a href="KM/IdentError.html">KM::IdentError</a></li>
81
+
82
+ <li><span class="type">CLASS</span> <a href="KM/InitError.html">KM::InitError</a></li>
83
+
84
+ </ul>
85
+ </div>
86
+
87
+
88
+ <!-- Method Quickref -->
89
+
90
+ <div id="method-list-section" class="section">
91
+ <h3 class="section-header">Methods</h3>
92
+ <ul class="link-list">
93
+
94
+ <li><a href="#method-c-alias">::alias</a></li>
95
+
96
+ <li><a href="#method-c-host">::host</a></li>
97
+
98
+ <li><a href="#method-c-identify">::identify</a></li>
99
+
100
+ <li><a href="#method-c-init">::init</a></li>
101
+
102
+ <li><a href="#method-c-log_dir">::log_dir</a></li>
103
+
104
+ <li><a href="#method-c-record">::record</a></li>
105
+
106
+ <li><a href="#method-c-set">::set</a></li>
107
+
108
+ </ul>
109
+ </div>
110
+
111
+
112
+ <!-- Included Modules -->
113
+
114
+ </div>
115
+
116
+ <div id="project-metadata">
117
+
118
+
119
+ <div id="fileindex-section" class="section project-section">
120
+ <h3 class="section-header">Files</h3>
121
+ <ul>
122
+
123
+ <li class="file"><a href="./Gemfile.html">Gemfile</a></li>
124
+
125
+ <li class="file"><a href="./README_rdoc.html">README.rdoc</a></li>
126
+
127
+ <li class="file"><a href="./Rakefile.html">Rakefile</a></li>
128
+
129
+ </ul>
130
+ </div>
131
+
132
+
133
+ <div id="classindex-section" class="section project-section">
134
+ <h3 class="section-header">Class/Module Index
135
+ <span class="search-toggle"><img src="./images/find.png"
136
+ height="16" width="16" alt="[+]"
137
+ title="show/hide quicksearch" /></span></h3>
138
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
139
+ <fieldset>
140
+ <legend>Quicksearch</legend>
141
+ <input type="text" name="quicksearch" value=""
142
+ class="quicksearch-field" />
143
+ </fieldset>
144
+ </form>
145
+
146
+ <ul class="link-list">
147
+
148
+ <li><a href="./KM.html">KM</a></li>
149
+
150
+ <li><a href="./KM/IdentError.html">KM::IdentError</a></li>
151
+
152
+ <li><a href="./KM/InitError.html">KM::InitError</a></li>
153
+
154
+ <li><a href="./KM/SaaS.html">KM::SaaS</a></li>
155
+
156
+ <li><a href="./Accept.html">Accept</a></li>
157
+
158
+ <li><a href="./Hash.html">Hash</a></li>
159
+
160
+ <li><a href="./Helper.html">Helper</a></li>
161
+
162
+ <li><a href="./KMError.html">KMError</a></li>
163
+
164
+ <li><a href="./Object.html">Object</a></li>
165
+
166
+ <li><a href="./String.html">String</a></li>
167
+
168
+ </ul>
169
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
170
+ </div>
171
+
172
+
173
+ </div>
174
+ </div>
175
+
176
+ <div id="documentation">
177
+ <h1 class="class">KM</h1>
178
+
179
+ <div id="description">
180
+
181
+ </div>
182
+
183
+ <!-- Constants -->
184
+
185
+ <div id="constants-list" class="section">
186
+ <h3 class="section-header">Constants</h3>
187
+ <dl>
188
+
189
+ <dt><a name="VERSION">VERSION</a></dt>
190
+
191
+ <dd class="description"></dd>
192
+
193
+
194
+ </dl>
195
+ </div>
196
+
197
+
198
+ <!-- Attributes -->
199
+
200
+
201
+ <!-- Methods -->
202
+
203
+ <div id="public-class-method-details" class="method-section section">
204
+ <h3 class="section-header">Public Class Methods</h3>
205
+
206
+
207
+ <div id="alias-method" class="method-detail ">
208
+ <a name="method-c-alias"></a>
209
+
210
+
211
+ <div class="method-heading">
212
+ <span class="method-name">alias</span><span
213
+ class="method-args">(name, alias_to)</span>
214
+ <span class="method-click-advice">click to toggle source</span>
215
+ </div>
216
+
217
+
218
+ <div class="method-description">
219
+
220
+
221
+
222
+
223
+
224
+ <div class="method-source-code"
225
+ id="alias-source">
226
+ <pre>
227
+ <span class="ruby-comment"># File lib/km.rb, line 67</span>
228
+ def alias(name, alias_to)
229
+ begin
230
+ return unless is_initialized?
231
+ generate_query(<span class="ruby-string">'a'</span>, { <span class="ruby-string">'_n'</span> =&gt; alias_to, <span class="ruby-string">'_p'</span> =&gt; name }, false)
232
+ rescue <span class="ruby-constant">Exception</span> =&gt; e
233
+ log_error(e)
234
+ end
235
+ end</pre>
236
+ </div>
237
+
238
+ </div>
239
+
240
+
241
+
242
+
243
+ </div>
244
+
245
+
246
+ <div id="host-method" class="method-detail ">
247
+ <a name="method-c-host"></a>
248
+
249
+
250
+ <div class="method-heading">
251
+ <span class="method-name">host</span><span
252
+ class="method-args">()</span>
253
+ <span class="method-click-advice">click to toggle source</span>
254
+ </div>
255
+
256
+
257
+ <div class="method-description">
258
+
259
+
260
+
261
+
262
+
263
+ <div class="method-source-code"
264
+ id="host-source">
265
+ <pre>
266
+ <span class="ruby-comment"># File lib/km.rb, line 110</span>
267
+ def host
268
+ <span class="ruby-ivar">@host</span>
269
+ end</pre>
270
+ </div>
271
+
272
+ </div>
273
+
274
+
275
+
276
+
277
+ </div>
278
+
279
+
280
+ <div id="identify-method" class="method-detail ">
281
+ <a name="method-c-identify"></a>
282
+
283
+
284
+ <div class="method-heading">
285
+ <span class="method-name">identify</span><span
286
+ class="method-args">(id)</span>
287
+ <span class="method-click-advice">click to toggle source</span>
288
+ </div>
289
+
290
+
291
+ <div class="method-description">
292
+
293
+
294
+
295
+
296
+
297
+ <div class="method-source-code"
298
+ id="identify-source">
299
+ <pre>
300
+ <span class="ruby-comment"># File lib/km.rb, line 50</span>
301
+ def identify(id)
302
+ <span class="ruby-ivar">@id</span> = id
303
+ end</pre>
304
+ </div>
305
+
306
+ </div>
307
+
308
+
309
+
310
+
311
+ </div>
312
+
313
+
314
+ <div id="init-method" class="method-detail ">
315
+ <a name="method-c-init"></a>
316
+
317
+
318
+ <div class="method-heading">
319
+ <span class="method-name">init</span><span
320
+ class="method-args">(key, options={})</span>
321
+ <span class="method-click-advice">click to toggle source</span>
322
+ </div>
323
+
324
+
325
+ <div class="method-description">
326
+
327
+
328
+
329
+
330
+
331
+ <div class="method-source-code"
332
+ id="init-source">
333
+ <pre>
334
+ <span class="ruby-comment"># File lib/km.rb, line 30</span>
335
+ def init(key, options={})
336
+ default = {
337
+ :host =&gt; <span class="ruby-ivar">@host</span>,
338
+ :log_dir =&gt; <span class="ruby-ivar">@log_dir</span>,
339
+ :to_stderr =&gt; <span class="ruby-ivar">@to_stderr</span>,
340
+ :use_cron =&gt; <span class="ruby-ivar">@use_cron</span>
341
+ }
342
+ options.reverse_merge!(default)
343
+ begin
344
+ <span class="ruby-ivar">@key</span> = key
345
+ <span class="ruby-ivar">@host</span> = options[:host]
346
+ <span class="ruby-ivar">@log_dir</span> = options[:log_dir]
347
+ <span class="ruby-ivar">@use_cron</span> = options[:use_cron]
348
+ <span class="ruby-ivar">@to_stderr</span> = options[:to_stderr]
349
+ log_dir_writable?
350
+ rescue <span class="ruby-constant">Exception</span> =&gt; e
351
+ log_error(e)
352
+ end
353
+ end</pre>
354
+ </div>
355
+
356
+ </div>
357
+
358
+
359
+
360
+
361
+ </div>
362
+
363
+
364
+ <div id="log_dir-method" class="method-detail ">
365
+ <a name="method-c-log_dir"></a>
366
+
367
+
368
+ <div class="method-heading">
369
+ <span class="method-name">log_dir</span><span
370
+ class="method-args">()</span>
371
+ <span class="method-click-advice">click to toggle source</span>
372
+ </div>
373
+
374
+
375
+ <div class="method-description">
376
+
377
+
378
+
379
+
380
+
381
+ <div class="method-source-code"
382
+ id="log_dir-source">
383
+ <pre>
384
+ <span class="ruby-comment"># File lib/km.rb, line 107</span>
385
+ def log_dir
386
+ <span class="ruby-ivar">@log_dir</span>
387
+ end</pre>
388
+ </div>
389
+
390
+ </div>
391
+
392
+
393
+
394
+
395
+ </div>
396
+
397
+
398
+ <div id="record-method" class="method-detail ">
399
+ <a name="method-c-record"></a>
400
+
401
+
402
+ <div class="method-heading">
403
+ <span class="method-name">record</span><span
404
+ class="method-args">(action,props={})</span>
405
+ <span class="method-click-advice">click to toggle source</span>
406
+ </div>
407
+
408
+
409
+ <div class="method-description">
410
+
411
+
412
+
413
+
414
+
415
+ <div class="method-source-code"
416
+ id="record-source">
417
+ <pre>
418
+ <span class="ruby-comment"># File lib/km.rb, line 54</span>
419
+ def record(action,props={})
420
+ props = hash_keys_to_str(props)
421
+ begin
422
+ return unless is_initialized_and_identified?
423
+ return set(action) if action.class == <span class="ruby-constant">Hash</span>
424
+
425
+ props.update(<span class="ruby-string">'_n'</span> =&gt; action)
426
+ generate_query(<span class="ruby-string">'e'</span>, props)
427
+ rescue <span class="ruby-constant">Exception</span> =&gt; e
428
+ log_error(e)
429
+ end
430
+ end</pre>
431
+ </div>
432
+
433
+ </div>
434
+
435
+
436
+
437
+
438
+ </div>
439
+
440
+
441
+ <div id="set-method" class="method-detail ">
442
+ <a name="method-c-set"></a>
443
+
444
+
445
+ <div class="method-heading">
446
+ <span class="method-name">set</span><span
447
+ class="method-args">(data)</span>
448
+ <span class="method-click-advice">click to toggle source</span>
449
+ </div>
450
+
451
+
452
+ <div class="method-description">
453
+
454
+
455
+
456
+
457
+
458
+ <div class="method-source-code"
459
+ id="set-source">
460
+ <pre>
461
+ <span class="ruby-comment"># File lib/km.rb, line 76</span>
462
+ def set(data)
463
+ begin
464
+ return unless is_initialized_and_identified?
465
+ generate_query(<span class="ruby-string">'s'</span>, data)
466
+ rescue <span class="ruby-constant">Exception</span> =&gt; e
467
+ log_error(e)
468
+ end
469
+ end</pre>
470
+ </div>
471
+
472
+ </div>
473
+
474
+
475
+
476
+
477
+ </div>
478
+
479
+
480
+ </div>
481
+
482
+
483
+ </div>
484
+
485
+ <div id="validator-badges">
486
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
487
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
488
+ Rdoc Generator</a> 2</small>.</p>
489
+ </div>
490
+
491
+ </body>
492
+ </html>
493
+