shards 2.2.3.pre.test → 2.2.4.pre.test
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/shards/version.rb +1 -1
- data/lib/shards/workflow/delete_by_api.rb +11 -11
- 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: 1486a7ef0de160d545393b15f763145a811c1390
|
4
|
+
data.tar.gz: 4c7adccdeac007811474302ba6779541399c8dd3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef87fb20e6d42ed8ffdc8de05dfd09f1a7068f0405a9ea57f4fb2e4ded1a46a7a68c9500ae1464f34049a81b9f253cae80077df1b4c330bc532d3ffb52ea991d
|
7
|
+
data.tar.gz: 0eac32267ddb7f6b3123097aee812190b98c99e888039d5ce5a6fa80ca6764edff21c809c4d43a46cd6a628c367e8e96b7e723dea04aae1fd06d3b208ac7df4f
|
data/Gemfile.lock
CHANGED
data/lib/shards/version.rb
CHANGED
@@ -23,7 +23,7 @@ module Shards
|
|
23
23
|
dns.delete
|
24
24
|
message_params= [dns.host_param, dns.resource_records.to_s]
|
25
25
|
raise_wrong_text message_params if dns.exist?
|
26
|
-
|
26
|
+
output_message step['message'] % message_params
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
@@ -46,11 +46,11 @@ module Shards
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def commit_changes
|
49
|
-
|
49
|
+
output_message config.repo.diff
|
50
50
|
config.repo.message = "Deleted site: #{params[:subdomain]} and shard: #{@shard_name} in #{location.name}"
|
51
51
|
config.repo.autocommit
|
52
|
-
|
53
|
-
|
52
|
+
output_message step['message']
|
53
|
+
output_message config.repo.message
|
54
54
|
end
|
55
55
|
|
56
56
|
def delete_database
|
@@ -65,24 +65,24 @@ module Shards
|
|
65
65
|
|
66
66
|
db.servers_to_drop.each do |host|
|
67
67
|
|
68
|
-
|
69
|
-
|
70
|
-
|
68
|
+
output_message "Database:\t #{database_to_drop}"
|
69
|
+
output_message "Host: \t #{host}"
|
70
|
+
output_message "Do you want to delete the above database? (y) to confirm, another string to not."
|
71
71
|
|
72
72
|
answer=$stdin.gets
|
73
73
|
|
74
74
|
if answer.chomp.downcase=='y'
|
75
|
-
|
75
|
+
output_message "DELETING database #{database_to_drop} in #{host}"
|
76
76
|
db.server=host
|
77
77
|
db.drop
|
78
78
|
else
|
79
|
-
|
79
|
+
output_message "KEEP database #{database_to_drop} in #{host}"
|
80
80
|
end
|
81
|
-
|
81
|
+
output_message "-" * 50
|
82
82
|
end
|
83
83
|
|
84
84
|
raise_wrong_text database_to_drop if db.exist? database_to_drop
|
85
|
-
|
85
|
+
output_message step['message'] % database_to_drop
|
86
86
|
|
87
87
|
else
|
88
88
|
output_message "The shard is in use by other site, will not be deleted"
|