outback 0.0.14 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (46) hide show
  1. checksums.yaml +7 -0
  2. data/CHANGELOG +11 -0
  3. data/LICENSE +21 -0
  4. data/README.md +29 -3
  5. data/lib/outback/archive.rb +6 -17
  6. data/lib/outback/backup.rb +38 -20
  7. data/lib/outback/cli.rb +6 -2
  8. data/lib/outback/configuration.rb +15 -10
  9. data/lib/outback/directory_source.rb +8 -7
  10. data/lib/outback/directory_target.rb +18 -11
  11. data/lib/outback/encryption_processor.rb +34 -0
  12. data/lib/outback/errors.rb +7 -0
  13. data/lib/outback/logging.rb +7 -0
  14. data/lib/outback/mysql_source.rb +9 -9
  15. data/lib/outback/processor.rb +17 -0
  16. data/lib/outback/s3_target.rb +18 -9
  17. data/lib/outback/sftp_target.rb +70 -0
  18. data/lib/outback/source.rb +9 -2
  19. data/lib/outback/source_archive.rb +17 -0
  20. data/lib/outback/support/attr_setter.rb +1 -1
  21. data/lib/outback/support/configurable.rb +5 -3
  22. data/lib/outback/target.rb +52 -14
  23. data/lib/outback/target_archive.rb +30 -0
  24. data/lib/outback/version.rb +3 -0
  25. data/lib/outback.rb +16 -11
  26. data/lib/vendor/enumerable_ext.rb +9 -0
  27. data/lib/{outback/vendor → vendor}/metaclass.rb +1 -1
  28. data/lib/vendor/methodphitamine.rb +28 -0
  29. data/lib/vendor/mysql/charset.rb +325 -0
  30. data/lib/vendor/mysql/constants.rb +165 -0
  31. data/lib/vendor/mysql/error.rb +989 -0
  32. data/lib/vendor/mysql/packet.rb +78 -0
  33. data/lib/vendor/mysql/protocol.rb +770 -0
  34. data/lib/vendor/mysql.rb +1093 -0
  35. data/lib/vendor/numeric_ext.rb +49 -0
  36. data/lib/vendor/string_ext.rb +19 -0
  37. metadata +84 -43
  38. data/MIT-LICENSE +0 -20
  39. data/VERSION +0 -1
  40. data/lib/outback/configuration_error.rb +0 -4
  41. data/lib/outback/directory_archive.rb +0 -8
  42. data/lib/outback/local_archive.rb +0 -6
  43. data/lib/outback/s3_archive.rb +0 -18
  44. data/lib/outback/temp_archive.rb +0 -5
  45. data/lib/outback/vendor/methodphitamine.rb +0 -25
  46. data/lib/outback/vendor/mysql.rb +0 -1214
@@ -0,0 +1,49 @@
1
+ class Numeric
2
+ # Enables the use of time calculations and declarations, like 45.minutes + 2.hours + 4.years.
3
+ #
4
+ # These methods use Time#advance for precise date calculations when using from_now, ago, etc.
5
+ # as well as adding or subtracting their results from a Time object. For example:
6
+ #
7
+ # # equivalent to Time.current.advance(months: 1)
8
+ # 1.month.from_now
9
+ #
10
+ # # equivalent to Time.current.advance(years: 2)
11
+ # 2.years.from_now
12
+ #
13
+ # # equivalent to Time.current.advance(months: 4, years: 5)
14
+ # (4.months + 5.years).from_now
15
+ def seconds
16
+ self
17
+ end
18
+ alias :second :seconds
19
+
20
+ def minutes
21
+ self * 60
22
+ end
23
+ alias :minute :minutes
24
+
25
+ def hours
26
+ self * 3600
27
+ end
28
+ alias :hour :hours
29
+
30
+ def days
31
+ self * 24.hours
32
+ end
33
+ alias :day :days
34
+
35
+ def weeks
36
+ self * 7.days
37
+ end
38
+ alias :week :weeks
39
+
40
+ def months
41
+ self * 31.days
42
+ end
43
+ alias :month :months
44
+
45
+ def years
46
+ self * 365.days
47
+ end
48
+ alias :year :years
49
+ end
@@ -0,0 +1,19 @@
1
+ module StringExt
2
+
3
+ def classify
4
+ split('/').map { |c| c.split('_').map(&:capitalize).join }.join('::')
5
+ end
6
+
7
+ def constantize
8
+ self.split("::").inject(Module) {|acc, val| acc.const_get(val)}
9
+ end
10
+
11
+ unless String.method_defined?(:blank?)
12
+ def blank?
13
+ empty? || strip.empty?
14
+ end
15
+ end
16
+
17
+ end
18
+
19
+ String.include StringExt
metadata CHANGED
@@ -1,97 +1,138 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.14
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Matthias Grosser
9
- - onrooby GmbH
10
- autorequire:
8
+ autorequire:
11
9
  bindir: bin
