shards 1.0.2 → 1.0.3
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/settings/workflow.yaml +22 -4
- data/lib/shards/version.rb +1 -1
- data/lib/shards/workflow/fast_terminal.rb +13 -22
- 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: f682cd536cd85467187d078ce7ff40db026ae5fd
|
|
4
|
+
data.tar.gz: b8bd5870c09c0b5f8a8b1128328cacd341b62249
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 427431a12c0e00156320910f355ce49bda25a6eed8df29f1cecc0d934d31750bf9ac0c8a0130473776b3b6b5220dc885af0e4be0a1b0c18d81c157d6011856a0
|
|
7
|
+
data.tar.gz: e442981b33fdb52863581d3f4c1586bfee28192e23373bcbc7d2ded01c6f9e22e1b402cdcf90bbb29e93ee3ab5c4d7f7caddfb47412d2dc49e763f0e630459e5
|
data/Gemfile.lock
CHANGED
data/lib/settings/workflow.yaml
CHANGED
|
@@ -85,6 +85,7 @@ terminal:
|
|
|
85
85
|
wrong: finish
|
|
86
86
|
|
|
87
87
|
clean_repo_and_exit:
|
|
88
|
+
wrong_message: Cuould not clean the repository.
|
|
88
89
|
correct: finish
|
|
89
90
|
|
|
90
91
|
finish:
|
|
@@ -97,12 +98,28 @@ terminal:
|
|
|
97
98
|
|
|
98
99
|
fastterminal:
|
|
99
100
|
|
|
100
|
-
|
|
101
|
+
validate_client:
|
|
102
|
+
correct: validate_domain
|
|
103
|
+
wrong: clean_repo_and_exit
|
|
104
|
+
wrong_message: The client name %s.
|
|
105
|
+
min_size: 2
|
|
106
|
+
|
|
107
|
+
validate_domain:
|
|
108
|
+
correct: validate_location
|
|
109
|
+
wrong: clean_repo_and_exit
|
|
110
|
+
wrong_message: The domain %s.
|
|
111
|
+
min_size: 3
|
|
112
|
+
regex: ^[a-zA-Z0-9_]*$
|
|
113
|
+
|
|
114
|
+
validate_location:
|
|
115
|
+
correct: validate_stage
|
|
116
|
+
wrong_message: Location %s does not exist.
|
|
117
|
+
wrong: clean_repo_and_exit
|
|
118
|
+
|
|
119
|
+
validate_stage:
|
|
101
120
|
correct: check_shard_presence_in_shards
|
|
121
|
+
wrong_message: Stage %s does not exist.
|
|
102
122
|
wrong: clean_repo_and_exit
|
|
103
|
-
client_min_size: 2
|
|
104
|
-
domain_min_size: 3
|
|
105
|
-
domain_regex: ^[a-zA-Z0-9_]*$
|
|
106
123
|
|
|
107
124
|
check_shard_presence_in_shards:
|
|
108
125
|
wrong_message: The shard %s exists in shards.
|
|
@@ -161,6 +178,7 @@ fastterminal:
|
|
|
161
178
|
wrong: finish
|
|
162
179
|
|
|
163
180
|
clean_repo_and_exit:
|
|
181
|
+
wrong_message: Cuould not clean the repository.
|
|
164
182
|
correct: finish
|
|
165
183
|
|
|
166
184
|
finish:
|
data/lib/shards/version.rb
CHANGED
|
@@ -8,44 +8,35 @@ module Shards
|
|
|
8
8
|
|
|
9
9
|
attr_accessor :client, :location, :stage, :domain, :site, :params
|
|
10
10
|
|
|
11
|
-
def
|
|
11
|
+
def validate_client
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
cli=params[:client]
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
validate_domain params[:domain]
|
|
17
|
-
validate_location params[:location]
|
|
18
|
-
validate_stage params[:stage]
|
|
19
|
-
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def validate_client cli
|
|
23
|
-
|
|
24
|
-
@wrong_text=false
|
|
25
|
-
|
|
26
|
-
validate_min_size cli, @step['client_min_size']
|
|
15
|
+
validate_min_size cli, step['min_size']
|
|
27
16
|
|
|
28
17
|
@client=cli.capitalize
|
|
29
18
|
|
|
30
19
|
end
|
|
31
20
|
|
|
32
|
-
def validate_location
|
|
33
|
-
|
|
21
|
+
def validate_location
|
|
22
|
+
loc=params[:location]
|
|
23
|
+
raise_wrong_text loc unless config.locations.keys.include? loc
|
|
34
24
|
@location=config.locations[loc]
|
|
35
25
|
end
|
|
36
26
|
|
|
37
|
-
def validate_stage
|
|
38
|
-
|
|
27
|
+
def validate_stage
|
|
28
|
+
st=params[:stage]
|
|
29
|
+
raise_wrong_text st unless location.stages.keys.include? st
|
|
39
30
|
@stage=location.stages[st]
|
|
40
31
|
end
|
|
41
32
|
|
|
42
|
-
def validate_domain
|
|
33
|
+
def validate_domain
|
|
43
34
|
|
|
44
|
-
|
|
35
|
+
domain_name=params[:domain]
|
|
45
36
|
|
|
46
|
-
validate_min_size domain_name,
|
|
37
|
+
validate_min_size domain_name, step['min_size']
|
|
47
38
|
|
|
48
|
-
validate_regex domain_name,
|
|
39
|
+
validate_regex domain_name, step['regex']
|
|
49
40
|
|
|
50
41
|
@domain=domain_name
|
|
51
42
|
|