{"action":"created","comment":{"url":"https://api.github.com/repos/sprangular/sprangular/pulls/comments/30929643","id":30929643,"diff_hunk":"@@ -27,25 +27,26 @@ Sprangular.service 'Catalog', ($http, $q, _, Status, Env) ->\n         return result\n \n     taxon: (path) ->\n-      $http.get(\"/api/taxons/#{path}\")\n+      $http.get(\"/api/taxons/#{path}\", useApiDomain: true)\n         .then (response) ->\n           response.data.taxon\n \n     find: (id) ->\n-      $http.get(\"/api/products/#{id}\", class: Sprangular.Product)\n+      $http.get(\"/api/products/#{id}\", class: Sprangular.Product, useApiDomain: true)\n         .then (response) ->\n           Status.cacheProduct(response)\n           response\n \n     getPaged: (page=1, params={}) ->\n-      $http.get(\"/api/products\", ignoreLoadingIndicator: params.ignoreLoadingIndicator, params: {per_page: @pageSize, page: page, \"q[name_or_description_cont]\": params.search, \"q[taxons_permalink_eq]\": params.taxon})\n+      $http.get(\"/api/products\", ignoreLoadingIndicator: params.ignoreLoadingIndicator, params: {per_page: @pageSize, page: page, \"q[name_or_description_cont]\": params.search, \"q[taxons_permalink_eq]\": params.taxon}, useApiDomain: true)\n         .then (response) ->\n           data = response.data\n           list = Sprangular.extend(data.products || [], Sprangular.Product)\n-          list.isLastPage = (data.meta.count < service.pageSize) || (page == data.pages)\n-          list.totalCount = data.meta.total_count\n-          list.totalPages = data.meta.pages\n-          list.page = data.meta.current_page\n+          if data.meta?\n+            list.isLastPage = (data.meta.count < service.pageSize) || (page == data.pages)","path":"app/assets/javascripts/sprangular/services/catalog.coffee","position":36,"original_position":36,"commit_id":"bdb61a0f3c4c87818421c93de234691921bfd085","original_commit_id":"bdb61a0f3c4c87818421c93de234691921bfd085","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 exceeds maximum allowed length","created_at":"2015-05-22T20:51:58Z","updated_at":"2015-05-22T20:51:58Z","html_url":"https://github.com/sprangular/sprangular/pull/159#discussion_r30929643","pull_request_url":"https://api.github.com/repos/sprangular/sprangular/pulls/159","_links":{"self":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/comments/30929643"},"html":{"href":"https://github.com/sprangular/sprangular/pull/159#discussion_r30929643"},"pull_request":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/159"}}},"pull_request":{"url":"https://api.github.com/repos/sprangular/sprangular/pulls/159","id":35468654,"html_url":"https://github.com/sprangular/sprangular/pull/159","diff_url":"https://github.com/sprangular/sprangular/pull/159.diff","patch_url":"https://github.com/sprangular/sprangular/pull/159.patch","issue_url":"https://api.github.com/repos/sprangular/sprangular/issues/159","number":159,"state":"open","locked":false,"title":"Allowing Custom API Domain","user":{"login":"simonwalsh","id":1783816,"avatar_url":"https://avatars.githubusercontent.com/u/1783816?v=3","gravatar_id":"","url":"https://api.github.com/users/simonwalsh","html_url":"https://github.com/simonwalsh","followers_url":"https://api.github.com/users/simonwalsh/followers","following_url":"https://api.github.com/users/simonwalsh/following{/other_user}","gists_url":"https://api.github.com/users/simonwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/simonwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonwalsh/subscriptions","organizations_url":"https://api.github.com/users/simonwalsh/orgs","repos_url":"https://api.github.com/users/simonwalsh/repos","events_url":"https://api.github.com/users/simonwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/simonwalsh/received_events","type":"User","site_admin":false},"body":"The idea is to be able to add a config attribute to Spree that allows you to specify a different api domain for the various requests.\r\n\r\n---\r\n\r\nTo-do:\r\n- [x] create config\r\n- [x] have it be part of sprangular's installation\r\n- [x] refactor angular module to add this as the root of all api requests (?)\r\n- [x] refactor services (if needed)\r\n- [x] split the module.coffee file into sub-pieces for overriding sake","created_at":"2015-05-14T22:24:42Z","updated_at":"2015-05-22T20:51:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4234ece2a9ddb40d80c9cf87577ceeb8075ef16b","assignee":{"login":"simonwalsh","id":1783816,"avatar_url":"https://avatars.githubusercontent.com/u/1783816?v=3","gravatar_id":"","url":"https://api.github.com/users/simonwalsh","html_url":"https://github.com/simonwalsh","followers_url":"https://api.github.com/users/simonwalsh/followers","following_url":"https://api.github.com/users/simonwalsh/following{/other_user}","gists_url":"https://api.github.com/users/simonwalsh/gists{/gist_id}","starred_url":"https://api.github.com/users/simonwalsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simonwalsh/subscriptions","organizations_url":"https://api.github.com/users/simonwalsh/orgs","repos_url":"https://api.github.com/users/simonwalsh/repos","events_url":"https://api.github.com/users/simonwalsh/events{/privacy}","received_events_url":"https://api.github.com/users/simonwalsh/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/sprangular/sprangular/pulls/159/commits","review_comments_url":"https://api.github.com/repos/sprangular/sprangular/pulls/159/comments","review_comment_url":"https://api.github.com/repos/sprangular/sprangular/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sprangular/sprangular/issues/159/comments","statuses_url":"https://api.github.com/repos/sprangular/sprangular/statuses/bdb61a0f3c4c87818421c93de234691921bfd085","head":{"label":"sprangular:feature/dynamic-api-endpoint","ref":"feature/dynamic-api-endpoint","sha":"bdb61a0f3c4c87818421c93de234691921bfd085","user":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"repo":{"id":22926972,"name":"sprangular","full_name":"sprangular/sprangular","owner":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprangular/sprangular","description":"Spree + Angular.js frontend","fork":false,"url":"https://api.github.com/repos/sprangular/sprangular","forks_url":"https://api.github.com/repos/sprangular/sprangular/forks","keys_url":"https://api.github.com/repos/sprangular/sprangular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprangular/sprangular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprangular/sprangular/teams","hooks_url":"https://api.github.com/repos/sprangular/sprangular/hooks","issue_events_url":"https://api.github.com/repos/sprangular/sprangular/issues/events{/number}","events_url":"https://api.github.com/repos/sprangular/sprangular/events","assignees_url":"https://api.github.com/repos/sprangular/sprangular/assignees{/user}","branches_url":"https://api.github.com/repos/sprangular/sprangular/branches{/branch}","tags_url":"https://api.github.com/repos/sprangular/sprangular/tags","blobs_url":"https://api.github.com/repos/sprangular/sprangular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprangular/sprangular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprangular/sprangular/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprangular/sprangular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprangular/sprangular/statuses/{sha}","languages_url":"https://api.github.com/repos/sprangular/sprangular/languages","stargazers_url":"https://api.github.com/repos/sprangular/sprangular/stargazers","contributors_url":"https://api.github.com/repos/sprangular/sprangular/contributors","subscribers_url":"https://api.github.com/repos/sprangular/sprangular/subscribers","subscription_url":"https://api.github.com/repos/sprangular/sprangular/subscription","commits_url":"https://api.github.com/repos/sprangular/sprangular/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprangular/sprangular/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprangular/sprangular/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprangular/sprangular/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprangular/sprangular/contents/{+path}","compare_url":"https://api.github.com/repos/sprangular/sprangular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprangular/sprangular/merges","archive_url":"https://api.github.com/repos/sprangular/sprangular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprangular/sprangular/downloads","issues_url":"https://api.github.com/repos/sprangular/sprangular/issues{/number}","pulls_url":"https://api.github.com/repos/sprangular/sprangular/pulls{/number}","milestones_url":"https://api.github.com/repos/sprangular/sprangular/milestones{/number}","notifications_url":"https://api.github.com/repos/sprangular/sprangular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprangular/sprangular/labels{/name}","releases_url":"https://api.github.com/repos/sprangular/sprangular/releases{/id}","created_at":"2014-08-13T18:43:03Z","updated_at":"2015-05-17T07:58:49Z","pushed_at":"2015-05-22T20:51:46Z","git_url":"git://github.com/sprangular/sprangular.git","ssh_url":"git@github.com:sprangular/sprangular.git","clone_url":"https://github.com/sprangular/sprangular.git","svn_url":"https://github.com/sprangular/sprangular","homepage":null,"size":8237,"stargazers_count":48,"watchers_count":48,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":19,"forks":13,"open_issues":19,"watchers":48,"default_branch":"master"}},"base":{"label":"sprangular:master","ref":"master","sha":"a77bca44e9e27d450ad67eda4a8c29ddbd992047","user":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"repo":{"id":22926972,"name":"sprangular","full_name":"sprangular/sprangular","owner":{"login":"sprangular","id":10926453,"avatar_url":"https://avatars.githubusercontent.com/u/10926453?v=3","gravatar_id":"","url":"https://api.github.com/users/sprangular","html_url":"https://github.com/sprangular","followers_url":"https://api.github.com/users/sprangular/followers","following_url":"https://api.github.com/users/sprangular/following{/other_user}","gists_url":"https://api.github.com/users/sprangular/gists{/gist_id}","starred_url":"https://api.github.com/users/sprangular/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sprangular/subscriptions","organizations_url":"https://api.github.com/users/sprangular/orgs","repos_url":"https://api.github.com/users/sprangular/repos","events_url":"https://api.github.com/users/sprangular/events{/privacy}","received_events_url":"https://api.github.com/users/sprangular/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sprangular/sprangular","description":"Spree + Angular.js frontend","fork":false,"url":"https://api.github.com/repos/sprangular/sprangular","forks_url":"https://api.github.com/repos/sprangular/sprangular/forks","keys_url":"https://api.github.com/repos/sprangular/sprangular/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sprangular/sprangular/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sprangular/sprangular/teams","hooks_url":"https://api.github.com/repos/sprangular/sprangular/hooks","issue_events_url":"https://api.github.com/repos/sprangular/sprangular/issues/events{/number}","events_url":"https://api.github.com/repos/sprangular/sprangular/events","assignees_url":"https://api.github.com/repos/sprangular/sprangular/assignees{/user}","branches_url":"https://api.github.com/repos/sprangular/sprangular/branches{/branch}","tags_url":"https://api.github.com/repos/sprangular/sprangular/tags","blobs_url":"https://api.github.com/repos/sprangular/sprangular/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sprangular/sprangular/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sprangular/sprangular/git/refs{/sha}","trees_url":"https://api.github.com/repos/sprangular/sprangular/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sprangular/sprangular/statuses/{sha}","languages_url":"https://api.github.com/repos/sprangular/sprangular/languages","stargazers_url":"https://api.github.com/repos/sprangular/sprangular/stargazers","contributors_url":"https://api.github.com/repos/sprangular/sprangular/contributors","subscribers_url":"https://api.github.com/repos/sprangular/sprangular/subscribers","subscription_url":"https://api.github.com/repos/sprangular/sprangular/subscription","commits_url":"https://api.github.com/repos/sprangular/sprangular/commits{/sha}","git_commits_url":"https://api.github.com/repos/sprangular/sprangular/git/commits{/sha}","comments_url":"https://api.github.com/repos/sprangular/sprangular/comments{/number}","issue_comment_url":"https://api.github.com/repos/sprangular/sprangular/issues/comments{/number}","contents_url":"https://api.github.com/repos/sprangular/sprangular/contents/{+path}","compare_url":"https://api.github.com/repos/sprangular/sprangular/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sprangular/sprangular/merges","archive_url":"https://api.github.com/repos/sprangular/sprangular/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sprangular/sprangular/downloads","issues_url":"https://api.github.com/repos/sprangular/sprangular/issues{/number}","pulls_url":"https://api.github.com/repos/sprangular/sprangular/pulls{/number}","milestones_url":"https://api.github.com/repos/sprangular/sprangular/milestones{/number}","notifications_url":"https://api.github.com/repos/sprangular/sprangular/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sprangular/sprangular/labels{/name}","releases_url":"https://api.github.com/repos/sprangular/sprangular/releases{/id}","created_at":"2014-08-13T18:43:03Z","updated_at":"2015-05-17T07:58:49Z","pushed_at":"2015-05-22T20:51:46Z","git_url":"git://github.com/sprangular/sprangular.git","ssh_url":"git@github.com:sprangular/sprangular.git","clone_url":"https://github.com/sprangular/sprangular.git","svn_url":"https://github.com/sprangular/sprangular","homepage":null,"size":8237,"stargazers_count":48,"watchers_count":48,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":19,"forks":13,"open_issues":19,"watchers":48,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/159"},"html":{"href":"https://github.com/sprangular/sprangular/pull/159"},"issue":{"href":"https://api.github.com/repos/sprangular/sprangular/issues/159"},"comments":{"href":"https://api.github.com/repos/sprangular/sprangular/issues/159/comments"},"review_comments":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/159/comments"},"review_comment":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sprangular/sprangular/pulls/159/commits"},"statuses":{"href":"https://api.github.com/repos/sprangular/sprangular/statuses/bdb61a0f3c4c87818421c93de234691921bfd085"}}}}