Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Fixed #650: make sure server-version gets defaulted properly in all cases #769

Merged

Conversation

grtjn
Copy link
Contributor

@grtjn grtjn commented May 28, 2017

Fixes #650

@grtjn grtjn added this to the May 2017 milestone May 28, 2017
@grtjn grtjn force-pushed the 650-prompt-server-version branch from d365aa7 to 31c64c2 Compare May 31, 2017 17:18
@grtjn
Copy link
Contributor Author

grtjn commented May 31, 2017

There was a merge conflict, but I resolved that with git rebase..

@grtjn
Copy link
Contributor Author

grtjn commented May 31, 2017

To test this, run ./ml new with and without --server-version, with and without --no-prompt, and when prompted both try entering a number as well as just hitting enter.

@grtjn grtjn modified the milestones: May 2017, July 2017 Jun 6, 2017
end
if server_version == 0
puts "Defaulting to 8.."
server_version = 8
Copy link
Contributor

@RobertSzkutak RobertSzkutak Jun 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we default to 9?

@@ -318,15 +318,19 @@ def self.initcpf
def self.prompt_server_version
if @@no_prompt
puts 'Required option --server-version=[version] not specified with valid value,
but --no-prompt parameter prevents prompting for password. Assuming 8.'
but --no-prompt parameter prevents prompting for password.'
server_version = 0
else
puts 'Required option --server-version=[version] not specified with valid value.

What is the version number of the target MarkLogic server? [5, 6, 7, 8, or 9]'
Copy link
Contributor

@RobertSzkutak RobertSzkutak Jun 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change this to only say 7, 8, or 9? Perhaps throw an error or warning if something lower than 7 is used?

@grtjn
Copy link
Contributor Author

grtjn commented Jun 11, 2017

Makes sense, I'll look into it tomorrow..

@grtjn grtjn force-pushed the 650-prompt-server-version branch from 31c64c2 to e6f72cc Compare June 12, 2017 08:38
@grtjn
Copy link
Contributor Author

grtjn commented Jun 12, 2017

What do you think of this? The warning is printed each time a command with an env is used if I am not mistaken. Should we add an option to silence the warning? The one for old Ruby is also always shown I think..

@RobertSzkutak
Copy link
Contributor

Looks good to me!

@RobertSzkutak RobertSzkutak merged commit c290907 into marklogic-community:dev Jun 13, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants