syc-backup 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (71) hide show
  1. data/README.rdoc +48 -0
  2. data/Rakefile +7 -0
  3. data/bin/sycbackup +6 -0
  4. data/doc/Backup.html +186 -0
  5. data/doc/Backup/CronEdit.html +381 -0
  6. data/doc/Backup/Environment.html +231 -0
  7. data/doc/Backup/FileBackup.html +363 -0
  8. data/doc/Backup/MySQLBackup.html +305 -0
  9. data/doc/Backup/Options.html +328 -0
  10. data/doc/Backup/Process.html +261 -0
  11. data/doc/Backup/Runner.html +244 -0
  12. data/doc/README_rdoc.html +202 -0
  13. data/doc/Rakefile.html +118 -0
  14. data/doc/TestCronEdit.html +211 -0
  15. data/doc/TestEnvironment.html +156 -0
  16. data/doc/TestFileBackup.html +237 -0
  17. data/doc/TestMySQLBackup.html +167 -0
  18. data/doc/TestOptions.html +156 -0
  19. data/doc/TestProcess.html +236 -0
  20. data/doc/created.rid +18 -0
  21. data/doc/images/add.png +0 -0
  22. data/doc/images/brick.png +0 -0
  23. data/doc/images/brick_link.png +0 -0
  24. data/doc/images/bug.png +0 -0
  25. data/doc/images/bullet_black.png +0 -0
  26. data/doc/images/bullet_toggle_minus.png +0 -0
  27. data/doc/images/bullet_toggle_plus.png +0 -0
  28. data/doc/images/date.png +0 -0
  29. data/doc/images/delete.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_blue.png +0 -0
  40. data/doc/images/tag_green.png +0 -0
  41. data/doc/images/transparent.png +0 -0
  42. data/doc/images/wrench.png +0 -0
  43. data/doc/images/wrench_orange.png +0 -0
  44. data/doc/images/zoom.png +0 -0
  45. data/doc/index.html +106 -0
  46. data/doc/js/darkfish.js +153 -0
  47. data/doc/js/jquery.js +18 -0
  48. data/doc/js/navigation.js +142 -0
  49. data/doc/js/search.js +94 -0
  50. data/doc/js/search_index.js +1 -0
  51. data/doc/js/searcher.js +228 -0
  52. data/doc/rdoc.css +543 -0
  53. data/doc/table_of_contents.html +148 -0
  54. data/lib/backup/cron_edit.rb +127 -0
  55. data/lib/backup/environment.rb +44 -0
  56. data/lib/backup/file_backup.rb +94 -0
  57. data/lib/backup/mysql_backup.rb +58 -0
  58. data/lib/backup/options.rb +199 -0
  59. data/lib/backup/process.rb +99 -0
  60. data/lib/backup/runner.rb +79 -0
  61. data/lib/backup_version.rb +9 -0
  62. data/syc-backup-0.0.1.gem +0 -0
  63. data/syc-backup-0.0.3.gem +0 -0
  64. data/sycbackup.gemspec +20 -0
  65. data/test/test_cron_edit.rb +49 -0
  66. data/test/test_environment.rb +22 -0
  67. data/test/test_file_backup.rb +70 -0
  68. data/test/test_mysql_backup.rb +71 -0
  69. data/test/test_options.rb +189 -0
  70. data/test/test_process.rb +40 -0
  71. metadata +123 -0
