s3snapshot 0.0.5 → 0.0.6
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/lib/s3snapshot/dir_upload.rb +9 -5
- data/lib/s3snapshot/version.rb +1 -1
- metadata +5 -5
@@ -16,7 +16,7 @@ module S3snapshot
|
|
16
16
|
super(aws_id, aws_key, bucket_name)
|
17
17
|
@local_dir = local_dir
|
18
18
|
@prefix = prefix
|
19
|
-
|
19
|
+
|
20
20
|
end
|
21
21
|
|
22
22
|
def upload
|
@@ -28,16 +28,20 @@ module S3snapshot
|
|
28
28
|
files = get_local_files
|
29
29
|
|
30
30
|
files.each do |file|
|
31
|
-
path = "#{prefix_path}/#{file[@local_dir.length
|
31
|
+
path = "#{prefix_path}/#{file[@local_dir.length..-1]}"
|
32
32
|
|
33
33
|
puts "uploading '#{file}' to '#{@bucket_name}/#{path}'"
|
34
|
-
|
34
|
+
|
35
|
+
File.open(file) do |file|
|
36
|
+
bucket.files.create(:key =>path, :body => file)
|
37
|
+
end
|
38
|
+
|
35
39
|
end
|
36
40
|
|
37
41
|
|
38
42
|
puts "Writing complete marker"
|
39
43
|
|
40
|
-
|
44
|
+
#Upload the complete marker
|
41
45
|
bucket.files.create(:key => complete_path(@prefix, start_time), :body => TimeFactory.utc_time.iso8601)
|
42
46
|
|
43
47
|
puts "backup complete!"
|
@@ -60,6 +64,6 @@ module S3snapshot
|
|
60
64
|
return files
|
61
65
|
end
|
62
66
|
|
63
|
-
|
67
|
+
|
64
68
|
end
|
65
69
|
end
|
data/lib/s3snapshot/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3snapshot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Todd
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-26 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: fog
|
@@ -123,7 +123,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
123
123
|
requirements: []
|
124
124
|
|
125
125
|
rubyforge_project: s3snapshot
|
126
|
-
rubygems_version: 1.8.
|
126
|
+
rubygems_version: 1.8.2
|
127
127
|
signing_key:
|
128
128
|
specification_version: 3
|
129
129
|
summary: Uploads to s3
|