{"action":"created","comment":{"url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/comments/56851444","id":56851444,"diff_hunk":"@@ -139,43 +167,23 @@ def static_record_nodenames(static_records = {})\n     # zone template) containing the RR and value for nodes (or whatever)\n     # specified using the static_records attribute.\n \n-    if @stub\n-      fail \"#{@apex} requires static_records in order to be a stub\" if\n-        static_records.empty?\n-      r = node_by_search_data(static_records)\n-      return {\n-        @apex => {\n-          'val' => (IPAddress.valid?(r) ? r : server_ip_by_hostname(r)),\n-          'type' => 'A'\n-        }\n-      }\n-    end\n-    static_records.each_with_object({}) do |(rr, rr_data), m|\n+    return {} if data.nil?\n+\n+    data.each_with_object({}) do |(rr, rr_data), m|\n       Chef::Log.debug('Processing static record: ' \\\n         \"#{rr_data.class}/#{rr}/#{rr_data.inspect}\")\n-      if rr_data.class == String\n-        m[rr] = { 'val' => rr_data }\n-      else\n-        m[rr] = { 'val' => node_by_search_data(rr_data) }\n-      end\n-      m[rr]['type'] = rr_data['type'] || 'CNAME'\n+      m[rr] = override_record(rr_data)\n     end\n   end\n \n-  def server_ip_by_hostname(hostname)\n-    server = connection.servers.all(\n-      'tag-key' => 'Name',\n-      'tag-value' => hostname\n-    ).first\n-\n-    fail \"Can't locate server with name #{hostname}\" if server.nil?\n-\n-    server_obj_ip(server)\n-  end\n-\n   def non_public_interfaces(server)\n+    unless zone_options['avoid_subnets'] == []\n+      Chef::Log.info('Avoiding these subnets: ' +\n+        zone_options['avoid_subnets'].join(','))\n+    end\n+\n     server.network_interfaces.reject do |ni|\n-      @avoid_subnets.include?(ni['subnetId']) || ni == {}\n+      zone_options['avoid_subnets'].include?(ni['subnetId']) || ni == {}","path":"libraries/ec2_dns_server.rb","position":243,"original_position":243,"commit_id":"178cf9998ec75c140d0f7c9055b40df5c19fbf9c","original_commit_id":"bd4165e937e2509cd11ed845a5c6f0fbe53c4d5e","user":{"login":"eherot","id":400447,"avatar_url":"https://avatars.githubusercontent.com/u/400447?v=3","gravatar_id":"","url":"https://api.github.com/users/eherot","html_url":"https://github.com/eherot","followers_url":"https://api.github.com/users/eherot/followers","following_url":"https://api.github.com/users/eherot/following{/other_user}","gists_url":"https://api.github.com/users/eherot/gists{/gist_id}","starred_url":"https://api.github.com/users/eherot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eherot/subscriptions","organizations_url":"https://api.github.com/users/eherot/orgs","repos_url":"https://api.github.com/users/eherot/repos","events_url":"https://api.github.com/users/eherot/events{/privacy}","received_events_url":"https://api.github.com/users/eherot/received_events","type":"User","site_admin":false},"body":"Sorry, didn't mean to ignore this earlier: It was a question of keeping with an industry standard term for Network Interface Cards vs. a coding standard of using acronyms for longer object names when working with them in a loop.","created_at":"2016-03-21T16:24:09Z","updated_at":"2016-03-21T16:24:09Z","html_url":"https://github.com/evertrue/ec2dnsserver-cookbook/pull/5#discussion_r56851444","pull_request_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/comments/56851444"},"html":{"href":"https://github.com/evertrue/ec2dnsserver-cookbook/pull/5#discussion_r56851444"},"pull_request":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5","id":48255616,"html_url":"https://github.com/evertrue/ec2dnsserver-cookbook/pull/5","diff_url":"https://github.com/evertrue/ec2dnsserver-cookbook/pull/5.diff","patch_url":"https://github.com/evertrue/ec2dnsserver-cookbook/pull/5.patch","issue_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/5","number":5,"state":"open","locked":false,"title":"Refactor the zone resource","user":{"login":"eherot","id":400447,"avatar_url":"https://avatars.githubusercontent.com/u/400447?v=3","gravatar_id":"","url":"https://api.github.com/users/eherot","html_url":"https://github.com/eherot","followers_url":"https://api.github.com/users/eherot/followers","following_url":"https://api.github.com/users/eherot/following{/other_user}","gists_url":"https://api.github.com/users/eherot/gists{/gist_id}","starred_url":"https://api.github.com/users/eherot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eherot/subscriptions","organizations_url":"https://api.github.com/users/eherot/orgs","repos_url":"https://api.github.com/users/eherot/repos","events_url":"https://api.github.com/users/eherot/events{/privacy}","received_events_url":"https://api.github.com/users/eherot/received_events","type":"User","site_admin":false},"body":"Sorry, the branch is misnamed. Also there are some other things in here that had to happen in concert.\r\n\r\nThis does not include the \"cluster\" functionality. That comes next.","created_at":"2015-10-20T20:47:49Z","updated_at":"2016-03-21T16:24:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a09b70521cc8a446ab82c4c0cc4f9f04ceb3f503","assignee":{"login":"jeffbyrnes","id":260553,"avatar_url":"https://avatars.githubusercontent.com/u/260553?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffbyrnes","html_url":"https://github.com/jeffbyrnes","followers_url":"https://api.github.com/users/jeffbyrnes/followers","following_url":"https://api.github.com/users/jeffbyrnes/following{/other_user}","gists_url":"https://api.github.com/users/jeffbyrnes/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffbyrnes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffbyrnes/subscriptions","organizations_url":"https://api.github.com/users/jeffbyrnes/orgs","repos_url":"https://api.github.com/users/jeffbyrnes/repos","events_url":"https://api.github.com/users/jeffbyrnes/events{/privacy}","received_events_url":"https://api.github.com/users/jeffbyrnes/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5/commits","review_comments_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5/comments","review_comment_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/comments{/number}","comments_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/5/comments","statuses_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/statuses/178cf9998ec75c140d0f7c9055b40df5c19fbf9c","head":{"label":"evertrue:eherot/improve_spec_tests","ref":"eherot/improve_spec_tests","sha":"178cf9998ec75c140d0f7c9055b40df5c19fbf9c","user":{"login":"evertrue","id":1162677,"avatar_url":"https://avatars.githubusercontent.com/u/1162677?v=3","gravatar_id":"","url":"https://api.github.com/users/evertrue","html_url":"https://github.com/evertrue","followers_url":"https://api.github.com/users/evertrue/followers","following_url":"https://api.github.com/users/evertrue/following{/other_user}","gists_url":"https://api.github.com/users/evertrue/gists{/gist_id}","starred_url":"https://api.github.com/users/evertrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evertrue/subscriptions","organizations_url":"https://api.github.com/users/evertrue/orgs","repos_url":"https://api.github.com/users/evertrue/repos","events_url":"https://api.github.com/users/evertrue/events{/privacy}","received_events_url":"https://api.github.com/users/evertrue/received_events","type":"Organization","site_admin":false},"repo":{"id":11264220,"name":"ec2dnsserver-cookbook","full_name":"evertrue/ec2dnsserver-cookbook","owner":{"login":"evertrue","id":1162677,"avatar_url":"https://avatars.githubusercontent.com/u/1162677?v=3","gravatar_id":"","url":"https://api.github.com/users/evertrue","html_url":"https://github.com/evertrue","followers_url":"https://api.github.com/users/evertrue/followers","following_url":"https://api.github.com/users/evertrue/following{/other_user}","gists_url":"https://api.github.com/users/evertrue/gists{/gist_id}","starred_url":"https://api.github.com/users/evertrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evertrue/subscriptions","organizations_url":"https://api.github.com/users/evertrue/orgs","repos_url":"https://api.github.com/users/evertrue/repos","events_url":"https://api.github.com/users/evertrue/events{/privacy}","received_events_url":"https://api.github.com/users/evertrue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evertrue/ec2dnsserver-cookbook","description":"EC2 DNS Server Cookbook","fork":false,"url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook","forks_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/forks","keys_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/teams","hooks_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/hooks","issue_events_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/events","assignees_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/tags","blobs_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/languages","stargazers_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/stargazers","contributors_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/contributors","subscribers_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/subscribers","subscription_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/subscription","commits_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/merges","archive_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/downloads","issues_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/labels{/name}","releases_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/deployments","created_at":"2013-07-08T20:14:17Z","updated_at":"2015-04-28T19:07:38Z","pushed_at":"2016-03-10T21:52:00Z","git_url":"git://github.com/evertrue/ec2dnsserver-cookbook.git","ssh_url":"git@github.com:evertrue/ec2dnsserver-cookbook.git","clone_url":"https://github.com/evertrue/ec2dnsserver-cookbook.git","svn_url":"https://github.com/evertrue/ec2dnsserver-cookbook","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"evertrue:master","ref":"master","sha":"4ba21a080d56f5fd2ad297ea24921af0d597363d","user":{"login":"evertrue","id":1162677,"avatar_url":"https://avatars.githubusercontent.com/u/1162677?v=3","gravatar_id":"","url":"https://api.github.com/users/evertrue","html_url":"https://github.com/evertrue","followers_url":"https://api.github.com/users/evertrue/followers","following_url":"https://api.github.com/users/evertrue/following{/other_user}","gists_url":"https://api.github.com/users/evertrue/gists{/gist_id}","starred_url":"https://api.github.com/users/evertrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evertrue/subscriptions","organizations_url":"https://api.github.com/users/evertrue/orgs","repos_url":"https://api.github.com/users/evertrue/repos","events_url":"https://api.github.com/users/evertrue/events{/privacy}","received_events_url":"https://api.github.com/users/evertrue/received_events","type":"Organization","site_admin":false},"repo":{"id":11264220,"name":"ec2dnsserver-cookbook","full_name":"evertrue/ec2dnsserver-cookbook","owner":{"login":"evertrue","id":1162677,"avatar_url":"https://avatars.githubusercontent.com/u/1162677?v=3","gravatar_id":"","url":"https://api.github.com/users/evertrue","html_url":"https://github.com/evertrue","followers_url":"https://api.github.com/users/evertrue/followers","following_url":"https://api.github.com/users/evertrue/following{/other_user}","gists_url":"https://api.github.com/users/evertrue/gists{/gist_id}","starred_url":"https://api.github.com/users/evertrue/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evertrue/subscriptions","organizations_url":"https://api.github.com/users/evertrue/orgs","repos_url":"https://api.github.com/users/evertrue/repos","events_url":"https://api.github.com/users/evertrue/events{/privacy}","received_events_url":"https://api.github.com/users/evertrue/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/evertrue/ec2dnsserver-cookbook","description":"EC2 DNS Server Cookbook","fork":false,"url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook","forks_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/forks","keys_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/keys{/key_id}","collaborators_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/teams","hooks_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/hooks","issue_events_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/events{/number}","events_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/events","assignees_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/assignees{/user}","branches_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/branches{/branch}","tags_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/tags","blobs_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/refs{/sha}","trees_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/trees{/sha}","statuses_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/statuses/{sha}","languages_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/languages","stargazers_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/stargazers","contributors_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/contributors","subscribers_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/subscribers","subscription_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/subscription","commits_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/commits{/sha}","git_commits_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/git/commits{/sha}","comments_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/comments{/number}","issue_comment_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/comments{/number}","contents_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/contents/{+path}","compare_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/compare/{base}...{head}","merges_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/merges","archive_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/downloads","issues_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues{/number}","pulls_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls{/number}","milestones_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/milestones{/number}","notifications_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/labels{/name}","releases_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/releases{/id}","deployments_url":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/deployments","created_at":"2013-07-08T20:14:17Z","updated_at":"2015-04-28T19:07:38Z","pushed_at":"2016-03-10T21:52:00Z","git_url":"git://github.com/evertrue/ec2dnsserver-cookbook.git","ssh_url":"git@github.com:evertrue/ec2dnsserver-cookbook.git","clone_url":"https://github.com/evertrue/ec2dnsserver-cookbook.git","svn_url":"https://github.com/evertrue/ec2dnsserver-cookbook","homepage":null,"size":100,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5"},"html":{"href":"https://github.com/evertrue/ec2dnsserver-cookbook/pull/5"},"issue":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/5"},"comments":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/evertrue/ec2dnsserver-cookbook/statuses/178cf9998ec75c140d0f7c9055b40df5c19fbf9c"}}}}