aldagai 0.1.3 → 0.1.4
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/lib/aldagai/cli.rb +6 -0
- data/lib/aldagai/variable_managers/base.rb +28 -8
- data/lib/aldagai/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb35f3538e42738d6eee32f8333b4d9b441a6c61affaf42b9e8493a571166601
|
4
|
+
data.tar.gz: c54c427d29f6a1d95f3d16f174b67824b7a291787bc9a2132fc8eb65b6461d42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eab5a8a5bf31724acb6da103d98e9db5518d657e34ca27ac0ca4b978ca1350bb304528ba85a42f8fde139245f3a67a61d17c20d1a38f6a672a996a75f6e0615a
|
7
|
+
data.tar.gz: ade5e191ab987ee0a53b926a1be9e7f529e1e974e23634f06db0c465bf1bf9fbf09e7875f15dc1347e4853fb85c17579797b1f0eaa602d5e7fc20c3d10b8c124
|
data/lib/aldagai/cli.rb
CHANGED
@@ -95,18 +95,23 @@ module Aldagai
|
|
95
95
|
if lines.empty?
|
96
96
|
log_no_variables_promoted(ENV['ALDAGAI_PIPELINE_ENV'])
|
97
97
|
else
|
98
|
-
variables =
|
98
|
+
variables = get_variables_from_lines(lines)
|
99
99
|
|
100
|
-
|
101
|
-
|
102
|
-
|
100
|
+
heroku.config_var.update(ENV['ALDAGAI_APP_NAME'], variables)
|
101
|
+
end
|
102
|
+
end
|
103
103
|
|
104
|
-
|
104
|
+
def set_temp
|
105
|
+
lines = lines_for_environment(ENV['ALDAGAI_PIPELINE_ENV'])
|
105
106
|
|
106
|
-
|
107
|
-
|
107
|
+
if lines.empty?
|
108
|
+
log_no_variables_promoted(ENV['ALDAGAI_PIPELINE_ENV'])
|
109
|
+
else
|
110
|
+
variables = get_variables_from_lines(lines)
|
108
111
|
|
109
|
-
|
112
|
+
variables.each do |(key, value)|
|
113
|
+
ENV[key] = value
|
114
|
+
end
|
110
115
|
end
|
111
116
|
end
|
112
117
|
|
@@ -116,6 +121,21 @@ module Aldagai
|
|
116
121
|
DEFAULT_ENVIRONMENTS
|
117
122
|
end
|
118
123
|
|
124
|
+
def get_variables_from_lines(lines)
|
125
|
+
variables = {}
|
126
|
+
|
127
|
+
lines.each do |line|
|
128
|
+
name, value = line.split('=')
|
129
|
+
value = value_presence(value)
|
130
|
+
|
131
|
+
log_variable_was_added_or_removed(name, value)
|
132
|
+
|
133
|
+
variables.merge!({name => value})
|
134
|
+
end
|
135
|
+
|
136
|
+
variables
|
137
|
+
end
|
138
|
+
|
119
139
|
def rewrite_file_with_lines(environment, lines, &block)
|
120
140
|
open(environment_file(environment), 'w') do |file|
|
121
141
|
file.truncate(0)
|
data/lib/aldagai/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aldagai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pablo Ifran
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-05-
|
11
|
+
date: 2018-05-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|