backup_paradise 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +452 -0
  3. data/backup_paradise.gemspec +50 -0
  4. data/bin/backup_for_ingrid +10 -0
  5. data/bin/backup_paradise +7 -0
  6. data/bin/windows_backup_paradise +9 -0
  7. data/doc/README.gen +390 -0
  8. data/doc/TODO.md +130 -0
  9. data/img/BackupParadise_Logo.png +0 -0
  10. data/lib/backup_paradise/actions/README.md +2 -0
  11. data/lib/backup_paradise/actions/backup.rb +62 -0
  12. data/lib/backup_paradise/base/base.rb +529 -0
  13. data/lib/backup_paradise/base/colours.rb +137 -0
  14. data/lib/backup_paradise/base/namespace.rb +16 -0
  15. data/lib/backup_paradise/base/tab.rb +47 -0
  16. data/lib/backup_paradise/colours/colours.rb +88 -0
  17. data/lib/backup_paradise/constants/constants.rb +162 -0
  18. data/lib/backup_paradise/gui/glimmer/libui/backup_for_ingrid/backup_for_ingrid.rb +87 -0
  19. data/lib/backup_paradise/gui/gtk2/OLD_backup.rb +165 -0
  20. data/lib/backup_paradise/gui/libui/backup_for_ingrid/backup_for_ingrid.rb +99 -0
  21. data/lib/backup_paradise/gui/shared_code/simple_backup_widget/simple_backup_widget_module.rb +0 -0
  22. data/lib/backup_paradise/gui/tk/backup.rb +108 -0
  23. data/lib/backup_paradise/gui/universal_widgets/simple_backup_widget/simple_backup_widget.rb +921 -0
  24. data/lib/backup_paradise/images/BACKUP_IMAGE.png +0 -0
  25. data/lib/backup_paradise/images/right_arrow.png +0 -0
  26. data/lib/backup_paradise/project/project.rb +40 -0
  27. data/lib/backup_paradise/requires/require_the_backup_paradise_project.rb +18 -0
  28. data/lib/backup_paradise/requires/require_yaml.rb +7 -0
  29. data/lib/backup_paradise/tab/tab.rb +87 -0
  30. data/lib/backup_paradise/toplevel_methods/cliner.rb +16 -0
  31. data/lib/backup_paradise/toplevel_methods/config.rb +86 -0
  32. data/lib/backup_paradise/toplevel_methods/create_and_remove.rb +63 -0
  33. data/lib/backup_paradise/toplevel_methods/e.rb +16 -0
  34. data/lib/backup_paradise/toplevel_methods/esystem.rb +19 -0
  35. data/lib/backup_paradise/toplevel_methods/files_and_directories.rb +181 -0
  36. data/lib/backup_paradise/toplevel_methods/help.rb +93 -0
  37. data/lib/backup_paradise/toplevel_methods/misc.rb +153 -0
  38. data/lib/backup_paradise/toplevel_methods/mountpoint.rb +188 -0
  39. data/lib/backup_paradise/toplevel_methods/opnn.rb +27 -0
  40. data/lib/backup_paradise/utility_scripts/backup/backup.rb +1942 -0
  41. data/lib/backup_paradise/version/version.rb +19 -0
  42. data/lib/backup_paradise/windows/README.md +1 -0
  43. data/lib/backup_paradise/windows/windows.rb +101 -0
  44. data/lib/backup_paradise/www/backup.cgi +63 -0
  45. data/lib/backup_paradise/yaml/config.yml +82 -0
  46. data/lib/backup_paradise.rb +5 -0
  47. data/test/testing_toplevel_functionality.rb +11 -0
  48. metadata +192 -0
