{"action":"created","comment":{"url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/comments/56473872","id":56473872,"diff_hunk":"@@ -0,0 +1,15 @@\n+module Filters\n+  class ExcludeFutureDated\n+    def initialize(date_field)\n+      @date_field = date_field\n+    end\n+\n+    def call\n+      date_field = @date_field\n+\n+      ETL::Filter.new(filter_name: 'Future Dated') do |record|\n+        Date.parse(record[date_field]) < Time.zone.today","path":"app/components/filters/exclude_future_dated.rb","position":11,"original_position":11,"commit_id":"47e7bc2ff63554c26770519f9fe036f770c6b206","original_commit_id":"47e7bc2ff63554c26770519f9fe036f770c6b206","user":{"login":"andrewgarner","id":2715,"avatar_url":"https://avatars.githubusercontent.com/u/2715?v=3","gravatar_id":"","url":"https://api.github.com/users/andrewgarner","html_url":"https://github.com/andrewgarner","followers_url":"https://api.github.com/users/andrewgarner/followers","following_url":"https://api.github.com/users/andrewgarner/following{/other_user}","gists_url":"https://api.github.com/users/andrewgarner/gists{/gist_id}","starred_url":"https://api.github.com/users/andrewgarner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrewgarner/subscriptions","organizations_url":"https://api.github.com/users/andrewgarner/orgs","repos_url":"https://api.github.com/users/andrewgarner/repos","events_url":"https://api.github.com/users/andrewgarner/events{/privacy}","received_events_url":"https://api.github.com/users/andrewgarner/received_events","type":"User","site_admin":false},"body":"If we're comparing dates we can use `Date.current`","created_at":"2016-03-17T09:11:41Z","updated_at":"2016-03-17T09:11:41Z","html_url":"https://github.com/guidance-guarantee-programme/data/pull/28#discussion_r56473872","pull_request_url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/comments/56473872"},"html":{"href":"https://github.com/guidance-guarantee-programme/data/pull/28#discussion_r56473872"},"pull_request":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28","id":62764999,"html_url":"https://github.com/guidance-guarantee-programme/data/pull/28","diff_url":"https://github.com/guidance-guarantee-programme/data/pull/28.diff","patch_url":"https://github.com/guidance-guarantee-programme/data/pull/28.patch","issue_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/28","number":28,"state":"open","locked":false,"title":"Better importer definitions","user":{"login":"dwhenry","id":63736,"avatar_url":"https://avatars.githubusercontent.com/u/63736?v=3","gravatar_id":"","url":"https://api.github.com/users/dwhenry","html_url":"https://github.com/dwhenry","followers_url":"https://api.github.com/users/dwhenry/followers","following_url":"https://api.github.com/users/dwhenry/following{/other_user}","gists_url":"https://api.github.com/users/dwhenry/gists{/gist_id}","starred_url":"https://api.github.com/users/dwhenry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwhenry/subscriptions","organizations_url":"https://api.github.com/users/dwhenry/orgs","repos_url":"https://api.github.com/users/dwhenry/repos","events_url":"https://api.github.com/users/dwhenry/events{/privacy}","received_events_url":"https://api.github.com/users/dwhenry/received_events","type":"User","site_admin":false},"body":"- This still requires unit tests to be written for \r\nthe extracted components","created_at":"2016-03-14T15:22:01Z","updated_at":"2016-03-17T09:11:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a24eb5888ae513776886e7abf36d30b10356cc51","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28/commits","review_comments_url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28/comments","review_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/comments{/number}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/28/comments","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/data/statuses/47e7bc2ff63554c26770519f9fe036f770c6b206","head":{"label":"guidance-guarantee-programme:components","ref":"components","sha":"47e7bc2ff63554c26770519f9fe036f770c6b206","user":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"repo":{"id":52270988,"name":"data","full_name":"guidance-guarantee-programme/data","owner":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guidance-guarantee-programme/data","description":"Reporting and data analysis for Pension Wise.","fork":false,"url":"https://api.github.com/repos/guidance-guarantee-programme/data","forks_url":"https://api.github.com/repos/guidance-guarantee-programme/data/forks","keys_url":"https://api.github.com/repos/guidance-guarantee-programme/data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guidance-guarantee-programme/data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guidance-guarantee-programme/data/teams","hooks_url":"https://api.github.com/repos/guidance-guarantee-programme/data/hooks","issue_events_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/events{/number}","events_url":"https://api.github.com/repos/guidance-guarantee-programme/data/events","assignees_url":"https://api.github.com/repos/guidance-guarantee-programme/data/assignees{/user}","branches_url":"https://api.github.com/repos/guidance-guarantee-programme/data/branches{/branch}","tags_url":"https://api.github.com/repos/guidance-guarantee-programme/data/tags","blobs_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/refs{/sha}","trees_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/data/statuses/{sha}","languages_url":"https://api.github.com/repos/guidance-guarantee-programme/data/languages","stargazers_url":"https://api.github.com/repos/guidance-guarantee-programme/data/stargazers","contributors_url":"https://api.github.com/repos/guidance-guarantee-programme/data/contributors","subscribers_url":"https://api.github.com/repos/guidance-guarantee-programme/data/subscribers","subscription_url":"https://api.github.com/repos/guidance-guarantee-programme/data/subscription","commits_url":"https://api.github.com/repos/guidance-guarantee-programme/data/commits{/sha}","git_commits_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/commits{/sha}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/data/comments{/number}","issue_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/comments{/number}","contents_url":"https://api.github.com/repos/guidance-guarantee-programme/data/contents/{+path}","compare_url":"https://api.github.com/repos/guidance-guarantee-programme/data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guidance-guarantee-programme/data/merges","archive_url":"https://api.github.com/repos/guidance-guarantee-programme/data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guidance-guarantee-programme/data/downloads","issues_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues{/number}","pulls_url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls{/number}","milestones_url":"https://api.github.com/repos/guidance-guarantee-programme/data/milestones{/number}","notifications_url":"https://api.github.com/repos/guidance-guarantee-programme/data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guidance-guarantee-programme/data/labels{/name}","releases_url":"https://api.github.com/repos/guidance-guarantee-programme/data/releases{/id}","deployments_url":"https://api.github.com/repos/guidance-guarantee-programme/data/deployments","created_at":"2016-02-22T12:11:36Z","updated_at":"2016-03-14T15:11:02Z","pushed_at":"2016-03-16T15:29:18Z","git_url":"git://github.com/guidance-guarantee-programme/data.git","ssh_url":"git@github.com:guidance-guarantee-programme/data.git","clone_url":"https://github.com/guidance-guarantee-programme/data.git","svn_url":"https://github.com/guidance-guarantee-programme/data","homepage":"https://data.pensionwise.gov.uk","size":2944,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"guidance-guarantee-programme:master","ref":"master","sha":"aa918554d1b77c0d8f4d8511f814e80b7ad73081","user":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"repo":{"id":52270988,"name":"data","full_name":"guidance-guarantee-programme/data","owner":{"login":"guidance-guarantee-programme","id":8751528,"avatar_url":"https://avatars.githubusercontent.com/u/8751528?v=3","gravatar_id":"","url":"https://api.github.com/users/guidance-guarantee-programme","html_url":"https://github.com/guidance-guarantee-programme","followers_url":"https://api.github.com/users/guidance-guarantee-programme/followers","following_url":"https://api.github.com/users/guidance-guarantee-programme/following{/other_user}","gists_url":"https://api.github.com/users/guidance-guarantee-programme/gists{/gist_id}","starred_url":"https://api.github.com/users/guidance-guarantee-programme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidance-guarantee-programme/subscriptions","organizations_url":"https://api.github.com/users/guidance-guarantee-programme/orgs","repos_url":"https://api.github.com/users/guidance-guarantee-programme/repos","events_url":"https://api.github.com/users/guidance-guarantee-programme/events{/privacy}","received_events_url":"https://api.github.com/users/guidance-guarantee-programme/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/guidance-guarantee-programme/data","description":"Reporting and data analysis for Pension Wise.","fork":false,"url":"https://api.github.com/repos/guidance-guarantee-programme/data","forks_url":"https://api.github.com/repos/guidance-guarantee-programme/data/forks","keys_url":"https://api.github.com/repos/guidance-guarantee-programme/data/keys{/key_id}","collaborators_url":"https://api.github.com/repos/guidance-guarantee-programme/data/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/guidance-guarantee-programme/data/teams","hooks_url":"https://api.github.com/repos/guidance-guarantee-programme/data/hooks","issue_events_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/events{/number}","events_url":"https://api.github.com/repos/guidance-guarantee-programme/data/events","assignees_url":"https://api.github.com/repos/guidance-guarantee-programme/data/assignees{/user}","branches_url":"https://api.github.com/repos/guidance-guarantee-programme/data/branches{/branch}","tags_url":"https://api.github.com/repos/guidance-guarantee-programme/data/tags","blobs_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/refs{/sha}","trees_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/trees{/sha}","statuses_url":"https://api.github.com/repos/guidance-guarantee-programme/data/statuses/{sha}","languages_url":"https://api.github.com/repos/guidance-guarantee-programme/data/languages","stargazers_url":"https://api.github.com/repos/guidance-guarantee-programme/data/stargazers","contributors_url":"https://api.github.com/repos/guidance-guarantee-programme/data/contributors","subscribers_url":"https://api.github.com/repos/guidance-guarantee-programme/data/subscribers","subscription_url":"https://api.github.com/repos/guidance-guarantee-programme/data/subscription","commits_url":"https://api.github.com/repos/guidance-guarantee-programme/data/commits{/sha}","git_commits_url":"https://api.github.com/repos/guidance-guarantee-programme/data/git/commits{/sha}","comments_url":"https://api.github.com/repos/guidance-guarantee-programme/data/comments{/number}","issue_comment_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/comments{/number}","contents_url":"https://api.github.com/repos/guidance-guarantee-programme/data/contents/{+path}","compare_url":"https://api.github.com/repos/guidance-guarantee-programme/data/compare/{base}...{head}","merges_url":"https://api.github.com/repos/guidance-guarantee-programme/data/merges","archive_url":"https://api.github.com/repos/guidance-guarantee-programme/data/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/guidance-guarantee-programme/data/downloads","issues_url":"https://api.github.com/repos/guidance-guarantee-programme/data/issues{/number}","pulls_url":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls{/number}","milestones_url":"https://api.github.com/repos/guidance-guarantee-programme/data/milestones{/number}","notifications_url":"https://api.github.com/repos/guidance-guarantee-programme/data/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/guidance-guarantee-programme/data/labels{/name}","releases_url":"https://api.github.com/repos/guidance-guarantee-programme/data/releases{/id}","deployments_url":"https://api.github.com/repos/guidance-guarantee-programme/data/deployments","created_at":"2016-02-22T12:11:36Z","updated_at":"2016-03-14T15:11:02Z","pushed_at":"2016-03-16T15:29:18Z","git_url":"git://github.com/guidance-guarantee-programme/data.git","ssh_url":"git@github.com:guidance-guarantee-programme/data.git","clone_url":"https://github.com/guidance-guarantee-programme/data.git","svn_url":"https://github.com/guidance-guarantee-programme/data","homepage":"https://data.pensionwise.gov.uk","size":2944,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28"},"html":{"href":"https://github.com/guidance-guarantee-programme/data/pull/28"},"issue":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/28"},"comments":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/guidance-guarantee-programme/data/statuses/47e7bc2ff63554c26770519f9fe036f770c6b206"}}}}