shards 1.1.0 → 1.1.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37037b22f0fdc8d6a764b7c8f024a37028d6c602
4
- data.tar.gz: e4b7b43c2a57b6f533238b50f305511083bbe3ce
3
+ metadata.gz: 04e94a12604d93f46937a5ad4f133295a19d6b5d
4
+ data.tar.gz: 1756072e402d29ffe485feb979f09729276f0563
5
5
  SHA512:
6
- metadata.gz: 2e26efb01b969d05031d88940395a6f2383dddb3f5e99acc6fffdeb321f39e9179cbd6ac347bb238ab2d56c4083ee397a694677d50c366c002dcf7041911158c
7
- data.tar.gz: 94ee547cf43a8c96ede17f6d666b3e34864303bbd0781b702674815b75f04e0625b05696c6704408248f9843c175d777a9280fbc1f30560a98ef114d9ed5f139
6
+ metadata.gz: 0a8b7d955ba86722b16ed49c16cd7e60169ae5f06c0ef046ebd0a292d60f84f062170bbe68ac53bdf662cc7b404208d411586ed57ae683f46673daffa5e69cf1
7
+ data.tar.gz: 95bd7f3d81e68cba4ff52f67f403ec3fa07253ba772891b20765d2b59d34bc9d88f1f780be4300952fdd1ac3d306d328d202836823364a25a00c06da7f3476db
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- shards (1.1.0)
4
+ shards (1.1.1)
5
5
  aws-sdk-route53 (~> 1.9)
6
6
  dotenv (~> 2.4)
7
7
  git (~> 1.4)
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Shards
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
@@ -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
 
@@ -6,8 +6,6 @@ module Shards
6
6
 
7
7
  class FastTerminal < Shards::Workflow::Base
8
8
 
9
- attr_accessor :client, :location, :stage, :domain, :site, :params
10
-
11
9
  def validate_client
12
10
 
13
11
  cli=params[:client]
@@ -6,8 +6,6 @@ module Shards
6
6
 
7
7
  class Terminal < Shards::Workflow::Base
8
8
 
9
- attr_accessor :client, :location, :stage, :domain, :site
10
-
11
9
  def ask_client
12
10
 
13
11
  ask_question
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shards
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego PL