@@ -0,0 +1,529 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'backup_paradise/base/base.rb'
6
+ # < ::BackupParadise::Base
7
+ # =========================================================================== #
8
+ module BackupParadise
9
+
10
+ class Base
11
+
12
+ require 'backup_paradise/constants/constants.rb'
13
+ require 'backup_paradise/project/project.rb'
14
+ require 'backup_paradise/toplevel_methods/config.rb'
15
+ require 'backup_paradise/toplevel_methods/e.rb'
16
+ require 'backup_paradise/toplevel_methods/files_and_directories.rb'
17
+ require 'backup_paradise/toplevel_methods/misc.rb'
18
+ require 'backup_paradise/base/colours.rb'
19
+ require 'backup_paradise/base/namespace.rb'
20
+ require 'backup_paradise/base/tab.rb'
21
+
22
+ # ========================================================================= #
23
+ # Next, external code is loaded.
24
+ # ========================================================================= #
25
+ begin
26
+ require 'roebe/time/time.rb'
27
+ rescue LoadError; end
28
+
29
+ begin
30
+ require 'opn'
31
+ rescue LoadError; end
32
+
33
+ begin
34
+ require 'roebe/toplevel_methods/write_what_into.rb'
35
+ rescue LoadError => error
36
+ puts 'Please install the roebe-gem ( gem install roebe ).'
37
+ pp error
38
+ end
39
+
40
+ # ========================================================================= #
41
+ # === BackupParadise.e
42
+ # ========================================================================= #
43
+ def e(i = '')
44
+ BackupParadise.e(i)
45
+ end
46
+
47
+ # ========================================================================= #
48
+ # === reset (reset tag)
49
+ # ========================================================================= #
50
+ def reset
51
+ # ======================================================================= #
52
+ # === @use_this_program_to_rename_tabs
53
+ # ======================================================================= #
54
+ @use_this_program_to_rename_tabs = nil
55
+ end
56
+
57
+ # ========================================================================= #
58
+ # === rds
59
+ # ========================================================================= #
60
+ def rds(i)
61
+ BackupParadise.rds(i)
62
+ end
63
+
64
+ # ========================================================================= #
65
+ # === no_such_directory_exists_at
66
+ # ========================================================================= #
67
+ def no_such_directory_exists_at(i)
68
+ e "No such directory exists at `#{sdir(i)}`."
69
+ end; alias no_directory_at no_such_directory_exists_at # === no_directory_at
70
+
71
+ # ========================================================================= #
72
+ # === no_target_at
73
+ # ========================================================================= #
74
+ def no_target_at(i)
75
+ e "No target at #{sfile(i)} could be found."
76
+ end
77
+
78
+ # ========================================================================= #
79
+ # === no_file_exists_at
80
+ # ========================================================================= #
81
+ def no_file_exists_at(i)
82
+ e "No file exists at `#{sfile(i)}`."
83
+ end
84
+
85
+ # ========================================================================= #
86
+ # === exit_program (exit tag)
87
+ #
88
+ # This method should be used when we have to exit from the
89
+ # backup_paradise project.
90
+ #
91
+ # The reason why a separate exit-method has been added is so that we
92
+ # can change this at a later time possibly, if we wish to do further
93
+ # checks before exiting.
94
+ # ========================================================================= #
95
+ def exit_program(be_verbose = false)
96
+ if be_verbose
97
+ e 'Quit was called, thus we exit now.'
98
+ end
99
+ if @use_this_program_to_rename_tabs
100
+ rename_tab(@use_this_program_to_rename_tabs)
101
+ end
102
+ exit
103
+ end
104
+
105
+ # ========================================================================= #
106
+ # === home_dir_of_user_x?
107
+ #
108
+ # This method is only relevant on my home system.
109
+ # ========================================================================= #
110
+ def home_dir_of_user_x?
111
+ '/home/x/'
112
+ end
113
+
114
+ # ========================================================================= #
115
+ # === cliner
116
+ # ========================================================================= #
117
+ def cliner
118
+ BackupParadise.cliner
119
+ end
120
+
121
+ # ========================================================================= #
122
+ # === register_sigint
123
+ # ========================================================================= #
124
+ def register_sigint
125
+ Signal.trap('SIGINT') { exit_program }
126
+ end
127
+
128
+ # ========================================================================= #
129
+ # === rename
130
+ # ========================================================================= #
131
+ def rename(a, b)
132
+ if File.exist? b
133
+ e "Can not rename to #{sfancy(b)} as that target already exists."
134
+ else
135
+ FileUtils.mv(a, b)
136
+ end
137
+ end
138
+
139
+ # ========================================================================= #
140
+ # === dd_mm_yyyy
141
+ #
142
+ # This method will return a String such as "25.12.2018".
143
+ # ========================================================================= #
144
+ def dd_mm_yyyy
145
+ if Object.const_defined? :Roebe
146
+ ::Roebe::Time.dd_mm_yyyy # Tap into the Roebe namespace for this.
147
+ else
148
+ Time.now.strftime('%d.%m.%Y')
149
+ end
150
+ end
151
+
152
+ # ========================================================================= #
153
+ # === return_current_date_and_time
154
+ #
155
+ # This method will return a String such as:
156
+ #
157
+ # "24.05.2018-03:48:50"
158
+ #
159
+ # ========================================================================= #
160
+ def return_current_date_and_time
161
+ "#{dd_mm_yyyy}-#{hh_mm_ss}"
162
+ end; alias return_full_date return_current_date_and_time # === return_full_date
163
+ alias date_and_time? return_current_date_and_time # === date_and_time?
164
+
165
+ require 'backup_paradise/toplevel_methods/opnn.rb'
166
+ # ========================================================================= #
167
+ # === opnn
168
+ # ========================================================================= #
169
+ def opnn(i = NAMESPACE)
170
+ if i.is_a? String
171
+ i = {
172
+ namespace: i,
173
+ use_colours: use_colours?
174
+ }
175
+ end
176
+ BackupParadise.opnn(i)
177
+ end
178
+
179
+ # ========================================================================= #
180
+ # === esystem
181
+ # ========================================================================= #
182
+ def esystem(i)
183
+ e i
184
+ system i
185
+ end
186
+
187
+ # ========================================================================= #
188
+ # === n_files_in?
189
+ #
190
+ # This method will return how many files are in the given directory.
191
+ # ========================================================================= #
192
+ def n_files_in?(i)
193
+ _ = 0
194
+ if File.directory? i
195
+ _ = Dir["#{i}*"].size
196
+ end
197
+ _
198
+ end
199
+
200
+ # ========================================================================= #
201
+ # === create_directory (mkdir tag)
202
+ #
203
+ # The first argument to this method should be the name of the directory
204
+ # that has to be created, such as 'foobar/'.
205
+ # ========================================================================= #
206
+ def create_directory(
207
+ i, options = { mode_to_use: 0755 }
208
+ )
209
+ BackupParadise.create_directory(i, options)
210
+ end; alias mkdir create_directory # === mkdir
211
+
212
+ # ========================================================================= #
213
+ # === cd_to_the_mounted_device
214
+ # ========================================================================= #
215
+ def cd_to_the_mounted_device
216
+ cd target_mountpoint?
217
+ end
218
+
219
+ # ========================================================================= #
220
+ # === do_symlink
221
+ # ========================================================================= #
222
+ def do_symlink(
223
+ from_this_target, create_a_symlink_here
224
+ )
225
+ if File.exist? create_a_symlink_here
226
+ no_target_at(create_a_symlink_here)
227
+ else
228
+ File.symlink(from_this_target, create_a_symlink_here)
229
+ end
230
+ end
231
+
232
+ # ========================================================================= #
233
+ # === delete_files
234
+ # ========================================================================= #
235
+ def delete_files(
236
+ i, be_verbose = false
237
+ )
238
+ case be_verbose
239
+ when :be_verbose
240
+ be_verbose = true
241
+ end
242
+ if i.is_a? Array
243
+ i.each {|entry| delete_files(entry, be_verbose) }
244
+ else
245
+ if File.file? i
246
+ if be_verbose
247
+ opnn; e "Now deleting the file `#{sfile(i)}`."
248
+ end
249
+ File.delete(i)
250
+ else
251
+ e sfancy(i)+' is not not a file - we thus can not delete it.'
252
+ end
253
+ end
254
+ end; alias delete_file delete_files # === delete_file
255
+ alias remove_these_files delete_files # === remove_these_files
256
+
257
+ # ========================================================================= #
258
+ # === remove_directory
259
+ # ========================================================================= #
260
+ def remove_directory(i)
261
+ BackupParadise.remove_directory(i)
262
+ end
263
+
264
+ # ========================================================================= #
265
+ # === copy_file
266
+ # ========================================================================= #
267
+ def copy_file(from, to)
268
+ BackupParadise.copy_file(from, to)
269
+ end; alias copy_this_file copy_file # === copy_this_file
270
+
271
+ # ========================================================================= #
272
+ # === write_what_into
273
+ # ========================================================================= #
274
+ def write_what_into(what, into)
275
+ ::Roebe.write_what_into(what, into)
276
+ end
277
+
278
+ # ========================================================================= #
279
+ # === append_what_into
280
+ # ========================================================================= #
281
+ def append_what_into(what, into)
282
+ ::Roebe.append_what_into(what, into)
283
+ end
284
+
285
+ # ========================================================================= #
286
+ # === data_directory?
287
+ # ========================================================================= #
288
+ def data_directory?
289
+ DATA_DIRECTORY
290
+ end; alias data_dir? data_directory? # === data_dir?
291
+
292
+ # ========================================================================= #
293
+ # === size?
294
+ # ========================================================================= #
295
+ def size?(i)
296
+ BackupParadise.size?(i)
297
+ end
298
+
299
+ # ========================================================================= #
300
+ # === target_mountpoint?
301
+ #
302
+ # Designate to which target we will backup.
303
+ # ========================================================================= #
304
+ def target_mountpoint?
305
+ BackupParadise.target_mountpoint?
306
+ end; alias main_target? target_mountpoint? # === main_target?
307
+ alias backup_to_this_directory? target_mountpoint? # === backup_to_this_directory?
308
+ alias mount_point? target_mountpoint? # === mount_point?
309
+ alias mount_target? target_mountpoint? # === mount_target?
310
+
311
+ # ========================================================================= #
312
+ # === use_system_cp
313
+ # ========================================================================= #
314
+ def use_system_cp?
315
+ ::BackupParadise.use_system_cp?
316
+ end
317
+
318
+ # ========================================================================= #
319
+ # === hh_mm_ss
320
+ # ========================================================================= #
321
+ def hh_mm_ss
322
+ if Object.const_defined? :Roebe
323
+ ::Roebe::Time.hh_mm_ss # This will yield something like: "03:53:55"
324
+ else
325
+ Time.now.strftime('%H:%M:%S')
326
+ end
327
+ end; alias current_time hh_mm_ss # === current_time
328
+
329
+ # ========================================================================= #
330
+ # === has_superuser_abilities?
331
+ # ========================================================================= #
332
+ def has_superuser_abilities?
333
+ Process.uid.zero?
334
+ end
335
+
336
+ # ========================================================================= #
337
+ # === chdir (cd tag)
338
+ #
339
+ # Change directory via this method here.
340
+ # ========================================================================= #
341
+ def chdir(i)
342
+ BackupParadise.change_directory(i)
343
+ end; alias cd chdir # === cd
344
+ alias change_directory chdir # === change_directory
345
+
346
+ # ========================================================================= #
347
+ # === report_total_size_of
348
+ #
349
+ # Use this method to report the total size of a specific directory. We
350
+ # expect the input to this method thus be a (local) directory.
351
+ # ========================================================================= #
352
+ def report_total_size_of(i)
353
+ size_result = size?(i)
354
+ kb_size = (size_result.to_f / 1000.0).round(2)
355
+ mb_size = (kb_size.to_f / 1000.0).round(2)
356
+ gb_size = (mb_size.to_f / 1000.0).round(2)
357
+ e "#{rev}Total size of files in bytes at #{sdir(i)}: "\
358
+ "#{seagreen(size_result)} bytes."
359
+ e 'This corresponds to '+
360
+ orangered(kb_size.to_s)+lightcoral(' KB ')+
361
+ orangered(mb_size.to_s)+lightcoral(' MB ')+
362
+ orangered(gb_size.to_s)+lightcoral(' GB')+'.'
363
+ end; alias report_file_size_of report_total_size_of # === report_file_size_of
364
+
365
+ # ========================================================================= #
366
+ # === remove
367
+ # ========================================================================= #
368
+ def remove(i)
369
+ BackupParadise.remove(i)
370
+ end
371
+
372
+ # ========================================================================= #
373
+ # === remove_file
374
+ # ========================================================================= #
375
+ def remove_file(i)
376
+ File.delete(i) if File.file?(i)
377
+ end
378
+
379
+ # ========================================================================= #
380
+ # === set_target_mountpoint
381
+ # ========================================================================= #
382
+ def set_target_mountpoint(i)
383
+ i = i.to_s
384
+ case i
385
+ when 'chroot'
386
+ i = '/Depot/Chroot/' unless File.exist?('chroot')
387
+ # ======================================================================= #
388
+ # Specify some shortcuts to be used here.
389
+ # ======================================================================= #
390
+ when '1',
391
+ '2',
392
+ '3',
393
+ '4',
394
+ '5',
395
+ '6',
396
+ '7',
397
+ '8',
398
+ '9',
399
+ 'usb1',
400
+ 'usb2',
401
+ 'usb3',
402
+ 'usb4',
403
+ 'usb5',
404
+ 'usb6',
405
+ 'tousb1',
406
+ 'tousb2',
407
+ 'tousb3',
408
+ 'tousb4',
409
+ 'tousb5'
410
+ i = i.dup if i.frozen?
411
+ if BackupParadise.is_this_a_shortcut?(i)
412
+ i = BackupParadise.return_the_assumed_mountpoint_from_this_input(i)
413
+ else
414
+ if i.start_with? 'usb'
415
+ i.sub!(/^usb/,'')
416
+ elsif i.start_with? 'to'
417
+ i.sub!(/^to(-| |_)?usb/,'')
418
+ end
419
+ i = "/Mount/USB#{i}/"
420
+ end
421
+ end
422
+ BackupParadise.target_mountpoint = i
423
+ end; alias set_target_device set_target_mountpoint # === set_target_device
424
+ alias set_backup_to_this_directory set_target_mountpoint # === set_backup_to_this_directory
425
+ alias set_target set_target_mountpoint # === set_target
426
+ alias set_main_target set_target_mountpoint # === set_main_target
427
+
428
+ # ========================================================================= #
429
+ # === copy_recursively
430
+ #
431
+ # This method can be used to copy the source to the target in a
432
+ # recursive manner.
433
+ #
434
+ # The third argument to this method, called `be_verbose`, will
435
+ # feedback what is done, to the user, if it has a value of true.
436
+ # Symbols such as :be_verbose can be used as an "alias" to true.
437
+ # If it is set to false, or :be_silent, then no output will be
438
+ # issued to the user.
439
+ # ========================================================================= #
440
+ def copy_recursively(
441
+ this_directory, # from (also called source)
442
+ backup_to_this_target, # to (also called target)
443
+ be_verbose = :be_verbose
444
+ )
445
+ ::BackupParadise.copy_recursively(
446
+ this_directory,
447
+ backup_to_this_target,
448
+ be_verbose
449
+ )
450
+ end; alias cpr copy_recursively # === cpr
451
+ alias backup_this_directory_if_it_exists copy_recursively # === backup_this_directory_if_it_exists
452
+
453
+ # ========================================================================= #
454
+ # === target_hdd_does_not_have_enough_space_left?
455
+ # ========================================================================= #
456
+ def target_hdd_does_not_have_enough_space_left? # FIXME
457
+ false # for now this is always false. stub
458
+ # MINIMAL_FILESIZE
459
+ end
460
+
461
+ # ========================================================================= #
462
+ # === are_we_on_windows?
463
+ #
464
+ # Query whether the underlying operating system is windows or whether
465
+ # it is not.
466
+ # ========================================================================= #
467
+ def are_we_on_windows?
468
+ ::BackupParadise.send(__method__)
469
+ end
470
+
471
+ # ========================================================================= #
472
+ # === all_important_directories?
473
+ #
474
+ # Feedback which directories are the most important ones.
475
+ # ========================================================================= #
476
+ def all_important_directories?
477
+ CONFIG['backup_these_directories'].map {|entry|
478
+ unless entry.end_with?('/')
479
+ entry = entry.dup if entry.frozen?
480
+ entry << '/' # Keep a trailing /; it looks better that way.
481
+ end
482
+ entry
483
+ }
484
+ end
485
+
486
+ # ========================================================================= #
487
+ # === is_on_roebe?
488
+ # ========================================================================= #
489
+ def is_on_roebe?
490
+ BackupParadise.is_on_roebe?
491
+ end
492
+
493
+ # ========================================================================= #
494
+ # === is_symlink?
495
+ # ========================================================================= #
496
+ def is_symlink?(i)
497
+ File.symlink?(i)
498
+ end
499
+
500
+ # ========================================================================= #
501
+ # === delete_symlink
502
+ # ========================================================================= #
503
+ def delete_symlink(i)
504
+ if File.symlink? i
505
+ File.delete(i)
506
+ end
507
+ end; alias remove_this_symlink delete_symlink # === remove_this_symlink
508
+
509
+ # ========================================================================= #
510
+ # === return_all_symlinks_from_this_directory
511
+ #
512
+ # This method can be used to return all symlinks from a given directory.
513
+ #
514
+ # Naturally this method expects a directory as its given input argument.
515
+ # ========================================================================= #
516
+ def return_all_symlinks_from_this_directory(i)
517
+ Dir["#{i}**/**"].select {|entry|
518
+ is_symlink?(entry)
519
+ }
520
+ end
521
+
522
+ # ========================================================================= #
523
+ # === opne
524
+ # ========================================================================= #
525
+ def opne(i = '')
526
+ opnn; e i
527
+ end
528
+
529
+ end; end
@@ -0,0 +1,137 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'backup_paradise/base/colours.rb'
6
+ # =========================================================================== #
7
+ module BackupParadise
8
+
9
+ class Base
10
+
11
+ require 'backup_paradise/colours/colours.rb'
12
+
13
+ # ========================================================================= #
14
+ # === use_colours?
15
+ # ========================================================================= #
16
+ def use_colours?
17
+ BackupParadise.use_colours?
18
+ end
19
+
20
+ # ========================================================================= #
21
+ # === simp
22
+ # ========================================================================= #
23
+ def simp(i = '')
24
+ BackupParadise.simp(i)
25
+ end
26
+
27
+ # ========================================================================= #
28
+ # === sdir
29
+ # ========================================================================= #
30
+ def sdir(i = '')
31
+ BackupParadise.sdir(i)
32
+ end
33
+
34
+ # ========================================================================= #
35
+ # === sfile
36
+ # ========================================================================= #
37
+ def sfile(i = '')
38
+ BackupParadise.sfile(i)
39
+ end
40
+
41
+ # ========================================================================= #
42
+ # === sfancy
43
+ # ========================================================================= #
44
+ def sfancy(i = '')
45
+ BackupParadise.sfancy(i)
46
+ end
47
+
48
+ # ========================================================================= #
49
+ # === tomato
50
+ # ========================================================================= #
51
+ def tomato(i)
52
+ BackupParadise.tomato(i)
53
+ end
54
+
55
+ # ========================================================================= #
56
+ # === royalblue
57
+ # ========================================================================= #
58
+ def royalblue(i)
59
+ BackupParadise.royalblue(i)
60
+ end
61
+
62
+ # ========================================================================= #
63
+ # === rosybrown
64
+ # ========================================================================= #
65
+ def rosybrown(i)
66
+ if use_colours?
67
+ return ::Colours.rosybrown(i)
68
+ end
69
+ return i
70
+ end
71
+
72
+ # ========================================================================= #
73
+ # === seagreen
74
+ # ========================================================================= #
75
+ def seagreen(i)
76
+ if use_colours?
77
+ return ::Colours.seagreen(i)
78
+ end
79
+ return i
80
+ end
81
+
82
+ # ========================================================================= #
83
+ # === steelblue
84
+ # ========================================================================= #
85
+ def steelblue(i)
86
+ if use_colours?
87
+ return ::Colours.steelblue(i)
88
+ end
89
+ return i
90
+ end
91
+
92
+ # ========================================================================= #
93
+ # === orangered
94
+ # ========================================================================= #
95
+ def orangered(i)
96
+ if use_colours?
97
+ return ::Colours.orangered(i)
98
+ end
99
+ return i
100
+ end
101
+
102
+ # ========================================================================= #
103
+ # === lightcoral
104
+ # ========================================================================= #
105
+ def lightcoral(i)
106
+ if use_colours?
107
+ return ::Colours.lightcoral(i)
108
+ end
109
+ return i
110
+ end
111
+
112
+ # ========================================================================= #
113
+ # === rev
114
+ # ========================================================================= #
115
+ def rev
116
+ if Object.const_defined? :Colours
117
+ Colours.rev
118
+ else
119
+ ''
120
+ end
121
+ end
122
+
123
+ # ========================================================================= #
124
+ # === print_rev
125
+ # ========================================================================= #
126
+ def print_rev
127
+ print rev
128
+ end
129
+
130
+ # ========================================================================= #
131
+ # === cyan
132
+ # ========================================================================= #
133
+ def cyan
134
+ Colours::CYAN
135
+ end
136
+
137
+ end; end
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'backup_paradise/base/namespace.rb'
6
+ # =========================================================================== #
7
+ module BackupParadise
8
+
9
+ class Base
10
+
11
+ # ========================================================================= #
12
+ # === NAMESPACE
13
+ # ========================================================================= #
14
+ NAMESPACE = inspect
15
+
16
+ end; end