{"action":"created","issue":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/5974","repository_url":"https://api.github.com/repos/jekyll/jekyll","labels_url":"https://api.github.com/repos/jekyll/jekyll/issues/5974/labels{/name}","comments_url":"https://api.github.com/repos/jekyll/jekyll/issues/5974/comments","events_url":"https://api.github.com/repos/jekyll/jekyll/issues/5974/events","html_url":"https://github.com/jekyll/jekyll/pull/5974","id":216160377,"number":5974,"title":"Specify version constraint in subcommand error message.","user":{"login":"parkr","id":237985,"avatar_url":"https://avatars3.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},"labels":[{"id":119844508,"url":"https://api.github.com/repos/jekyll/jekyll/labels/ux","name":"ux","color":"006b75","default":false}],"state":"open","locked":false,"assignee":{"login":"jekyllbot","id":6166343,"avatar_url":"https://avatars3.githubusercontent.com/u/6166343?v=3","gravatar_id":"","url":"https://api.github.com/users/jekyllbot","html_url":"https://github.com/jekyllbot","followers_url":"https://api.github.com/users/jekyllbot/followers","following_url":"https://api.github.com/users/jekyllbot/following{/other_user}","gists_url":"https://api.github.com/users/jekyllbot/gists{/gist_id}","starred_url":"https://api.github.com/users/jekyllbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekyllbot/subscriptions","organizations_url":"https://api.github.com/users/jekyllbot/orgs","repos_url":"https://api.github.com/users/jekyllbot/repos","events_url":"https://api.github.com/users/jekyllbot/events{/privacy}","received_events_url":"https://api.github.com/users/jekyllbot/received_events","type":"User","site_admin":false},"assignees":[{"login":"parkr","id":237985,"avatar_url":"https://avatars3.githubusercontent.com/u/237985?v=3","gravatar_id":"","url":"https://api.github.com/users/parkr","html_url":"https://github.com/parkr","followers_url":"https://api.github.com/users/parkr/followers","following_url":"https://api.github.com/users/parkr/following{/other_user}","gists_url":"https://api.github.com/users/parkr/gists{/gist_id}","starred_url":"https://api.github.com/users/parkr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/parkr/subscriptions","organizations_url":"https://api.github.com/users/parkr/orgs","repos_url":"https://api.github.com/users/parkr/repos","events_url":"https://api.github.com/users/parkr/events{/privacy}","received_events_url":"https://api.github.com/users/parkr/received_events","type":"User","site_admin":true},{"login":"jekyllbot","id":6166343,"avatar_url":"https://avatars3.githubusercontent.com/u/6166343?v=3","gravatar_id":"","url":"https://api.github.com/users/jekyllbot","html_url":"https://github.com/jekyllbot","followers_url":"https://api.github.com/users/jekyllbot/followers","following_url":"https://api.github.com/users/jekyllbot/following{/other_user}","gists_url":"https://api.github.com/users/jekyllbot/gists{/gist_id}","starred_url":"https://api.github.com/users/jekyllbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jekyllbot/subscriptions","organizations_url":"https://api.github.com/users/jekyllbot/orgs","repos_url":"https://api.github.com/users/jekyllbot/repos","events_url":"https://api.github.com/users/jekyllbot/events{/privacy}","received_events_url":"https://api.github.com/users/jekyllbot/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2017-03-22T18:09:34Z","updated_at":"2017-03-23T04:18:18Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/jekyll/jekyll/pulls/5974","html_url":"https://github.com/jekyll/jekyll/pull/5974","diff_url":"https://github.com/jekyll/jekyll/pull/5974.diff","patch_url":"https://github.com/jekyll/jekyll/pull/5974.patch"},"body":"This clarifies the following error message:\n\n    You must install the 'jekyll-docs' gem to use the 'jekyll docs' command.\n\nby including the required version\n\n    You must install the 'jekyll-docs' gem version = 3.4.0 to use the 'jekyll docs' command.\n\nThis removes ambiguity.\n\nThe technical solution is no fun (makes \"magical\" assumptions) but I\ncouldn't get the RubyGems `Gem` API to play nice and tell me what\nconstraint is required. Does anyone else know how to do that?\n\n/cc @jekyll/stability"},"comment":{"url":"https://api.github.com/repos/jekyll/jekyll/issues/comments/288613158","html_url":"https://github.com/jekyll/jekyll/pull/5974#issuecomment-288613158","issue_url":"https://api.github.com/repos/jekyll/jekyll/issues/5974","id":288613158,"user":{"login":"ashmaroli","id":12479464,"avatar_url":"https://avatars3.githubusercontent.com/u/12479464?v=3","gravatar_id":"","url":"https://api.github.com/users/ashmaroli","html_url":"https://github.com/ashmaroli","followers_url":"https://api.github.com/users/ashmaroli/followers","following_url":"https://api.github.com/users/ashmaroli/following{/other_user}","gists_url":"https://api.github.com/users/ashmaroli/gists{/gist_id}","starred_url":"https://api.github.com/users/ashmaroli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashmaroli/subscriptions","organizations_url":"https://api.github.com/users/ashmaroli/orgs","repos_url":"https://api.github.com/users/ashmaroli/repos","events_url":"https://api.github.com/users/ashmaroli/events{/privacy}","received_events_url":"https://api.github.com/users/ashmaroli/received_events","type":"User","site_admin":false},"created_at":"2017-03-23T04:18:18Z","updated_at":"2017-03-23T04:18:18Z","body":"A method to get the version constraint of a given gem and dependency:\r\n```ruby\r\ndef version_constraint(gem_name, dep_name)\r\n  deps = Gem::Specification.find_by_name(gem_name.to_s).runtime_dependencies\r\n  deps.find { |d| d.name == dep_name.to_s }.requirements_list.join(\", \")\r\nend\r\n\r\n# version_constraint(\"jekyll-docs\", \"jekyll\")\r\n# => \"= 3.4.0\"\r\n```"}}
{"actor":{"display_login":"ashmaroli"}}