{"action":"created","comment":{"url":"https://api.github.com/repos/otwcode/otwarchive/pulls/comments/34420162","id":34420162,"diff_hunk":"@@ -23,6 +23,7 @@ def #{method_name}=(value)\n   def self.range_to_search(option)\n     option.gsub!(\"&gt;\", \">\")\n     option.gsub!(\"&lt;\", \"<\")\n+    option.downcase!\n     match = option.match(/^([<>]*)\\s*([\\d -]+)\\s*(year|week|month|day|hour)s?(\\s*ago)?s*$/)","path":"app/models/search.rb","position":5,"original_position":5,"commit_id":"2eb9e2d365993b768c4bcdc93f1e26dd4de799c6","original_commit_id":"2eb9e2d365993b768c4bcdc93f1e26dd4de799c6","user":{"login":"ariana-paris","id":1660785,"avatar_url":"https://avatars.githubusercontent.com/u/1660785?v=3","gravatar_id":"","url":"https://api.github.com/users/ariana-paris","html_url":"https://github.com/ariana-paris","followers_url":"https://api.github.com/users/ariana-paris/followers","following_url":"https://api.github.com/users/ariana-paris/following{/other_user}","gists_url":"https://api.github.com/users/ariana-paris/gists{/gist_id}","starred_url":"https://api.github.com/users/ariana-paris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ariana-paris/subscriptions","organizations_url":"https://api.github.com/users/ariana-paris/orgs","repos_url":"https://api.github.com/users/ariana-paris/repos","events_url":"https://api.github.com/users/ariana-paris/events{/privacy}","received_events_url":"https://api.github.com/users/ariana-paris/received_events","type":"User","site_admin":false},"body":"Sorry I didn't get around to this sooner after being pinged over a month ago... >.>\r\nThere is indeed a magic Regex trick, just add the letter `i` after the last slash in the Regex expression to make the match case insensitive.\r\n\r\n```ruby\r\nmatch = option.match(/^([<>]*)\\s*([\\d -]+)\\s*(year|week|month|day|hour)s?(\\s*ago)?s*$/i)\r\n```","created_at":"2015-07-12T09:24:26Z","updated_at":"2015-07-12T09:24:26Z","html_url":"https://github.com/otwcode/otwarchive/pull/2130#discussion_r34420162","pull_request_url":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130","_links":{"self":{"href":"https://api.github.com/repos/otwcode/otwarchive/pulls/comments/34420162"},"html":{"href":"https://github.com/otwcode/otwarchive/pull/2130#discussion_r34420162"},"pull_request":{"href":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130"}}},"pull_request":{"url":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130","id":36688495,"html_url":"https://github.com/otwcode/otwarchive/pull/2130","diff_url":"https://github.com/otwcode/otwarchive/pull/2130.diff","patch_url":"https://github.com/otwcode/otwarchive/pull/2130.patch","issue_url":"https://api.github.com/repos/otwcode/otwarchive/issues/2130","number":2130,"state":"open","locked":false,"title":"4301: Advanced work search date field is case sensitive","user":{"login":"scottsds","id":1735563,"avatar_url":"https://avatars.githubusercontent.com/u/1735563?v=3","gravatar_id":"","url":"https://api.github.com/users/scottsds","html_url":"https://github.com/scottsds","followers_url":"https://api.github.com/users/scottsds/followers","following_url":"https://api.github.com/users/scottsds/following{/other_user}","gists_url":"https://api.github.com/users/scottsds/gists{/gist_id}","starred_url":"https://api.github.com/users/scottsds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottsds/subscriptions","organizations_url":"https://api.github.com/users/scottsds/orgs","repos_url":"https://api.github.com/users/scottsds/repos","events_url":"https://api.github.com/users/scottsds/events{/privacy}","received_events_url":"https://api.github.com/users/scottsds/received_events","type":"User","site_admin":false},"body":"Resolves issue: https://code.google.com/p/otwarchive/issues/detail?id=4301\r\n\r\nThe code was looking for 'week' or 'weeks'. I downcased the user's input before it ran through our matching algorithms so things like \"WeEkS\" will still turn up the correct result. \r\n\r\nAs a note, there might have been a Regex way to do this, but I don't understand that witchcraft. Pinging @ariana-paris because she's a wizz at them :-D ","created_at":"2015-06-02T01:58:28Z","updated_at":"2015-07-12T09:24:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"874e0784567edb34d4379fec7794b727c71f595d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130/commits","review_comments_url":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130/comments","review_comment_url":"https://api.github.com/repos/otwcode/otwarchive/pulls/comments{/number}","comments_url":"https://api.github.com/repos/otwcode/otwarchive/issues/2130/comments","statuses_url":"https://api.github.com/repos/otwcode/otwarchive/statuses/2eb9e2d365993b768c4bcdc93f1e26dd4de799c6","head":{"label":"scottsds:issue_4301","ref":"issue_4301","sha":"2eb9e2d365993b768c4bcdc93f1e26dd4de799c6","user":{"login":"scottsds","id":1735563,"avatar_url":"https://avatars.githubusercontent.com/u/1735563?v=3","gravatar_id":"","url":"https://api.github.com/users/scottsds","html_url":"https://github.com/scottsds","followers_url":"https://api.github.com/users/scottsds/followers","following_url":"https://api.github.com/users/scottsds/following{/other_user}","gists_url":"https://api.github.com/users/scottsds/gists{/gist_id}","starred_url":"https://api.github.com/users/scottsds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottsds/subscriptions","organizations_url":"https://api.github.com/users/scottsds/orgs","repos_url":"https://api.github.com/users/scottsds/repos","events_url":"https://api.github.com/users/scottsds/events{/privacy}","received_events_url":"https://api.github.com/users/scottsds/received_events","type":"User","site_admin":false},"repo":{"id":4659431,"name":"otwarchive","full_name":"scottsds/otwarchive","owner":{"login":"scottsds","id":1735563,"avatar_url":"https://avatars.githubusercontent.com/u/1735563?v=3","gravatar_id":"","url":"https://api.github.com/users/scottsds","html_url":"https://github.com/scottsds","followers_url":"https://api.github.com/users/scottsds/followers","following_url":"https://api.github.com/users/scottsds/following{/other_user}","gists_url":"https://api.github.com/users/scottsds/gists{/gist_id}","starred_url":"https://api.github.com/users/scottsds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scottsds/subscriptions","organizations_url":"https://api.github.com/users/scottsds/orgs","repos_url":"https://api.github.com/users/scottsds/repos","events_url":"https://api.github.com/users/scottsds/events{/privacy}","received_events_url":"https://api.github.com/users/scottsds/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/scottsds/otwarchive","description":"The Organization for Transformative Works (OTW) - Archive Of Our Own (AO3) Project","fork":true,"url":"https://api.github.com/repos/scottsds/otwarchive","forks_url":"https://api.github.com/repos/scottsds/otwarchive/forks","keys_url":"https://api.github.com/repos/scottsds/otwarchive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/scottsds/otwarchive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/scottsds/otwarchive/teams","hooks_url":"https://api.github.com/repos/scottsds/otwarchive/hooks","issue_events_url":"https://api.github.com/repos/scottsds/otwarchive/issues/events{/number}","events_url":"https://api.github.com/repos/scottsds/otwarchive/events","assignees_url":"https://api.github.com/repos/scottsds/otwarchive/assignees{/user}","branches_url":"https://api.github.com/repos/scottsds/otwarchive/branches{/branch}","tags_url":"https://api.github.com/repos/scottsds/otwarchive/tags","blobs_url":"https://api.github.com/repos/scottsds/otwarchive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/scottsds/otwarchive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/scottsds/otwarchive/git/refs{/sha}","trees_url":"https://api.github.com/repos/scottsds/otwarchive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/scottsds/otwarchive/statuses/{sha}","languages_url":"https://api.github.com/repos/scottsds/otwarchive/languages","stargazers_url":"https://api.github.com/repos/scottsds/otwarchive/stargazers","contributors_url":"https://api.github.com/repos/scottsds/otwarchive/contributors","subscribers_url":"https://api.github.com/repos/scottsds/otwarchive/subscribers","subscription_url":"https://api.github.com/repos/scottsds/otwarchive/subscription","commits_url":"https://api.github.com/repos/scottsds/otwarchive/commits{/sha}","git_commits_url":"https://api.github.com/repos/scottsds/otwarchive/git/commits{/sha}","comments_url":"https://api.github.com/repos/scottsds/otwarchive/comments{/number}","issue_comment_url":"https://api.github.com/repos/scottsds/otwarchive/issues/comments{/number}","contents_url":"https://api.github.com/repos/scottsds/otwarchive/contents/{+path}","compare_url":"https://api.github.com/repos/scottsds/otwarchive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/scottsds/otwarchive/merges","archive_url":"https://api.github.com/repos/scottsds/otwarchive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/scottsds/otwarchive/downloads","issues_url":"https://api.github.com/repos/scottsds/otwarchive/issues{/number}","pulls_url":"https://api.github.com/repos/scottsds/otwarchive/pulls{/number}","milestones_url":"https://api.github.com/repos/scottsds/otwarchive/milestones{/number}","notifications_url":"https://api.github.com/repos/scottsds/otwarchive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/scottsds/otwarchive/labels{/name}","releases_url":"https://api.github.com/repos/scottsds/otwarchive/releases{/id}","created_at":"2012-06-14T04:44:52Z","updated_at":"2015-05-07T21:40:06Z","pushed_at":"2015-07-11T17:52:27Z","git_url":"git://github.com/scottsds/otwarchive.git","ssh_url":"git@github.com:scottsds/otwarchive.git","clone_url":"https://github.com/scottsds/otwarchive.git","svn_url":"https://github.com/scottsds/otwarchive","homepage":"http://transformativeworks.org/projects/archive","size":50787,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":2,"default_branch":"master"}},"base":{"label":"otwcode:master","ref":"master","sha":"0a5caeb50caadc63346ca7e6271e134415b70d70","user":{"login":"otwcode","id":408606,"avatar_url":"https://avatars.githubusercontent.com/u/408606?v=3","gravatar_id":"","url":"https://api.github.com/users/otwcode","html_url":"https://github.com/otwcode","followers_url":"https://api.github.com/users/otwcode/followers","following_url":"https://api.github.com/users/otwcode/following{/other_user}","gists_url":"https://api.github.com/users/otwcode/gists{/gist_id}","starred_url":"https://api.github.com/users/otwcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otwcode/subscriptions","organizations_url":"https://api.github.com/users/otwcode/orgs","repos_url":"https://api.github.com/users/otwcode/repos","events_url":"https://api.github.com/users/otwcode/events{/privacy}","received_events_url":"https://api.github.com/users/otwcode/received_events","type":"Organization","site_admin":false},"repo":{"id":1338040,"name":"otwarchive","full_name":"otwcode/otwarchive","owner":{"login":"otwcode","id":408606,"avatar_url":"https://avatars.githubusercontent.com/u/408606?v=3","gravatar_id":"","url":"https://api.github.com/users/otwcode","html_url":"https://github.com/otwcode","followers_url":"https://api.github.com/users/otwcode/followers","following_url":"https://api.github.com/users/otwcode/following{/other_user}","gists_url":"https://api.github.com/users/otwcode/gists{/gist_id}","starred_url":"https://api.github.com/users/otwcode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/otwcode/subscriptions","organizations_url":"https://api.github.com/users/otwcode/orgs","repos_url":"https://api.github.com/users/otwcode/repos","events_url":"https://api.github.com/users/otwcode/events{/privacy}","received_events_url":"https://api.github.com/users/otwcode/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/otwcode/otwarchive","description":"The Organization for Transformative Works (OTW) - Archive Of Our Own (AO3) Project","fork":false,"url":"https://api.github.com/repos/otwcode/otwarchive","forks_url":"https://api.github.com/repos/otwcode/otwarchive/forks","keys_url":"https://api.github.com/repos/otwcode/otwarchive/keys{/key_id}","collaborators_url":"https://api.github.com/repos/otwcode/otwarchive/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/otwcode/otwarchive/teams","hooks_url":"https://api.github.com/repos/otwcode/otwarchive/hooks","issue_events_url":"https://api.github.com/repos/otwcode/otwarchive/issues/events{/number}","events_url":"https://api.github.com/repos/otwcode/otwarchive/events","assignees_url":"https://api.github.com/repos/otwcode/otwarchive/assignees{/user}","branches_url":"https://api.github.com/repos/otwcode/otwarchive/branches{/branch}","tags_url":"https://api.github.com/repos/otwcode/otwarchive/tags","blobs_url":"https://api.github.com/repos/otwcode/otwarchive/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/otwcode/otwarchive/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/otwcode/otwarchive/git/refs{/sha}","trees_url":"https://api.github.com/repos/otwcode/otwarchive/git/trees{/sha}","statuses_url":"https://api.github.com/repos/otwcode/otwarchive/statuses/{sha}","languages_url":"https://api.github.com/repos/otwcode/otwarchive/languages","stargazers_url":"https://api.github.com/repos/otwcode/otwarchive/stargazers","contributors_url":"https://api.github.com/repos/otwcode/otwarchive/contributors","subscribers_url":"https://api.github.com/repos/otwcode/otwarchive/subscribers","subscription_url":"https://api.github.com/repos/otwcode/otwarchive/subscription","commits_url":"https://api.github.com/repos/otwcode/otwarchive/commits{/sha}","git_commits_url":"https://api.github.com/repos/otwcode/otwarchive/git/commits{/sha}","comments_url":"https://api.github.com/repos/otwcode/otwarchive/comments{/number}","issue_comment_url":"https://api.github.com/repos/otwcode/otwarchive/issues/comments{/number}","contents_url":"https://api.github.com/repos/otwcode/otwarchive/contents/{+path}","compare_url":"https://api.github.com/repos/otwcode/otwarchive/compare/{base}...{head}","merges_url":"https://api.github.com/repos/otwcode/otwarchive/merges","archive_url":"https://api.github.com/repos/otwcode/otwarchive/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/otwcode/otwarchive/downloads","issues_url":"https://api.github.com/repos/otwcode/otwarchive/issues{/number}","pulls_url":"https://api.github.com/repos/otwcode/otwarchive/pulls{/number}","milestones_url":"https://api.github.com/repos/otwcode/otwarchive/milestones{/number}","notifications_url":"https://api.github.com/repos/otwcode/otwarchive/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/otwcode/otwarchive/labels{/name}","releases_url":"https://api.github.com/repos/otwcode/otwarchive/releases{/id}","created_at":"2011-02-07T14:50:58Z","updated_at":"2015-07-02T01:37:19Z","pushed_at":"2015-07-12T06:08:58Z","git_url":"git://github.com/otwcode/otwarchive.git","ssh_url":"git@github.com:otwcode/otwarchive.git","clone_url":"https://github.com/otwcode/otwarchive.git","svn_url":"https://github.com/otwcode/otwarchive","homepage":"http://transformativeworks.org/projects/archive","size":152774,"stargazers_count":150,"watchers_count":150,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":104,"mirror_url":null,"open_issues_count":33,"forks":104,"open_issues":33,"watchers":150,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130"},"html":{"href":"https://github.com/otwcode/otwarchive/pull/2130"},"issue":{"href":"https://api.github.com/repos/otwcode/otwarchive/issues/2130"},"comments":{"href":"https://api.github.com/repos/otwcode/otwarchive/issues/2130/comments"},"review_comments":{"href":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130/comments"},"review_comment":{"href":"https://api.github.com/repos/otwcode/otwarchive/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/otwcode/otwarchive/pulls/2130/commits"},"statuses":{"href":"https://api.github.com/repos/otwcode/otwarchive/statuses/2eb9e2d365993b768c4bcdc93f1e26dd4de799c6"}}}}