Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

Commit

Permalink
Bug 982135 - Namespace optional should affect the message displayed
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Jul 9, 2013
1 parent 93edcae commit 24bc69b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions lib/rhc/wizard.rb
Expand Up @@ -382,11 +382,11 @@ def config_namespace_stage
warn "none"

paragraph do
say "Your namespace is unique to your account and is the suffix of the " \
"public URLs we assign to your applications. You may configure your " \
"namespace here or leave it blank and use 'rhc create-domain' to " \
"create a namespace later. You will not be able to create " \
"applications without first creating a namespace."
say [
"Your namespace is unique to your account and is the suffix of the public URLs we assign to your applications.",
("You may configure your namespace here or leave it blank and use 'rhc create-domain' to create a namespace later." if namespace_optional?),
"You will not be able to create applications without first creating a namespace.",
].compact.join(' ')
end

ask_for_namespace
Expand Down Expand Up @@ -592,6 +592,11 @@ def stages
def finalize_stage
true
end

protected
def namespace_optional?
false
end
end

class DomainWizard < Wizard
Expand Down
2 changes: 1 addition & 1 deletion spec/rhc/commands/app_spec.rb
Expand Up @@ -163,7 +163,7 @@
before{ rest_client.domains.clear }
let(:arguments) { ['app', 'create', 'app1', 'mock_standalone_cart-1'] }
# skips login stage and insecure check because of mock rest client, doesn't check keys
it { run_output(['mydomain', 'y', 'mykey']).should match(/This wizard.*Checking your namespace.*Your domain name 'mydomain' has been successfully created.*Creating application.*Your public SSH key.*Uploading key 'mykey'.*Your application 'app1' is now available.*Cloned to/m) }
it { run_output(['mydomain', 'y', 'mykey']).should match(/This wizard.*Checking your namespace.*assign to your applications\. You will not be able to create applications without first creating a namespace.*Your domain name 'mydomain' has been successfully created.*Creating application.*Your public SSH key.*Uploading key 'mykey'.*Your application 'app1' is now available.*Cloned to/m) }
end

context 'when run without a cart' do
Expand Down

0 comments on commit 24bc69b

Please sign in to comment.