forklift_etl 1.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (121) hide show
  1. checksums.yaml +15 -0
  2. data/.gitignore +10 -0
  3. data/.rbenv-version +1 -0
  4. data/.travis.yml +10 -0
  5. data/Gemfile +10 -0
  6. data/Gemfile.lock +74 -0
  7. data/Rakefile +13 -0
  8. data/bin/forklift +61 -0
  9. data/doc/EmailSuffix.html +228 -0
  10. data/doc/Forklift.html +187 -0
  11. data/doc/Forklift/Base.html +167 -0
  12. data/doc/Forklift/Base/Connection.html +590 -0
  13. data/doc/Forklift/Base/Logger.html +453 -0
  14. data/doc/Forklift/Base/Mailer.html +399 -0
  15. data/doc/Forklift/Base/Mailer/ERBBinding.html +256 -0
  16. data/doc/Forklift/Base/Pid.html +489 -0
  17. data/doc/Forklift/Base/Utils.html +252 -0
  18. data/doc/Forklift/Connection.html +164 -0
  19. data/doc/Forklift/Connection/Elasticsearch.html +419 -0
  20. data/doc/Forklift/Connection/Mysql.html +939 -0
  21. data/doc/Forklift/Patterns.html +164 -0
  22. data/doc/Forklift/Patterns/Elasticsearch.html +169 -0
  23. data/doc/Forklift/Patterns/Mysql.html +402 -0
  24. data/doc/Forklift/Plan.html +704 -0
  25. data/doc/Gemfile.html +132 -0
  26. data/doc/Object.html +326 -0
  27. data/doc/Rakefile.html +138 -0
  28. data/doc/SpecClient.html +291 -0
  29. data/doc/SpecPlan.html +253 -0
  30. data/doc/SpecSeeds.html +303 -0
  31. data/doc/created.rid +35 -0
  32. data/doc/example/Gemfile.html +129 -0
  33. data/doc/images/add.png +0 -0
  34. data/doc/images/brick.png +0 -0
  35. data/doc/images/brick_link.png +0 -0
  36. data/doc/images/bug.png +0 -0
  37. data/doc/images/bullet_black.png +0 -0
  38. data/doc/images/bullet_toggle_minus.png +0 -0
  39. data/doc/images/bullet_toggle_plus.png +0 -0
  40. data/doc/images/date.png +0 -0
  41. data/doc/images/delete.png +0 -0
  42. data/doc/images/find.png +0 -0
  43. data/doc/images/loadingAnimation.gif +0 -0
  44. data/doc/images/macFFBgHack.png +0 -0
  45. data/doc/images/package.png +0 -0
  46. data/doc/images/page_green.png +0 -0
  47. data/doc/images/page_white_text.png +0 -0
  48. data/doc/images/page_white_width.png +0 -0
  49. data/doc/images/plugin.png +0 -0
  50. data/doc/images/ruby.png +0 -0
  51. data/doc/images/tag_blue.png +0 -0
  52. data/doc/images/tag_green.png +0 -0
  53. data/doc/images/transparent.png +0 -0
  54. data/doc/images/wrench.png +0 -0
  55. data/doc/images/wrench_orange.png +0 -0
  56. data/doc/images/zoom.png +0 -0
  57. data/doc/index.html +122 -0
  58. data/doc/js/darkfish.js +155 -0
  59. data/doc/js/jquery.js +18 -0
  60. data/doc/js/navigation.js +142 -0
  61. data/doc/js/search.js +94 -0
  62. data/doc/js/search_index.js +1 -0
  63. data/doc/js/searcher.js +228 -0
  64. data/doc/rdoc.css +543 -0
  65. data/doc/table_of_contents.html +309 -0
  66. data/example/Gemfile +3 -0
  67. data/example/Gemfile.lock +55 -0
  68. data/example/config/connections/elasticsearch/source.yml +1 -0
  69. data/example/config/connections/mysql/destination.yml +6 -0
  70. data/example/config/connections/mysql/source.yml +6 -0
  71. data/example/config/email.yml +18 -0
  72. data/example/plan.rb +87 -0
  73. data/example/template/email.erb +6 -0
  74. data/example/transformations/cleanup.sql +1 -0
  75. data/example/transformations/combined_name.sql +7 -0
  76. data/example/transformations/email_suffix.rb +20 -0
  77. data/forklift.jpg +0 -0
  78. data/forklift_etl.gemspec +28 -0
  79. data/lib/forklift/base/connection.rb +72 -0
  80. data/lib/forklift/base/logger.rb +49 -0
  81. data/lib/forklift/base/mailer.rb +83 -0
  82. data/lib/forklift/base/pid.rb +55 -0
  83. data/lib/forklift/base/utils.rb +23 -0
  84. data/lib/forklift/forklift.rb +19 -0
  85. data/lib/forklift/patterns/elasticsearch_patterns.rb +7 -0
  86. data/lib/forklift/patterns/mysql_patterns.rb +87 -0
  87. data/lib/forklift/plan.rb +138 -0
  88. data/lib/forklift/transports/elasticsearch.rb +75 -0
  89. data/lib/forklift/transports/mysql.rb +241 -0
  90. data/lib/forklift/version.rb +3 -0
  91. data/readme.md +410 -0
  92. data/spec/config/connections/elasticsearch/forklift_test.yml +1 -0
  93. data/spec/config/connections/mysql/forklift_test_destination.yml +6 -0
  94. data/spec/config/connections/mysql/forklift_test_source_a.yml +6 -0
  95. data/spec/config/connections/mysql/forklift_test_source_b.yml +6 -0
  96. data/spec/config/connections/mysql/forklift_test_working.yml +6 -0
  97. data/spec/config/email.yml +4 -0
  98. data/spec/integration/basic_spec.rb +29 -0
  99. data/spec/integration/elasticsearch_patterns_spec.rb +5 -0
  100. data/spec/integration/elasticsearch_spec.rb +95 -0
  101. data/spec/integration/multi_transport_spec.rb +112 -0
  102. data/spec/integration/mysql_patterns_spec.rb +76 -0
  103. data/spec/integration/mysql_spec.rb +138 -0
  104. data/spec/spec_helper.rb +30 -0
  105. data/spec/support/dumps/elasticsearch/forklift_test.json +7 -0
  106. data/spec/support/dumps/mysql/forklift_test_source_a.sql +79 -0
  107. data/spec/support/dumps/mysql/forklift_test_source_b.sql +23 -0
  108. data/spec/support/spec_client.rb +30 -0
  109. data/spec/support/spec_plan.rb +15 -0
  110. data/spec/support/spec_seeds.rb +69 -0
  111. data/spec/template/spec_email_template.erb +4 -0
  112. data/spec/unit/connection/mysql_spec.rb +102 -0
  113. data/spec/unit/misc/email_spec.rb +37 -0
  114. data/spec/unit/misc/pid_spec.rb +25 -0
  115. data/spec/unit/misc/step_spec.rb +53 -0
  116. data/template/destination.yml +6 -0
  117. data/template/email.erb +1 -0
  118. data/template/email.yml +18 -0
  119. data/template/plan.rb +10 -0
  120. data/template/source.yml +6 -0
  121. metadata +289 -0