12
10
  cert_chain: []
13
- date: 2012-08-16 00:00:00.000000000 Z
11
+ date: 2024-07-08 00:00:00.000000000 Z
14
12
  dependencies:
15
13
  - !ruby/object:Gem::Dependency
16
- name: s3
17
- requirement: &2151929740 !ruby/object:Gem::Requirement
18
- none: false
14
+ name: net-sftp
15
+ requirement: !ruby/object:Gem::Requirement
19
16
  requirements:
20
- - - ! '>='
17
+ - - ">="
21
18
  - !ruby/object:Gem::Version
22
19
  version: '0'
23
20
  type: :runtime
24
21
  prerelease: false
25
- version_requirements: *2151929740
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
26
27
  - !ruby/object:Gem::Dependency
27
- name: activesupport
28
- requirement: &2151929000 !ruby/object:Gem::Requirement
29
- none: false
28
+ name: rexml
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ! '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 3.0.0
33
+ version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *2151929000
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: base64
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: s3
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: 0.3.24
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 0.3.24
37
69
  description: A Ruby backup tool
38
- email: admin@onrooby.com
70
+ email: mtgrosser@gmx.net
39
71
  executables:
40
72
  - outback
41
73
  extensions: []
42
74
  extra_rdoc_files: []
43
75
  files:
76
+ - CHANGELOG
77
+ - LICENSE
78
+ - README.md
79
+ - bin/outback
80
+ - lib/outback.rb
44
81
  - lib/outback/archive.rb
45
82
  - lib/outback/backup.rb
46
83
  - lib/outback/cli.rb
47
84
  - lib/outback/configuration.rb
48
- - lib/outback/configuration_error.rb
49
- - lib/outback/directory_archive.rb
50
85
  - lib/outback/directory_source.rb
51
86
  - lib/outback/directory_target.rb
52
- - lib/outback/local_archive.rb
87
+ - lib/outback/encryption_processor.rb
88
+ - lib/outback/errors.rb
89
+ - lib/outback/logging.rb
53
90
  - lib/outback/mysql_source.rb
54
- - lib/outback/s3_archive.rb
91
+ - lib/outback/processor.rb
55
92
  - lib/outback/s3_target.rb
93
+ - lib/outback/sftp_target.rb
56
94
  - lib/outback/source.rb
95
+ - lib/outback/source_archive.rb
57
96
  - lib/outback/support/attr_setter.rb
58
97
  - lib/outback/support/configurable.rb
59
98
  - lib/outback/support/mysql_ext.rb
60
99
  - lib/outback/support/pathname_ext.rb
61
100
  - lib/outback/support/returning.rb
62
101
  - lib/outback/target.rb
