{"action":"closed","number":139,"pull_request":{"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/139","id":36364769,"html_url":"https://github.com/samselikoff/ember-cli-mirage/pull/139","diff_url":"https://github.com/samselikoff/ember-cli-mirage/pull/139.diff","patch_url":"https://github.com/samselikoff/ember-cli-mirage/pull/139.patch","issue_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/139","number":139,"state":"closed","locked":false,"title":"Add ability to have per environment configs.","user":{"login":"cball","id":14339,"avatar_url":"https://avatars.githubusercontent.com/u/14339?v=3","gravatar_id":"","url":"https://api.github.com/users/cball","html_url":"https://github.com/cball","followers_url":"https://api.github.com/users/cball/followers","following_url":"https://api.github.com/users/cball/following{/other_user}","gists_url":"https://api.github.com/users/cball/gists{/gist_id}","starred_url":"https://api.github.com/users/cball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cball/subscriptions","organizations_url":"https://api.github.com/users/cball/orgs","repos_url":"https://api.github.com/users/cball/repos","events_url":"https://api.github.com/users/cball/events{/privacy}","received_events_url":"https://api.github.com/users/cball/received_events","type":"User","site_admin":false},"body":"First, here's the use case this is solving. The app is already existing and is set up with `--proxy`, so mirage needs to be explicitly enabled.\r\n\r\nWorkflow:\r\n1. Create fixtures/factories for new feature development.\r\n2. Stop using the fixtures in development when the API is ready, but keep using the factories in tests. This assumes a passthrough fallback is in place, either manually or from #134 so mirage doesn't complain about the route not being defined.\r\n\r\nI can't think of a way to do this without requiring an update of some sort to consuming apps, and the approach here seems the least invasive. I can do this manually by adding `if (environment === 'test')` around test only routes, but it's messy. I also need to do this across at least 3 apps, and assume some others might be in a similar boat.\r\n\r\nI added an integration test for this functionality because it's the only way I could think of to test that the initializer has actually been called.\r\n\r\nThoughts on the approach? Anything I'm missing?","created_at":"2015-05-28T01:30:02Z","updated_at":"2015-05-28T15:18:37Z","closed_at":"2015-05-28T15:18:37Z","merged_at":"2015-05-28T15:18:37Z","merge_commit_sha":"ed2ddcd0a9c4401c10ebf6f22a9d0cee301baf70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/139/commits","review_comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/139/comments","review_comment_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/comments{/number}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/139/comments","statuses_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/statuses/7807fcb3e6a2f611ca10608843165b7a6b091a55","head":{"label":"cball:cb-per-env-routes","ref":"cb-per-env-routes","sha":"7807fcb3e6a2f611ca10608843165b7a6b091a55","user":{"login":"cball","id":14339,"avatar_url":"https://avatars.githubusercontent.com/u/14339?v=3","gravatar_id":"","url":"https://api.github.com/users/cball","html_url":"https://github.com/cball","followers_url":"https://api.github.com/users/cball/followers","following_url":"https://api.github.com/users/cball/following{/other_user}","gists_url":"https://api.github.com/users/cball/gists{/gist_id}","starred_url":"https://api.github.com/users/cball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cball/subscriptions","organizations_url":"https://api.github.com/users/cball/orgs","repos_url":"https://api.github.com/users/cball/repos","events_url":"https://api.github.com/users/cball/events{/privacy}","received_events_url":"https://api.github.com/users/cball/received_events","type":"User","site_admin":false},"repo":{"id":36365644,"name":"ember-cli-mirage","full_name":"cball/ember-cli-mirage","owner":{"login":"cball","id":14339,"avatar_url":"https://avatars.githubusercontent.com/u/14339?v=3","gravatar_id":"","url":"https://api.github.com/users/cball","html_url":"https://github.com/cball","followers_url":"https://api.github.com/users/cball/followers","following_url":"https://api.github.com/users/cball/following{/other_user}","gists_url":"https://api.github.com/users/cball/gists{/gist_id}","starred_url":"https://api.github.com/users/cball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cball/subscriptions","organizations_url":"https://api.github.com/users/cball/orgs","repos_url":"https://api.github.com/users/cball/repos","events_url":"https://api.github.com/users/cball/events{/privacy}","received_events_url":"https://api.github.com/users/cball/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cball/ember-cli-mirage","description":"A client-side mock server to develop, test and prototype your app","fork":true,"url":"https://api.github.com/repos/cball/ember-cli-mirage","forks_url":"https://api.github.com/repos/cball/ember-cli-mirage/forks","keys_url":"https://api.github.com/repos/cball/ember-cli-mirage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cball/ember-cli-mirage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cball/ember-cli-mirage/teams","hooks_url":"https://api.github.com/repos/cball/ember-cli-mirage/hooks","issue_events_url":"https://api.github.com/repos/cball/ember-cli-mirage/issues/events{/number}","events_url":"https://api.github.com/repos/cball/ember-cli-mirage/events","assignees_url":"https://api.github.com/repos/cball/ember-cli-mirage/assignees{/user}","branches_url":"https://api.github.com/repos/cball/ember-cli-mirage/branches{/branch}","tags_url":"https://api.github.com/repos/cball/ember-cli-mirage/tags","blobs_url":"https://api.github.com/repos/cball/ember-cli-mirage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cball/ember-cli-mirage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cball/ember-cli-mirage/git/refs{/sha}","trees_url":"https://api.github.com/repos/cball/ember-cli-mirage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cball/ember-cli-mirage/statuses/{sha}","languages_url":"https://api.github.com/repos/cball/ember-cli-mirage/languages","stargazers_url":"https://api.github.com/repos/cball/ember-cli-mirage/stargazers","contributors_url":"https://api.github.com/repos/cball/ember-cli-mirage/contributors","subscribers_url":"https://api.github.com/repos/cball/ember-cli-mirage/subscribers","subscription_url":"https://api.github.com/repos/cball/ember-cli-mirage/subscription","commits_url":"https://api.github.com/repos/cball/ember-cli-mirage/commits{/sha}","git_commits_url":"https://api.github.com/repos/cball/ember-cli-mirage/git/commits{/sha}","comments_url":"https://api.github.com/repos/cball/ember-cli-mirage/comments{/number}","issue_comment_url":"https://api.github.com/repos/cball/ember-cli-mirage/issues/comments{/number}","contents_url":"https://api.github.com/repos/cball/ember-cli-mirage/contents/{+path}","compare_url":"https://api.github.com/repos/cball/ember-cli-mirage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cball/ember-cli-mirage/merges","archive_url":"https://api.github.com/repos/cball/ember-cli-mirage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cball/ember-cli-mirage/downloads","issues_url":"https://api.github.com/repos/cball/ember-cli-mirage/issues{/number}","pulls_url":"https://api.github.com/repos/cball/ember-cli-mirage/pulls{/number}","milestones_url":"https://api.github.com/repos/cball/ember-cli-mirage/milestones{/number}","notifications_url":"https://api.github.com/repos/cball/ember-cli-mirage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cball/ember-cli-mirage/labels{/name}","releases_url":"https://api.github.com/repos/cball/ember-cli-mirage/releases{/id}","created_at":"2015-05-27T12:33:56Z","updated_at":"2015-05-27T12:33:56Z","pushed_at":"2015-05-28T13:50:26Z","git_url":"git://github.com/cball/ember-cli-mirage.git","ssh_url":"git@github.com:cball/ember-cli-mirage.git","clone_url":"https://github.com/cball/ember-cli-mirage.git","svn_url":"https://github.com/cball/ember-cli-mirage","homepage":"http://ember-cli-mirage.com/","size":600,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"samselikoff:master","ref":"master","sha":"d1406fb5c2eb9621ede2745c74e40de67a680b34","user":{"login":"samselikoff","id":2922250,"avatar_url":"https://avatars.githubusercontent.com/u/2922250?v=3","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"repo":{"id":29990778,"name":"ember-cli-mirage","full_name":"samselikoff/ember-cli-mirage","owner":{"login":"samselikoff","id":2922250,"avatar_url":"https://avatars.githubusercontent.com/u/2922250?v=3","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samselikoff/ember-cli-mirage","description":"A client-side mock server to develop, test and prototype your app","fork":false,"url":"https://api.github.com/repos/samselikoff/ember-cli-mirage","forks_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/forks","keys_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/teams","hooks_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/hooks","issue_events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/events{/number}","events_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/events","assignees_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/assignees{/user}","branches_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/branches{/branch}","tags_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/tags","blobs_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/refs{/sha}","trees_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/statuses/{sha}","languages_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/languages","stargazers_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/stargazers","contributors_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/contributors","subscribers_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/subscribers","subscription_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/subscription","commits_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/commits{/sha}","git_commits_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/git/commits{/sha}","comments_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/comments{/number}","issue_comment_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/comments{/number}","contents_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/contents/{+path}","compare_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/merges","archive_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/downloads","issues_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues{/number}","pulls_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls{/number}","milestones_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/milestones{/number}","notifications_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/labels{/name}","releases_url":"https://api.github.com/repos/samselikoff/ember-cli-mirage/releases{/id}","created_at":"2015-01-28T22:08:26Z","updated_at":"2015-05-28T02:47:49Z","pushed_at":"2015-05-28T15:18:37Z","git_url":"git://github.com/samselikoff/ember-cli-mirage.git","ssh_url":"git@github.com:samselikoff/ember-cli-mirage.git","clone_url":"https://github.com/samselikoff/ember-cli-mirage.git","svn_url":"https://github.com/samselikoff/ember-cli-mirage","homepage":"http://ember-cli-mirage.com/","size":2782,"stargazers_count":155,"watchers_count":155,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":28,"mirror_url":null,"open_issues_count":42,"forks":28,"open_issues":42,"watchers":155,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/139"},"html":{"href":"https://github.com/samselikoff/ember-cli-mirage/pull/139"},"issue":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/139"},"comments":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/samselikoff/ember-cli-mirage/statuses/7807fcb3e6a2f611ca10608843165b7a6b091a55"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"samselikoff","id":2922250,"avatar_url":"https://avatars.githubusercontent.com/u/2922250?v=3","gravatar_id":"","url":"https://api.github.com/users/samselikoff","html_url":"https://github.com/samselikoff","followers_url":"https://api.github.com/users/samselikoff/followers","following_url":"https://api.github.com/users/samselikoff/following{/other_user}","gists_url":"https://api.github.com/users/samselikoff/gists{/gist_id}","starred_url":"https://api.github.com/users/samselikoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samselikoff/subscriptions","organizations_url":"https://api.github.com/users/samselikoff/orgs","repos_url":"https://api.github.com/users/samselikoff/repos","events_url":"https://api.github.com/users/samselikoff/events{/privacy}","received_events_url":"https://api.github.com/users/samselikoff/received_events","type":"User","site_admin":false},"comments":1,"review_comments":2,"commits":1,"additions":25,"deletions":3,"changed_files":5}}