@@ -0,0 +1,167 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>module Forklift::Base - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="module">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../index.html">Home</a>
28
+ <a href="../table_of_contents.html#classes">Classes</a>
29
+ <a href="../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/forklift/base/connection.rb
51
+ <li>lib/forklift/base/logger.rb
52
+ <li>lib/forklift/base/mailer.rb
53
+ <li>lib/forklift/base/pid.rb
54
+ <li>lib/forklift/base/utils.rb
55
+ </ul>
56
+ </nav>
57
+
58
+
59
+ </div>
60
+
61
+ <div id="class-metadata">
62
+
63
+
64
+
65
+
66
+ </div>
67
+
68
+ <div id="project-metadata">
69
+ <nav id="fileindex-section" class="section project-section">
70
+ <h3 class="section-header">Pages</h3>
71
+
72
+ <ul>
73
+
74
+ <li class="file"><a href="../Gemfile.html">Gemfile</a>
75
+
76
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
77
+
78
+ <li class="file"><a href="../example/Gemfile.html">Gemfile</a>
79
+
80
+ <li class="file"><a href="../spec/pid/pidfile.html">pidfile</a>
81
+
82
+ </ul>
83
+ </nav>
84
+
85
+ <nav id="classindex-section" class="section project-section">
86
+ <h3 class="section-header">Class and Module Index</h3>
87
+
88
+ <ul class="link-list">
89
+
90
+ <li><a href="../Forklift.html">Forklift</a>
91
+
92
+ <li><a href="../Forklift/Base.html">Forklift::Base</a>
93
+
94
+ <li><a href="../Forklift/Base/Connection.html">Forklift::Base::Connection</a>
95
+
96
+ <li><a href="../Forklift/Base/Logger.html">Forklift::Base::Logger</a>
97
+
98
+ <li><a href="../Forklift/Base/Mailer.html">Forklift::Base::Mailer</a>
99
+
100
+ <li><a href="../Forklift/Base/Mailer/ERBBinding.html">Forklift::Base::Mailer::ERBBinding</a>
101
+
102
+ <li><a href="../Forklift/Base/Pid.html">Forklift::Base::Pid</a>
103
+
104
+ <li><a href="../Forklift/Base/Utils.html">Forklift::Base::Utils</a>
105
+
106
+ <li><a href="../Forklift/Connection.html">Forklift::Connection</a>
107
+
108
+ <li><a href="../Forklift/Connection/Elasticsearch.html">Forklift::Connection::Elasticsearch</a>
109
+
110
+ <li><a href="../Forklift/Connection/Mysql.html">Forklift::Connection::Mysql</a>
111
+
112
+ <li><a href="../Forklift/Patterns.html">Forklift::Patterns</a>
113
+
114
+ <li><a href="../Forklift/Patterns/Elasticsearch.html">Forklift::Patterns::Elasticsearch</a>
115
+
116
+ <li><a href="../Forklift/Patterns/Mysql.html">Forklift::Patterns::Mysql</a>
117
+
118
+ <li><a href="../Forklift/Plan.html">Forklift::Plan</a>
119
+
120
+ <li><a href="../EmailSuffix.html">EmailSuffix</a>
121
+
122
+ <li><a href="../Object.html">Object</a>
123
+
124
+ <li><a href="../SpecClient.html">SpecClient</a>
125
+
126
+ <li><a href="../SpecPlan.html">SpecPlan</a>
127
+
128
+ <li><a href="../SpecSeeds.html">SpecSeeds</a>
129
+
130
+ </ul>
131
+ </nav>
132
+
133
+ </div>
134
+ </nav>
135
+
136
+ <div id="documentation">
137
+ <h1 class="module">module Forklift::Base</h1>
138
+
139
+ <div id="description" class="description">
140
+
141
+ </div><!-- description -->
142
+
143
+
144
+
145
+
146
+ <section id="5Buntitled-5D" class="documentation-section">
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+ <!-- Methods -->
156
+
157
+ </section><!-- 5Buntitled-5D -->
158
+
159
+ </div><!-- documentation -->
160
+
161
+
162
+ <footer id="validator-badges">
163
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
164
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
165
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
166
+ </footer>
167
+
@@ -0,0 +1,590 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Forklift::Base::Connection - RDoc Documentation</title>
8
+
9
+ <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet">
10
+
11
+ <script type="text/javascript">
12
+ var rdoc_rel_prefix = "../../";
13
+ </script>
14
+
15
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
16
+ <script type="text/javascript" charset="utf-8" src="../../js/navigation.js"></script>
17
+ <script type="text/javascript" charset="utf-8" src="../../js/search_index.js"></script>
18
+ <script type="text/javascript" charset="utf-8" src="../../js/search.js"></script>
19
+ <script type="text/javascript" charset="utf-8" src="../../js/searcher.js"></script>
20
+ <script type="text/javascript" charset="utf-8" src="../../js/darkfish.js"></script>
21
+
22
+
23
+ <body id="top" class="class">
24
+ <nav id="metadata">
25
+ <nav id="home-section" class="section">
26
+ <h3 class="section-header">
27
+ <a href="../../index.html">Home</a>
28
+ <a href="../../table_of_contents.html#classes">Classes</a>
29
+ <a href="../../table_of_contents.html#methods">Methods</a>
30
+ </h3>
31
+ </nav>
32
+
33
+
34
+ <nav id="search-section" class="section project-section" class="initially-hidden">
35
+ <form action="#" method="get" accept-charset="utf-8">
36
+ <h3 class="section-header">
37
+ <input type="text" name="search" placeholder="Search" id="search-field"
38
+ title="Type to search, Up and Down to navigate, Enter to load">
39
+ </h3>
40
+ </form>
41
+
42
+ <ul id="search-results" class="initially-hidden"></ul>
43
+ </nav>
44
+
45
+
46
+ <div id="file-metadata">
47
+ <nav id="file-list-section" class="section">
48
+ <h3 class="section-header">Defined In</h3>
49
+ <ul>
50
+ <li>lib/forklift/base/connection.rb
51
+ </ul>
52
+ </nav>
53
+
54
+
55
+ </div>
56
+
57
+ <div id="class-metadata">
58
+
59
+ <nav id="parent-class-section" class="section">
60
+ <h3 class="section-header">Parent</h3>
61
+
62
+ <p class="link"><a href="../../Object.html">Object</a>
63
+
64
+ </nav>
65
+
66
+
67
+ <!-- Method Quickref -->
68
+ <nav id="method-list-section" class="section">
69
+ <h3 class="section-header">Methods</h3>
70
+
71
+ <ul class="link-list">
72
+
73
+ <li><a href="#method-c-new">::new</a>
74
+
75
+ <li><a href="#method-i-client">#client</a>
76
+
77
+ <li><a href="#method-i-config">#config</a>
78
+
79
+ <li><a href="#method-i-connect">#connect</a>
80
+
81
+ <li><a href="#method-i-disconnect">#disconnect</a>
82
+
83
+ <li><a href="#method-i-exec">#exec</a>
84
+
85
+ <li><a href="#method-i-exec-21">#exec!</a>
86
+
87
+ <li><a href="#method-i-exec_ruby">#exec_ruby</a>
88
+
89
+ <li><a href="#method-i-exec_script">#exec_script</a>
90
+
91
+ <li><a href="#method-i-pipe">#pipe</a>
92
+
93
+ <li><a href="#method-i-read">#read</a>
94
+
95
+ <li><a href="#method-i-write">#write</a>
96
+
97
+ </ul>
98
+ </nav>
99
+
100
+ </div>
101
+
102
+ <div id="project-metadata">
103
+ <nav id="fileindex-section" class="section project-section">
104
+ <h3 class="section-header">Pages</h3>
105
+
106
+ <ul>
107
+
108
+ <li class="file"><a href="../../Gemfile.html">Gemfile</a>
109
+
110
+ <li class="file"><a href="../../Rakefile.html">Rakefile</a>
111
+
112
+ <li class="file"><a href="../../example/Gemfile.html">Gemfile</a>
113
+
114
+ <li class="file"><a href="../../spec/pid/pidfile.html">pidfile</a>
115
+
116
+ </ul>
117
+ </nav>
118
+
119
+ <nav id="classindex-section" class="section project-section">
120
+ <h3 class="section-header">Class and Module Index</h3>
121
+
122
+ <ul class="link-list">
123
+
124
+ <li><a href="../../Forklift.html">Forklift</a>
125
+
126
+ <li><a href="../../Forklift/Base.html">Forklift::Base</a>
127
+
128
+ <li><a href="../../Forklift/Base/Connection.html">Forklift::Base::Connection</a>
129
+
130
+ <li><a href="../../Forklift/Base/Logger.html">Forklift::Base::Logger</a>
131
+
132
+ <li><a href="../../Forklift/Base/Mailer.html">Forklift::Base::Mailer</a>
133
+
134
+ <li><a href="../../Forklift/Base/Mailer/ERBBinding.html">Forklift::Base::Mailer::ERBBinding</a>
135
+
136
+ <li><a href="../../Forklift/Base/Pid.html">Forklift::Base::Pid</a>
137
+
138
+ <li><a href="../../Forklift/Base/Utils.html">Forklift::Base::Utils</a>
139
+
140
+ <li><a href="../../Forklift/Connection.html">Forklift::Connection</a>
141
+
142
+ <li><a href="../../Forklift/Connection/Elasticsearch.html">Forklift::Connection::Elasticsearch</a>
143
+
144
+ <li><a href="../../Forklift/Connection/Mysql.html">Forklift::Connection::Mysql</a>
145
+
146
+ <li><a href="../../Forklift/Patterns.html">Forklift::Patterns</a>
147
+
148
+ <li><a href="../../Forklift/Patterns/Elasticsearch.html">Forklift::Patterns::Elasticsearch</a>
149
+
150
+ <li><a href="../../Forklift/Patterns/Mysql.html">Forklift::Patterns::Mysql</a>
151
+
152
+ <li><a href="../../Forklift/Plan.html">Forklift::Plan</a>
153
+
154
+ <li><a href="../../EmailSuffix.html">EmailSuffix</a>
155
+
156
+ <li><a href="../../Object.html">Object</a>
157
+
158
+ <li><a href="../../SpecClient.html">SpecClient</a>
159
+
160
+ <li><a href="../../SpecPlan.html">SpecPlan</a>
161
+
162
+ <li><a href="../../SpecSeeds.html">SpecSeeds</a>
163
+
164
+ </ul>
165
+ </nav>
166
+
167
+ </div>
168
+ </nav>
169
+
170
+ <div id="documentation">
171
+ <h1 class="class">class Forklift::Base::Connection</h1>
172
+
173
+ <div id="description" class="description">
174
+
175
+ </div><!-- description -->
176
+
177
+
178
+
179
+
180
+ <section id="5Buntitled-5D" class="documentation-section">
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+ <!-- Methods -->
190
+
191
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
192
+ <h3 class="section-header">Public Class Methods</h3>
193
+
194
+
195
+ <div id="method-c-new" class="method-detail ">
196
+
197
+ <div class="method-heading">
198
+ <span class="method-name">new</span><span
199
+ class="method-args">(config)</span>
200
+ <span class="method-click-advice">click to toggle source</span>
201
+ </div>
202
+
203
+
204
+ <div class="method-description">
205
+
206
+
207
+
208
+
209
+
210
+ <div class="method-source-code" id="new-source">
211
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 5</span>
212
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">config</span>)
213
+ <span class="ruby-ivar">@config</span> = <span class="ruby-identifier">config</span>
214
+ <span class="ruby-keyword">end</span></pre>
215
+ </div><!-- new-source -->
216
+
217
+ </div>
218
+
219
+
220
+
221
+
222
+ </div><!-- new-method -->
223
+
224
+
225
+ </section><!-- public-class-method-details -->
226
+
227
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
228
+ <h3 class="section-header">Public Instance Methods</h3>
229
+
230
+
231
+ <div id="method-i-client" class="method-detail ">
232
+
233
+ <div class="method-heading">
234
+ <span class="method-name">client</span><span
235
+ class="method-args">()</span>
236
+ <span class="method-click-advice">click to toggle source</span>
237
+ </div>
238
+
239
+
240
+ <div class="method-description">
241
+
242
+
243
+
244
+
245
+
246
+ <div class="method-source-code" id="client-source">
247
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 13</span>
248
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">client</span>
249
+ <span class="ruby-ivar">@client</span>
250
+ <span class="ruby-keyword">end</span></pre>
251
+ </div><!-- client-source -->
252
+
253
+ </div>
254
+
255
+
256
+
257
+
258
+ </div><!-- client-method -->
259
+
260
+
261
+ <div id="method-i-config" class="method-detail ">
262
+
263
+ <div class="method-heading">
264
+ <span class="method-name">config</span><span
265
+ class="method-args">()</span>
266
+ <span class="method-click-advice">click to toggle source</span>
267
+ </div>
268
+
269
+
270
+ <div class="method-description">
271
+
272
+
273
+
274
+
275
+
276
+ <div class="method-source-code" id="config-source">
277
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 9</span>
278
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">config</span>
279
+ <span class="ruby-ivar">@config</span>
280
+ <span class="ruby-keyword">end</span></pre>
281
+ </div><!-- config-source -->
282
+
283
+ </div>
284
+
285
+
286
+
287
+
288
+ </div><!-- config-method -->
289
+
290
+
291
+ <div id="method-i-connect" class="method-detail ">
292
+
293
+ <div class="method-heading">
294
+ <span class="method-name">connect</span><span
295
+ class="method-args">()</span>
296
+ <span class="method-click-advice">click to toggle source</span>
297
+ </div>
298
+
299
+
300
+ <div class="method-description">
301
+
302
+
303
+
304
+
305
+
306
+ <div class="method-source-code" id="connect-source">
307
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 17</span>
308
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">connect</span>
309
+ <span class="ruby-comment"># Will define @client</span>
310
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">'not implemented'</span>
311
+ <span class="ruby-keyword">end</span></pre>
312
+ </div><!-- connect-source -->
313
+
314
+ </div>
315
+
316
+
317
+
318
+
319
+ </div><!-- connect-method -->
320
+
321
+
322
+ <div id="method-i-disconnect" class="method-detail ">
323
+
324
+ <div class="method-heading">
325
+ <span class="method-name">disconnect</span><span
326
+ class="method-args">()</span>
327
+ <span class="method-click-advice">click to toggle source</span>
328
+ </div>
329
+
330
+
331
+ <div class="method-description">
332
+
333
+
334
+
335
+
336
+
337
+ <div class="method-source-code" id="disconnect-source">
338
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 22</span>
339
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">disconnect</span>
340
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">'not implemented'</span>
341
+ <span class="ruby-keyword">end</span></pre>
342
+ </div><!-- disconnect-source -->
343
+
344
+ </div>
345
+
346
+
347
+
348
+
349
+ </div><!-- disconnect-method -->
350
+
351
+
352
+ <div id="method-i-exec" class="method-detail ">
353
+
354
+ <div class="method-heading">
355
+ <span class="method-name">exec</span><span
356
+ class="method-args">(path)</span>
357
+ <span class="method-click-advice">click to toggle source</span>
358
+ </div>
359
+
360
+
361
+ <div class="method-description">
362
+
363
+
364
+
365
+
366
+
367
+ <div class="method-source-code" id="exec-source">
368
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 41</span>
369
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec</span>(<span class="ruby-identifier">path</span>)
370
+ <span class="ruby-keyword">begin</span>
371
+ <span class="ruby-identifier">exec!</span>(<span class="ruby-identifier">path</span>)
372
+ <span class="ruby-keyword">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">e</span>
373
+ <span class="ruby-identifier">forklift</span>.<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">log</span>(<span class="ruby-identifier">e</span>)
374
+ <span class="ruby-keyword">end</span>
375
+ <span class="ruby-keyword">end</span></pre>
376
+ </div><!-- exec-source -->
377
+
378
+ </div>
379
+
380
+
381
+
382
+
383
+ </div><!-- exec-method -->
384
+
385
+
386
+ <div id="method-i-exec-21" class="method-detail ">
387
+
388
+ <div class="method-heading">
389
+ <span class="method-name">exec!</span><span
390
+ class="method-args">(path)</span>
391
+ <span class="method-click-advice">click to toggle source</span>
392
+ </div>
393
+
394
+
395
+ <div class="method-description">
396
+
397
+
398
+
399
+
400
+
401
+ <div class="method-source-code" id="exec-21-source">
402
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 49</span>
403
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec!</span>(<span class="ruby-identifier">path</span>)
404
+ <span class="ruby-identifier">forklift</span>.<span class="ruby-identifier">logger</span>.<span class="ruby-identifier">log</span> <span class="ruby-node">&quot;Running script: #{path}&quot;</span>
405
+ <span class="ruby-identifier">extension</span> = <span class="ruby-identifier">path</span>.<span class="ruby-identifier">split</span>(<span class="ruby-string">&quot;.&quot;</span>).<span class="ruby-identifier">last</span>
406
+ <span class="ruby-keyword">if</span>(<span class="ruby-identifier">extension</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;rb&quot;</span> <span class="ruby-operator">||</span> <span class="ruby-identifier">extension</span> <span class="ruby-operator">==</span> <span class="ruby-string">&quot;ruby&quot;</span>)
407
+ <span class="ruby-identifier">exec_ruby</span>(<span class="ruby-identifier">path</span>)
408
+ <span class="ruby-keyword">else</span>
409
+ <span class="ruby-identifier">exec_script</span>(<span class="ruby-identifier">path</span>)
410
+ <span class="ruby-keyword">end</span>
411
+ <span class="ruby-keyword">end</span></pre>
412
+ </div><!-- exec-21-source -->
413
+
414
+ </div>
415
+
416
+
417
+
418
+
419
+ </div><!-- exec-21-method -->
420
+
421
+
422
+ <div id="method-i-exec_ruby" class="method-detail ">
423
+
424
+ <div class="method-heading">
425
+ <span class="method-name">exec_ruby</span><span
426
+ class="method-args">(path)</span>
427
+ <span class="method-click-advice">click to toggle source</span>
428
+ </div>
429
+
430
+
431
+ <div class="method-description">
432
+
433
+
434
+
435
+
436
+
437
+ <div class="method-source-code" id="exec_ruby-source">
438
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 59</span>
439
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_ruby</span>(<span class="ruby-identifier">path</span>)
440
+ <span class="ruby-identifier">klass</span> = <span class="ruby-identifier">forklift</span>.<span class="ruby-identifier">utils</span>.<span class="ruby-identifier">class_name_from_file</span>(<span class="ruby-identifier">path</span>)
441
+ <span class="ruby-identifier">require</span> <span class="ruby-identifier">path</span>
442
+ <span class="ruby-identifier">model</span> = <span class="ruby-identifier">eval</span>(<span class="ruby-node">&quot;#{klass}.new&quot;</span>)
443
+ <span class="ruby-identifier">model</span>.<span class="ruby-identifier">do!</span>(<span class="ruby-keyword">self</span>, <span class="ruby-identifier">forklift</span>)
444
+ <span class="ruby-keyword">end</span></pre>
445
+ </div><!-- exec_ruby-source -->
446
+
447
+ </div>
448
+
449
+
450
+
451
+
452
+ </div><!-- exec_ruby-method -->
453
+
454
+
455
+ <div id="method-i-exec_script" class="method-detail ">
456
+
457
+ <div class="method-heading">
458
+ <span class="method-name">exec_script</span><span
459
+ class="method-args">(path)</span>
460
+ <span class="method-click-advice">click to toggle source</span>
461
+ </div>
462
+
463
+
464
+ <div class="method-description">
465
+
466
+
467
+
468
+
469
+
470
+ <div class="method-source-code" id="exec_script-source">
471
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 66</span>
472
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">exec_script</span>(<span class="ruby-identifier">path</span>)
473
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">'not implemented'</span>
474
+ <span class="ruby-keyword">end</span></pre>
475
+ </div><!-- exec_script-source -->
476
+
477
+ </div>
478
+
479
+
480
+
481
+
482
+ </div><!-- exec_script-method -->
483
+
484
+
485
+ <div id="method-i-pipe" class="method-detail ">
486
+
487
+ <div class="method-heading">
488
+ <span class="method-name">pipe</span><span
489
+ class="method-args">()</span>
490
+ <span class="method-click-advice">click to toggle source</span>
491
+ </div>
492
+
493
+
494
+ <div class="method-description">
495
+
496
+
497
+
498
+
499
+
500
+ <div class="method-source-code" id="pipe-source">
501
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 36</span>
502
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">pipe</span>
503
+ <span class="ruby-comment"># when copying within the same connection, this method can be defined to speed things up</span>
504
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">'not implemented'</span>
505
+ <span class="ruby-keyword">end</span></pre>
506
+ </div><!-- pipe-source -->
507
+
508
+ </div>
509
+
510
+
511
+
512
+
513
+ </div><!-- pipe-method -->
514
+
515
+
516
+ <div id="method-i-read" class="method-detail ">
517
+
518
+ <div class="method-heading">
519
+ <span class="method-name">read</span><span
520
+ class="method-args">(query)</span>
521
+ <span class="method-click-advice">click to toggle source</span>
522
+ </div>
523
+
524
+
525
+ <div class="method-description">
526
+
527
+
528
+
529
+
530
+
531
+ <div class="method-source-code" id="read-source">
532
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 26</span>
533
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">read</span>(<span class="ruby-identifier">query</span>)
534
+ <span class="ruby-comment"># will return an array of data rows</span>
535
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">'not implemented'</span>
536
+ <span class="ruby-keyword">end</span></pre>
537
+ </div><!-- read-source -->
538
+
539
+ </div>
540
+
541
+
542
+
543
+
544
+ </div><!-- read-method -->
545
+
546
+
547
+ <div id="method-i-write" class="method-detail ">
548
+
549
+ <div class="method-heading">
550
+ <span class="method-name">write</span><span
551
+ class="method-args">(data, collection)</span>
552
+ <span class="method-click-advice">click to toggle source</span>
553
+ </div>
554
+
555
+
556
+ <div class="method-description">
557
+
558
+
559
+
560
+
561
+
562
+ <div class="method-source-code" id="write-source">
563
+ <pre><span class="ruby-comment"># File lib/forklift/base/connection.rb, line 31</span>
564
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">write</span>(<span class="ruby-identifier">data</span>, <span class="ruby-identifier">collection</span>)
565
+ <span class="ruby-comment"># will write array data to collection (table)</span>
566
+ <span class="ruby-identifier">raise</span> <span class="ruby-string">'not implemented'</span>
567
+ <span class="ruby-keyword">end</span></pre>
568
+ </div><!-- write-source -->
569
+
570
+ </div>
571
+
572
+
573
+
574
+
575
+ </div><!-- write-method -->
576
+
577
+
578
+ </section><!-- public-instance-method-details -->
579
+
580
+ </section><!-- 5Buntitled-5D -->
581
+
582
+ </div><!-- documentation -->
583
+
584
+
585
+ <footer id="validator-badges">
586
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
587
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.2.
588
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
589
+ </footer>
590
+