@@ -0,0 +1,305 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Backup::MySQLBackup - 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/backup/mysql_backup.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">Object
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-backup">#backup</a>
76
+
77
+ <li><a href="#method-i-compress">#compress</a>
78
+
79
+ </ul>
80
+ </nav>
81
+
82
+ </div>
83
+
84
+ <div id="project-metadata">
85
+ <nav id="fileindex-section" class="section project-section">
86
+ <h3 class="section-header">Pages</h3>
87
+
88
+ <ul>
89
+
90
+ <li class="file"><a href="../README_rdoc.html">README</a>
91
+
92
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
93
+
94
+ </ul>
95
+ </nav>
96
+
97
+ <nav id="classindex-section" class="section project-section">
98
+ <h3 class="section-header">Class and Module Index</h3>
99
+
100
+ <ul class="link-list">
101
+
102
+ <li><a href="../Backup.html">Backup</a>
103
+
104
+ <li><a href="../Backup/CronEdit.html">Backup::CronEdit</a>
105
+
106
+ <li><a href="../Backup/Environment.html">Backup::Environment</a>
107
+
108
+ <li><a href="../Backup/FileBackup.html">Backup::FileBackup</a>
109
+
110
+ <li><a href="../Backup/MySQLBackup.html">Backup::MySQLBackup</a>
111
+
112
+ <li><a href="../Backup/Options.html">Backup::Options</a>
113
+
114
+ <li><a href="../Backup/Process.html">Backup::Process</a>
115
+
116
+ <li><a href="../Backup/Runner.html">Backup::Runner</a>
117
+
118
+ <li><a href="../TestCronEdit.html">TestCronEdit</a>
119
+
120
+ <li><a href="../TestEnvironment.html">TestEnvironment</a>
121
+
122
+ <li><a href="../TestFileBackup.html">TestFileBackup</a>
123
+
124
+ <li><a href="../TestMySQLBackup.html">TestMySQLBackup</a>
125
+
126
+ <li><a href="../TestOptions.html">TestOptions</a>
127
+
128
+ <li><a href="../TestProcess.html">TestProcess</a>
129
+
130
+ </ul>
131
+ </nav>
132
+
133
+ </div>
134
+ </nav>
135
+
136
+ <div id="documentation">
137
+ <h1 class="class">class Backup::MySQLBackup</h1>
138
+
139
+ <div id="description" class="description">
140
+
141
+ <p><a href="MySQLBackup.html">MySQLBackup</a> creates a dump file of a MySQL
142
+ database with <em>mysqldump</em> and returns the dump file.</p>
143
+
144
+ </div><!-- description -->
145
+
146
+
147
+
148
+
149
+ <section id="5Buntitled-5D" class="documentation-section">
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+ <!-- Methods -->
159
+
160
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
161
+ <h3 class="section-header">Public Class Methods</h3>
162
+
163
+
164
+ <div id="method-c-new" class="method-detail ">
165
+
166
+ <div class="method-heading">
167
+ <span class="method-name">new</span><span
168
+ class="method-args">(database, user, password)</span>
169
+ <span class="method-click-advice">click to toggle source</span>
170
+ </div>
171
+
172
+
173
+ <div class="method-description">
174
+
175
+ <p>database is the database to be backed up with the user that has the
176
+ credentials to access the database with the provided password</p>
177
+
178
+
179
+
180
+ <div class="method-source-code" id="new-source">
181
+ <pre><span class="ruby-comment"># File lib/backup/mysql_backup.rb, line 11</span>
182
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">database</span>, <span class="ruby-identifier">user</span>, <span class="ruby-identifier">password</span>)
183
+ <span class="ruby-ivar">@database</span> = <span class="ruby-identifier">database</span>
184
+ <span class="ruby-ivar">@user</span> = <span class="ruby-identifier">user</span>
185
+ <span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
186
+ <span class="ruby-keyword">end</span></pre>
187
+ </div><!-- new-source -->
188
+
189
+ </div>
190
+
191
+
192
+
193
+
194
+ </div><!-- new-method -->
195
+
196
+
197
+ </section><!-- public-class-method-details -->
198
+
199
+ <section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
200
+ <h3 class="section-header">Public Instance Methods</h3>
201
+
202
+
203
+ <div id="method-i-backup" class="method-detail ">
204
+
205
+ <div class="method-heading">
206
+ <span class="method-name">backup</span><span
207
+ class="method-args">(backup_folder="./")</span>
208
+ <span class="method-click-advice">click to toggle source</span>
209
+ </div>
210
+
211
+
212
+ <div class="method-description">
213
+
214
+ <p>Creates a MySQL dump file and returns the file</p>
215
+
216
+
217
+
218
+ <div class="method-source-code" id="backup-source">
219
+ <pre><span class="ruby-comment"># File lib/backup/mysql_backup.rb, line 36</span>
220
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">backup</span>(<span class="ruby-identifier">backup_folder</span>=<span class="ruby-string">&quot;./&quot;</span>)
221
+ <span class="ruby-constant">Dir</span>.<span class="ruby-identifier">mkdir</span> <span class="ruby-identifier">backup_folder</span> <span class="ruby-keyword">unless</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-identifier">backup_folder</span>
222
+
223
+ <span class="ruby-identifier">timestamp</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">strftime</span>(<span class="ruby-string">'%Y%m%d-%H%M%S'</span>)
224
+ <span class="ruby-identifier">backup_file</span> = <span class="ruby-identifier">backup_folder</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@database</span> <span class="ruby-operator">+</span> <span class="ruby-string">'_'</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">timestamp</span> <span class="ruby-operator">+</span> <span class="ruby-string">'.sql'</span>
225
+ <span class="ruby-identifier">mysqldump</span> = <span class="ruby-node">&quot;mysqldump -u#{@user} -p#{@password} #{@database}&quot;</span>
226
+
227
+ <span class="ruby-identifier">backup_command</span> = <span class="ruby-node">&quot;#{mysqldump} &gt; #{backup_file}&quot;</span>
228
+ <span class="ruby-identifier">stdout_str</span>, <span class="ruby-identifier">stderr_str</span>, <span class="ruby-identifier">status</span> = <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">capture3</span>(<span class="ruby-identifier">backup_command</span>)
229
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">exitstatus</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
230
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">backup_file</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-identifier">backup_file</span>
231
+ <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;There was a problem running mysqldump&quot;</span>
232
+ <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;--&gt; #{backup_command}&quot;</span>
233
+ <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">stderr_str</span>
234
+ <span class="ruby-identifier">exit</span>(<span class="ruby-value">1</span>)
235
+ <span class="ruby-keyword">end</span>
236
+
237
+ <span class="ruby-identifier">backup_file</span>
238
+
239
+ <span class="ruby-keyword">end</span></pre>
240
+ </div><!-- backup-source -->
241
+
242
+ </div>
243
+
244
+
245
+
246
+
247
+ </div><!-- backup-method -->
248
+
249
+
250
+ <div id="method-i-compress" class="method-detail ">
251
+
252
+ <div class="method-heading">
253
+ <span class="method-name">compress</span><span
254
+ class="method-args">(backup_file)</span>
255
+ <span class="method-click-advice">click to toggle source</span>
256
+ </div>
257
+
258
+
259
+ <div class="method-description">
260
+
261
+ <p>Compresses the MySQL dump file. If an error occurs when compressing the
262
+ file an error message is printed and the application terminates</p>
263
+
264
+
265
+
266
+ <div class="method-source-code" id="compress-source">
267
+ <pre><span class="ruby-comment"># File lib/backup/mysql_backup.rb, line 19</span>
268
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">compress</span>(<span class="ruby-identifier">backup_file</span>)
269
+ <span class="ruby-identifier">tar_file</span> = <span class="ruby-identifier">backup_file</span> <span class="ruby-operator">+</span> <span class="ruby-string">'.tar.gz'</span>
270
+ <span class="ruby-identifier">tar_command</span> = <span class="ruby-node">&quot;tar cfz #{tar_file} #{backup_file}&quot;</span>
271
+ <span class="ruby-identifier">stdout_str</span>, <span class="ruby-identifier">stderr_str</span>, <span class="ruby-identifier">status</span> = <span class="ruby-constant">Open3</span>.<span class="ruby-identifier">capture3</span>(<span class="ruby-identifier">tar_command</span>)
272
+ <span class="ruby-keyword">unless</span> <span class="ruby-identifier">status</span>.<span class="ruby-identifier">exitstatus</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
273
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">delete</span> <span class="ruby-identifier">tar_file</span> <span class="ruby-keyword">if</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">exists?</span> <span class="ruby-identifier">tar_file</span>
274
+ <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-string">&quot;There was a problem compressing the backup file&quot;</span>
275
+ <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-node">&quot;--&gt;#{tar_command}&quot;</span>
276
+ <span class="ruby-constant">STDERR</span>.<span class="ruby-identifier">puts</span> <span class="ruby-identifier">stderr_str</span>
277
+ <span class="ruby-identifier">exit</span>(<span class="ruby-value">2</span>)
278
+ <span class="ruby-keyword">end</span>
279
+
280
+ <span class="ruby-identifier">status</span>.<span class="ruby-identifier">exitstatus</span>
281
+
282
+ <span class="ruby-keyword">end</span></pre>
283
+ </div><!-- compress-source -->
284
+
285
+ </div>
286
+
287
+
288
+
289
+
290
+ </div><!-- compress-method -->
291
+
292
+
293
+ </section><!-- public-instance-method-details -->
294
+
295
+ </section><!-- 5Buntitled-5D -->
296
+
297
+ </div><!-- documentation -->
298
+
299
+
300
+ <footer id="validator-badges">
301
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
302
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
303
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
304
+ </footer>
305
+
@@ -0,0 +1,328 @@
1
+ <!DOCTYPE html>
2
+
3
+ <html>
4
+ <head>
5
+ <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
6
+
7
+ <title>class Backup::Options - 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/backup/options.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">Object
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
+ </ul>
76
+ </nav>
77
+
78
+ </div>
79
+
80
+ <div id="project-metadata">
81
+ <nav id="fileindex-section" class="section project-section">
82
+ <h3 class="section-header">Pages</h3>
83
+
84
+ <ul>
85
+
86
+ <li class="file"><a href="../README_rdoc.html">README</a>
87
+
88
+ <li class="file"><a href="../Rakefile.html">Rakefile</a>
89
+
90
+ </ul>
91
+ </nav>
92
+
93
+ <nav id="classindex-section" class="section project-section">
94
+ <h3 class="section-header">Class and Module Index</h3>
95
+
96
+ <ul class="link-list">
97
+
98
+ <li><a href="../Backup.html">Backup</a>
99
+
100
+ <li><a href="../Backup/CronEdit.html">Backup::CronEdit</a>
101
+
102
+ <li><a href="../Backup/Environment.html">Backup::Environment</a>
103
+
104
+ <li><a href="../Backup/FileBackup.html">Backup::FileBackup</a>
105
+
106
+ <li><a href="../Backup/MySQLBackup.html">Backup::MySQLBackup</a>
107
+
108
+ <li><a href="../Backup/Options.html">Backup::Options</a>
109
+
110
+ <li><a href="../Backup/Process.html">Backup::Process</a>
111
+
112
+ <li><a href="../Backup/Runner.html">Backup::Runner</a>
113
+
114
+ <li><a href="../TestCronEdit.html">TestCronEdit</a>
115
+
116
+ <li><a href="../TestEnvironment.html">TestEnvironment</a>
117
+
118
+ <li><a href="../TestFileBackup.html">TestFileBackup</a>
119
+
120
+ <li><a href="../TestMySQLBackup.html">TestMySQLBackup</a>
121
+
122
+ <li><a href="../TestOptions.html">TestOptions</a>
123
+
124
+ <li><a href="../TestProcess.html">TestProcess</a>
125
+
126
+ </ul>
127
+ </nav>
128
+
129
+ </div>
130
+ </nav>
131
+
132
+ <div id="documentation">
133
+ <h1 class="class">class Backup::Options</h1>
134
+
135
+ <div id="description" class="description">
136
+
137
+ <p>Parses the command line options the user has provided on the command line</p>
138
+
139
+ </div><!-- description -->
140
+
141
+
142
+
143
+
144
+ <section id="5Buntitled-5D" class="documentation-section">
145
+
146
+
147
+
148
+
149
+
150
+ <!-- Constants -->
151
+ <section id="constants-list" class="section">
152
+ <h3 class="section-header">Constants</h3>
153
+ <dl>
154
+
155
+ <dt id="DEFAULT_BACKUP_FOLDER">DEFAULT_BACKUP_FOLDER
156
+
157
+ <dd class="description"><p>If the user doesn’t provide a backup folder a default folder is used</p>
158
+
159
+
160
+ </dl>
161
+ </section>
162
+
163
+
164
+
165
+ <!-- Attributes -->
166
+ <section id="attribute-method-details" class="method-section section">
167
+ <h3 class="section-header">Attributes</h3>
168
+
169
+
170
+ <div id="attribute-i-backup_folder" class="method-detail">
171
+ <div class="method-heading attribute-method-heading">
172
+ <span class="method-name">backup_folder</span><span
173
+ class="attribute-access-type">[R]</span>
174
+ </div>
175
+
176
+ <div class="method-description">
177
+
178
+ <p>The backup directory where the files to be backed up</p>
179
+
180
+ </div>
181
+ </div>
182
+
183
+ <div id="attribute-i-cron" class="method-detail">
184
+ <div class="method-heading attribute-method-heading">
185
+ <span class="method-name">cron</span><span
186
+ class="attribute-access-type">[R]</span>
187
+ </div>
188
+
189
+ <div class="method-description">
190
+
191
+ <p>The cron schedule</p>
192
+
193
+ </div>
194
+ </div>
195
+
196
+ <div id="attribute-i-database" class="method-detail">
197
+ <div class="method-heading attribute-method-heading">
198
+ <span class="method-name">database</span><span
199
+ class="attribute-access-type">[R]</span>
200
+ </div>
201
+
202
+ <div class="method-description">
203
+
204
+ <p>Retrieve the database name that has to be backed up</p>
205
+
206
+ </div>
207
+ </div>
208
+
209
+ <div id="attribute-i-files" class="method-detail">
210
+ <div class="method-heading attribute-method-heading">
211
+ <span class="method-name">files</span><span
212
+ class="attribute-access-type">[R]</span>
213
+ </div>
214
+
215
+ <div class="method-description">
216
+
217
+ <p>The files to be backed up</p>
218
+
219
+ </div>
220
+ </div>
221
+
222
+ <div id="attribute-i-no_compress" class="method-detail">
223
+ <div class="method-heading attribute-method-heading">
224
+ <span class="method-name">no_compress</span><span
225
+ class="attribute-access-type">[R]</span>
226
+ </div>
227
+
228
+ <div class="method-description">
229
+
230
+ <p>Determines whether to compress the backup if not to compress it returns
231
+ false, otherwise true</p>
232
+
233
+ </div>
234
+ </div>
235
+
236
+ <div id="attribute-i-override" class="method-detail">
237
+ <div class="method-heading attribute-method-heading">
238
+ <span class="method-name">override</span><span
239
+ class="attribute-access-type">[R]</span>
240
+ </div>
241
+
242
+ <div class="method-description">
243
+
244
+ <p>Determines whether the backup folder to be overridden when already exists</p>
245
+
246
+ </div>
247
+ </div>
248
+
249
+ <div id="attribute-i-password" class="method-detail">
250
+ <div class="method-heading attribute-method-heading">
251
+ <span class="method-name">password</span><span
252
+ class="attribute-access-type">[R]</span>
253
+ </div>
254
+
255
+ <div class="method-description">
256
+
257
+ <p>The user’s password to access the database</p>
258
+
259
+ </div>
260
+ </div>
261
+
262
+ <div id="attribute-i-user" class="method-detail">
263
+ <div class="method-heading attribute-method-heading">
264
+ <span class="method-name">user</span><span
265
+ class="attribute-access-type">[R]</span>
266
+ </div>
267
+
268
+ <div class="method-description">
269
+
270
+ <p>The user that is allowed to access the database</p>
271
+
272
+ </div>
273
+ </div>
274
+
275
+ </section><!-- attribute-method-details -->
276
+
277
+
278
+ <!-- Methods -->
279
+
280
+ <section id="public-class-5Buntitled-5D-method-details" class="method-section section">
281
+ <h3 class="section-header">Public Class Methods</h3>
282
+
283
+
284
+ <div id="method-c-new" class="method-detail ">
285
+
286
+ <div class="method-heading">
287
+ <span class="method-name">new</span><span
288
+ class="method-args">(argv)</span>
289
+ <span class="method-click-advice">click to toggle source</span>
290
+ </div>
291
+
292
+
293
+ <div class="method-description">
294
+
295
+ <p>Takes the arguments from the command line and parses them</p>
296
+
297
+
298
+
299
+ <div class="method-source-code" id="new-source">
300
+ <pre><span class="ruby-comment"># File lib/backup/options.rb, line 30</span>
301
+ <span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">argv</span>)
302
+ <span class="ruby-ivar">@exit_code</span> = <span class="ruby-value">0</span>
303
+ <span class="ruby-identifier">init_exit_messages</span>
304
+ <span class="ruby-identifier">parse</span>(<span class="ruby-identifier">argv</span>)
305
+ <span class="ruby-keyword">end</span></pre>
306
+ </div><!-- new-source -->
307
+
308
+ </div>
309
+
310
+
311
+
312
+
313
+ </div><!-- new-method -->
314
+
315
+
316
+ </section><!-- public-class-method-details -->
317
+
318
+ </section><!-- 5Buntitled-5D -->
319
+
320
+ </div><!-- documentation -->
321
+
322
+
323
+ <footer id="validator-badges">
324
+ <p><a href="http://validator.w3.org/check/referer">[Validate]</a>
325
+ <p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
326
+ <p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
327
+ </footer>
328
+