{"action":"created","comment":{"url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/comments/27698766","id":27698766,"diff_hunk":"@@ -0,0 +1,29 @@\n+require 'test_helper'\n+\n+class TrailsServiceTest < ActiveSupport::TestCase\n+  attr_reader :service\n+\n+  def setup\n+    @service = TrailsService.new\n+  end\n+\n+  test '#trails' do\n+    VCR.use_cassette('trails_service_api') do\n+      trails = service.trails\n+      first_trail = trails.first\n+\n+      assert_equal \"San Francisco\", first_trail[\"city\"]\n+      assert_equal \"California\", first_trail[\"state\"]\n+      assert_equal \"Mt. Sutro Historic Trail\", first_trail[\"name\"]\n+      assert_equal 664, first_trail[\"unique_id\"]\n+      assert_equal 37.75756, first_trail[\"lat\"]\n+      assert_equal -122.45615, first_trail[\"lon\"]\n+      assert_equal \"mountain biking\", first_trail[\"activities\"].first[\"activity_type_name\"]\n+      assert_equal \"http://www.singletracks.com/item.php?c=1&i=5180\", first_trail[\"activities\"].first[\"url\"]\n+      assert_equal 2, first_trail[\"activities\"].first[\"length\"]\n+      assert_equal \"http://images.singletracks.com/2013/12/image-29.jpg\", first_trail[\"activities\"].first[\"thumbnail\"]\n+      assert_equal \"Fun ride through the Mt. Sutro forest.  Technical signal track that has some big drops if you slip on &quot;Historic Trail&quot;.  A lot of cutbacks going down to Stanyan St. exit. This trail is well maintained by volunteers at http://sutrostewards.org.\", first_trail[\"activities\"].first[\"description\"]","path":"test/services/trails_service_test.rb","position":25,"original_position":25,"commit_id":"be0bb338a286a9d3aaae023edb57132b7844fc6d","original_commit_id":"be0bb338a286a9d3aaae023edb57132b7844fc6d","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":"Line is too long. [322/80]","created_at":"2015-04-02T21:25:27Z","updated_at":"2015-04-02T21:25:27Z","html_url":"https://github.com/bhargavisatpathy/trails/pull/5#discussion_r27698766","pull_request_url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/comments/27698766"},"html":{"href":"https://github.com/bhargavisatpathy/trails/pull/5#discussion_r27698766"},"pull_request":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5","id":32551885,"html_url":"https://github.com/bhargavisatpathy/trails/pull/5","diff_url":"https://github.com/bhargavisatpathy/trails/pull/5.diff","patch_url":"https://github.com/bhargavisatpathy/trails/pull/5.patch","issue_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues/5","number":5,"state":"open","locked":false,"title":"Trails api","user":{"login":"cluhring","id":8466906,"avatar_url":"https://avatars.githubusercontent.com/u/8466906?v=3","gravatar_id":"","url":"https://api.github.com/users/cluhring","html_url":"https://github.com/cluhring","followers_url":"https://api.github.com/users/cluhring/followers","following_url":"https://api.github.com/users/cluhring/following{/other_user}","gists_url":"https://api.github.com/users/cluhring/gists{/gist_id}","starred_url":"https://api.github.com/users/cluhring/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cluhring/subscriptions","organizations_url":"https://api.github.com/users/cluhring/orgs","repos_url":"https://api.github.com/users/cluhring/repos","events_url":"https://api.github.com/users/cluhring/events{/privacy}","received_events_url":"https://api.github.com/users/cluhring/received_events","type":"User","site_admin":false},"body":":walking: ","created_at":"2015-04-02T21:25:22Z","updated_at":"2015-04-02T21:25:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34ed35946f031b2d6d893bc868b68fd2e79d6f25","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5/commits","review_comments_url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5/comments","review_comment_url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues/5/comments","statuses_url":"https://api.github.com/repos/bhargavisatpathy/trails/statuses/be0bb338a286a9d3aaae023edb57132b7844fc6d","head":{"label":"bhargavisatpathy:trails_api","ref":"trails_api","sha":"be0bb338a286a9d3aaae023edb57132b7844fc6d","user":{"login":"bhargavisatpathy","id":8531351,"avatar_url":"https://avatars.githubusercontent.com/u/8531351?v=3","gravatar_id":"","url":"https://api.github.com/users/bhargavisatpathy","html_url":"https://github.com/bhargavisatpathy","followers_url":"https://api.github.com/users/bhargavisatpathy/followers","following_url":"https://api.github.com/users/bhargavisatpathy/following{/other_user}","gists_url":"https://api.github.com/users/bhargavisatpathy/gists{/gist_id}","starred_url":"https://api.github.com/users/bhargavisatpathy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhargavisatpathy/subscriptions","organizations_url":"https://api.github.com/users/bhargavisatpathy/orgs","repos_url":"https://api.github.com/users/bhargavisatpathy/repos","events_url":"https://api.github.com/users/bhargavisatpathy/events{/privacy}","received_events_url":"https://api.github.com/users/bhargavisatpathy/received_events","type":"User","site_admin":false},"repo":{"id":33273895,"name":"trails","full_name":"bhargavisatpathy/trails","owner":{"login":"bhargavisatpathy","id":8531351,"avatar_url":"https://avatars.githubusercontent.com/u/8531351?v=3","gravatar_id":"","url":"https://api.github.com/users/bhargavisatpathy","html_url":"https://github.com/bhargavisatpathy","followers_url":"https://api.github.com/users/bhargavisatpathy/followers","following_url":"https://api.github.com/users/bhargavisatpathy/following{/other_user}","gists_url":"https://api.github.com/users/bhargavisatpathy/gists{/gist_id}","starred_url":"https://api.github.com/users/bhargavisatpathy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhargavisatpathy/subscriptions","organizations_url":"https://api.github.com/users/bhargavisatpathy/orgs","repos_url":"https://api.github.com/users/bhargavisatpathy/repos","events_url":"https://api.github.com/users/bhargavisatpathy/events{/privacy}","received_events_url":"https://api.github.com/users/bhargavisatpathy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhargavisatpathy/trails","description":"","fork":false,"url":"https://api.github.com/repos/bhargavisatpathy/trails","forks_url":"https://api.github.com/repos/bhargavisatpathy/trails/forks","keys_url":"https://api.github.com/repos/bhargavisatpathy/trails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhargavisatpathy/trails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhargavisatpathy/trails/teams","hooks_url":"https://api.github.com/repos/bhargavisatpathy/trails/hooks","issue_events_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues/events{/number}","events_url":"https://api.github.com/repos/bhargavisatpathy/trails/events","assignees_url":"https://api.github.com/repos/bhargavisatpathy/trails/assignees{/user}","branches_url":"https://api.github.com/repos/bhargavisatpathy/trails/branches{/branch}","tags_url":"https://api.github.com/repos/bhargavisatpathy/trails/tags","blobs_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhargavisatpathy/trails/statuses/{sha}","languages_url":"https://api.github.com/repos/bhargavisatpathy/trails/languages","stargazers_url":"https://api.github.com/repos/bhargavisatpathy/trails/stargazers","contributors_url":"https://api.github.com/repos/bhargavisatpathy/trails/contributors","subscribers_url":"https://api.github.com/repos/bhargavisatpathy/trails/subscribers","subscription_url":"https://api.github.com/repos/bhargavisatpathy/trails/subscription","commits_url":"https://api.github.com/repos/bhargavisatpathy/trails/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhargavisatpathy/trails/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhargavisatpathy/trails/contents/{+path}","compare_url":"https://api.github.com/repos/bhargavisatpathy/trails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhargavisatpathy/trails/merges","archive_url":"https://api.github.com/repos/bhargavisatpathy/trails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhargavisatpathy/trails/downloads","issues_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues{/number}","pulls_url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls{/number}","milestones_url":"https://api.github.com/repos/bhargavisatpathy/trails/milestones{/number}","notifications_url":"https://api.github.com/repos/bhargavisatpathy/trails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhargavisatpathy/trails/labels{/name}","releases_url":"https://api.github.com/repos/bhargavisatpathy/trails/releases{/id}","created_at":"2015-04-01T21:26:27Z","updated_at":"2015-04-02T20:32:39Z","pushed_at":"2015-04-02T21:25:22Z","git_url":"git://github.com/bhargavisatpathy/trails.git","ssh_url":"git@github.com:bhargavisatpathy/trails.git","clone_url":"https://github.com/bhargavisatpathy/trails.git","svn_url":"https://github.com/bhargavisatpathy/trails","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"bhargavisatpathy:master","ref":"master","sha":"10c866bd0361ab37dd76866ac3d008749e386ee0","user":{"login":"bhargavisatpathy","id":8531351,"avatar_url":"https://avatars.githubusercontent.com/u/8531351?v=3","gravatar_id":"","url":"https://api.github.com/users/bhargavisatpathy","html_url":"https://github.com/bhargavisatpathy","followers_url":"https://api.github.com/users/bhargavisatpathy/followers","following_url":"https://api.github.com/users/bhargavisatpathy/following{/other_user}","gists_url":"https://api.github.com/users/bhargavisatpathy/gists{/gist_id}","starred_url":"https://api.github.com/users/bhargavisatpathy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhargavisatpathy/subscriptions","organizations_url":"https://api.github.com/users/bhargavisatpathy/orgs","repos_url":"https://api.github.com/users/bhargavisatpathy/repos","events_url":"https://api.github.com/users/bhargavisatpathy/events{/privacy}","received_events_url":"https://api.github.com/users/bhargavisatpathy/received_events","type":"User","site_admin":false},"repo":{"id":33273895,"name":"trails","full_name":"bhargavisatpathy/trails","owner":{"login":"bhargavisatpathy","id":8531351,"avatar_url":"https://avatars.githubusercontent.com/u/8531351?v=3","gravatar_id":"","url":"https://api.github.com/users/bhargavisatpathy","html_url":"https://github.com/bhargavisatpathy","followers_url":"https://api.github.com/users/bhargavisatpathy/followers","following_url":"https://api.github.com/users/bhargavisatpathy/following{/other_user}","gists_url":"https://api.github.com/users/bhargavisatpathy/gists{/gist_id}","starred_url":"https://api.github.com/users/bhargavisatpathy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhargavisatpathy/subscriptions","organizations_url":"https://api.github.com/users/bhargavisatpathy/orgs","repos_url":"https://api.github.com/users/bhargavisatpathy/repos","events_url":"https://api.github.com/users/bhargavisatpathy/events{/privacy}","received_events_url":"https://api.github.com/users/bhargavisatpathy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bhargavisatpathy/trails","description":"","fork":false,"url":"https://api.github.com/repos/bhargavisatpathy/trails","forks_url":"https://api.github.com/repos/bhargavisatpathy/trails/forks","keys_url":"https://api.github.com/repos/bhargavisatpathy/trails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bhargavisatpathy/trails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bhargavisatpathy/trails/teams","hooks_url":"https://api.github.com/repos/bhargavisatpathy/trails/hooks","issue_events_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues/events{/number}","events_url":"https://api.github.com/repos/bhargavisatpathy/trails/events","assignees_url":"https://api.github.com/repos/bhargavisatpathy/trails/assignees{/user}","branches_url":"https://api.github.com/repos/bhargavisatpathy/trails/branches{/branch}","tags_url":"https://api.github.com/repos/bhargavisatpathy/trails/tags","blobs_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/refs{/sha}","trees_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bhargavisatpathy/trails/statuses/{sha}","languages_url":"https://api.github.com/repos/bhargavisatpathy/trails/languages","stargazers_url":"https://api.github.com/repos/bhargavisatpathy/trails/stargazers","contributors_url":"https://api.github.com/repos/bhargavisatpathy/trails/contributors","subscribers_url":"https://api.github.com/repos/bhargavisatpathy/trails/subscribers","subscription_url":"https://api.github.com/repos/bhargavisatpathy/trails/subscription","commits_url":"https://api.github.com/repos/bhargavisatpathy/trails/commits{/sha}","git_commits_url":"https://api.github.com/repos/bhargavisatpathy/trails/git/commits{/sha}","comments_url":"https://api.github.com/repos/bhargavisatpathy/trails/comments{/number}","issue_comment_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues/comments{/number}","contents_url":"https://api.github.com/repos/bhargavisatpathy/trails/contents/{+path}","compare_url":"https://api.github.com/repos/bhargavisatpathy/trails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bhargavisatpathy/trails/merges","archive_url":"https://api.github.com/repos/bhargavisatpathy/trails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bhargavisatpathy/trails/downloads","issues_url":"https://api.github.com/repos/bhargavisatpathy/trails/issues{/number}","pulls_url":"https://api.github.com/repos/bhargavisatpathy/trails/pulls{/number}","milestones_url":"https://api.github.com/repos/bhargavisatpathy/trails/milestones{/number}","notifications_url":"https://api.github.com/repos/bhargavisatpathy/trails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bhargavisatpathy/trails/labels{/name}","releases_url":"https://api.github.com/repos/bhargavisatpathy/trails/releases{/id}","created_at":"2015-04-01T21:26:27Z","updated_at":"2015-04-02T20:32:39Z","pushed_at":"2015-04-02T21:25:22Z","git_url":"git://github.com/bhargavisatpathy/trails.git","ssh_url":"git@github.com:bhargavisatpathy/trails.git","clone_url":"https://github.com/bhargavisatpathy/trails.git","svn_url":"https://github.com/bhargavisatpathy/trails","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":4,"forks":1,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5"},"html":{"href":"https://github.com/bhargavisatpathy/trails/pull/5"},"issue":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/issues/5"},"comments":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/bhargavisatpathy/trails/statuses/be0bb338a286a9d3aaae023edb57132b7844fc6d"}}}}