shards 1.1.0 → 1.1.1
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/settings/workflow.yaml +3 -51
- data/lib/shards/version.rb +1 -1
- data/lib/shards/workflow/base.rb +3 -2
- data/lib/shards/workflow/fast_terminal.rb +0 -2
- data/lib/shards/workflow/terminal.rb +0 -2
- 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: 04e94a12604d93f46937a5ad4f133295a19d6b5d
|
4
|
+
data.tar.gz: 1756072e402d29ffe485feb979f09729276f0563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0a8b7d955ba86722b16ed49c16cd7e60169ae5f06c0ef046ebd0a292d60f84f062170bbe68ac53bdf662cc7b404208d411586ed57ae683f46673daffa5e69cf1
|
7
|
+
data.tar.gz: 95bd7f3d81e68cba4ff52f67f403ec3fa07253ba772891b20765d2b59d34bc9d88f1f780be4300952fdd1ac3d306d328d202836823364a25a00c06da7f3476db
|
data/Gemfile.lock
CHANGED
data/lib/settings/workflow.yaml
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
---
|
2
|
+
# see shared_steps to find the steps not defined in a workflow
|
2
3
|
terminal:
|
3
4
|
|
4
5
|
ask_client:
|
@@ -28,50 +29,6 @@ terminal:
|
|
28
29
|
min_size: 3
|
29
30
|
regex: ^[a-zA-Z0-9_]*$
|
30
31
|
|
31
|
-
check_shard_presence_in_shards:
|
32
|
-
wrong_message: The shard %s exists in shards.
|
33
|
-
correct: check_database_presence_in_server
|
34
|
-
wrong: finish
|
35
|
-
|
36
|
-
check_database_presence_in_server:
|
37
|
-
wrong_message: The database %s exists in server %s.
|
38
|
-
correct: check_domain_dns_presence
|
39
|
-
wrong: finish
|
40
|
-
|
41
|
-
check_domain_dns_presence:
|
42
|
-
wrong_message: There is already a record for the host %s.
|
43
|
-
correct: check_domain_presence_in_sites
|
44
|
-
wrong: finish
|
45
|
-
|
46
|
-
check_domain_presence_in_sites:
|
47
|
-
wrong_message: The domain %s is already present in sites.
|
48
|
-
correct: write_yaml_files
|
49
|
-
wrong: finish
|
50
|
-
|
51
|
-
write_yaml_files:
|
52
|
-
question: Type Y to confirm the changes
|
53
|
-
wrong_message: Undo changes
|
54
|
-
correct: create_database
|
55
|
-
wrong: clean_repo_and_exit
|
56
|
-
|
57
|
-
create_database:
|
58
|
-
message: The database %s has been successfully created in %s.
|
59
|
-
wrong_message: Error. Couldn't create the database %s in %s.
|
60
|
-
correct: commit_changes
|
61
|
-
wrong: clean_repo_and_exit
|
62
|
-
|
63
|
-
commit_changes:
|
64
|
-
message: The changes has been committed and pushed to the remote repository.
|
65
|
-
wrong_message: We had an issue to commit and push the changes.
|
66
|
-
correct: dns_upsert
|
67
|
-
wrong: finish
|
68
|
-
|
69
|
-
dns_upsert:
|
70
|
-
message: The dns record with the host %s has been succesfully created.
|
71
|
-
wrong_message: Error. Could not register the host %s as a dns record.
|
72
|
-
correct: ask_for_exit_and_restart
|
73
|
-
wrong: finish
|
74
|
-
|
75
32
|
ask_for_exit_and_restart:
|
76
33
|
question: Type 'r' to restart the process, another key to finish.
|
77
34
|
wrong_message: Process Interrupted.
|
@@ -84,13 +41,6 @@ terminal:
|
|
84
41
|
wrong_message: Process Interrupted. Cleanning the repo and exit.
|
85
42
|
wrong: finish
|
86
43
|
|
87
|
-
clean_repo_and_exit:
|
88
|
-
wrong_message: Cuould not clean the repository.
|
89
|
-
correct: finish
|
90
|
-
|
91
|
-
finish:
|
92
|
-
correct: final_step
|
93
|
-
|
94
44
|
repeat_previous_method:
|
95
45
|
correct: repeat_previous_method
|
96
46
|
wrong: finish
|
@@ -121,6 +71,8 @@ fastterminal:
|
|
121
71
|
wrong_message: Stage %s does not exist.
|
122
72
|
wrong: clean_repo_and_exit
|
123
73
|
|
74
|
+
shared_steps:
|
75
|
+
|
124
76
|
check_shard_presence_in_shards:
|
125
77
|
wrong_message: The shard %s exists in shards.
|
126
78
|
correct: check_database_presence_in_server
|
data/lib/shards/version.rb
CHANGED
data/lib/shards/workflow/base.rb
CHANGED
@@ -6,7 +6,7 @@ module Shards
|
|
6
6
|
|
7
7
|
class Base
|
8
8
|
|
9
|
-
attr_accessor :yaml, :config, :flow, :pointer, :step, :answer, :pointer_history
|
9
|
+
attr_accessor :yaml, :config, :flow, :pointer, :step, :answer, :pointer_history, :client, :location, :stage, :domain, :site, :params
|
10
10
|
|
11
11
|
def initialize config
|
12
12
|
@config=config
|
@@ -25,7 +25,7 @@ module Shards
|
|
25
25
|
|
26
26
|
def start wf=nil
|
27
27
|
wf||=self.class.name.split('::').last.downcase
|
28
|
-
@flow=yaml[wf]
|
28
|
+
@flow=yaml[wf].merge yaml['shared_steps']
|
29
29
|
@pointer=flow.keys.first
|
30
30
|
run_step
|
31
31
|
end
|
@@ -142,6 +142,7 @@ module Shards
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def commit_changes
|
145
|
+
config.repo.client = client
|
145
146
|
puts config.repo.autocommit
|
146
147
|
end
|
147
148
|
|