{"action":"created","issue":{"url":"https://api.github.com/repos/47deg/translate-bubble-android/issues/24","labels_url":"https://api.github.com/repos/47deg/translate-bubble-android/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/47deg/translate-bubble-android/issues/24/comments","events_url":"https://api.github.com/repos/47deg/translate-bubble-android/issues/24/events","html_url":"https://github.com/47deg/translate-bubble-android/pull/24","id":79490515,"number":24,"title":"Fix #7 issue. Improve text validation checking if the text to translate is a number or a URL.","user":{"login":"pedrovgs","id":4030704,"avatar_url":"https://avatars.githubusercontent.com/u/4030704?v=3","gravatar_id":"","url":"https://api.github.com/users/pedrovgs","html_url":"https://github.com/pedrovgs","followers_url":"https://api.github.com/users/pedrovgs/followers","following_url":"https://api.github.com/users/pedrovgs/following{/other_user}","gists_url":"https://api.github.com/users/pedrovgs/gists{/gist_id}","starred_url":"https://api.github.com/users/pedrovgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pedrovgs/subscriptions","organizations_url":"https://api.github.com/users/pedrovgs/orgs","repos_url":"https://api.github.com/users/pedrovgs/repos","events_url":"https://api.github.com/users/pedrovgs/events{/privacy}","received_events_url":"https://api.github.com/users/pedrovgs/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-05-22T15:10:23Z","updated_at":"2015-05-25T19:11:38Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/47deg/translate-bubble-android/pulls/24","html_url":"https://github.com/47deg/translate-bubble-android/pull/24","diff_url":"https://github.com/47deg/translate-bubble-android/pull/24.diff","patch_url":"https://github.com/47deg/translate-bubble-android/pull/24.patch"},"body":"Hi 47Deg developers!\r\n\r\nIn this PR I've changed your text validation policy in ``ClipboardServicesComponentImpl`` to fix the issue #7.\r\n\r\nTake a look to the new conditions I've added. Now, if the text to translate is a number or a URL the text is not consider as valid. I've added some tests to ``ClipboardServiceComponentSpec``.\r\n\r\nI've used a regular expression to check if the text to translate is a URL or not and the ``forall`` functional combinator to check if the text is a number. \r\n\r\nTo write this tests I've used ``clipboardServices.isValidCall shouldEqual false`` but I'm not sure if this is the correct way to assert this expected value :S This is my first PR to a Scala project :)\r\n\r\nMaybe all the code related to the text validation should be extracted to another class. But I think for this PR is not needed."},"comment":{"url":"https://api.github.com/repos/47deg/translate-bubble-android/issues/comments/105291791","html_url":"https://github.com/47deg/translate-bubble-android/pull/24#issuecomment-105291791","issue_url":"https://api.github.com/repos/47deg/translate-bubble-android/issues/24","id":105291791,"user":{"login":"franciscodr","id":1200151,"avatar_url":"https://avatars.githubusercontent.com/u/1200151?v=3","gravatar_id":"","url":"https://api.github.com/users/franciscodr","html_url":"https://github.com/franciscodr","followers_url":"https://api.github.com/users/franciscodr/followers","following_url":"https://api.github.com/users/franciscodr/following{/other_user}","gists_url":"https://api.github.com/users/franciscodr/gists{/gist_id}","starred_url":"https://api.github.com/users/franciscodr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franciscodr/subscriptions","organizations_url":"https://api.github.com/users/franciscodr/orgs","repos_url":"https://api.github.com/users/franciscodr/repos","events_url":"https://api.github.com/users/franciscodr/events{/privacy}","received_events_url":"https://api.github.com/users/franciscodr/received_events","type":"User","site_admin":false},"created_at":"2015-05-25T19:11:38Z","updated_at":"2015-05-25T19:11:38Z","body":"Thank you for taking the time to improve the project @pedrovgs. Minor comments from my side, good job and I hope you have enjoyed with Scala ;)"}}