myreplicator 1.0.6 → 1.1.0

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.
Files changed (49) hide show
  1. data/app/assets/javascripts/myreplicator/select2.js +2685 -0
  2. data/app/assets/stylesheets/myreplicator/select2-spinner.gif +0 -0
  3. data/app/assets/stylesheets/myreplicator/select2.css +612 -0
  4. data/app/assets/stylesheets/myreplicator/select2.png +0 -0
  5. data/app/models/myreplicator/export.rb +25 -7
  6. data/app/models/myreplicator/vertica_export.rb +5 -0
  7. data/app/views/myreplicator/exports/_form.html.erb +48 -27
  8. data/app/views/myreplicator/exports/index.html.erb +4 -4
  9. data/db/migrate/20130213211927_create_myreplicator_vertica_exports.rb +22 -0
  10. data/db/migrate/20130213211927_create_myreplicator_vertica_exports.rb~ +8 -0
  11. data/lib/exporter/export_metadata.rb +7 -1
  12. data/lib/exporter/mysql_exporter.rb +103 -29
  13. data/lib/exporter/sql_commands.rb +8 -9
  14. data/lib/exporter.rb +1 -0
  15. data/lib/loader/loader.rb +32 -12
  16. data/lib/loader/vertica/source_db.rb +30 -0
  17. data/lib/loader/vertica/source_db.rb~ +30 -0
  18. data/lib/loader/vertica/types.rb +44 -0
  19. data/lib/loader/vertica/vertica_loader.rb +235 -0
  20. data/lib/loader/vertica/vertica_loader.rb~ +175 -0
  21. data/lib/loader/vertica/vertica_sql.rb +59 -0
  22. data/lib/loader/vertica/vertica_sql.rb~ +60 -0
  23. data/lib/loader/vertica.rb +1 -0
  24. data/lib/myreplicator/version.rb +1 -1
  25. data/lib/transporter/transporter.rb +11 -1
  26. data/test/dummy/app/models/vertica_db.rb +7 -0
  27. data/test/dummy/config/database.yml +7 -0
  28. data/test/dummy/config/database.yml~ +2 -2
  29. data/test/dummy/config/myreplicator.yml +5 -0
  30. data/test/dummy/config/myreplicator.yml~ +0 -2
  31. data/test/dummy/log/development.log +1664 -9510
  32. data/test/dummy/tmp/cache/assets/CD5/B90/sprockets%2Fc999d13a6a21113981c0d820e8043bdf +0 -0
  33. data/test/dummy/tmp/cache/assets/CD7/030/sprockets%2F9ba4859590582b8b72a650b2b00b6cd2 +0 -0
  34. data/test/dummy/tmp/cache/assets/CE5/670/sprockets%2Fe9e4122f1706626a21da6f8457f088ce +0 -0
  35. data/test/dummy/tmp/cache/assets/D06/5D0/sprockets%2F91850a20c0ddfa3d8814ca91870fb715 +0 -0
  36. data/test/dummy/tmp/cache/assets/D14/3A0/sprockets%2Fe59a60053fada52e8185281b4ee887a5 +0 -0
  37. data/test/dummy/tmp/cache/assets/D7C/E30/sprockets%2F0ba91e21bddfc7e1de102b22183e1e11 +0 -0
  38. data/test/dummy/tmp/cache/assets/D8B/B60/sprockets%2Faa32227c440a378ccd21218eefeb80bf +0 -0
  39. data/test/dummy/tmp/cache/assets/DA7/E50/sprockets%2F47bf4f2b4afeac775e6d572a83343fb8 +0 -0
  40. data/test/dummy/tmp/cache/assets/DA8/910/sprockets%2Fab5775c4a837bd4d97ac394d473cda9b +0 -0
  41. data/test/dummy/tmp/cache/assets/DAA/060/sprockets%2Facc0d22b9d28123cc1c84d0db630d0ba +0 -0
  42. data/test/dummy/tmp/cache/assets/DF8/5D0/sprockets%2Fb815ed34d61cfed96222daa3bfd1d84d +0 -0
  43. data/test/dummy/tmp/cache/assets/E1C/AC0/sprockets%2Faff544a3a34eb7dab7d46b0cb2cd7b70 +0 -0
  44. data/test/dummy/tmp/cache/assets/E2E/1F0/sprockets%2Fa24e3d7bc5ae4d40adf6f1b8fe94e7c3 +0 -0
  45. data/test/fixtures/myreplicator/vertica_exports.yml +11 -0
  46. data/test/unit/myreplicator/vertica_export_test.rb +9 -0
  47. metadata +43 -13
  48. data/test/dummy/tmp/myreplicator/okl_test_batchy_batches_1358547945.tsv.gz +0 -0
  49. data/test/dummy/tmp/myreplicator/okl_test_batchy_batches_1358547945.tsv.json +0 -1
