GitHub PullRequestReviewCommentEvent at 2014-08-20 21:59:28
Repository: puppet
Actor: laurenrother
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/16508758","id":16508758,"diff_hunk":"@@ -51,11 +52,32 @@ def update(data)\n       process_name(data) if data['name']\n       process_version(data) if data['version']\n       process_source(data) if data['source']\n+      process_dependencies(data) if data['dependencies']\n \n       @data.merge!(data)\n       return self\n     end\n \n+    # Validates the name and version_requirement for a dependency, then creates\n+    # the Dependency and adds it.\n+    # Returns the Dependency that was added.\n+    def add_dependency(name, version_requirement=nil, repository=nil)\n+      validate_name(name)\n+      validate_version_range(version_requirement) if version_requirement\n+      duplicates = @data['dependencies'].select { |d| d.full_module_name == name }\n+      unless duplicates.empty?\n+        duplicates.each do |dup|\n+          if dup.version_requirement != version_requirement\n+            raise ArgumentError, \"Dependency conflict for #{full_module_name}: Dependency #{name} was given conflicting version requirements #{version_requirement} and #{dup.version_requirement}. Verify that there are no duplicates in the metadata.json or the Modulefile.\"","path":"lib/puppet/module_tool/metadata.rb","position":37,"original_position":37,"commit_id":"497165d00a6b2232dba309ca4421edc0564a84ad","original_commit_id":"497165d00a6b2232dba309ca4421edc0564a84ad","user":{"login":"laurenrother","id":2624486,"avatar_url":"https://avatars.githubusercontent.com/u/2624486?v=2","gravatar_id":"8d82150663bbe3b68f624edd61ddd413","url":"https://api.github.com/users/laurenrother","html_url":"https://github.com/laurenrother","followers_url":"https://api.github.com/users/laurenrother/followers","following_url":"https://api.github.com/users/laurenrother/following{/other_user}","gists_url":"https://api.github.com/users/laurenrother/gists{/gist_id}","starred_url":"https://api.github.com/users/laurenrother/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laurenrother/subscriptions","organizations_url":"https://api.github.com/users/laurenrother/orgs","repos_url":"https://api.github.com/users/laurenrother/repos","events_url":"https://api.github.com/users/laurenrother/events{/privacy}","received_events_url":"https://api.github.com/users/laurenrother/received_events","type":"User","site_admin":false},"body":"+1 to adding 'at least' given the case of having more than 2 dependencies return only two. ","created_at":"2014-08-20T21:59:28Z","updated_at":"2014-08-20T21:59:28Z","html_url":"https://github.com/puppetlabs/puppet/pull/2838#discussion_r16508758","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/16508758"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/2838#discussion_r16508758"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838","id":17957503,"html_url":"https://github.com/puppetlabs/puppet/pull/2838","diff_url":"https://github.com/puppetlabs/puppet/pull/2838.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/2838.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/2838","number":2838,"state":"open","locked":false,"title":"(PUP-2901/PE-4524) Add module dependency validation","user":{"login":"highb","id":759848,"avatar_url":"https://avatars.githubusercontent.com/u/759848?v=2","gravatar_id":"3f5473ffe66f431954c81f58eda24856","url":"https://api.github.com/users/highb","html_url":"https://github.com/highb","followers_url":"https://api.github.com/users/highb/followers","following_url":"https://api.github.com/users/highb/following{/other_user}","gists_url":"https://api.github.com/users/highb/gists{/gist_id}","starred_url":"https://api.github.com/users/highb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highb/subscriptions","organizations_url":"https://api.github.com/users/highb/orgs","repos_url":"https://api.github.com/users/highb/repos","events_url":"https://api.github.com/users/highb/events{/privacy}","received_events_url":"https://api.github.com/users/highb/received_events","type":"User","site_admin":false},"body":"Prior to this commit there wasn't much verification for module dependencies.\r\nThis commit adds verification the module dependencies have sane names and version\r\nranges. If verification fails, it will raise an argument exception.","created_at":"2014-07-03T17:28:10Z","updated_at":"2014-08-20T21:59:28Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57c9058568398f073a004074bb7dcd19cb5103c1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/{number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/2838/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/497165d00a6b2232dba309ca4421edc0564a84ad","head":{"label":"highb:fix/master/pup-4524_dependency_validation","ref":"fix/master/pup-4524_dependency_validation","sha":"497165d00a6b2232dba309ca4421edc0564a84ad","user":{"login":"highb","id":759848,"avatar_url":"https://avatars.githubusercontent.com/u/759848?v=2","gravatar_id":"3f5473ffe66f431954c81f58eda24856","url":"https://api.github.com/users/highb","html_url":"https://github.com/highb","followers_url":"https://api.github.com/users/highb/followers","following_url":"https://api.github.com/users/highb/following{/other_user}","gists_url":"https://api.github.com/users/highb/gists{/gist_id}","starred_url":"https://api.github.com/users/highb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highb/subscriptions","organizations_url":"https://api.github.com/users/highb/orgs","repos_url":"https://api.github.com/users/highb/repos","events_url":"https://api.github.com/users/highb/events{/privacy}","received_events_url":"https://api.github.com/users/highb/received_events","type":"User","site_admin":false},"repo":{"id":21367043,"name":"puppet","full_name":"highb/puppet","owner":{"login":"highb","id":759848,"avatar_url":"https://avatars.githubusercontent.com/u/759848?v=2","gravatar_id":"3f5473ffe66f431954c81f58eda24856","url":"https://api.github.com/users/highb","html_url":"https://github.com/highb","followers_url":"https://api.github.com/users/highb/followers","following_url":"https://api.github.com/users/highb/following{/other_user}","gists_url":"https://api.github.com/users/highb/gists{/gist_id}","starred_url":"https://api.github.com/users/highb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/highb/subscriptions","organizations_url":"https://api.github.com/users/highb/orgs","repos_url":"https://api.github.com/users/highb/repos","events_url":"https://api.github.com/users/highb/events{/privacy}","received_events_url":"https://api.github.com/users/highb/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/highb/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/highb/puppet","forks_url":"https://api.github.com/repos/highb/puppet/forks","keys_url":"https://api.github.com/repos/highb/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/highb/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/highb/puppet/teams","hooks_url":"https://api.github.com/repos/highb/puppet/hooks","issue_events_url":"https://api.github.com/repos/highb/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/highb/puppet/events","assignees_url":"https://api.github.com/repos/highb/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/highb/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/highb/puppet/tags","blobs_url":"https://api.github.com/repos/highb/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/highb/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/highb/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/highb/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/highb/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/highb/puppet/languages","stargazers_url":"https://api.github.com/repos/highb/puppet/stargazers","contributors_url":"https://api.github.com/repos/highb/puppet/contributors","subscribers_url":"https://api.github.com/repos/highb/puppet/subscribers","subscription_url":"https://api.github.com/repos/highb/puppet/subscription","commits_url":"https://api.github.com/repos/highb/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/highb/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/highb/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/highb/puppet/issues/comments/{number}","contents_url":"https://api.github.com/repos/highb/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/highb/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/highb/puppet/merges","archive_url":"https://api.github.com/repos/highb/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/highb/puppet/downloads","issues_url":"https://api.github.com/repos/highb/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/highb/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/highb/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/highb/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/highb/puppet/labels{/name}","releases_url":"https://api.github.com/repos/highb/puppet/releases{/id}","created_at":"2014-06-30T21:51:00Z","updated_at":"2014-06-30T18:22:52Z","pushed_at":"2014-08-20T21:04:00Z","git_url":"git://github.com/highb/puppet.git","ssh_url":"git@github.com:highb/puppet.git","clone_url":"https://github.com/highb/puppet.git","svn_url":"https://github.com/highb/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":41450,"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":"puppetlabs:master","ref":"master","sha":"fd7cf5fdf0aa5f7faaae94045463726a971a0a82","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=2","gravatar_id":"eb454c2139c156db7c8266a875519a1f","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=2","gravatar_id":"eb454c2139c156db7c8266a875519a1f","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments/{number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","created_at":"2010-09-14T19:26:44Z","updated_at":"2014-08-20T08:12:53Z","pushed_at":"2014-08-20T18:53:07Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":107914,"stargazers_count":2563,"watchers_count":2563,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"forks_count":1103,"mirror_url":null,"open_issues_count":35,"forks":1103,"open_issues":35,"watchers":2563,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/2838"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/2838"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/2838/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/2838/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/497165d00a6b2232dba309ca4421edc0564a84ad"}}}}