{"action":"created","issue":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3692","labels_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3692/labels{/name}","comments_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3692/comments","events_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3692/events","html_url":"https://github.com/pouchdb/pouchdb/pull/3692","id":66039871,"number":3692,"title":"(#3689) - Add ajax to GET and fix npm run dev on Windows","user":{"login":"yaronyg","id":1480964,"avatar_url":"https://avatars.githubusercontent.com/u/1480964?v=3","gravatar_id":"","url":"https://api.github.com/users/yaronyg","html_url":"https://github.com/yaronyg","followers_url":"https://api.github.com/users/yaronyg/followers","following_url":"https://api.github.com/users/yaronyg/following{/other_user}","gists_url":"https://api.github.com/users/yaronyg/gists{/gist_id}","starred_url":"https://api.github.com/users/yaronyg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaronyg/subscriptions","organizations_url":"https://api.github.com/users/yaronyg/orgs","repos_url":"https://api.github.com/users/yaronyg/repos","events_url":"https://api.github.com/users/yaronyg/events{/privacy}","received_events_url":"https://api.github.com/users/yaronyg/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-04-03T00:27:43Z","updated_at":"2015-04-06T16:42:49Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/pouchdb/pouchdb/pulls/3692","html_url":"https://github.com/pouchdb/pouchdb/pull/3692","diff_url":"https://github.com/pouchdb/pouchdb/pull/3692.diff","patch_url":"https://github.com/pouchdb/pouchdb/pull/3692.patch"},"body":"Fixes #3689.\r\n\r\nNeeded the ability to actually use the advertised support for ajax on GET\r\nrequests.\r\n\r\ntest.headers.js - Fixed it up to use promises for the tests. This was\r\nimportant for after() because otherwise for some reason done never\r\ngot called. Also added tests for new GET functionality.\r\n\r\nnpm run dev - The package.json was edited to use an environment variable\r\nto set the client variable to 'dev'. But this doesn't work on Windows.\r\nSo I edited bin/run-test.sh to support an optional command line argument\r\nand then edited package.json to use that argument to pass in 'dev'"},"comment":{"url":"https://api.github.com/repos/pouchdb/pouchdb/issues/comments/90143360","html_url":"https://github.com/pouchdb/pouchdb/pull/3692#issuecomment-90143360","issue_url":"https://api.github.com/repos/pouchdb/pouchdb/issues/3692","id":90143360,"user":{"login":"yaronyg","id":1480964,"avatar_url":"https://avatars.githubusercontent.com/u/1480964?v=3","gravatar_id":"","url":"https://api.github.com/users/yaronyg","html_url":"https://github.com/yaronyg","followers_url":"https://api.github.com/users/yaronyg/followers","following_url":"https://api.github.com/users/yaronyg/following{/other_user}","gists_url":"https://api.github.com/users/yaronyg/gists{/gist_id}","starred_url":"https://api.github.com/users/yaronyg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yaronyg/subscriptions","organizations_url":"https://api.github.com/users/yaronyg/orgs","repos_url":"https://api.github.com/users/yaronyg/repos","events_url":"https://api.github.com/users/yaronyg/events{/privacy}","received_events_url":"https://api.github.com/users/yaronyg/received_events","type":"User","site_admin":false},"created_at":"2015-04-06T16:42:49Z","updated_at":"2015-04-06T16:42:49Z","body":"Thanks for taking the time on the minor nits. Seriously. Because I haven't committed in a while I'm rusty. I'm hoping to have a substantial commit regarding atts_since (which is what motivated this commit) so I should get back up to speed. Splitting the commits is fine. The only reason I didn't is because then I couldn't have run the dev tests on the GET commit.\r\n\r\nAs for Windows. It's tricky. The configuration I use is that I run the Git Bash shell and run the commands from there. This creates a bizarre hybrid environment where the script command is run \"unix style\" but the individual commands are run in what appears to be a windows command line environment. In other words if the NPM script command is \"foo && bar\" then parsing that line will happen in \"unix style\" so the && will be recognized but foo and bar will both be exec'd (it appears) in windows command line. That's why, I'm guessing, the environment variable setting didn't work since that isn't how environment variables are set on the command line in Windows. In other words running \"blah = 3 foo\" will just confuse Windows.\r\n\r\nThat's why I went with a command line argument. That works the same everywhere. Also note that the change i proposed should still work just fine if someone manually sets the CLIENT environment variable. The script change I made looks to see if there is an argument. If there is then it sets CLIENT, otherwise it does nothing. So if someone sets CLIENT in the environment and doesn't pass in an argument then their setting should work."}}