{"action":"created","issue":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/1880","labels_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1880/labels{/name}","comments_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1880/comments","events_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1880/events","html_url":"https://github.com/bbatsov/rubocop/pull/1880","id":74567031,"number":1880,"title":"Adds auto-correct to LiteralInInterpolation cop.","user":{"login":"tmr08c","id":691365,"avatar_url":"https://avatars.githubusercontent.com/u/691365?v=3","gravatar_id":"","url":"https://api.github.com/users/tmr08c","html_url":"https://github.com/tmr08c","followers_url":"https://api.github.com/users/tmr08c/followers","following_url":"https://api.github.com/users/tmr08c/following{/other_user}","gists_url":"https://api.github.com/users/tmr08c/gists{/gist_id}","starred_url":"https://api.github.com/users/tmr08c/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmr08c/subscriptions","organizations_url":"https://api.github.com/users/tmr08c/orgs","repos_url":"https://api.github.com/users/tmr08c/repos","events_url":"https://api.github.com/users/tmr08c/events{/privacy}","received_events_url":"https://api.github.com/users/tmr08c/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-09T02:59:55Z","updated_at":"2015-05-09T08:51:04Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bbatsov/rubocop/pulls/1880","html_url":"https://github.com/bbatsov/rubocop/pull/1880","diff_url":"https://github.com/bbatsov/rubocop/pull/1880.diff","patch_url":"https://github.com/bbatsov/rubocop/pull/1880.patch"},"body":"This updates the `LiteralInInterpolation` cop to add auto-correction functionality.\r\n\r\n## Example\r\n\r\n### Before\r\n\r\n```ruby\r\n\"This is string #{1}\"\r\n\"another #{'string'}\"\r\n\"let us #{a} with #{1}\"\r\n\"does it work? #{true}\"\r\n```\r\n\r\n### After\r\n\r\n```ruby\r\n'This is string 1'\r\n\"another 'string'\"\r\n\"let us #{a} with 1\"\r\n'does it work? true'\r\n```\r\n\r\n## Additional Specs\r\n\r\nI added additional specs to test the auto-correct functionality with the existing examples as well as with multiple literals interpolated and literal interpolation mixed with non-literal interpolation.\r\n"},"comment":{"url":"https://api.github.com/repos/bbatsov/rubocop/issues/comments/100450163","html_url":"https://github.com/bbatsov/rubocop/pull/1880#issuecomment-100450163","issue_url":"https://api.github.com/repos/bbatsov/rubocop/issues/1880","id":100450163,"user":{"login":"bbatsov","id":103882,"avatar_url":"https://avatars.githubusercontent.com/u/103882?v=3","gravatar_id":"","url":"https://api.github.com/users/bbatsov","html_url":"https://github.com/bbatsov","followers_url":"https://api.github.com/users/bbatsov/followers","following_url":"https://api.github.com/users/bbatsov/following{/other_user}","gists_url":"https://api.github.com/users/bbatsov/gists{/gist_id}","starred_url":"https://api.github.com/users/bbatsov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bbatsov/subscriptions","organizations_url":"https://api.github.com/users/bbatsov/orgs","repos_url":"https://api.github.com/users/bbatsov/repos","events_url":"https://api.github.com/users/bbatsov/events{/privacy}","received_events_url":"https://api.github.com/users/bbatsov/received_events","type":"User","site_admin":false},"created_at":"2015-05-09T08:51:04Z","updated_at":"2015-05-09T08:51:04Z","body":"@tmr08c When you're done with the changes, please squash the commits into one and update the commit message to match the style outlined [here](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html)."}}