GitHub PullRequestReviewCommentEvent at 2014-11-27 01:52:00
Repository: pio
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/trema/pio/pulls/comments/20975246","id":20975246,"diff_hunk":"@@ -0,0 +1,159 @@\n+# encoding: utf-8\n+\n+require 'pio'\n+\n+describe Pio::Dhcp::Inform, '.new' do\n+  Given(:mandatory_option) do\n+    {\n+      source_mac: Pio::Mac.new('00:00:00:00:00:01')\n+    }\n+  end\n+\n+  context '必須オプションだけ与えた場合の結果' do\n+    When(:result) { Pio::Dhcp::Inform.new(mandatory_option) }\n+\n+    Then { result.destination_mac.to_s == 'ff:ff:ff:ff:ff:ff' }\n+    Then { result.source_mac.to_s == '00:00:00:00:00:01' }\n+    Then { result.ether_type == 0x0800 }\n+    Then { result.ip_version == 0x4 }\n+    Then { result.ip_header_length == 0x5 }\n+    Then { result.ip_type_of_service == 0x00 }\n+    Then { result.ip_total_length == 0x0148 }\n+    Then { result.ip_identifier == 0x0000 }\n+    Then { result.ip_flag == 0x0000 }\n+    Then { result.ip_fragment == 0x0000 }\n+    Then { result.ip_ttl == 0x80 }\n+    Then { result.ip_protocol == 0x11 }\n+    Then { result.ip_source_address.to_s == '0.0.0.0' }\n+    Then { result.ip_destination_address.to_s == '255.255.255.255' }\n+    Then { result.udp_src_port == 0x44 }\n+    Then { result.udp_dst_port == 0x43 }\n+    Then { result.udp_length == 0x0134 }\n+    Then { result.operation_code == 0x1 }\n+    Then { result.hw_addr_type == 0x1 }\n+    Then { result.hw_addr_len == 0x6 }\n+    Then { result.hops == 0x0 }\n+    Then { (0..0xffffffff).include? result.transaction_id }\n+    Then { result.seconds == 0x0000 }\n+    Then { result.bootp_flags == 0x0000 }\n+    Then { result.client_ip_address.to_s == '0.0.0.0' }\n+    Then { result.your_ip_address.to_s == '0.0.0.0' }\n+    Then { result.next_server_ip_address.to_s == '0.0.0.0' }\n+    Then { result.relay_agent_ip_address.to_s == '0.0.0.0' }\n+    Then { result.client_mac_address.to_s == '00:00:00:00:00:01' }\n+    Then { result.server_host_name == '' }\n+    Then { result.boot_file_name == '' }\n+    Then { result.message_type == 0x8 }\n+    Then { result.client_identifier == nil }\n+    Then { result.server_identifier == nil }\n+    Then { result.renewal_time_value == nil }\n+    Then { result.rebinding_time_value == nil }\n+    Then { result.vendor_class_identifier == nil }\n+    Then { result.hostname == nil }\n+    Then { result.ip_address_lease_time == nil }\n+    Then { result.parameter_list == nil }\n+  end\n+\n+  context '必須オプションとすべての任意オプションを与えた場合の結果' do\n+    Given(:user_options) do\n+      user_options = {\n+        destination_mac: '00:00:00:00:00:02',\n+        ip_source_address: '192.168.0.10',\n+        ip_destination_address: '192.168.0.1',","path":"spec/pio/dhcp/inform/options_spec.rb","position":62,"original_position":62,"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:52:00Z","updated_at":"2014-11-27T01:52:00Z","html_url":"https://github.com/trema/pio/pull/78#discussion_r20975246","pull_request_url":"https://api.github.com/repos/trema/pio/pulls/78","_links":{"self":{"href":"https://api.github.com/repos/trema/pio/pulls/comments/20975246"},"html":{"href":"https://github.com/trema/pio/pull/78#discussion_r20975246"},"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:52:00Z","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"}}}}