{"action":"created","comment":{"url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/comments/45477016","id":45477016,"diff_hunk":"@@ -27,47 +29,75 @@ mailcatcher --smtp-port 1035  # needs to be running in order to catch mail\n open http://localhost:1080/\n ```\n \n+\n ## Development\n \n-To run the tests, simply invoke `rake`. This will run the test suite, as well as rubocop. The rubocop configuration is a copy of the configuration used in [frontend](https://github.com/moneyadviceservice/frontend/blob/master/.rubocop.yml) to match the MAS style.\n+Add the following to a `.ruby-env` file in the project root directory:\n+\n+    ```bash\n+    HOST=localhost\n+    SKIP_SLOW_TESTS=(true|false)\n+    ```\n+\n+We have a number of slow running feature specs. Using `SKIP_SLOW_TESTS=true` in the `.ruby-env` file will always ignore these when running locally. Alternatively, you can skip them on the fly by running `rake SPEC_OPTS=\"--tag ~js\"`, or run only those tests by running `rake SPEC_OPTS=\"--tag js\"` instead.\n+\n+\n+## Testing\n+\n+To run the tests, simply invoke `rake`. This will run the ruby and javascript test suites, as well as rubocop. The rubocop configuration is a copy of the configuration used in [frontend](https://github.com/moneyadviceservice/frontend/blob/master/.rubocop.yml) to match the MAS style.\n \n-We also have some javascript tests which can be run separately using:\n+The ruby tests can be run separately using:\n+```bash\n+  bundle exec rspec\n+```\n+\n+The javascript tests can be run separately using:\n ```bash\n   npm test\n ```\n \n-We have a number of slow running feature specs. If you would like to always ignore these locally, you can add an environment variable to your local machine setting `SKIP_SLOW_TESTS=true`. Alternatively, you can skip them on the fly by running `rake SPEC_OPTS=\"--tag ~js\"`, or run only those tests by running `rake SPEC_OPTS=\"--tag js\"` instead.\n+Rubocop can be run separately using:\n+```bash\n+  rubocop\n+```\n+\n \n ## Deployment\n-If you don't have an environment setup yet, follow the [setup instructions](https://moneyadviceserviceuk.atlassian.net/wiki/display/AZURE/Deploying+a+Rails+app+on+Ubuntu+14.4+with+Postgres%2C+Unicorn+and+Nginx)\n \n-You'll want to create a file `config/deploy/production.rb` if you don't already have one and populate the following info:\n+Each of the servers is on Azure. We currently use [Capistrano](http://capistranorb.com/) for deployment (although there is talk of moving this to Puppet).\n \n-```ruby\n-server <server_name>, user: <user>, roles: %w(app db web)\n+### TL;DR\n+\n+Set up your local development machine as described in the [super secret instructions](https://moneyadviceserviceuk.atlassian.net/wiki/display/DEV/Webfeeds+project-specific+instructions) and then either:\n+\n+```\n+# deploy to staging server\n+cap staging deploy\n ```\n \n-```ruby\n-cap production setup\n+or\n+\n+```\n+# deploy to production server\n cap production deploy\n ```\n \n-You may also want/need to run `rake db:seed` on the server.\n+### Setting up a new environment\n \n-### ENV variables\n-The following are the ENV variables that need set in\n+> PLEASE NOTE: you only need to do this for new environments that have not been set up yet. Existing environments should already be set up so you can proceed straight to deploying instructions.\n \n-* development:\n-```bash\n-  SKIP_SLOW_TESTS=(true|false)\n-```\n+The servers have been set up using these [instructions](https://moneyadviceserviceuk.atlassian.net/wiki/display/AZURE/Deploying+a+Rails+app+on+Ubuntu+14.4+with+Postgres%2C+Unicorn+and+Nginx). If you need to set up a new environment follow those instructions skipping any steps that are marked as ignorable if you're using Capistrano.\n \n+Capistrano has the ability to use recipes that will do most of the set up for you. The ones that we are using can be found in the `Capfile` on the project root directory. Common deploy information can be found in `config/deploy.rb`. Environment specific information can be found in `config/deploy/<env>.rb` although you'll need to create those files first. Please refer to the [super secret instructions](https://moneyadviceserviceuk.atlassian.net/wiki/display/DEV/Webfeeds+project-specific+instructions) for more information.\n \n-* production:\n+Once you have the necessary files set up, you can set up any non-production environment (i.e. staging, qa, etc.) as follows:\n \n-```bash\n-  BASIC_AUTH_NAME=<username>\n-  BASIC_AUTH_PASSWORD=<password>\n-  HOST=<hostname>\n-  GA_TRACKING_ID=<tracking_id>\n-```\n+  1. Create a file called `config/deploy/<env>.rb` on your local machine, and populate it similar to the `config/deploy/staging.rb` file (see the [super secret instructions](https://moneyadviceserviceuk.atlassian.net/wiki/display/DEV/Webfeeds+project-specific+instructions) if you don't yet have a `config/deploy/staging.rb` file).\n+  2. Run `cap <env> setup`.\n+  3. SSH into the server and navigate to `/var/www/webfeeds` and ensure that environment key on line 1 of both `db/database.yml` and `shared/config/database.yml` is `production:` and not `<env>:`.\n+\n+You can set up production (**BUT ONLY IF IT'S NOT ALREADY SET UP**) using just `cap production deploy`.","path":"README.md","position":103,"original_position":103,"commit_id":"53115c938a35c93c97620ea9c6ef53eafb3718c2","original_commit_id":"53115c938a35c93c97620ea9c6ef53eafb3718c2","user":{"login":"urfolomeus","id":52965,"avatar_url":"https://avatars.githubusercontent.com/u/52965?v=3","gravatar_id":"","url":"https://api.github.com/users/urfolomeus","html_url":"https://github.com/urfolomeus","followers_url":"https://api.github.com/users/urfolomeus/followers","following_url":"https://api.github.com/users/urfolomeus/following{/other_user}","gists_url":"https://api.github.com/users/urfolomeus/gists{/gist_id}","starred_url":"https://api.github.com/users/urfolomeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfolomeus/subscriptions","organizations_url":"https://api.github.com/users/urfolomeus/orgs","repos_url":"https://api.github.com/users/urfolomeus/repos","events_url":"https://api.github.com/users/urfolomeus/events{/privacy}","received_events_url":"https://api.github.com/users/urfolomeus/received_events","type":"User","site_admin":false},"body":"Oops, good catch. Fixing ... :)","created_at":"2015-11-20T14:59:16Z","updated_at":"2015-11-20T14:59:16Z","html_url":"https://github.com/moneyadviceservice/webfeeds/pull/111#discussion_r45477016","pull_request_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111","_links":{"self":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/comments/45477016"},"html":{"href":"https://github.com/moneyadviceservice/webfeeds/pull/111#discussion_r45477016"},"pull_request":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111"}}},"pull_request":{"url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111","id":51360008,"html_url":"https://github.com/moneyadviceservice/webfeeds/pull/111","diff_url":"https://github.com/moneyadviceservice/webfeeds/pull/111.diff","patch_url":"https://github.com/moneyadviceservice/webfeeds/pull/111.patch","issue_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/111","number":111,"state":"open","locked":false,"title":"Improving the README","user":{"login":"urfolomeus","id":52965,"avatar_url":"https://avatars.githubusercontent.com/u/52965?v=3","gravatar_id":"","url":"https://api.github.com/users/urfolomeus","html_url":"https://github.com/urfolomeus","followers_url":"https://api.github.com/users/urfolomeus/followers","following_url":"https://api.github.com/users/urfolomeus/following{/other_user}","gists_url":"https://api.github.com/users/urfolomeus/gists{/gist_id}","starred_url":"https://api.github.com/users/urfolomeus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urfolomeus/subscriptions","organizations_url":"https://api.github.com/users/urfolomeus/orgs","repos_url":"https://api.github.com/users/urfolomeus/repos","events_url":"https://api.github.com/users/urfolomeus/events{/privacy}","received_events_url":"https://api.github.com/users/urfolomeus/received_events","type":"User","site_admin":false},"body":"Deploy instructions were a little vague.","created_at":"2015-11-20T14:07:38Z","updated_at":"2015-11-20T14:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7276238416ee79b8f8a024f4a0274b0dd9d491fc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111/commits","review_comments_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111/comments","review_comment_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/comments{/number}","comments_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/111/comments","statuses_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/statuses/53115c938a35c93c97620ea9c6ef53eafb3718c2","head":{"label":"moneyadviceservice:readme_update","ref":"readme_update","sha":"53115c938a35c93c97620ea9c6ef53eafb3718c2","user":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"repo":{"id":34719869,"name":"webfeeds","full_name":"moneyadviceservice/webfeeds","owner":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyadviceservice/webfeeds","description":"","fork":false,"url":"https://api.github.com/repos/moneyadviceservice/webfeeds","forks_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/forks","keys_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/teams","hooks_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/hooks","issue_events_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/events{/number}","events_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/events","assignees_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/assignees{/user}","branches_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/branches{/branch}","tags_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/tags","blobs_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/languages","stargazers_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/stargazers","contributors_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/contributors","subscribers_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/subscribers","subscription_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/subscription","commits_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/comments{/number}","contents_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/contents/{+path}","compare_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/merges","archive_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/downloads","issues_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues{/number}","pulls_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/labels{/name}","releases_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/releases{/id}","created_at":"2015-04-28T08:59:24Z","updated_at":"2015-05-06T09:27:41Z","pushed_at":"2015-11-20T14:07:39Z","git_url":"git://github.com/moneyadviceservice/webfeeds.git","ssh_url":"git@github.com:moneyadviceservice/webfeeds.git","clone_url":"https://github.com/moneyadviceservice/webfeeds.git","svn_url":"https://github.com/moneyadviceservice/webfeeds","homepage":null,"size":32303,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"moneyadviceservice:master","ref":"master","sha":"2fabdd915fd3a34d081671b2b45ace765a9556d7","user":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"repo":{"id":34719869,"name":"webfeeds","full_name":"moneyadviceservice/webfeeds","owner":{"login":"moneyadviceservice","id":2064781,"avatar_url":"https://avatars.githubusercontent.com/u/2064781?v=3","gravatar_id":"","url":"https://api.github.com/users/moneyadviceservice","html_url":"https://github.com/moneyadviceservice","followers_url":"https://api.github.com/users/moneyadviceservice/followers","following_url":"https://api.github.com/users/moneyadviceservice/following{/other_user}","gists_url":"https://api.github.com/users/moneyadviceservice/gists{/gist_id}","starred_url":"https://api.github.com/users/moneyadviceservice/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/moneyadviceservice/subscriptions","organizations_url":"https://api.github.com/users/moneyadviceservice/orgs","repos_url":"https://api.github.com/users/moneyadviceservice/repos","events_url":"https://api.github.com/users/moneyadviceservice/events{/privacy}","received_events_url":"https://api.github.com/users/moneyadviceservice/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/moneyadviceservice/webfeeds","description":"","fork":false,"url":"https://api.github.com/repos/moneyadviceservice/webfeeds","forks_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/forks","keys_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/keys{/key_id}","collaborators_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/teams","hooks_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/hooks","issue_events_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/events{/number}","events_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/events","assignees_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/assignees{/user}","branches_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/branches{/branch}","tags_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/tags","blobs_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/refs{/sha}","trees_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/trees{/sha}","statuses_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/statuses/{sha}","languages_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/languages","stargazers_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/stargazers","contributors_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/contributors","subscribers_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/subscribers","subscription_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/subscription","commits_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/commits{/sha}","git_commits_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/git/commits{/sha}","comments_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/comments{/number}","issue_comment_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/comments{/number}","contents_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/contents/{+path}","compare_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/compare/{base}...{head}","merges_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/merges","archive_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/downloads","issues_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues{/number}","pulls_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls{/number}","milestones_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/milestones{/number}","notifications_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/labels{/name}","releases_url":"https://api.github.com/repos/moneyadviceservice/webfeeds/releases{/id}","created_at":"2015-04-28T08:59:24Z","updated_at":"2015-05-06T09:27:41Z","pushed_at":"2015-11-20T14:07:39Z","git_url":"git://github.com/moneyadviceservice/webfeeds.git","ssh_url":"git@github.com:moneyadviceservice/webfeeds.git","clone_url":"https://github.com/moneyadviceservice/webfeeds.git","svn_url":"https://github.com/moneyadviceservice/webfeeds","homepage":null,"size":32303,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111"},"html":{"href":"https://github.com/moneyadviceservice/webfeeds/pull/111"},"issue":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/111"},"comments":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/issues/111/comments"},"review_comments":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111/comments"},"review_comment":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/pulls/111/commits"},"statuses":{"href":"https://api.github.com/repos/moneyadviceservice/webfeeds/statuses/53115c938a35c93c97620ea9c6ef53eafb3718c2"}}}}