63
- - lib/outback/temp_archive.rb
64
- - lib/outback/vendor/metaclass.rb
65
- - lib/outback/vendor/methodphitamine.rb
66
- - lib/outback/vendor/mysql.rb
67
- - lib/outback.rb
68
- - bin/outback
69
- - MIT-LICENSE
70
- - VERSION
71
- - README.md
72
- - CHANGELOG
73
- homepage: http://rubygems.org/gems/outback
74
- licenses: []
75
- post_install_message:
102
+ - lib/outback/target_archive.rb
103
+ - lib/outback/version.rb
104
+ - lib/vendor/enumerable_ext.rb
105
+ - lib/vendor/metaclass.rb
106
+ - lib/vendor/methodphitamine.rb
107
+ - lib/vendor/mysql.rb
108
+ - lib/vendor/mysql/charset.rb
109
+ - lib/vendor/mysql/constants.rb
110
+ - lib/vendor/mysql/error.rb
111
+ - lib/vendor/mysql/packet.rb
112
+ - lib/vendor/mysql/protocol.rb
113
+ - lib/vendor/numeric_ext.rb
114
+ - lib/vendor/string_ext.rb
115
+ homepage: http://github.com/onrooby/outback
116
+ licenses:
117
+ - MIT
118
+ metadata: {}
119
+ post_install_message:
76
120
  rdoc_options: []
77
121
  require_paths:
78
122
  - lib
79
123
  required_ruby_version: !ruby/object:Gem::Requirement
80
- none: false
81
124
  requirements:
82
- - - ! '>='
125
+ - - ">="
83
126
  - !ruby/object:Gem::Version
84
- version: 1.9.1
127
+ version: 2.0.0
85
128
  required_rubygems_version: !ruby/object:Gem::Requirement
86
- none: false
87
129
  requirements:
88
- - - ! '>='
130
+ - - ">="
89
131
  - !ruby/object:Gem::Version
90
132
  version: '0'
91
133
  requirements: []
92
- rubyforge_project:
93
- rubygems_version: 1.8.11
94
- signing_key:
95
- specification_version: 3
134
+ rubygems_version: 3.5.9
135
+ signing_key:
136
+ specification_version: 4
96
137
  summary: Ruby Backup Tool
97
138
  test_files: []
data/MIT-LICENSE DELETED
@@ -1,20 +0,0 @@
1
- Copyright (c) 2012 onrooby GmbH
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.0.14
@@ -1,4 +0,0 @@
1
- module Outback
2
- class ConfigurationError < Exception
3
- end
4
- end
@@ -1,8 +0,0 @@
1
- module Outback
2
- class DirectoryArchive < Archive
3
- def purge!
4
- Outback.debug "purging DirectoryArchive: #{filename}"
5
- filename.unlink
6
- end
7
- end
8
- end
@@ -1,6 +0,0 @@
1
- module Outback
2
- class LocalArchive < Archive
3
-
4
-
5
- end
6
- end
@@ -1,18 +0,0 @@
1
- module Outback
2
- class S3Archive < Archive
3
- def size
4
- object.size.to_i
5
- end
6
-
7
- def purge!
8
- Outback.debug "purging S3Archive: #{filename}"
9
- object && object.destroy or Outback.error("could not find object #{filename} for purging")
10
- end
11
-
12
- private
13
-
14
- def object
15
- parent.bucket.objects.find(filename.to_s)
16
- end
17
- end
18
- end
@@ -1,5 +0,0 @@
1
- module Outback
2
- class TempArchive < Archive
3
-
4
- end
5
- end
@@ -1,25 +0,0 @@
1
- module Kernel
2
- protected
3
- def it() It.new end
4
- alias its it
5
- end
6
-
7
- class It < BasicObject
8
-
9
- undef_method(*(instance_methods - [:__id__, :__send__]))
10
-
11
- def initialize
12
- @methods = []
13
- end
14
-
15
- def method_missing(*args, &block)
16
- @methods << [args, block] unless args == [:respond_to?, :to_proc]
17
- self
18
- end
19
-
20
- def to_proc
21
- ::Kernel.lambda do |obj|
22
- @methods.inject(obj) { |current, (args,block)| current.send(*args, &block) }
23
- end
24
- end
25
- end