GitHub PullRequestReviewCommentEvent at 2014-11-27 01:51:36
Repository: pio
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/trema/pio/pulls/comments/20975097","id":20975097,"diff_hunk":"@@ -2,188 +2,207 @@\n \n require 'pio'\n \n-describe Pio::DHCP::Ack do\n-  Pio::DHCP::Ack == Pio::Dhcp::Ack\n+describe Pio::Dhcp::Ack do\n+  Then { Pio::Dhcp::Ack == Pio::DHCP::Ack }\n end\n \n describe Pio::Dhcp::Ack, '.new' do\n-  context 'with optional options' do\n-    subject do\n+  DHCP_ACK_DUMP =\n+    [\n+      # Destination MAC Address\n+      0x00, 0x0b, 0x82, 0x01, 0xfc, 0x42,\n+      # Source MAC Address\n+      0x00, 0x08, 0x74, 0xad, 0xf1, 0x9b,\n+      # Ethernet Type\n+      0x08, 0x00,\n+      # IP version and IP Header Length\n+      0x45,\n+      # DSCP\n+      0x00,\n+      # IP Total Length\n+      0x01, 0x48,\n+      # IP Identifier\n+      0x04, 0x46,\n+      # IP Flags and IP Fragmentation\n+      0x00, 0x00,\n+      # IP TTL\n+      0x80,\n+      # IP Protocol\n+      0x11,\n+      # IP Header Checksum\n+      0xb4, 0x03,\n+      # IP Source Address\n+      0xc0, 0xa8, 0x00, 0x01,\n+      # IP Destination Address\n+      0xc0, 0xa8, 0x00, 0x0a,\n+      # UDP Source Port\n+      0x00, 0x43,\n+      # UDP Destination Port\n+      0x00, 0x44,\n+      # UDP Total Length\n+      0x01, 0x34,\n+      # UDP Header Checksum\n+      0xdf, 0xdb,\n+      # Bootp Msg Type\n+      0x02,\n+      # Hw Type\n+      0x01,\n+      # Hw Address Length\n+      0x06,\n+      # Hops\n+      0x00,\n+      # Transaction ID\n+      0x00, 0x00, 0x3d, 0x1e,\n+      # Seconds\n+      0x00, 0x00,\n+      # Bootp Flags\n+      0x00, 0x00,\n+      # Client IP Address\n+      0x00, 0x00, 0x00, 0x00,\n+      # Your IP Address\n+      0xc0, 0xa8, 0x00, 0x0a,\n+      # Next Server IP Address\n+      0x00, 0x00, 0x00, 0x00,\n+      # Relay Agent IP Address\n+      0x00, 0x00, 0x00, 0x00,\n+      # Client MAC Address\n+      0x00, 0x0b, 0x82, 0x01, 0xfc, 0x42,\n+      # Client Hw Address Padding\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      # Server Host Name\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      # Boot File Name\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      # Magic Cookie\n+      0x63, 0x82, 0x53, 0x63,\n+      # DHCP Msg Type\n+      0x35, 0x01, 0x05,\n+      # Subnet Mask\n+      0x01, 0x04, 0xff, 0xff, 0xff, 0x00,\n+      # Renewal Time Value\n+      0x3a, 0x04, 0x00, 0x00, 0x07, 0x08,\n+      # Rebinding Time Value\n+      0x3b, 0x04, 0x00, 0x00, 0x0c, 0x4e,\n+      # IP Address Lease Time\n+      0x33, 0x04, 0x00, 0x00, 0x0e, 0x10,\n+      # Server Identifier\n+      0x36, 0x04, 0xc0, 0xa8, 0x00, 0x01,\n+      # End Option\n+      0xff,\n+      # Padding\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n+      0x00, 0x00\n+    ].pack('C*')\n+\n+  context 'with String MAC and IP address' do\n+    Given(:dhcp_ack) do\n       Pio::Dhcp::Ack.new(\n-        source_mac: source_mac,\n-        destination_mac: destination_mac,\n-        ip_source_address: ip_source_address,\n-        ip_destination_address: ip_destination_address,\n-        transaction_id: 0xdeadbeef,\n-        renewal_time_value: 0xdeadbeef,\n-        rebinding_time_value: 0xdeadbeef,\n-        ip_address_lease_time: 0xdeadbeef,\n-        subnet_mask: subnet_mask\n+        source_mac: '00:08:74:ad:f1:9b',\n+        destination_mac: '00:0b:82:01:fc:42',\n+        ip_identifier: 0x0446,\n+        ip_source_address: '192.168.0.1',\n+        ip_destination_address: '192.168.0.10',\n+        transaction_id: 0x00003d1e,\n+        bootp_flags: 0x00,\n+        your_ip_address: '192.168.0.10',\n+        relay_agent_ip_address: '0.0.0.0',\n+        client_mac_address: '00:0b:82:01:fc:42',","path":"spec/pio/dhcp/ack_spec.rb","position":146,"original_position":146,"commit_id":"cb58cb590b94e26f2199e93e8cc2a30fc733b78b","original_commit_id":"cb58cb590b94e26f2199e93e8cc2a30fc733b78b","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.","created_at":"2014-11-27T01:51:36Z","updated_at":"2014-11-27T01:51:36Z","html_url":"https://github.com/trema/pio/pull/78#discussion_r20975097","pull_request_url":"https://api.github.com/repos/trema/pio/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/trema/pio/pulls/comments/20975097"},"html":{"href":"https://github.com/trema/pio/pull/78#discussion_r20975097"},"pull_request":{"href":"https://api.github.com/repos/trema/pio/pulls/78"}}},"pull_request":{"url":"https://api.github.com/repos/trema/pio/pulls/78","id":17523658,"html_url":"https://github.com/trema/pio/pull/78","diff_url":"https://github.com/trema/pio/pull/78.diff","patch_url":"https://github.com/trema/pio/pull/78.patch","issue_url":"https://api.github.com/repos/trema/pio/issues/78","number":78,"state":"open","locked":false,"title":"(2nd attempt)refactoring dhcp(refs: #77)","user":{"login":"shun159","id":2569175,"avatar_url":"https://avatars.githubusercontent.com/u/2569175?v=3","gravatar_id":"","url":"https://api.github.com/users/shun159","html_url":"https://github.com/shun159","followers_url":"https://api.github.com/users/shun159/followers","following_url":"https://api.github.com/users/shun159/following{/other_user}","gists_url":"https://api.github.com/users/shun159/gists{/gist_id}","starred_url":"https://api.github.com/users/shun159/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shun159/subscriptions","organizations_url":"https://api.github.com/users/shun159/orgs","repos_url":"https://api.github.com/users/shun159/repos","events_url":"https://api.github.com/users/shun159/events{/privacy}","received_events_url":"https://api.github.com/users/shun159/received_events","type":"User","site_admin":false},"body":"https://github.com/trema/pio/issues/77\r\nで議論している内容です。\r\n\r\nコード重複あってテストとおりませんが、\r\nこのブランチをベースに改修を行いたいと思います。\r\n\r\n問題ないでしょうか？\r\n","created_at":"2014-06-24T10:31:06Z","updated_at":"2014-11-27T01:51:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3513b406401ebda2abd3d99d6fb137b2afb231ba","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/trema/pio/pulls/78/commits","review_comments_url":"https://api.github.com/repos/trema/pio/pulls/78/comments","review_comment_url":"https://api.github.com/repos/trema/pio/pulls/comments/{number}","comments_url":"https://api.github.com/repos/trema/pio/issues/78/comments","statuses_url":"https://api.github.com/repos/trema/pio/statuses/cb58cb590b94e26f2199e93e8cc2a30fc733b78b","head":{"label":"shun159:new_dhcp","ref":"new_dhcp","sha":"cb58cb590b94e26f2199e93e8cc2a30fc733b78b","user":{"login":"shun159","id":2569175,"avatar_url":"https://avatars.githubusercontent.com/u/2569175?v=3","gravatar_id":"","url":"https://api.github.com/users/shun159","html_url":"https://github.com/shun159","followers_url":"https://api.github.com/users/shun159/followers","following_url":"https://api.github.com/users/shun159/following{/other_user}","gists_url":"https://api.github.com/users/shun159/gists{/gist_id}","starred_url":"https://api.github.com/users/shun159/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shun159/subscriptions","organizations_url":"https://api.github.com/users/shun159/orgs","repos_url":"https://api.github.com/users/shun159/repos","events_url":"https://api.github.com/users/shun159/events{/privacy}","received_events_url":"https://api.github.com/users/shun159/received_events","type":"User","site_admin":false},"repo":{"id":13205953,"name":"pio","full_name":"shun159/pio","owner":{"login":"shun159","id":2569175,"avatar_url":"https://avatars.githubusercontent.com/u/2569175?v=3","gravatar_id":"","url":"https://api.github.com/users/shun159","html_url":"https://github.com/shun159","followers_url":"https://api.github.com/users/shun159/followers","following_url":"https://api.github.com/users/shun159/following{/other_user}","gists_url":"https://api.github.com/users/shun159/gists{/gist_id}","starred_url":"https://api.github.com/users/shun159/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shun159/subscriptions","organizations_url":"https://api.github.com/users/shun159/orgs","repos_url":"https://api.github.com/users/shun159/repos","events_url":"https://api.github.com/users/shun159/events{/privacy}","received_events_url":"https://api.github.com/users/shun159/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shun159/pio","description":"Packet parser and generator","fork":true,"url":"https://api.github.com/repos/shun159/pio","forks_url":"https://api.github.com/repos/shun159/pio/forks","keys_url":"https://api.github.com/repos/shun159/pio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shun159/pio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shun159/pio/teams","hooks_url":"https://api.github.com/repos/shun159/pio/hooks","issue_events_url":"https://api.github.com/repos/shun159/pio/issues/events{/number}","events_url":"https://api.github.com/repos/shun159/pio/events","assignees_url":"https://api.github.com/repos/shun159/pio/assignees{/user}","branches_url":"https://api.github.com/repos/shun159/pio/branches{/branch}","tags_url":"https://api.github.com/repos/shun159/pio/tags","blobs_url":"https://api.github.com/repos/shun159/pio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shun159/pio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shun159/pio/git/refs{/sha}","trees_url":"https://api.github.com/repos/shun159/pio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shun159/pio/statuses/{sha}","languages_url":"https://api.github.com/repos/shun159/pio/languages","stargazers_url":"https://api.github.com/repos/shun159/pio/stargazers","contributors_url":"https://api.github.com/repos/shun159/pio/contributors","subscribers_url":"https://api.github.com/repos/shun159/pio/subscribers","subscription_url":"https://api.github.com/repos/shun159/pio/subscription","commits_url":"https://api.github.com/repos/shun159/pio/commits{/sha}","git_commits_url":"https://api.github.com/repos/shun159/pio/git/commits{/sha}","comments_url":"https://api.github.com/repos/shun159/pio/comments{/number}","issue_comment_url":"https://api.github.com/repos/shun159/pio/issues/comments/{number}","contents_url":"https://api.github.com/repos/shun159/pio/contents/{+path}","compare_url":"https://api.github.com/repos/shun159/pio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shun159/pio/merges","archive_url":"https://api.github.com/repos/shun159/pio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shun159/pio/downloads","issues_url":"https://api.github.com/repos/shun159/pio/issues{/number}","pulls_url":"https://api.github.com/repos/shun159/pio/pulls{/number}","milestones_url":"https://api.github.com/repos/shun159/pio/milestones{/number}","notifications_url":"https://api.github.com/repos/shun159/pio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shun159/pio/labels{/name}","releases_url":"https://api.github.com/repos/shun159/pio/releases{/id}","created_at":"2013-09-30T04:17:15Z","updated_at":"2014-06-24T10:31:06Z","pushed_at":"2014-11-27T01:50:20Z","git_url":"git://github.com/shun159/pio.git","ssh_url":"git@github.com:shun159/pio.git","clone_url":"https://github.com/shun159/pio.git","svn_url":"https://github.com/shun159/pio","homepage":null,"size":2407,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"trema:feature/refactor_dhcp","ref":"feature/refactor_dhcp","sha":"9baf2811830582ca0ac534b75b62a3b861d5d89d","user":{"login":"trema","id":696690,"avatar_url":"https://avatars.githubusercontent.com/u/696690?v=3","gravatar_id":"","url":"https://api.github.com/users/trema","html_url":"https://github.com/trema","followers_url":"https://api.github.com/users/trema/followers","following_url":"https://api.github.com/users/trema/following{/other_user}","gists_url":"https://api.github.com/users/trema/gists{/gist_id}","starred_url":"https://api.github.com/users/trema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trema/subscriptions","organizations_url":"https://api.github.com/users/trema/orgs","repos_url":"https://api.github.com/users/trema/repos","events_url":"https://api.github.com/users/trema/events{/privacy}","received_events_url":"https://api.github.com/users/trema/received_events","type":"Organization","site_admin":false},"repo":{"id":11780463,"name":"pio","full_name":"trema/pio","owner":{"login":"trema","id":696690,"avatar_url":"https://avatars.githubusercontent.com/u/696690?v=3","gravatar_id":"","url":"https://api.github.com/users/trema","html_url":"https://github.com/trema","followers_url":"https://api.github.com/users/trema/followers","following_url":"https://api.github.com/users/trema/following{/other_user}","gists_url":"https://api.github.com/users/trema/gists{/gist_id}","starred_url":"https://api.github.com/users/trema/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trema/subscriptions","organizations_url":"https://api.github.com/users/trema/orgs","repos_url":"https://api.github.com/users/trema/repos","events_url":"https://api.github.com/users/trema/events{/privacy}","received_events_url":"https://api.github.com/users/trema/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/trema/pio","description":"Packet parser and generator in Ruby","fork":false,"url":"https://api.github.com/repos/trema/pio","forks_url":"https://api.github.com/repos/trema/pio/forks","keys_url":"https://api.github.com/repos/trema/pio/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trema/pio/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trema/pio/teams","hooks_url":"https://api.github.com/repos/trema/pio/hooks","issue_events_url":"https://api.github.com/repos/trema/pio/issues/events{/number}","events_url":"https://api.github.com/repos/trema/pio/events","assignees_url":"https://api.github.com/repos/trema/pio/assignees{/user}","branches_url":"https://api.github.com/repos/trema/pio/branches{/branch}","tags_url":"https://api.github.com/repos/trema/pio/tags","blobs_url":"https://api.github.com/repos/trema/pio/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trema/pio/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trema/pio/git/refs{/sha}","trees_url":"https://api.github.com/repos/trema/pio/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trema/pio/statuses/{sha}","languages_url":"https://api.github.com/repos/trema/pio/languages","stargazers_url":"https://api.github.com/repos/trema/pio/stargazers","contributors_url":"https://api.github.com/repos/trema/pio/contributors","subscribers_url":"https://api.github.com/repos/trema/pio/subscribers","subscription_url":"https://api.github.com/repos/trema/pio/subscription","commits_url":"https://api.github.com/repos/trema/pio/commits{/sha}","git_commits_url":"https://api.github.com/repos/trema/pio/git/commits{/sha}","comments_url":"https://api.github.com/repos/trema/pio/comments{/number}","issue_comment_url":"https://api.github.com/repos/trema/pio/issues/comments/{number}","contents_url":"https://api.github.com/repos/trema/pio/contents/{+path}","compare_url":"https://api.github.com/repos/trema/pio/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trema/pio/merges","archive_url":"https://api.github.com/repos/trema/pio/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trema/pio/downloads","issues_url":"https://api.github.com/repos/trema/pio/issues{/number}","pulls_url":"https://api.github.com/repos/trema/pio/pulls{/number}","milestones_url":"https://api.github.com/repos/trema/pio/milestones{/number}","notifications_url":"https://api.github.com/repos/trema/pio/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trema/pio/labels{/name}","releases_url":"https://api.github.com/repos/trema/pio/releases{/id}","created_at":"2013-07-31T02:22:47Z","updated_at":"2014-11-27T01:00:50Z","pushed_at":"2014-11-27T01:00:53Z","git_url":"git://github.com/trema/pio.git","ssh_url":"git@github.com:trema/pio.git","clone_url":"https://github.com/trema/pio.git","svn_url":"https://github.com/trema/pio","homepage":"","size":4069,"stargazers_count":11,"watchers_count":11,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":3,"forks":4,"open_issues":3,"watchers":11,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/trema/pio/pulls/78"},"html":{"href":"https://github.com/trema/pio/pull/78"},"issue":{"href":"https://api.github.com/repos/trema/pio/issues/78"},"comments":{"href":"https://api.github.com/repos/trema/pio/issues/78/comments"},"review_comments":{"href":"https://api.github.com/repos/trema/pio/pulls/78/comments"},"review_comment":{"href":"https://api.github.com/repos/trema/pio/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/trema/pio/pulls/78/commits"},"statuses":{"href":"https://api.github.com/repos/trema/pio/statuses/cb58cb590b94e26f2199e93e8cc2a30fc733b78b"}}}}