outback 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.13
1
+ 0.0.14
@@ -13,7 +13,8 @@ module Outback
13
13
  def run!
14
14
  @archives = []
15
15
  begin
16
- @tmpdir = Dir.mktmpdir([name, timestamp])
16
+ Outback.info "Using working directory #{configuration.tmpdir}" if configuration.tmpdir
17
+ @tmpdir = Dir.mktmpdir([name, timestamp], configuration.tmpdir)
17
18
  @archives = create_archives
18
19
  Outback.info "Created #{@archives.size} archives"
19
20
  store_archives
@@ -41,4 +42,4 @@ module Outback
41
42
  end
42
43
 
43
44
  end
44
- end
45
+ end
@@ -42,6 +42,18 @@ module Outback
42
42
  return error('moving target must be defined last') if moving_targets.first && moving_targets.first != targets.last
43
43
  true
44
44
  end
45
+
46
+ def tmpdir(*args)
47
+ if args.empty?
48
+ @tmpdir
49
+ elsif args.size == 1
50
+ dir = Pathname.new(args.first).realpath
51
+ raise(ConfigurationError.new("tmpdir #{dir} is no directory")) unless dir.directory?
52
+ @tmpdir = dir
53
+ else
54
+ raise ConfigurationError.new("tmpdir: wrong number of arguments(#{args.size} for 1)")
55
+ end
56
+ end
45
57
 
46
58
  protected
47
59
 
@@ -52,7 +64,7 @@ module Outback
52
64
  def target(type, *args, &block)
53
65
  "Outback::#{type.to_s.classify}Target".constantize.configure(*args, &block).tap { |instance| targets << instance }
54
66
  end
55
-
67
+
56
68
  def error(message)
57
69
  errors << ConfigurationError.new(message)
58
70
  false
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: outback
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.13
4
+ version: 0.0.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-01-10 00:00:00.000000000 Z
13
+ date: 2012-08-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: s3
17
- requirement: !ruby/object:Gem::Requirement
17
+ requirement: &2151929740 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,15 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ! '>='
29
- - !ruby/object:Gem::Version
30
- version: '0'
25
+ version_requirements: *2151929740
31
26
  - !ruby/object:Gem::Dependency
32
27
  name: activesupport
33
- requirement: !ruby/object:Gem::Requirement
28
+ requirement: &2151929000 !ruby/object:Gem::Requirement
34
29
  none: false
35
30
  requirements:
36
31
  - - ! '>='
@@ -38,12 +33,7 @@ dependencies:
38
33
  version: 3.0.0
39
34
  type: :runtime
40
35
  prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ! '>='
45
- - !ruby/object:Gem::Version
46
- version: 3.0.0
36
+ version_requirements: *2151929000
47
37
  description: A Ruby backup tool
48
38
  email: admin@onrooby.com
49
39
  executables:
@@ -51,29 +41,29 @@ executables:
51
41
  extensions: []
52
42
  extra_rdoc_files: []
53
43
  files:
44
+ - lib/outback/archive.rb
45
+ - lib/outback/backup.rb
46
+ - lib/outback/cli.rb
47
+ - lib/outback/configuration.rb
48
+ - lib/outback/configuration_error.rb
54
49
  - lib/outback/directory_archive.rb
55
- - lib/outback/local_archive.rb
56
- - lib/outback/s3_archive.rb
50
+ - lib/outback/directory_source.rb
57
51
  - lib/outback/directory_target.rb
52
+ - lib/outback/local_archive.rb
58
53
  - lib/outback/mysql_source.rb
59
- - lib/outback/configuration.rb
60
- - lib/outback/configuration_error.rb
61
- - lib/outback/backup.rb
62
- - lib/outback/support/mysql_ext.rb
63
- - lib/outback/support/returning.rb
64
- - lib/outback/support/pathname_ext.rb
54
+ - lib/outback/s3_archive.rb
55
+ - lib/outback/s3_target.rb
56
+ - lib/outback/source.rb
65
57
  - lib/outback/support/attr_setter.rb
66
58
  - lib/outback/support/configurable.rb
67
- - lib/outback/cli.rb
68
- - lib/outback/archive.rb
69
- - lib/outback/source.rb
70
- - lib/outback/directory_source.rb
71
- - lib/outback/vendor/mysql.rb
72
- - lib/outback/vendor/methodphitamine.rb
73
- - lib/outback/vendor/metaclass.rb
74
- - lib/outback/temp_archive.rb
75
- - lib/outback/s3_target.rb
59
+ - lib/outback/support/mysql_ext.rb
60
+ - lib/outback/support/pathname_ext.rb
61
+ - lib/outback/support/returning.rb
76
62
  - 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
77
67
  - lib/outback.rb
78
68
  - bin/outback
79
69
  - MIT-LICENSE
@@ -100,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
90
  version: '0'
101
91
  requirements: []
102
92
  rubyforge_project:
103
- rubygems_version: 1.8.23
93
+ rubygems_version: 1.8.11
104
94
  signing_key:
105
95
  specification_version: 3
106
96
  summary: Ruby Backup Tool