tddium-preview 0.6.5 → 0.6.6
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.
- data/Gemfile.lock +1 -1
- data/lib/tddium/version.rb +1 -1
- data/lib/tddium.rb +7 -8
- data/spec/tddium_spec.rb +2 -0
- metadata +1 -1
data/Gemfile.lock
CHANGED
data/lib/tddium/version.rb
CHANGED
data/lib/tddium.rb
CHANGED
@@ -448,10 +448,10 @@ class Tddium < Thor
|
|
448
448
|
def handle_heroku_user(options, heroku_config)
|
449
449
|
api_key = heroku_config['TDDIUM_API_KEY']
|
450
450
|
user = tddium_client.call_api(:get, Api::Path::USERS, {}, api_key) rescue nil
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
451
|
+
exit_failure Text::Error::HEROKU_MISCONFIGURED % "Unrecognized user" unless user
|
452
|
+
say Text::Process::HEROKU_WELCOME % heroku_config['TDDIUM_USER_NAME']
|
453
|
+
|
454
|
+
if user["user"]["heroku_needs_activation"] == true
|
455
455
|
params = get_user_credentials(:email => heroku_config['TDDIUM_USER_NAME'])
|
456
456
|
params.delete(:email)
|
457
457
|
params[:password_confirmation] = HighLine.ask(Text::Prompt::PASSWORD_CONFIRMATION) { |q| q.echo = "*" }
|
@@ -460,16 +460,15 @@ class Tddium < Thor
|
|
460
460
|
begin
|
461
461
|
user_id = user["user"]["id"]
|
462
462
|
result = tddium_client.call_api(:put, "#{Api::Path::USERS}/#{user_id}/", {:user=>params, :heroku_activation=>true}, api_key)
|
463
|
-
write_api_key(user["user"]["api_key"])
|
464
|
-
say Text::Status::HEROKU_CONFIG
|
465
463
|
rescue TddiumClient::Error::API => e
|
466
464
|
exit_failure Text::Error::HEROKU_MISCONFIGURED % e
|
467
465
|
rescue TddiumClient::Error::Base => e
|
468
466
|
exit_failure Text::Error::HEROKU_MISCONFIGURED % e
|
469
467
|
end
|
470
|
-
else
|
471
|
-
exit_failure Text::Error::HEROKU_MISCONFIGURED % "Unrecognized user"
|
472
468
|
end
|
469
|
+
|
470
|
+
write_api_key(user["user"]["api_key"])
|
471
|
+
say Text::Status::HEROKU_CONFIG
|
473
472
|
end
|
474
473
|
|
475
474
|
def login_user(options = {})
|
data/spec/tddium_spec.rb
CHANGED