{"action":"created","comment":{"url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/comments/180414983","pull_request_review_id":110828808,"id":180414983,"diff_hunk":"@@ -433,6 +433,46 @@ def upload_file!(name, ext = 'csv')\n     end\n   end\n \n+  context 'with slice_columns option' do\n+    before do\n+      add_author_resource(\n+        validate: true,\n+        template_object: ActiveAdminImport::Model.new,\n+        before_batch_import: lambda { |importer|\n+                               importer.batch_slice_columns(slice_columns)\n+                             }\n+      )\n+      visit '/admin/authors/import'\n+      upload_file!(:authors)\n+    end\n+\n+    context \"slice last column and superfluous column\" do\n+      let(:slice_columns) { [\"name\", \"last_name\", \"not_existing_column\"] }","path":"spec/import_spec.rb","position":18,"original_position":18,"commit_id":"be2da05fe4dc7e9619cf5a8a1e626179f573bce2","original_commit_id":"be2da05fe4dc7e9619cf5a8a1e626179f573bce2","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Style/WordArray: Use %w or %W for an array of words.","created_at":"2018-04-10T13:14:20Z","updated_at":"2018-04-10T13:14:20Z","html_url":"https://github.com/activeadmin-plugins/active_admin_import/pull/149#discussion_r180414983","pull_request_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/comments/180414983"},"html":{"href":"https://github.com/activeadmin-plugins/active_admin_import/pull/149#discussion_r180414983"},"pull_request":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149"}}},"pull_request":{"url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149","id":180592968,"html_url":"https://github.com/activeadmin-plugins/active_admin_import/pull/149","diff_url":"https://github.com/activeadmin-plugins/active_admin_import/pull/149.diff","patch_url":"https://github.com/activeadmin-plugins/active_admin_import/pull/149.patch","issue_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues/149","number":149,"state":"open","locked":false,"title":"WIP: Add possibility to skip columns/values in CSV","user":{"login":"workgena","id":9843321,"avatar_url":"https://avatars3.githubusercontent.com/u/9843321?v=4","gravatar_id":"","url":"https://api.github.com/users/workgena","html_url":"https://github.com/workgena","followers_url":"https://api.github.com/users/workgena/followers","following_url":"https://api.github.com/users/workgena/following{/other_user}","gists_url":"https://api.github.com/users/workgena/gists{/gist_id}","starred_url":"https://api.github.com/users/workgena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workgena/subscriptions","organizations_url":"https://api.github.com/users/workgena/orgs","repos_url":"https://api.github.com/users/workgena/repos","events_url":"https://api.github.com/users/workgena/events{/privacy}","received_events_url":"https://api.github.com/users/workgena/received_events","type":"User","site_admin":false},"body":"Add function `batch_slice_columns` which meant to resolve issue\r\nwhen CSV contains some redundant columns,\r\nor columns not existing in corresponding Model\r\n\r\nUsage example:\r\n\r\n```ruby\r\nActiveAdmin.register Post\r\n  active_admin_import before_batch_import: lambda { |importer|\r\n                        importer.batch_slice_columns(['name', 'birthday'])\r\n                      }\r\nend\r\n```\r\n\r\nIn this example  Post has columns 'name', 'last_name' and 'birthday'\r\nAnd on import only 'name' and 'birthday' will be used in INSERT-SQL\r\n\r\n Changes to be committed:","created_at":"2018-04-10T12:56:45Z","updated_at":"2018-04-10T13:14:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e70c6b5d45f6259f3f5dbf65659eb0fc61fef305","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149/commits","review_comments_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149/comments","review_comment_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/comments{/number}","comments_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues/149/comments","statuses_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/statuses/be2da05fe4dc7e9619cf5a8a1e626179f573bce2","head":{"label":"workgena:slice_insert_columns","ref":"slice_insert_columns","sha":"be2da05fe4dc7e9619cf5a8a1e626179f573bce2","user":{"login":"workgena","id":9843321,"avatar_url":"https://avatars3.githubusercontent.com/u/9843321?v=4","gravatar_id":"","url":"https://api.github.com/users/workgena","html_url":"https://github.com/workgena","followers_url":"https://api.github.com/users/workgena/followers","following_url":"https://api.github.com/users/workgena/following{/other_user}","gists_url":"https://api.github.com/users/workgena/gists{/gist_id}","starred_url":"https://api.github.com/users/workgena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workgena/subscriptions","organizations_url":"https://api.github.com/users/workgena/orgs","repos_url":"https://api.github.com/users/workgena/repos","events_url":"https://api.github.com/users/workgena/events{/privacy}","received_events_url":"https://api.github.com/users/workgena/received_events","type":"User","site_admin":false},"repo":{"id":33597184,"name":"active_admin_import","full_name":"workgena/active_admin_import","owner":{"login":"workgena","id":9843321,"avatar_url":"https://avatars3.githubusercontent.com/u/9843321?v=4","gravatar_id":"","url":"https://api.github.com/users/workgena","html_url":"https://github.com/workgena","followers_url":"https://api.github.com/users/workgena/followers","following_url":"https://api.github.com/users/workgena/following{/other_user}","gists_url":"https://api.github.com/users/workgena/gists{/gist_id}","starred_url":"https://api.github.com/users/workgena/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/workgena/subscriptions","organizations_url":"https://api.github.com/users/workgena/orgs","repos_url":"https://api.github.com/users/workgena/repos","events_url":"https://api.github.com/users/workgena/events{/privacy}","received_events_url":"https://api.github.com/users/workgena/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/workgena/active_admin_import","description":"active_admin_import is based on activerecord-import gem  - the most efficient way to import for ActiveAdmin","fork":true,"url":"https://api.github.com/repos/workgena/active_admin_import","forks_url":"https://api.github.com/repos/workgena/active_admin_import/forks","keys_url":"https://api.github.com/repos/workgena/active_admin_import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/workgena/active_admin_import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/workgena/active_admin_import/teams","hooks_url":"https://api.github.com/repos/workgena/active_admin_import/hooks","issue_events_url":"https://api.github.com/repos/workgena/active_admin_import/issues/events{/number}","events_url":"https://api.github.com/repos/workgena/active_admin_import/events","assignees_url":"https://api.github.com/repos/workgena/active_admin_import/assignees{/user}","branches_url":"https://api.github.com/repos/workgena/active_admin_import/branches{/branch}","tags_url":"https://api.github.com/repos/workgena/active_admin_import/tags","blobs_url":"https://api.github.com/repos/workgena/active_admin_import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/workgena/active_admin_import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/workgena/active_admin_import/git/refs{/sha}","trees_url":"https://api.github.com/repos/workgena/active_admin_import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/workgena/active_admin_import/statuses/{sha}","languages_url":"https://api.github.com/repos/workgena/active_admin_import/languages","stargazers_url":"https://api.github.com/repos/workgena/active_admin_import/stargazers","contributors_url":"https://api.github.com/repos/workgena/active_admin_import/contributors","subscribers_url":"https://api.github.com/repos/workgena/active_admin_import/subscribers","subscription_url":"https://api.github.com/repos/workgena/active_admin_import/subscription","commits_url":"https://api.github.com/repos/workgena/active_admin_import/commits{/sha}","git_commits_url":"https://api.github.com/repos/workgena/active_admin_import/git/commits{/sha}","comments_url":"https://api.github.com/repos/workgena/active_admin_import/comments{/number}","issue_comment_url":"https://api.github.com/repos/workgena/active_admin_import/issues/comments{/number}","contents_url":"https://api.github.com/repos/workgena/active_admin_import/contents/{+path}","compare_url":"https://api.github.com/repos/workgena/active_admin_import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/workgena/active_admin_import/merges","archive_url":"https://api.github.com/repos/workgena/active_admin_import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/workgena/active_admin_import/downloads","issues_url":"https://api.github.com/repos/workgena/active_admin_import/issues{/number}","pulls_url":"https://api.github.com/repos/workgena/active_admin_import/pulls{/number}","milestones_url":"https://api.github.com/repos/workgena/active_admin_import/milestones{/number}","notifications_url":"https://api.github.com/repos/workgena/active_admin_import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/workgena/active_admin_import/labels{/name}","releases_url":"https://api.github.com/repos/workgena/active_admin_import/releases{/id}","deployments_url":"https://api.github.com/repos/workgena/active_admin_import/deployments","created_at":"2015-04-08T09:22:49Z","updated_at":"2018-04-10T09:13:46Z","pushed_at":"2018-04-10T13:14:10Z","git_url":"git://github.com/workgena/active_admin_import.git","ssh_url":"git@github.com:workgena/active_admin_import.git","clone_url":"https://github.com/workgena/active_admin_import.git","svn_url":"https://github.com/workgena/active_admin_import","homepage":"http://fivell.github.io/active_admin_import","size":199,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"activeadmin-plugins:master","ref":"master","sha":"b491d732217da040e828e369717b1b573cfa03eb","user":{"login":"activeadmin-plugins","id":11481496,"avatar_url":"https://avatars0.githubusercontent.com/u/11481496?v=4","gravatar_id":"","url":"https://api.github.com/users/activeadmin-plugins","html_url":"https://github.com/activeadmin-plugins","followers_url":"https://api.github.com/users/activeadmin-plugins/followers","following_url":"https://api.github.com/users/activeadmin-plugins/following{/other_user}","gists_url":"https://api.github.com/users/activeadmin-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/activeadmin-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeadmin-plugins/subscriptions","organizations_url":"https://api.github.com/users/activeadmin-plugins/orgs","repos_url":"https://api.github.com/users/activeadmin-plugins/repos","events_url":"https://api.github.com/users/activeadmin-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/activeadmin-plugins/received_events","type":"Organization","site_admin":false},"repo":{"id":8607819,"name":"active_admin_import","full_name":"activeadmin-plugins/active_admin_import","owner":{"login":"activeadmin-plugins","id":11481496,"avatar_url":"https://avatars0.githubusercontent.com/u/11481496?v=4","gravatar_id":"","url":"https://api.github.com/users/activeadmin-plugins","html_url":"https://github.com/activeadmin-plugins","followers_url":"https://api.github.com/users/activeadmin-plugins/followers","following_url":"https://api.github.com/users/activeadmin-plugins/following{/other_user}","gists_url":"https://api.github.com/users/activeadmin-plugins/gists{/gist_id}","starred_url":"https://api.github.com/users/activeadmin-plugins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activeadmin-plugins/subscriptions","organizations_url":"https://api.github.com/users/activeadmin-plugins/orgs","repos_url":"https://api.github.com/users/activeadmin-plugins/repos","events_url":"https://api.github.com/users/activeadmin-plugins/events{/privacy}","received_events_url":"https://api.github.com/users/activeadmin-plugins/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activeadmin-plugins/active_admin_import","description":":paperclip: active_admin_import is based on activerecord-import gem  - the most efficient way to import for ActiveAdmin","fork":false,"url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import","forks_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/forks","keys_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/teams","hooks_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/hooks","issue_events_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues/events{/number}","events_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/events","assignees_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/assignees{/user}","branches_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/branches{/branch}","tags_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/tags","blobs_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/git/refs{/sha}","trees_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/statuses/{sha}","languages_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/languages","stargazers_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/stargazers","contributors_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/contributors","subscribers_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/subscribers","subscription_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/subscription","commits_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/commits{/sha}","git_commits_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/git/commits{/sha}","comments_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/comments{/number}","issue_comment_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues/comments{/number}","contents_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/contents/{+path}","compare_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/merges","archive_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/downloads","issues_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues{/number}","pulls_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls{/number}","milestones_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/milestones{/number}","notifications_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/labels{/name}","releases_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/releases{/id}","deployments_url":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/deployments","created_at":"2013-03-06T16:33:45Z","updated_at":"2018-04-02T02:41:07Z","pushed_at":"2018-04-10T13:14:11Z","git_url":"git://github.com/activeadmin-plugins/active_admin_import.git","ssh_url":"git@github.com:activeadmin-plugins/active_admin_import.git","clone_url":"https://github.com/activeadmin-plugins/active_admin_import.git","svn_url":"https://github.com/activeadmin-plugins/active_admin_import","homepage":"http://activeadmin-plugins.github.io/active_admin_import","size":205,"stargazers_count":111,"watchers_count":111,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":64,"mirror_url":null,"archived":false,"open_issues_count":9,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":64,"open_issues":9,"watchers":111,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149"},"html":{"href":"https://github.com/activeadmin-plugins/active_admin_import/pull/149"},"issue":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues/149"},"comments":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/issues/149/comments"},"review_comments":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149/comments"},"review_comment":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/pulls/149/commits"},"statuses":{"href":"https://api.github.com/repos/activeadmin-plugins/active_admin_import/statuses/be2da05fe4dc7e9619cf5a8a1e626179f573bce2"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"houndci-bot"}}