@@ -0,0 +1,612 @@
1
+ /*
2
+ Version: @@ver@@ Timestamp: @@timestamp@@
3
+ */
4
+ .select2-container {
5
+ position: relative;
6
+ display: inline-block;
7
+ /* inline-block for ie7 */
8
+ zoom: 1;
9
+ *display: inline;
10
+ margin-bottom:10px;
11
+ vertical-align: top;
12
+ width:272px;
13
+ font-size:12px;
14
+ }
15
+
16
+ .select2-container,
17
+ .select2-drop,
18
+ .select2-search,
19
+ .select2-search input{
20
+ /*
21
+ Force border-box so that % widths fit the parent
22
+ container without overlap because of margin/padding.
23
+
24
+ More Info : http://www.quirksmode.org/css/box.html
25
+ */
26
+ -webkit-box-sizing: border-box; /* webkit */
27
+ -khtml-box-sizing: border-box; /* konqueror */
28
+ -moz-box-sizing: border-box; /* firefox */
29
+ -ms-box-sizing: border-box; /* ie */
30
+ box-sizing: border-box; /* css3 */
31
+ }
32
+
33
+ .select2-container .select2-choice {
34
+ display: block;
35
+ height: 26px;
36
+ padding: 0 0 0 8px;
37
+ overflow: hidden;
38
+ position: relative;
39
+
40
+ border: 1px solid #aaa;
41
+ white-space: nowrap;
42
+ line-height: 26px;
43
+ color: #444;
44
+ text-decoration: none;
45
+
46
+ -webkit-border-radius: 4px;
47
+ -moz-border-radius: 4px;
48
+ border-radius: 4px;
49
+
50
+ -webkit-background-clip: padding-box;
51
+ -moz-background-clip: padding;
52
+ background-clip: padding-box;
53
+
54
+ -webkit-touch-callout: none;
55
+ -webkit-user-select: none;
56
+ -khtml-user-select: none;
57
+ -moz-user-select: none;
58
+ -ms-user-select: none;
59
+ user-select: none;
60
+
61
+ background-color: #fff;
62
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.5, white));
63
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 50%);
64
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 50%);
65
+ background-image: -o-linear-gradient(bottom, #eeeeee 0%, #ffffff 50%);
66
+ background-image: -ms-linear-gradient(top, #ffffff 0%, #eeeeee 50%);
67
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#ffffff', endColorstr = '#eeeeee', GradientType = 0);
68
+ background-image: linear-gradient(top, #ffffff 0%, #eeeeee 50%);
69
+ }
70
+
71
+ .select2-container.select2-drop-above .select2-choice {
72
+ border-bottom-color: #aaa;
73
+
74
+ -webkit-border-radius:0 0 4px 4px;
75
+ -moz-border-radius:0 0 4px 4px;
76
+ border-radius:0 0 4px 4px;
77
+
78
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #eeeeee), color-stop(0.9, white));
79
+ background-image: -webkit-linear-gradient(center bottom, #eeeeee 0%, white 90%);
80
+ background-image: -moz-linear-gradient(center bottom, #eeeeee 0%, white 90%);
81
+ background-image: -o-linear-gradient(bottom, #eeeeee 0%, white 90%);
82
+ background-image: -ms-linear-gradient(top, #eeeeee 0%,#ffffff 90%);
83
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#eeeeee',GradientType=0 );
84
+ background-image: linear-gradient(top, #eeeeee 0%,#ffffff 90%);
85
+ }
86
+
87
+ .select2-container .select2-choice span {
88
+ margin-right: 26px;
89
+ display: block;
90
+ overflow: hidden;
91
+
92
+ white-space: nowrap;
93
+
94
+ -ms-text-overflow: ellipsis;
95
+ -o-text-overflow: ellipsis;
96
+ text-overflow: ellipsis;
97
+ }
98
+
99
+ .select2-container .select2-choice abbr {
100
+ display: block;
101
+ width: 12px;
102
+ height: 12px;
103
+ position: absolute;
104
+ right: 26px;
105
+ top: 8px;
106
+
107
+ font-size: 1px;
108
+ text-decoration: none;
109
+
110
+ border: 0;
111
+ background: url('select2.png') right top no-repeat;
112
+ cursor: pointer;
113
+ outline: 0;
114
+ }
115
+ .select2-container .select2-choice abbr:hover {
116
+ background-position: right -11px;
117
+ cursor: pointer;
118
+ }
119
+
120
+ .select2-drop-mask {
121
+ position: absolute;
122
+ left: 0;
123
+ top: 0;
124
+ z-index: 9998;
125
+ opacity: 0;
126
+ }
127
+
128
+ .select2-drop {
129
+ width: 100%;
130
+ margin-top:-1px;
131
+ position: absolute;
132
+ z-index: 9999;
133
+ top: 100%;
134
+
135
+ background: #fff;
136
+ color: #000;
137
+ border: 1px solid #aaa;
138
+ border-top: 0;
139
+
140
+ -webkit-border-radius: 0 0 4px 4px;
141
+ -moz-border-radius: 0 0 4px 4px;
142
+ border-radius: 0 0 4px 4px;
143
+
144
+ -webkit-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
145
+ -moz-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
146
+ -o-box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
147
+ box-shadow: 0 4px 5px rgba(0, 0, 0, .15);
148
+ }
149
+
150
+ .select2-drop.select2-drop-above {
151
+ margin-top: 1px;
152
+ border-top: 1px solid #aaa;
153
+ border-bottom: 0;
154
+
155
+ -webkit-border-radius: 4px 4px 0 0;
156
+ -moz-border-radius: 4px 4px 0 0;
157
+ border-radius: 4px 4px 0 0;
158
+
159
+ -webkit-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
160
+ -moz-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
161
+ -o-box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
162
+ box-shadow: 0 -4px 5px rgba(0, 0, 0, .15);
163
+ }
164
+
165
+ .select2-container .select2-choice div {
166
+ display: block;
167
+ width: 18px;
168
+ height: 100%;
169
+ position: absolute;
170
+ right: 0;
171
+ top: 0;
172
+
173
+ border-left: 1px solid #aaa;
174
+ -webkit-border-radius: 0 4px 4px 0;
175
+ -moz-border-radius: 0 4px 4px 0;
176
+ border-radius: 0 4px 4px 0;
177
+
178
+ -webkit-background-clip: padding-box;
179
+ -moz-background-clip: padding;
180
+ background-clip: padding-box;
181
+
182
+ background: #ccc;
183
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ccc), color-stop(0.6, #eee));
184
+ background-image: -webkit-linear-gradient(center bottom, #ccc 0%, #eee 60%);
185
+ background-image: -moz-linear-gradient(center bottom, #ccc 0%, #eee 60%);
186
+ background-image: -o-linear-gradient(bottom, #ccc 0%, #eee 60%);
187
+ background-image: -ms-linear-gradient(top, #cccccc 0%, #eeeeee 60%);
188
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '#eeeeee', endColorstr = '#cccccc', GradientType = 0);
189
+ background-image: linear-gradient(top, #cccccc 0%, #eeeeee 60%);
190
+ }
191
+
192
+ .select2-container .select2-choice div b {
193
+ display: block;
194
+ width: 100%;
195
+ height: 100%;
196
+ background: url('select2.png') no-repeat 0 1px;
197
+ }
198
+
199
+ .select2-search {
200
+ display: inline-block;
201
+ width: 100%;
202
+ min-height: 26px;
203
+ margin: 0;
204
+ padding-left: 4px;
205
+ padding-right: 4px;
206
+
207
+ position: relative;
208
+ z-index: 10000;
209
+
210
+ white-space: nowrap;
211
+ }
212
+
213
+ .select2-search-hidden {
214
+ display: block;
215
+ position: absolute;
216
+ left: -10000px;
217
+ }
218
+
219
+ .select2-search input {
220
+ width: 100%;
221
+ height: auto !important;
222
+ min-height: 26px;
223
+ padding: 4px 20px 4px 5px;
224
+ margin: 0;
225
+
226
+ outline: 0;
227
+ font-family: sans-serif;
228
+ font-size: 1em;
229
+
230
+ border: 1px solid #aaa;
231
+ -webkit-border-radius: 0;
232
+ -moz-border-radius: 0;
233
+ border-radius: 0;
234
+
235
+ -webkit-box-shadow: none;
236
+ -moz-box-shadow: none;
237
+ box-shadow: none;
238
+
239
+ background: #fff url('select2.png') no-repeat 100% -22px;
240
+ background: url('select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
241
+ background: url('select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
242
+ background: url('select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
243
+ background: url('select2.png') no-repeat 100% -22px, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
244
+ background: url('select2.png') no-repeat 100% -22px, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
245
+ background: url('select2.png') no-repeat 100% -22px, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
246
+ }
247
+
248
+ .select2-drop.select2-drop-above .select2-search input {
249
+ margin-top: 4px;
250
+ }
251
+
252
+ .select2-search input.select2-active {
253
+ background: #fff url('select2-spinner.gif') no-repeat 100%;
254
+ background: url('select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, white), color-stop(0.99, #eeeeee));
255
+ background: url('select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, white 85%, #eeeeee 99%);
256
+ background: url('select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, white 85%, #eeeeee 99%);
257
+ background: url('select2-spinner.gif') no-repeat 100%, -o-linear-gradient(bottom, white 85%, #eeeeee 99%);
258
+ background: url('select2-spinner.gif') no-repeat 100%, -ms-linear-gradient(top, #ffffff 85%, #eeeeee 99%);
259
+ background: url('select2-spinner.gif') no-repeat 100%, linear-gradient(top, #ffffff 85%, #eeeeee 99%);
260
+ }
261
+
262
+ .select2-container-active .select2-choice,
263
+ .select2-container-active .select2-choices {
264
+ border: 1px solid #5897fb;
265
+ outline: none;
266
+
267
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
268
+ -moz-box-shadow: 0 0 5px rgba(0,0,0,.3);
269
+ -o-box-shadow: 0 0 5px rgba(0,0,0,.3);
270
+ box-shadow: 0 0 5px rgba(0,0,0,.3);
271
+ }
272
+
273
+ .select2-dropdown-open .select2-choice {
274
+ border-bottom-color: transparent;
275
+ -webkit-box-shadow: 0 1px 0 #fff inset;
276
+ -moz-box-shadow: 0 1px 0 #fff inset;
277
+ -o-box-shadow: 0 1px 0 #fff inset;
278
+ box-shadow: 0 1px 0 #fff inset;
279
+
280
+ -webkit-border-bottom-left-radius: 0;
281
+ -moz-border-radius-bottomleft: 0;
282
+ border-bottom-left-radius: 0;
283
+
284
+ -webkit-border-bottom-right-radius: 0;
285
+ -moz-border-radius-bottomright: 0;
286
+ border-bottom-right-radius: 0;
287
+
288
+ background-color: #eee;
289
+ background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, white), color-stop(0.5, #eeeeee));
290
+ background-image: -webkit-linear-gradient(center bottom, white 0%, #eeeeee 50%);
291
+ background-image: -moz-linear-gradient(center bottom, white 0%, #eeeeee 50%);
292
+ background-image: -o-linear-gradient(bottom, white 0%, #eeeeee 50%);
293
+ background-image: -ms-linear-gradient(top, #ffffff 0%,#eeeeee 50%);
294
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#ffffff',GradientType=0 );
295
+ background-image: linear-gradient(top, #ffffff 0%,#eeeeee 50%);
296
+ }
297
+
298
+ .select2-dropdown-open .select2-choice div {
299
+ background: transparent;
300
+ border-left: none;
301
+ filter: none;
302
+ }
303
+ .select2-dropdown-open .select2-choice div b {
304
+ background-position: -18px 1px;
305
+ }
306
+
307
+ /* results */
308
+ .select2-results {
309
+ max-height: 200px;
310
+ padding: 0 0 0 4px;
311
+ margin: 4px 4px 4px 0;
312
+ position: relative;
313
+ overflow-x: hidden;
314
+ overflow-y: auto;
315
+ font-size:12px;
316
+ }
317
+
318
+ .select2-results ul.select2-result-sub {
319
+ margin: 0;
320
+ }
321
+
322
+ .select2-results ul.select2-result-sub > li .select2-result-label { padding-left: 20px }
323
+ .select2-results ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 40px }
324
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 60px }
325
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 80px }
326
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 100px }
327
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 110px }
328
+ .select2-results ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub ul.select2-result-sub > li .select2-result-label { padding-left: 120px }
329
+
330
+ .select2-results li {
331
+ list-style: none;
332
+ display: list-item;
333
+ background-image: none;
334
+ }
335
+
336
+ .select2-results li.select2-result-with-children > .select2-result-label {
337
+ font-weight: bold;
338
+ }
339
+
340
+ .select2-results .select2-result-label {
341
+ padding: 3px 7px 4px;
342
+ margin: 0;
343
+ cursor: pointer;
344
+
345
+ -webkit-touch-callout: none;
346
+ -webkit-user-select: none;
347
+ -khtml-user-select: none;
348
+ -moz-user-select: none;
349
+ -ms-user-select: none;
350
+ user-select: none;
351
+ }
352
+
353
+ .select2-results .select2-highlighted {
354
+ background: #3875d7;
355
+ color: #fff;
356
+ }
357
+
358
+ .select2-results li em {
359
+ background: #feffde;
360
+ font-style: normal;
361
+ }
362
+
363
+ .select2-results .select2-highlighted em {
364
+ background: transparent;
365
+ }
366
+
367
+ .select2-results .select2-highlighted ul {
368
+ background: white;
369
+ color: #000;
370
+ }
371
+
372
+
373
+ .select2-results .select2-no-results,
374
+ .select2-results .select2-searching,
375
+ .select2-results .select2-selection-limit {
376
+ background: #f4f4f4;
377
+ display: list-item;
378
+ }
379
+
380
+ /*
381
+ disabled look for disabled choices in the results dropdown
382
+ */
383
+ .select2-results .select2-disabled.select2-highlighted {
384
+ color: #666;
385
+ background: #f4f4f4;
386
+ display: list-item;
387
+ cursor: default;
388
+ }
389
+ .select2-results .select2-disabled {
390
+ background: #f4f4f4;
391
+ display: list-item;
392
+ cursor: default;
393
+ }
394
+
395
+ .select2-results .select2-selected {
396
+ display: none;
397
+ }
398
+
399
+ .select2-more-results.select2-active {
400
+ background: #f4f4f4 url('select2-spinner.gif') no-repeat 100%;
401
+ }
402
+
403
+ .select2-more-results {
404
+ background: #f4f4f4;
405
+ display: list-item;
406
+ }
407
+
408
+ /* disabled styles */
409
+
410
+ .select2-container.select2-container-disabled .select2-choice {
411
+ background-color: #f4f4f4;
412
+ background-image: none;
413
+ border: 1px solid #ddd;
414
+ cursor: default;
415
+ }
416
+
417
+ .select2-container.select2-container-disabled .select2-choice div {
418
+ background-color: #f4f4f4;
419
+ background-image: none;
420
+ border-left: 0;
421
+ }
422
+
423
+ .select2-container.select2-container-disabled .select2-choice abbr {
424
+ display: none
425
+ }
426
+
427
+
428
+ /* multiselect */
429
+
430
+ .select2-container-multi .select2-choices {
431
+ height: auto !important;
432
+ height: 1%;
433
+ margin: 0;
434
+ padding: 0;
435
+ position: relative;
436
+
437
+ border: 1px solid #aaa;
438
+ cursor: text;
439
+ overflow: hidden;
440
+
441
+ background-color: #fff;
442
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, #eeeeee), color-stop(15%, #ffffff));
443
+ background-image: -webkit-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
444
+ background-image: -moz-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
445
+ background-image: -o-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
446
+ background-image: -ms-linear-gradient(top, #eeeeee 1%, #ffffff 15%);
447
+ background-image: linear-gradient(top, #eeeeee 1%, #ffffff 15%);
448
+ }
449
+
450
+ .select2-locked {
451
+ padding: 3px 5px 3px 5px !important;
452
+ }
453
+
454
+ .select2-container-multi .select2-choices {
455
+ min-height: 26px;
456
+ }
457
+
458
+ .select2-container-multi.select2-container-active .select2-choices {
459
+ border: 1px solid #5897fb;
460
+ outline: none;
461
+
462
+ -webkit-box-shadow: 0 0 5px rgba(0,0,0,.3);
463
+ -moz-box-shadow: 0 0 5px rgba(0,0,0,.3);
464
+ -o-box-shadow: 0 0 5px rgba(0,0,0,.3);
465
+ box-shadow: 0 0 5px rgba(0,0,0,.3);
466
+ }
467
+ .select2-container-multi .select2-choices li {
468
+ float: left;
469
+ list-style: none;
470
+ }
471
+ .select2-container-multi .select2-choices .select2-search-field {
472
+ margin: 0;
473
+ padding: 0;
474
+ white-space: nowrap;
475
+ }
476
+
477
+ .select2-container-multi .select2-choices .select2-search-field input {
478
+ padding: 5px;
479
+ margin: 1px 0;
480
+
481
+ font-family: sans-serif;
482
+ font-size: 100%;
483
+ color: #666;
484
+ outline: 0;
485
+ border: 0;
486
+ -webkit-box-shadow: none;
487
+ -moz-box-shadow: none;
488
+ -o-box-shadow: none;
489
+ box-shadow: none;
490
+ background: transparent !important;
491
+ }
492
+
493
+ .select2-container-multi .select2-choices .select2-search-field input.select2-active {
494
+ background: #fff url('select2-spinner.gif') no-repeat 100% !important;
495
+ }
496
+
497
+ .select2-default {
498
+ color: #999 !important;
499
+ }
500
+
501
+ .select2-container-multi .select2-choices .select2-search-choice {
502
+ padding: 3px 5px 3px 18px;
503
+ margin: 3px 0 3px 5px;
504
+ position: relative;
505
+
506
+ line-height: 13px;
507
+ color: #333;
508
+ cursor: default;
509
+ border: 1px solid #aaaaaa;
510
+
511
+ -webkit-border-radius: 3px;
512
+ -moz-border-radius: 3px;
513
+ border-radius: 3px;
514
+
515
+ -webkit-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
516
+ -moz-box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
517
+ box-shadow: 0 0 2px #ffffff inset, 0 1px 0 rgba(0,0,0,0.05);
518
+
519
+ -webkit-background-clip: padding-box;
520
+ -moz-background-clip: padding;
521
+ background-clip: padding-box;
522
+
523
+ -webkit-touch-callout: none;
524
+ -webkit-user-select: none;
525
+ -khtml-user-select: none;
526
+ -moz-user-select: none;
527
+ -ms-user-select: none;
528
+ user-select: none;
529
+
530
+ background-color: #e4e4e4;
531
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#eeeeee', endColorstr='#f4f4f4', GradientType=0 );
532
+ background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(20%, #f4f4f4), color-stop(50%, #f0f0f0), color-stop(52%, #e8e8e8), color-stop(100%, #eeeeee));
533
+ background-image: -webkit-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
534
+ background-image: -moz-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
535
+ background-image: -o-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
536
+ background-image: -ms-linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
537
+ background-image: linear-gradient(top, #f4f4f4 20%, #f0f0f0 50%, #e8e8e8 52%, #eeeeee 100%);
538
+ }
539
+ .select2-container-multi .select2-choices .select2-search-choice span {
540
+ cursor: default;
541
+ }
542
+ .select2-container-multi .select2-choices .select2-search-choice-focus {
543
+ background: #d4d4d4;
544
+ }
545
+
546
+ .select2-search-choice-close {
547
+ display: block;
548
+ width: 12px;
549
+ height: 13px;
550
+ position: absolute;
551
+ right: 3px;
552
+ top: 4px;
553
+
554
+ font-size: 1px;
555
+ outline: none;
556
+ background: url('select2.png') right top no-repeat;
557
+ }
558
+
559
+ .select2-container-multi .select2-search-choice-close {
560
+ left: 3px;
561
+ }
562
+
563
+ .select2-container-multi .select2-choices .select2-search-choice .select2-search-choice-close:hover {
564
+ background-position: right -11px;
565
+ }
566
+ .select2-container-multi .select2-choices .select2-search-choice-focus .select2-search-choice-close {
567
+ background-position: right -11px;
568
+ }
569
+
570
+ /* disabled styles */
571
+ .select2-container-multi.select2-container-disabled .select2-choices{
572
+ background-color: #f4f4f4;
573
+ background-image: none;
574
+ border: 1px solid #ddd;
575
+ cursor: default;
576
+ }
577
+
578
+ .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice {
579
+ padding: 3px 5px 3px 5px;
580
+ border: 1px solid #ddd;
581
+ background-image: none;
582
+ background-color: #f4f4f4;
583
+ }
584
+
585
+ .select2-container-multi.select2-container-disabled .select2-choices .select2-search-choice .select2-search-choice-close {
586
+ display: none;
587
+ }
588
+ /* end multiselect */
589
+
590
+
591
+ .select2-result-selectable .select2-match,
592
+ .select2-result-unselectable .select2-match {
593
+ text-decoration: underline;
594
+ }
595
+
596
+ .select2-offscreen {
597
+ position: absolute;
598
+ left: -10000px;
599
+ }
600
+
601
+ /* Retina-ize icons */
602
+
603
+ @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 144dpi) {
604
+ .select2-search input, .select2-search-choice-close, .select2-container .select2-choice abbr, .select2-container .select2-choice div b {
605
+ background-image: url('select2x2.png') !important;
606
+ background-repeat: no-repeat !important;
607
+ background-size: 60px 40px !important;
608
+ }
609
+ .select2-search input {
610
+ background-position: 100% -21px !important;
611
+ }
612
+ }
@@ -44,14 +44,24 @@ module Myreplicator
44
44
 
45
45
  ##
46
46
  # Runs the export process using the required Exporter library
47
- ##
48
- def export
49
- Log.run(:job_type => "export", :name => schedule_name,
47
+ ##
48
+ def export
49
+ Log.run(:job_type => "export", :name => schedule_name,
50
50
  :file => filename, :export_id => id) do |log|
51
51
  exporter = MysqlExporter.new
52
52
  exporter.export_table self # pass current object to exporter
53
53
  end
54
54
  end
55
+
56
+ # def source_mysql_schema
57
+ # sql = "describe #{source_schema}.#{table_name}"
58
+ # result = exec_on_source(sql)
59
+ # return result
60
+ # end
61
+
62
+ # def destination_schema_mysql
63
+
64
+ # end
55
65
 
56
66
  def export_type?
57
67
  if state == "new"
@@ -77,8 +87,16 @@ module Myreplicator
77
87
  :db => self.source_schema,
78
88
  :table => self.table_name)
79
89
  result = exec_on_source(sql)
80
-
81
- return result.first.first.to_s(:db)
90
+ if result.first.nil?
91
+ return ""
92
+ else
93
+ case result.first.first.class.to_s
94
+ when "Symbol", "Fixnum"
95
+ return result.first.first.to_s
96
+ else
97
+ return result.first.first.to_s(:db)
98
+ end
99
+ end
82
100
  end
83
101
 
84
102
  def update_max_val(max_val = nil)
@@ -110,7 +128,7 @@ module Myreplicator
110
128
  ##
111
129
  def connection_factory type
112
130
  config = Myreplicator.configs[self.source_schema]
113
-
131
+
114
132
  case type
115
133
  when :ssh
116
134
  if config.has_key? "ssh_password"
@@ -209,7 +227,7 @@ module Myreplicator
209
227
  ##
210
228
 
211
229
  class SourceDb < ActiveRecord::Base
212
-
230
+
213
231
  def self.connect db
214
232
  establish_connection(ActiveRecord::Base.configurations[db])
215
233
  end
@@ -0,0 +1,5 @@
1
+ module Myreplicator
2
+ class VerticaExport < ActiveRecord::Base
3
+ # attr_accessible :title, :body
4
+ end
5
+ end