backup2everbox 0.1.3 → 0.2.0

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.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- backup2everbox (0.1.3)
4
+ backup2everbox (0.2.0)
5
5
  activesupport
6
6
  backup (~> 3.0)
7
7
  launchy
@@ -1,3 +1,6 @@
1
+ === 0.2.0 / 2012-08-26
2
+ * support cycling
3
+
1
4
  === 0.1.3 / 2012-08-22
2
5
  * fix crash (again).
3
6
 
data/README.md CHANGED
@@ -25,6 +25,7 @@
25
25
  add following code to your ~/Backup/models/foo.rb
26
26
  ##################################################
27
27
  store_with Everbox do |eb|
28
+ eb.keep = 7
28
29
  eb.token = '1234567890abcdefgh'
29
30
  eb.secret = 'hgfedcba0987654321'
30
31
  end
@@ -51,6 +52,7 @@
51
52
  end
52
53
 
53
54
  store_with Everbox do |eb|
55
+ eb.keep = 7
54
56
  eb.token = '1234567890abcdefgh'
55
57
  eb.secret = 'hgfedcba0987654321'
56
58
  end
@@ -95,8 +95,7 @@ module Backup
95
95
  when "200"
96
96
  true
97
97
  else
98
- nil
99
- #raise "delete failed: #{response}"
98
+ raise "delete failed: #{response}"
100
99
  end
101
100
  end
102
101
 
@@ -15,11 +15,16 @@ module Backup
15
15
  instance_eval(&block) if block_given?
16
16
  end
17
17
 
18
+ def remove!(pkg)
19
+ remote_path = remote_path_for(pkg)
20
+ Logger.message "#{storage_name} started removing " +
21
+ "'#{ remote_path }'."
22
+ connection.session.delete(remote_path)
23
+ end
24
+
18
25
  def transfer!
19
26
  remote_path = remote_path_for(@package)
20
27
 
21
- connection = Backup::Connection::Everbox.new(token, secret)
22
-
23
28
  files_to_transfer_for(@package) do |local_file, remote_file|
24
29
  Logger.message "#{storage_name} started transferring " +
25
30
  "'#{ local_file }'."
@@ -38,6 +43,10 @@ module Backup
38
43
  end
39
44
  end
40
45
 
46
+ private
47
+ def connection
48
+ @connection ||= Backup::Connection::Everbox.new(token, secret)
49
+ end
41
50
  end
42
51
  end
43
52
  end
@@ -33,6 +33,7 @@ module Backup2everbox
33
33
  puts "add following code to your ~/Backup/models/foo.rb"
34
34
  puts "#" * 50
35
35
  puts " store_with Everbox do |eb|"
36
+ puts " eb.keep = 7"
36
37
  puts " eb.token = '#{access_token.token}'"
37
38
  puts " eb.secret = '#{access_token.secret}'"
38
39
  puts " end"
@@ -1,3 +1,3 @@
1
1
  module Backup2everbox
2
- VERSION = "0.1.3"
2
+ VERSION = "0.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backup2everbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.2.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-22 00:00:00.000000000 Z
12
+ date: 2012-08-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: backup
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
196
196
  version: '0'
197
197
  segments:
198
198
  - 0
199
- hash: 3450040392433416965
199
+ hash: -3041682065296939570
200
200
  required_rubygems_version: !ruby/object:Gem::Requirement
201
201
  none: false
202
202
  requirements:
@@ -205,7 +205,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
205
205
  version: '0'
206
206
  segments:
207
207
  - 0
208
- hash: 3450040392433416965
208
+ hash: -3041682065296939570
209
209
  requirements: []
210
210
  rubyforge_project: backup2everbox
211
211
  rubygems_version: 1.8.23