crashbreak 0.9.8 → 0.9.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/crashbreak/version.rb +1 -1
- data/lib/dumpers/database_dumper.rb +6 -9
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4df45d34d6e9036c52b70b7c7719925cd7204228
|
4
|
+
data.tar.gz: fd14f19299eb5dab7082000818db713f714d1e76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b59aa2de3910274e2c670487634f4f0dbed9ce987b3f3a55fda5c698c741b86a81dc508e31066eeefb7ef0349ca9db3c31eaef115dce9351e3a542827f1cdfa
|
7
|
+
data.tar.gz: 5d7fdc4a29c2e1407815148d094b76ef86885cf7900acaedecc4f0e4966d86c7304ef8fd2ce5516b2fd5be610c05ac9dff4bc1a44afb6b643c8e301ef1d050e3
|
data/lib/crashbreak/version.rb
CHANGED
@@ -5,7 +5,7 @@ module Crashbreak
|
|
5
5
|
def dump
|
6
6
|
dump_database
|
7
7
|
prepare_aws
|
8
|
-
upload_dump
|
8
|
+
aws_file_name = upload_dump
|
9
9
|
remove_locally_dump
|
10
10
|
{ file_name: aws_file_name }
|
11
11
|
end
|
@@ -17,15 +17,17 @@ module Crashbreak
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def upload_dump
|
20
|
-
|
20
|
+
generate_aws_file_name.tap do |aws_file_name|
|
21
|
+
client.put_object(bucket: bucket_name, key: aws_file_name, body: File.read(dump_location))
|
22
|
+
end
|
21
23
|
end
|
22
24
|
|
23
25
|
def remove_locally_dump
|
24
26
|
File.delete(dump_location)
|
25
27
|
end
|
26
28
|
|
27
|
-
def
|
28
|
-
|
29
|
+
def generate_aws_file_name
|
30
|
+
"Crashbreak - database dump #{DateTime.now.utc}"
|
29
31
|
end
|
30
32
|
|
31
33
|
def dump_location
|
@@ -35,10 +37,5 @@ module Crashbreak
|
|
35
37
|
def dump_command
|
36
38
|
Crashbreak.configure.dumper_options[:dump_command]
|
37
39
|
end
|
38
|
-
|
39
|
-
def unique_string
|
40
|
-
o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten
|
41
|
-
(0...50).map { o[rand(o.length)] }.join
|
42
|
-
end
|
43
40
|
end
|
44
41
|
end
|