rehabilitate 0.4.2 → 0.4.4
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.
- data/Gemfile.lock +1 -2
- data/bin/rehabilitate +6 -1
- data/lib/rehabilitate/plugin.rb +9 -9
- data/lib/rehabilitate/plugins/lzop.rb +1 -1
- data/lib/rehabilitate/plugins/postgresql.rb +1 -1
- data/lib/rehabilitate/plugins/s3.rb +1 -1
- data/lib/rehabilitate/plugins/scp.rb +1 -1
- data/lib/rehabilitate/plugins/splitter.rb +3 -3
- data/lib/rehabilitate/version.rb +2 -2
- data/lib/rehabilitate.rb +1 -2
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/bin/rehabilitate
CHANGED
|
@@ -12,11 +12,16 @@
|
|
|
12
12
|
#
|
|
13
13
|
# example: rehabilitate save --driver postgresql --type scp --location user:pass@ftp.example.com
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
begin
|
|
16
|
+
require "bundler/setup"
|
|
17
|
+
rescue LoadError
|
|
18
|
+
require "rubygems"
|
|
19
|
+
end
|
|
16
20
|
|
|
17
21
|
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib"
|
|
18
22
|
$LOAD_PATH.unshift "#{File.dirname(__FILE__)}/../lib/rehabilitate"
|
|
19
23
|
|
|
24
|
+
require "pluginfactory"
|
|
20
25
|
require 'rehabilitate'
|
|
21
26
|
require 'commander/import'
|
|
22
27
|
require 'log4r'
|
data/lib/rehabilitate/plugin.rb
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
include PluginFactory
|
|
1
|
+
module Rehabilitate
|
|
2
|
+
class Plugin
|
|
3
|
+
include ::PluginFactory
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
def self::derivative_dirs
|
|
6
|
+
["plugins"]
|
|
7
|
+
end
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
def log(message)
|
|
10
|
+
$LOGGER.info message
|
|
11
|
+
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
require 'rehabilitate/plugin'
|
|
2
2
|
|
|
3
|
-
class Splitter < Plugin
|
|
3
|
+
class Splitter < Rehabilitate::Plugin
|
|
4
4
|
MAX_FILE_SIZE = (4.5*1024*1024*1024*1024*10).to_i #4.5TB
|
|
5
5
|
|
|
6
6
|
def join(files)
|
|
7
|
-
log %[ cat #{files.join(" ")} > #{files[0].split("-")[0..-2].join("-")} ]
|
|
8
|
-
log %x[ cat #{files.join(" ")} > #{files[0].split("-")[0..-2].join("-")} ]
|
|
7
|
+
log %[ cat #{files.reverse.join(" ")} > #{files[0].split("-")[0..-2].join("-")} ]
|
|
8
|
+
log %x[ cat #{files.reverse.join(" ")} > #{files[0].split("-")[0..-2].join("-")} ]
|
|
9
9
|
files[0].split("-")[0..-2].join("-")
|
|
10
10
|
end
|
|
11
11
|
|
data/lib/rehabilitate/version.rb
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
VERSION = "0.4.
|
|
1
|
+
module Rehabilitate
|
|
2
|
+
VERSION = "0.4.4" unless const_defined?("VERSION")
|
|
3
3
|
end
|
data/lib/rehabilitate.rb
CHANGED