GitHub PullRequestReviewCommentEvent at 2014-08-12 00:33:23
Repository: chef
Actor: lamont-granquist
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/opscode/chef/pulls/comments/16090100","id":16090100,"diff_hunk":"@@ -63,6 +67,35 @@ def value_for_node(node)\n \n         private\n \n+        def match_versions(node)\n+          begin\n+            platform, version = node[:platform].to_s, node[:platform_version].to_s\n+            return unless @values.key?(platform)\n+            node_version = Chef::Version::Platform.new(version)\n+            keys = @values[platform].keys\n+            keys.each do |k|","path":"lib/chef/dsl/platform_introspection.rb","position":23,"original_position":23,"commit_id":"02096028d39c96d41a5324a0826f207a14265faa","original_commit_id":"02096028d39c96d41a5324a0826f207a14265faa","user":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=2","gravatar_id":"84c874984f69ef596764255efcd79113","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"body":"I would say that exact matches should take precedence, so as long as those are preferred over the constraint matches (which are preferred over 'default' matches), then its fine.","created_at":"2014-08-12T00:33:23Z","updated_at":"2014-08-12T00:33:23Z","html_url":"https://github.com/opscode/chef/pull/1726#discussion_r16090100","pull_request_url":"https://api.github.com/repos/opscode/chef/pulls/1726","_links":{"self":{"href":"https://api.github.com/repos/opscode/chef/pulls/comments/16090100"},"html":{"href":"https://github.com/opscode/chef/pull/1726#discussion_r16090100"},"pull_request":{"href":"https://api.github.com/repos/opscode/chef/pulls/1726"}}},"pull_request":{"url":"https://api.github.com/repos/opscode/chef/pulls/1726","id":19167592,"html_url":"https://github.com/opscode/chef/pull/1726","diff_url":"https://github.com/opscode/chef/pull/1726.diff","patch_url":"https://github.com/opscode/chef/pull/1726.patch","issue_url":"https://api.github.com/repos/opscode/chef/issues/1726","number":1726,"state":"open","title":"support version constraints in value_for_platform","user":{"login":"jordane","id":342364,"avatar_url":"https://avatars.githubusercontent.com/u/342364?v=2","gravatar_id":"6575a1f2025e32430d152704b8bd5933","url":"https://api.github.com/users/jordane","html_url":"https://github.com/jordane","followers_url":"https://api.github.com/users/jordane/followers","following_url":"https://api.github.com/users/jordane/following{/other_user}","gists_url":"https://api.github.com/users/jordane/gists{/gist_id}","starred_url":"https://api.github.com/users/jordane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordane/subscriptions","organizations_url":"https://api.github.com/users/jordane/orgs","repos_url":"https://api.github.com/users/jordane/repos","events_url":"https://api.github.com/users/jordane/events{/privacy}","received_events_url":"https://api.github.com/users/jordane/received_events","type":"User","site_admin":false},"body":"This allows version constraints like <code>~\\></code>,<code>\\>=</code>, and others to be used in the keys for <code>value_for_platform</code>\r\n\r\nThe primary motivation behind this is that CentOS has started tagging their versions with minor versions, like <code>7.0.1406</code>, and it would be far more convenient to just specify <code>~> 7.0</code>.\r\n\r\nIf a platform has a version that Gem doesn't like, we simply throw it away and move on.","created_at":"2014-07-31T17:57:43Z","updated_at":"2014-08-12T00:33:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ceecaa213a3c37a4a4df9dfec97dcac2afe55731","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/opscode/chef/pulls/1726/commits","review_comments_url":"https://api.github.com/repos/opscode/chef/pulls/1726/comments","review_comment_url":"https://api.github.com/repos/opscode/chef/pulls/comments/{number}","comments_url":"https://api.github.com/repos/opscode/chef/issues/1726/comments","statuses_url":"https://api.github.com/repos/opscode/chef/statuses/02096028d39c96d41a5324a0826f207a14265faa","head":{"label":"jordane:jordane/allow-constraints-value-for-platform","ref":"jordane/allow-constraints-value-for-platform","sha":"02096028d39c96d41a5324a0826f207a14265faa","user":{"login":"jordane","id":342364,"avatar_url":"https://avatars.githubusercontent.com/u/342364?v=2","gravatar_id":"6575a1f2025e32430d152704b8bd5933","url":"https://api.github.com/users/jordane","html_url":"https://github.com/jordane","followers_url":"https://api.github.com/users/jordane/followers","following_url":"https://api.github.com/users/jordane/following{/other_user}","gists_url":"https://api.github.com/users/jordane/gists{/gist_id}","starred_url":"https://api.github.com/users/jordane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordane/subscriptions","organizations_url":"https://api.github.com/users/jordane/orgs","repos_url":"https://api.github.com/users/jordane/repos","events_url":"https://api.github.com/users/jordane/events{/privacy}","received_events_url":"https://api.github.com/users/jordane/received_events","type":"User","site_admin":false},"repo":{"id":5592248,"name":"chef","full_name":"jordane/chef","owner":{"login":"jordane","id":342364,"avatar_url":"https://avatars.githubusercontent.com/u/342364?v=2","gravatar_id":"6575a1f2025e32430d152704b8bd5933","url":"https://api.github.com/users/jordane","html_url":"https://github.com/jordane","followers_url":"https://api.github.com/users/jordane/followers","following_url":"https://api.github.com/users/jordane/following{/other_user}","gists_url":"https://api.github.com/users/jordane/gists{/gist_id}","starred_url":"https://api.github.com/users/jordane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jordane/subscriptions","organizations_url":"https://api.github.com/users/jordane/orgs","repos_url":"https://api.github.com/users/jordane/repos","events_url":"https://api.github.com/users/jordane/events{/privacy}","received_events_url":"https://api.github.com/users/jordane/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jordane/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":true,"url":"https://api.github.com/repos/jordane/chef","forks_url":"https://api.github.com/repos/jordane/chef/forks","keys_url":"https://api.github.com/repos/jordane/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jordane/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jordane/chef/teams","hooks_url":"https://api.github.com/repos/jordane/chef/hooks","issue_events_url":"https://api.github.com/repos/jordane/chef/issues/events{/number}","events_url":"https://api.github.com/repos/jordane/chef/events","assignees_url":"https://api.github.com/repos/jordane/chef/assignees{/user}","branches_url":"https://api.github.com/repos/jordane/chef/branches{/branch}","tags_url":"https://api.github.com/repos/jordane/chef/tags","blobs_url":"https://api.github.com/repos/jordane/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jordane/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jordane/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/jordane/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jordane/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/jordane/chef/languages","stargazers_url":"https://api.github.com/repos/jordane/chef/stargazers","contributors_url":"https://api.github.com/repos/jordane/chef/contributors","subscribers_url":"https://api.github.com/repos/jordane/chef/subscribers","subscription_url":"https://api.github.com/repos/jordane/chef/subscription","commits_url":"https://api.github.com/repos/jordane/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/jordane/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/jordane/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/jordane/chef/issues/comments/{number}","contents_url":"https://api.github.com/repos/jordane/chef/contents/{+path}","compare_url":"https://api.github.com/repos/jordane/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jordane/chef/merges","archive_url":"https://api.github.com/repos/jordane/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jordane/chef/downloads","issues_url":"https://api.github.com/repos/jordane/chef/issues{/number}","pulls_url":"https://api.github.com/repos/jordane/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/jordane/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/jordane/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jordane/chef/labels{/name}","releases_url":"https://api.github.com/repos/jordane/chef/releases{/id}","created_at":"2012-08-28T21:17:16Z","updated_at":"2014-06-25T18:29:01Z","pushed_at":"2014-08-04T23:06:45Z","git_url":"git://github.com/jordane/chef.git","ssh_url":"git@github.com:jordane/chef.git","clone_url":"https://github.com/jordane/chef.git","svn_url":"https://github.com/jordane/chef","homepage":"http://www.opscode.com/chef/","size":72321,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"opscode:master","ref":"master","sha":"dc9c3ebd33c664178b215780817074d880c2255d","user":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=2","gravatar_id":"890bf76f4dc18c12a19c55e988a1bd5e","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"opscode/chef","owner":{"login":"opscode","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=2","gravatar_id":"890bf76f4dc18c12a19c55e988a1bd5e","url":"https://api.github.com/users/opscode","html_url":"https://github.com/opscode","followers_url":"https://api.github.com/users/opscode/followers","following_url":"https://api.github.com/users/opscode/following{/other_user}","gists_url":"https://api.github.com/users/opscode/gists{/gist_id}","starred_url":"https://api.github.com/users/opscode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/opscode/subscriptions","organizations_url":"https://api.github.com/users/opscode/orgs","repos_url":"https://api.github.com/users/opscode/repos","events_url":"https://api.github.com/users/opscode/events{/privacy}","received_events_url":"https://api.github.com/users/opscode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/opscode/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":false,"url":"https://api.github.com/repos/opscode/chef","forks_url":"https://api.github.com/repos/opscode/chef/forks","keys_url":"https://api.github.com/repos/opscode/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/opscode/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/opscode/chef/teams","hooks_url":"https://api.github.com/repos/opscode/chef/hooks","issue_events_url":"https://api.github.com/repos/opscode/chef/issues/events{/number}","events_url":"https://api.github.com/repos/opscode/chef/events","assignees_url":"https://api.github.com/repos/opscode/chef/assignees{/user}","branches_url":"https://api.github.com/repos/opscode/chef/branches{/branch}","tags_url":"https://api.github.com/repos/opscode/chef/tags","blobs_url":"https://api.github.com/repos/opscode/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/opscode/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/opscode/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/opscode/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/opscode/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/opscode/chef/languages","stargazers_url":"https://api.github.com/repos/opscode/chef/stargazers","contributors_url":"https://api.github.com/repos/opscode/chef/contributors","subscribers_url":"https://api.github.com/repos/opscode/chef/subscribers","subscription_url":"https://api.github.com/repos/opscode/chef/subscription","commits_url":"https://api.github.com/repos/opscode/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/opscode/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/opscode/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/opscode/chef/issues/comments/{number}","contents_url":"https://api.github.com/repos/opscode/chef/contents/{+path}","compare_url":"https://api.github.com/repos/opscode/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/opscode/chef/merges","archive_url":"https://api.github.com/repos/opscode/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/opscode/chef/downloads","issues_url":"https://api.github.com/repos/opscode/chef/issues{/number}","pulls_url":"https://api.github.com/repos/opscode/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/opscode/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/opscode/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/opscode/chef/labels{/name}","releases_url":"https://api.github.com/repos/opscode/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2014-08-11T21:19:01Z","pushed_at":"2014-08-12T00:28:22Z","git_url":"git://github.com/opscode/chef.git","ssh_url":"git@github.com:opscode/chef.git","clone_url":"https://github.com/opscode/chef.git","svn_url":"https://github.com/opscode/chef","homepage":"http://www.getchef.com/chef/","size":151346,"stargazers_count":2888,"watchers_count":2888,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"forks_count":1189,"mirror_url":null,"open_issues_count":179,"forks":1189,"open_issues":179,"watchers":2888,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/opscode/chef/pulls/1726"},"html":{"href":"https://github.com/opscode/chef/pull/1726"},"issue":{"href":"https://api.github.com/repos/opscode/chef/issues/1726"},"comments":{"href":"https://api.github.com/repos/opscode/chef/issues/1726/comments"},"review_comments":{"href":"https://api.github.com/repos/opscode/chef/pulls/1726/comments"},"review_comment":{"href":"https://api.github.com/repos/opscode/chef/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/opscode/chef/pulls/1726/commits"},"statuses":{"href":"https://api.github.com/repos/opscode/chef/statuses/02096028d39c96d41a5324a0826f207a14265faa"}}}}