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

Specify version constraint in subcommand error message. #5974

Merged
merged 1 commit into from Mar 31, 2017

Conversation

Projects
None yet
4 participants
@parkr
Member

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

Specify version constraint in subcommand error message.
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.
@ashmaroli

This comment has been minimized.

Show comment
Hide comment
@ashmaroli

ashmaroli Mar 22, 2017

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.
Member

ashmaroli commented Mar 22, 2017

Request: Can the message from exe/jekyll be:

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

DirtyF approved these changes Mar 22, 2017

@parkr

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 22, 2017

Member

Request: Can the message from exe/jekyll be:

@ashmaroli Can you please support that request with motivation?

Member

parkr commented Mar 22, 2017

Request: Can the message from exe/jekyll be:

@ashmaroli Can you please support that request with motivation?

@ashmaroli

This comment has been minimized.

Show comment
Hide comment
@ashmaroli

ashmaroli Mar 23, 2017

Member

Can you please support that request with motivation?

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

Member

ashmaroli commented Mar 23, 2017

Can you please support that request with motivation?

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

@ashmaroli

This comment has been minimized.

Show comment
Hide comment
@ashmaroli

ashmaroli Mar 23, 2017

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"
Member

ashmaroli commented Mar 23, 2017

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

This comment has been minimized.

Show comment
Hide comment
@parkr

parkr Mar 31, 2017

Member

@jekyllbot: merge +minor

Member

parkr commented Mar 31, 2017

@jekyllbot: merge +minor

@jekyllbot jekyllbot merged commit b807799 into master Mar 31, 2017

1 of 2 checks passed

continuous-integration/appveyor/pr AppVeyor build failed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jekyllbot jekyllbot deleted the jekylldocserrormessage branch Mar 31, 2017

jekyllbot added a commit that referenced this pull request Mar 31, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment