{"action":"closed","number":3,"pull_request":{"url":"https://api.github.com/repos/assaf/scrapi/pulls/3","id":49097306,"html_url":"https://github.com/assaf/scrapi/pull/3","diff_url":"https://github.com/assaf/scrapi/pull/3.diff","patch_url":"https://github.com/assaf/scrapi/pull/3.patch","issue_url":"https://api.github.com/repos/assaf/scrapi/issues/3","number":3,"state":"closed","locked":false,"title":"Make it work on recent ruby toolchain.","user":{"login":"zdk","id":5758,"avatar_url":"https://avatars2.githubusercontent.com/u/5758?v=3","gravatar_id":"","url":"https://api.github.com/users/zdk","html_url":"https://github.com/zdk","followers_url":"https://api.github.com/users/zdk/followers","following_url":"https://api.github.com/users/zdk/following{/other_user}","gists_url":"https://api.github.com/users/zdk/gists{/gist_id}","starred_url":"https://api.github.com/users/zdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdk/subscriptions","organizations_url":"https://api.github.com/users/zdk/orgs","repos_url":"https://api.github.com/users/zdk/repos","events_url":"https://api.github.com/users/zdk/events{/privacy}","received_events_url":"https://api.github.com/users/zdk/received_events","type":"User","site_admin":false},"body":"This fix intends to let me test scrapi via `bundle exec rake test`.\n\n```\nRake version 10.4.2\nBundler version 1.10.6\n```\n- Most changes are related to rake and unit test.\n- Update eBay example in README, so it reflects the recent site.\n- Fix test with webrick, so I can run test multiple times without port collision.\n\n```\nscrapi|master ⇒ bundle exec rake test                                                                                                                                                                                               │························································\n/Users/di/.rbenv/versions/2.2.3/bin/ruby -I\"lib:lib\" -I\"/Users/di/.rbenv/versions/2.2.3/lib/ruby/2.2.0\" \"/Users/di/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rake/rake_test_loader.rb\" \"test/**/*_test.rb\"                               │························································\nLoaded suite /Users/di/.rbenv/versions/2.2.3/lib/ruby/2.2.0/rake/rake_test_loader                                                                                                                                                   │························································\nStarted                                                                                                                                                                                                                             │························································\n...localhost - - [29/Oct/2015:11:09:19 ICT] \"GET /test.html HTTP/1.1\" 200 18                                                                                                                                                        │························································\n- -> /test.html                                                                                                                                                                                                                     │························································\nlocalhost - - [29/Oct/2015:11:09:19 ICT] \"GET /test.html HTTP/1.1\" 200 119                                                                                                                                                          │························································\n- -> /test.html                                                                                                                                                                                                                     │························································\n............................++++++                                                                                                                                                                                                  │························································\n.........++++++                                                                                                                                                                                                                     │························································\nlocalhost - - [29/Oct/2015:11:09:19 ICT] \"GET /test.html HTTP/1.1\" 200 77                                                                                                                                                           │························································\n- -> /test.html                                                                                                                                                                                                                     │························································\n.......................................................N                                                                                                                                                                            │························································\n====================================================================================================================================================================================================================================│························································\nSelectorTest#test_first_and_last was redefined [test_first_and_last(SelectorTest)]                                                                                                                                                  │························································\n/Users/di/WDC/scrapi/test/selector_test.rb:482:in `<class:SelectorTest>'                                                                                                                                                            │························································\n====================================================================================================================================================================================================================================│························································\n..................                                                                                                                                                                                                                  │························································\n                                                                                                                                                                                                                                    │························································\nFinished in 0.114041 seconds.                                                                                                                                                                                                       │························································\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------│························································\n80 tests, 367 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 1 notifications                                                                                                                                            │························································\n100% passed                                                                                                                                                                                                                         │························································\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------│························································\n701.50 tests/s, 3218.14 assertions/s\n```\n\nExample test:\n\n```\n~|⇒ cat test.rb\nrequire 'net/http'\nrequire 'uri'\nrequire 'scrapi'\n\nurl  = \"http://www.ebay.com/sch/i.html?_from=R40&_trksid=p2050601.m570.l1313.TR0.TRC0.H0.Xapple+watch.TRS0&_nkw=apple+watch&_sacat=0\"\nhtml = Net::HTTP.get(URI.parse(url))\n\nebay_auction = Scraper.define do\n  process \"h3.lvtitle>a\", :description=>:text,\n                      :url=>\"@href\"\n  process \"li.lvprice.prc>span\", :price=>:text\n  process \"div a.img.imgWr2>img\", :image=>\"@src\"\n\n  result :description, :url, :price, :image\nend\n\nebay = Scraper.define do\n  array :auctions\n\n  process \"ul li.sresult.lvresult\",\n          :auctions => ebay_auction\n\n  result :auctions\nend\nauctions = ebay.scrape(html)\n# No. of auctions found\nputs auctions.size\n# First auction:\nauction = auctions[0]\nputs auction.description\nputs auction.url\n\n~|⇒ ruby test.rb\n50\nStock Apple Watch 38mm Gold Aluminum Case with Antique White Sport Band\nhttp://www.ebay.com/itm/Stock-Apple-Watch-38mm-Gold-Aluminum-Case-with-Antique-White-Sport-Band-/262042100156?hash=item3d02ed21bc:g:PqoAAOSwEetV8KEe\n\nNotes: Test on OSX Yosemite 10.10.5 ( Darwin Kernel Version 14.5.0 )\n\nHope you find this useful.\n```\n","created_at":"2015-10-29T04:19:15Z","updated_at":"2017-05-04T04:48:59Z","closed_at":"2017-05-04T04:48:59Z","merged_at":null,"merge_commit_sha":"8fbc7168b3a6b65e00077024eaf349d675010491","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/assaf/scrapi/pulls/3/commits","review_comments_url":"https://api.github.com/repos/assaf/scrapi/pulls/3/comments","review_comment_url":"https://api.github.com/repos/assaf/scrapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/assaf/scrapi/issues/3/comments","statuses_url":"https://api.github.com/repos/assaf/scrapi/statuses/0c035d7199ad64fdb2dca25eff3a916bdf6a0be9","head":{"label":"zdk:master","ref":"master","sha":"0c035d7199ad64fdb2dca25eff3a916bdf6a0be9","user":{"login":"zdk","id":5758,"avatar_url":"https://avatars2.githubusercontent.com/u/5758?v=3","gravatar_id":"","url":"https://api.github.com/users/zdk","html_url":"https://github.com/zdk","followers_url":"https://api.github.com/users/zdk/followers","following_url":"https://api.github.com/users/zdk/following{/other_user}","gists_url":"https://api.github.com/users/zdk/gists{/gist_id}","starred_url":"https://api.github.com/users/zdk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zdk/subscriptions","organizations_url":"https://api.github.com/users/zdk/orgs","repos_url":"https://api.github.com/users/zdk/repos","events_url":"https://api.github.com/users/zdk/events{/privacy}","received_events_url":"https://api.github.com/users/zdk/received_events","type":"User","site_admin":false},"repo":null},"base":{"label":"assaf:master","ref":"master","sha":"08f207ed740660bdf65730dd6bd3cb4df64e6d4b","user":{"login":"assaf","id":5158,"avatar_url":"https://avatars0.githubusercontent.com/u/5158?v=3","gravatar_id":"","url":"https://api.github.com/users/assaf","html_url":"https://github.com/assaf","followers_url":"https://api.github.com/users/assaf/followers","following_url":"https://api.github.com/users/assaf/following{/other_user}","gists_url":"https://api.github.com/users/assaf/gists{/gist_id}","starred_url":"https://api.github.com/users/assaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assaf/subscriptions","organizations_url":"https://api.github.com/users/assaf/orgs","repos_url":"https://api.github.com/users/assaf/repos","events_url":"https://api.github.com/users/assaf/events{/privacy}","received_events_url":"https://api.github.com/users/assaf/received_events","type":"User","site_admin":false},"repo":{"id":45908,"name":"scrapi","full_name":"assaf/scrapi","owner":{"login":"assaf","id":5158,"avatar_url":"https://avatars0.githubusercontent.com/u/5158?v=3","gravatar_id":"","url":"https://api.github.com/users/assaf","html_url":"https://github.com/assaf","followers_url":"https://api.github.com/users/assaf/followers","following_url":"https://api.github.com/users/assaf/following{/other_user}","gists_url":"https://api.github.com/users/assaf/gists{/gist_id}","starred_url":"https://api.github.com/users/assaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/assaf/subscriptions","organizations_url":"https://api.github.com/users/assaf/orgs","repos_url":"https://api.github.com/users/assaf/repos","events_url":"https://api.github.com/users/assaf/events{/privacy}","received_events_url":"https://api.github.com/users/assaf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/assaf/scrapi","description":"LOOKING FOR A MAINTAINER","fork":false,"url":"https://api.github.com/repos/assaf/scrapi","forks_url":"https://api.github.com/repos/assaf/scrapi/forks","keys_url":"https://api.github.com/repos/assaf/scrapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/assaf/scrapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/assaf/scrapi/teams","hooks_url":"https://api.github.com/repos/assaf/scrapi/hooks","issue_events_url":"https://api.github.com/repos/assaf/scrapi/issues/events{/number}","events_url":"https://api.github.com/repos/assaf/scrapi/events","assignees_url":"https://api.github.com/repos/assaf/scrapi/assignees{/user}","branches_url":"https://api.github.com/repos/assaf/scrapi/branches{/branch}","tags_url":"https://api.github.com/repos/assaf/scrapi/tags","blobs_url":"https://api.github.com/repos/assaf/scrapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/assaf/scrapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/assaf/scrapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/assaf/scrapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/assaf/scrapi/statuses/{sha}","languages_url":"https://api.github.com/repos/assaf/scrapi/languages","stargazers_url":"https://api.github.com/repos/assaf/scrapi/stargazers","contributors_url":"https://api.github.com/repos/assaf/scrapi/contributors","subscribers_url":"https://api.github.com/repos/assaf/scrapi/subscribers","subscription_url":"https://api.github.com/repos/assaf/scrapi/subscription","commits_url":"https://api.github.com/repos/assaf/scrapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/assaf/scrapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/assaf/scrapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/assaf/scrapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/assaf/scrapi/contents/{+path}","compare_url":"https://api.github.com/repos/assaf/scrapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/assaf/scrapi/merges","archive_url":"https://api.github.com/repos/assaf/scrapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/assaf/scrapi/downloads","issues_url":"https://api.github.com/repos/assaf/scrapi/issues{/number}","pulls_url":"https://api.github.com/repos/assaf/scrapi/pulls{/number}","milestones_url":"https://api.github.com/repos/assaf/scrapi/milestones{/number}","notifications_url":"https://api.github.com/repos/assaf/scrapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/assaf/scrapi/labels{/name}","releases_url":"https://api.github.com/repos/assaf/scrapi/releases{/id}","deployments_url":"https://api.github.com/repos/assaf/scrapi/deployments","created_at":"2008-08-25T20:18:45Z","updated_at":"2017-04-27T07:16:41Z","pushed_at":"2015-10-29T04:19:16Z","git_url":"git://github.com/assaf/scrapi.git","ssh_url":"git@github.com:assaf/scrapi.git","clone_url":"https://github.com/assaf/scrapi.git","svn_url":"https://github.com/assaf/scrapi","homepage":"","size":499,"stargazers_count":154,"watchers_count":154,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":28,"mirror_url":null,"open_issues_count":1,"forks":28,"open_issues":1,"watchers":154,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/assaf/scrapi/pulls/3"},"html":{"href":"https://github.com/assaf/scrapi/pull/3"},"issue":{"href":"https://api.github.com/repos/assaf/scrapi/issues/3"},"comments":{"href":"https://api.github.com/repos/assaf/scrapi/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/assaf/scrapi/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/assaf/scrapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/assaf/scrapi/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/assaf/scrapi/statuses/0c035d7199ad64fdb2dca25eff3a916bdf6a0be9"}},"merged":false,"mergeable":true,"rebaseable":false,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":0,"additions":0,"deletions":0,"changed_files":0}}
{"actor":{"display_login":"zdk"}}