suspenders-ocs 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/suspenders/adapters/heroku.rb +10 -0
- data/lib/suspenders/version.rb +1 -1
- 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: 78fa5c855764749dba3f1b6fc38a21fa6678d475
|
4
|
+
data.tar.gz: 266bfe793fc87feda45fbaefc23cfb93161d4403
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e91f503f613eb80d299a2f21c420b143fc646f33a3102deac44755f3a014dbca29d89674776c2d9a4155845d024582cd1c772f8341fe4aade7e19a0af19701f
|
7
|
+
data.tar.gz: 0de8f10b9855cc50fef7c44e415ac17f892bc3ab9ad7211db6f858f39e9cc8d4d81dd9a9dd1d73cbb6e7e5541c3d88fd3283f890398bd7f895effa99e545bee8
|
@@ -30,12 +30,14 @@ module Suspenders
|
|
30
30
|
|
31
31
|
run_toolbelt_command "create #{app_name} #{flags}", "staging"
|
32
32
|
run_toolbelt_command "config:add #{rack_env}", "staging"
|
33
|
+
run_toolbelt_command "config:set #{smtp_config_vars('staging')}", "staging"
|
33
34
|
end
|
34
35
|
|
35
36
|
def create_production_heroku_app(flags)
|
36
37
|
app_name = heroku_app_name_for("production")
|
37
38
|
|
38
39
|
run_toolbelt_command "create #{app_name} #{flags}", "production"
|
40
|
+
run_toolbelt_command "config:set #{smtp_config_vars('production')}", "production"
|
39
41
|
end
|
40
42
|
|
41
43
|
def set_heroku_rails_secrets
|
@@ -115,6 +117,14 @@ fi
|
|
115
117
|
SecureRandom.hex(64)
|
116
118
|
end
|
117
119
|
|
120
|
+
def smtp_config_vars(heroku_env)
|
121
|
+
predefined = "SMTP_ADDRESS=smtp.sendgrid.com SMTP_DOMAIN=heroku.com"
|
122
|
+
smtp_password = "SMTP_PASSWORD=`heroku config:get SENDGRID_PASSWORD -r #{heroku_env}`"
|
123
|
+
smtp_username = "SMTP_USERNAME=`heroku config:get SENDGRID_USERNAME -r #{heroku_env}`"
|
124
|
+
|
125
|
+
"#{predefined} #{smtp_password} #{smtp_username}"
|
126
|
+
end
|
127
|
+
|
118
128
|
def run_toolbelt_command(command, environment)
|
119
129
|
app_builder.run(
|
120
130
|
"heroku #{command} --remote #{environment}",
|
data/lib/suspenders/version.rb
CHANGED