8000 Specify version constraint in subcommand error message. by parkr · Pull Request #5974 · jekyll/jekyll · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Specify version constraint in subcommand error message. #5974

8000
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2017

Conversation

parkr
Copy link
Member
@parkr parkr commented Mar 22, 2017

This clarifies the following error message:

You must install the 'jekyll-docs' gem to use the 'jekyll docs' command.

by including the required version

You must install the 'jekyll-docs' gem version = 3.4.0 to use the 'jekyll docs' command.

This removes ambiguity.

The technical solution is no fun (makes "magical" assumptions) but I
couldn't get the RubyGems Gem API to play nice and tell me what
constraint is required. Does anyone else know how to do that?

/cc @jekyll/stability

This clarifies the following error message:

    You must install the 'jekyll-docs' gem to use the 'jekyll docs' command.

by including the required version

    You must install the 'jekyll-docs' gem version = 3.4.0 to use the 'jekyll docs' command.

This removes ambiguity.
@parkr parkr force-pushed the jekylldocserrormessage branch from 7911e8d to 14df2b6 Compare March 22, 2017 19:02
@ashmaroli
Copy link
Member

Request: Can the message from exe/jekyll be:

You must install the 'jekyll-docs' gem v3.4.0 to use the 'jekyll docs' command.

@parkr
Copy link
Member Author
parkr commented Mar 22, 2017

Request: Can the message from exe/jekyll be:

@ashmaroli Can you please support that request with motivation?

@ashmaroli
Copy link
Member

Can you please support that request with motivation?

Um, just a personal nit, I gez.. Nevermind then.

@ashmaroli
Copy link
Member

A method to get the version constraint of a given gem and dependency:

def version_constraint(gem_name, dep_name)
  deps = Gem::Specification.find_by_name(gem_name.to_s).runtime_dependencies
  deps.find { |d| d.name == dep_name.to_s }.requirements_list.join(", ")
end

# version_constraint("jekyll-docs", "jekyll")
# => "= 3.4.0"

@parkr
Copy link
Member Author
parkr commented Mar 31, 2017

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit b807799 into master Mar 31, 2017
@jekyllbot jekyllbot deleted the jekylldocserrormessage branch March 31, 2017 05:31
jekyllbot added a commit that referenced this pull request Mar 31, 2017
@jekyll jekyll locked and limited conversation to collaborators Jul 11, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0