aldagai 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/README.md +27 -25
- data/lib/aldagai/colors.rb +6 -10
- data/lib/aldagai/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: dbf48e4b2d9359a9f42a03ca50ac4daedf276f3972408b13a62ccb6e3ce5a4aa
|
4
|
+
data.tar.gz: 450197a8ae663e823e8cf37156fc6a893b9d93486f445d23075d1b0b36a6b14a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 47c028e5236125cd4ea9d82c5420b046ca134640bc5417e7446d81f3923b120ba5c6a3e33d8bf372407dc69b02a0bafd19955a3d9c21b875d45114d5e78eda60
|
7
|
+
data.tar.gz: b4b248efbde229badfbe3705332b97c42c6068a708431581a6f0d001dd3b7f72771f6afbbeeacbcad49999fb7d2a1c3ab34c6c2290d2205ac95b31662a6792cb
|
data/README.md
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
-
The aim of this gem is to help developers
|
1
|
+
The aim of this gem is to help developers promote Heroku variables during the deployment process.
|
2
2
|
|
3
3
|
## Getting Started
|
4
4
|
|
5
|
-
*
|
5
|
+
* By default we assume that your Heroku pipeline has three different environments: development, staging and production.
|
6
|
+
|
7
|
+
* Add aldagai to your Gemfile
|
6
8
|
|
7
9
|
```
|
8
10
|
source 'https://rubygems.org'
|
@@ -12,33 +14,33 @@ The aim of this gem is to help developers promoting heroku variables during the
|
|
12
14
|
gem 'aldagai', '0.1.1'
|
13
15
|
```
|
14
16
|
|
15
|
-
*
|
17
|
+
* Install aldagai in your application by running the following command:
|
16
18
|
|
17
19
|
$ bundle exec aldagai install
|
18
20
|
|
19
|
-
|
20
|
-
|
21
|
-
`.aldagai.secret` to your `.gitignore` file.
|
21
|
+
The command creates an `.aldagai.secret` file for each one of the development environments containing the secret key used to encrypt your variables. And finally it adds `.aldagai.secret`
|
22
|
+
to your `.gitignore` file.
|
22
23
|
|
23
|
-
*
|
24
|
-
that you have
|
25
|
-
|
24
|
+
* Manually add a new environment variable to each one of your applications in the pipeline with the name
|
25
|
+
`ALDAGAI_SECRET` containing the same string that you have on the file `.aldagai.secret`. You could run the following
|
26
|
+
command to achieve that, or use the Heroku web panel.
|
26
27
|
|
27
28
|
$ heroku config:set ALDAGAI_SECRET="MySuperSecretPasswordUsingForEncryptTheMessage" -a yourapp
|
28
29
|
|
29
|
-
* Generate a new
|
30
|
+
* Generate a new API token to intereact with Heroku API
|
30
31
|
|
31
32
|
$ heroku plugins:install heroku-cli-oauth
|
32
33
|
$ heroku authorizations:create -d "YouApp"
|
33
34
|
|
34
|
-
*
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
example `development`.
|
35
|
+
* Manually add new environment variables to intereact with heroku API.
|
36
|
+
- One named `ALDAGAI_HEROKU_TOKEN` with the value that was generated by the previous step
|
37
|
+
- Another one named `ALDAGAI_APP_NAME` with the name of the application in Heroku
|
38
|
+
- Finally one named `ALDAGAI_PIPELINE_ENV` indicating the environment of the pipeline, e.g.: `development`.
|
39
39
|
|
40
40
|
### Aldagai Generators
|
41
41
|
|
42
|
+
TODO
|
43
|
+
|
42
44
|
#### install
|
43
45
|
|
44
46
|
$ bundle exec aldagai install
|
@@ -47,7 +49,7 @@ Install aldagai on your application
|
|
47
49
|
|
48
50
|
### Aldagai Commands
|
49
51
|
|
50
|
-
A list of all commands available
|
52
|
+
A list of all commands available in aldagai with their different options
|
51
53
|
|
52
54
|
#### add
|
53
55
|
|
@@ -56,29 +58,29 @@ A list of all commands available through aldagai with their different options
|
|
56
58
|
$ bundle exec aldagai add VARIABLE_NAME --values 1 2 3
|
57
59
|
|
58
60
|
Values are the variables that are going to be promoted to the different environments (by default we
|
59
|
-
use 3 environments development, staging, and production)
|
61
|
+
use 3 environments development, staging, and production).
|
60
62
|
|
61
63
|
*Interactive Mode*
|
62
64
|
|
63
65
|
$ export EDITOR=vim
|
64
66
|
$ bundle exec aldagai add VARIABLE_NAME -i
|
65
67
|
|
66
|
-
Variables values are obtained from what you type on your prefered editor
|
67
|
-
blank line.
|
68
|
+
Variables values are obtained from what you type on your prefered editor.
|
69
|
+
Values are separated by a blank line.
|
68
70
|
|
69
71
|
#### show
|
70
72
|
|
71
73
|
$ bundle exec aldagai show VARIABLE_NAME
|
72
74
|
|
73
|
-
|
74
|
-
modified, this is checked locally)
|
75
|
+
Shows the VARIABLE_NAME if that variable is going to be deployed (either if it's going to be removed or
|
76
|
+
modified, this is checked locally).
|
75
77
|
|
76
78
|
#### list
|
77
79
|
|
78
80
|
$ bundle exec aldagai list
|
79
81
|
|
80
|
-
|
81
|
-
is checked locally)
|
82
|
+
Shows all variables that are going to be deployed (either if they are going to be removed or modified, this
|
83
|
+
is checked locally),
|
82
84
|
|
83
85
|
#### delete
|
84
86
|
|
@@ -88,6 +90,6 @@ Enqueue a variable to be deleted.
|
|
88
90
|
|
89
91
|
#### clear
|
90
92
|
|
91
|
-
Clear all
|
93
|
+
Clear all files, creating a new start point for the next deploy.
|
92
94
|
|
93
|
-
|
95
|
+
NOTE: Variables that are already deployed and are identical to what it's setted on Heroku are not going to be promoted.
|
data/lib/aldagai/colors.rb
CHANGED
@@ -4,31 +4,27 @@ module Aldagai
|
|
4
4
|
refine String do
|
5
5
|
|
6
6
|
def red
|
7
|
-
|
7
|
+
"\e[31m#{self}\e[0m"
|
8
8
|
end
|
9
9
|
|
10
10
|
def green
|
11
|
-
|
11
|
+
"\e[32m#{self}\e[0m"
|
12
12
|
end
|
13
13
|
|
14
14
|
def yellow
|
15
|
-
|
15
|
+
"\e[33m#{self}\e[0m"
|
16
16
|
end
|
17
17
|
|
18
18
|
def blue
|
19
|
-
|
19
|
+
"\e[34m#{self}\e[0m"
|
20
20
|
end
|
21
21
|
|
22
22
|
def pink
|
23
|
-
|
23
|
+
"\e[35m#{self}\e[0m"
|
24
24
|
end
|
25
25
|
|
26
26
|
def light_blue
|
27
|
-
|
28
|
-
end
|
29
|
-
|
30
|
-
def colorize(color_code)
|
31
|
-
"\e[#{color_code}m#{self}\e[0m"
|
27
|
+
"\e[36m#{self}\e[0m"
|
32
28
|
end
|
33
29
|
|
34
30
|
end
|
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.3
|
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-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: platform-api
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.7.3
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: Promote environment variables on heroku
|