{"action":"created","comment":{"url":"https://api.github.com/repos/dpla/KriKri/pulls/comments/28088372","id":28088372,"diff_hunk":"@@ -0,0 +1,94 @@\n+# -*- coding: utf-8 -*-\n+require 'spec_helper'\n+\n+describe Krikri::Enrichments::LimitCharacters do\n+  it_behaves_like 'a field enrichment'\n+\n+  values = [{ :string => 'truncates a string over 100 characters',\n+              # The following string has 1022 characters.\n+              :start => 'Lorem ipsum dolor sit amet, consectetur adipiscing '\\\n+              'elit. Praesent tellus felis, porttitor non nulla ut, tincidunt '\\\n+              'eleifend lacus. Mauris sit amet urna sed mi dapibus hendrerit '\\\n+              'luctus sed metus. Nullam ut magna iaculis, gravida mauris sed, '\\\n+              'cursus sapien. Duis in libero tellus. Donec ac mollis dolor, '\\\n+              'convallis elementum lacus. Nullam vitae sodales nisl. Proin '\\\n+              'sed neque leo. Interdum et malesuada fames ac ante ipsum '\\\n+              'primis in faucibus. Aenean quis tortor in purus vehicula '\\\n+              'convallis. Suspendisse finibus cursus venenatis. Nam ac arcu '\\\n+              'in urna maximus dictum. Phasellus tempor tincidunt lectus '\\\n+              'aliquam eleifend. Morbi in commodo massa, sit amet bibendum '\\\n+              'quam. Sed efficitur velit libero, nec pulvinar diam tempor a. '\\\n+              'In eu ullamcorper risus, non pretium felis. Nam rutrum augue '\\\n+              'vel quam lacinia, non feugiat nunc fermentum. Aliquam lacinia '\\\n+              'rutrum lorem sed commodo. Nam tempor vel nisl eget vestibulum. '\\\n+              'Nunc lorem velit, euismod a ipsum non, consequat vulputate '\\\n+              'tellus. Phasellus sapien ipsum portal vitae augue eu volutpat.',\n+              # The following string has 1000 characters (including elipse).\n+              :end => 'Lorem ipsum dolor sit amet, consectetur adipiscing '\\\n+              'elit. Praesent tellus felis, porttitor non nulla ut, tincidunt '\\\n+              'eleifend lacus. Mauris sit amet urna sed mi dapibus hendrerit '\\\n+              'luctus sed metus. Nullam ut magna iaculis, gravida mauris sed, '\\\n+              'cursus sapien. Duis in libero tellus. Donec ac mollis dolor, '\\\n+              'convallis elementum lacus. Nullam vitae sodales nisl. Proin '\\\n+              'sed neque leo. Interdum et malesuada fames ac ante ipsum '\\\n+              'primis in faucibus. Aenean quis tortor in purus vehicula '\\\n+              'convallis. Suspendisse finibus cursus venenatis. Nam ac arcu '\\\n+              'in urna maximus dictum. Phasellus tempor tincidunt lectus '\\\n+              'aliquam eleifend. Morbi in commodo massa, sit amet bibendum '\\\n+              'quam. Sed efficitur velit libero, nec pulvinar diam tempor a. '\\\n+              'In eu ullamcorper risus, non pretium felis. Nam rutrum augue '\\\n+              'vel quam lacinia, non feugiat nunc fermentum. Aliquam lacinia '\\\n+              'rutrum lorem sed commodo. Nam tempor vel nisl eget vestibulum. '\\\n+              'Nunc lorem velit, euismod a ipsum non, consequat vulputate '\\\n+              'tellus. Phasellus sapien ipsum portal...'\n+            },\n+            { :string => 'truncates at whitespace',\n+              # The following string has 1023 characters.\n+              :start => 'Lorem ipsum dolor sit amet, consectetur adipiscing '\\\n+              'elit. Praesent tellus felis, porttitor non nulla ut, tincidunt '\\\n+              'eleifend lacus. Mauris sit amet urna sed mi dapibus hendrerit '\\\n+              'luctus sed metus. Nullam ut magna iaculis, gravida mauris sed, '\\\n+              'cursus sapien. Duis in libero tellus. Donec ac mollis dolor, '\\\n+              'convallis elementum lacus. Nullam vitae sodales nisl. Proin '\\\n+              'sed neque leo. Interdum et malesuada fames ac ante ipsum '\\\n+              'primis in faucibus. Aenean quis tortor in purus vehicula '\\\n+              'convallis. Suspendisse finibus cursus venenatis. Nam ac arcu '\\\n+              'in urna maximus dictum. Phasellus tempor tincidunt lectus '\\\n+              'aliquam eleifend. Morbi in commodo massa, sit amet bibendum '\\\n+              'quam. Sed efficitur velit libero, nec pulvinar diam tempor a. '\\\n+              'In eu ullamcorper risus, non pretium felis. Nam rutrum augue '\\\n+              'vel quam lacinia, non feugiat nunc fermentum. Aliquam lacinia '\\\n+              'rutrum lorem sed commodo. Nam tempor vel nisl eget vestibulum. '\\\n+              'Nunc lorem velit, euismod a ipsum non, consequat vulputate '\\\n+              'tellus. Phasellus sapien ipsum portale vitae augue eu volutpat.',\n+              # The following string has 993 characters (including elipse).\n+              :end => 'Lorem ipsum dolor sit amet, consectetur adipiscing '\\\n+              'elit. Praesent tellus felis, porttitor non nulla ut, tincidunt '\\\n+              'eleifend lacus. Mauris sit amet urna sed mi dapibus hendrerit '\\\n+              'luctus sed metus. Nullam ut magna iaculis, gravida mauris sed, '\\\n+              'cursus sapien. Duis in libero tellus. Donec ac mollis dolor, '\\\n+              'convallis elementum lacus. Nullam vitae sodales nisl. Proin '\\\n+              'sed neque leo. Interdum et malesuada fames ac ante ipsum '\\\n+              'primis in faucibus. Aenean quis tortor in purus vehicula '\\\n+              'convallis. Suspendisse finibus cursus venenatis. Nam ac arcu '\\\n+              'in urna maximus dictum. Phasellus tempor tincidunt lectus '\\\n+              'aliquam eleifend. Morbi in commodo massa, sit amet bibendum '\\\n+              'quam. Sed efficitur velit libero, nec pulvinar diam tempor a. '\\\n+              'In eu ullamcorper risus, non pretium felis. Nam rutrum augue '\\\n+              'vel quam lacinia, non feugiat nunc fermentum. Aliquam lacinia '\\\n+              'rutrum lorem sed commodo. Nam tempor vel nisl eget vestibulum. '\\\n+              'Nunc lorem velit, euismod a ipsum non, consequat vulputate '\\\n+              'tellus. Phasellus sapien ipsum...'\n+            },\n+            { :string => 'leaves strings under 100 characters alone',","path":"spec/lib/krikri/enrichments/limit_characters_spec.rb","position":83,"original_position":83,"commit_id":"7233c6acc4f90715059b4e361c9c825a4a9a88a7","original_commit_id":"7233c6acc4f90715059b4e361c9c825a4a9a88a7","user":{"login":"no-reply","id":1361776,"avatar_url":"https://avatars.githubusercontent.com/u/1361776?v=3","gravatar_id":"","url":"https://api.github.com/users/no-reply","html_url":"https://github.com/no-reply","followers_url":"https://api.github.com/users/no-reply/followers","following_url":"https://api.github.com/users/no-reply/following{/other_user}","gists_url":"https://api.github.com/users/no-reply/gists{/gist_id}","starred_url":"https://api.github.com/users/no-reply/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/no-reply/subscriptions","organizations_url":"https://api.github.com/users/no-reply/orgs","repos_url":"https://api.github.com/users/no-reply/repos","events_url":"https://api.github.com/users/no-reply/events{/privacy}","received_events_url":"https://api.github.com/users/no-reply/received_events","type":"User","site_admin":false},"body":"same typo as above.","created_at":"2015-04-09T18:23:43Z","updated_at":"2015-04-09T18:23:43Z","html_url":"https://github.com/dpla/KriKri/pull/145#discussion_r28088372","pull_request_url":"https://api.github.com/repos/dpla/KriKri/pulls/145","_links":{"self":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/comments/28088372"},"html":{"href":"https://github.com/dpla/KriKri/pull/145#discussion_r28088372"},"pull_request":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/145"}}},"pull_request":{"url":"https://api.github.com/repos/dpla/KriKri/pulls/145","id":32981893,"html_url":"https://github.com/dpla/KriKri/pull/145","diff_url":"https://github.com/dpla/KriKri/pull/145.diff","patch_url":"https://github.com/dpla/KriKri/pull/145.patch","issue_url":"https://api.github.com/repos/dpla/KriKri/issues/145","number":145,"state":"open","locked":false,"title":"enrichment limits string to 1000 characters","user":{"login":"AudreyAltman","id":3615206,"avatar_url":"https://avatars.githubusercontent.com/u/3615206?v=3","gravatar_id":"","url":"https://api.github.com/users/AudreyAltman","html_url":"https://github.com/AudreyAltman","followers_url":"https://api.github.com/users/AudreyAltman/followers","following_url":"https://api.github.com/users/AudreyAltman/following{/other_user}","gists_url":"https://api.github.com/users/AudreyAltman/gists{/gist_id}","starred_url":"https://api.github.com/users/AudreyAltman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AudreyAltman/subscriptions","organizations_url":"https://api.github.com/users/AudreyAltman/orgs","repos_url":"https://api.github.com/users/AudreyAltman/repos","events_url":"https://api.github.com/users/AudreyAltman/events{/privacy}","received_events_url":"https://api.github.com/users/AudreyAltman/received_events","type":"User","site_admin":false},"body":"This enrichment truncates strings that are more than 1000 characters.","created_at":"2015-04-09T18:19:40Z","updated_at":"2015-04-09T18:23:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3a197f0e13b99cb6cbfc35051f7f2468d4d27252","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/dpla/KriKri/pulls/145/commits","review_comments_url":"https://api.github.com/repos/dpla/KriKri/pulls/145/comments","review_comment_url":"https://api.github.com/repos/dpla/KriKri/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dpla/KriKri/issues/145/comments","statuses_url":"https://api.github.com/repos/dpla/KriKri/statuses/7233c6acc4f90715059b4e361c9c825a4a9a88a7","head":{"label":"dpla:feature/limit-field-chars","ref":"feature/limit-field-chars","sha":"7233c6acc4f90715059b4e361c9c825a4a9a88a7","user":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"repo":{"id":25104780,"name":"KriKri","full_name":"dpla/KriKri","owner":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dpla/KriKri","description":"A Rails engine for metadata aggregation, enhancement, and quality control.","fork":false,"url":"https://api.github.com/repos/dpla/KriKri","forks_url":"https://api.github.com/repos/dpla/KriKri/forks","keys_url":"https://api.github.com/repos/dpla/KriKri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpla/KriKri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpla/KriKri/teams","hooks_url":"https://api.github.com/repos/dpla/KriKri/hooks","issue_events_url":"https://api.github.com/repos/dpla/KriKri/issues/events{/number}","events_url":"https://api.github.com/repos/dpla/KriKri/events","assignees_url":"https://api.github.com/repos/dpla/KriKri/assignees{/user}","branches_url":"https://api.github.com/repos/dpla/KriKri/branches{/branch}","tags_url":"https://api.github.com/repos/dpla/KriKri/tags","blobs_url":"https://api.github.com/repos/dpla/KriKri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpla/KriKri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpla/KriKri/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpla/KriKri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpla/KriKri/statuses/{sha}","languages_url":"https://api.github.com/repos/dpla/KriKri/languages","stargazers_url":"https://api.github.com/repos/dpla/KriKri/stargazers","contributors_url":"https://api.github.com/repos/dpla/KriKri/contributors","subscribers_url":"https://api.github.com/repos/dpla/KriKri/subscribers","subscription_url":"https://api.github.com/repos/dpla/KriKri/subscription","commits_url":"https://api.github.com/repos/dpla/KriKri/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpla/KriKri/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpla/KriKri/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpla/KriKri/issues/comments{/number}","contents_url":"https://api.github.com/repos/dpla/KriKri/contents/{+path}","compare_url":"https://api.github.com/repos/dpla/KriKri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpla/KriKri/merges","archive_url":"https://api.github.com/repos/dpla/KriKri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpla/KriKri/downloads","issues_url":"https://api.github.com/repos/dpla/KriKri/issues{/number}","pulls_url":"https://api.github.com/repos/dpla/KriKri/pulls{/number}","milestones_url":"https://api.github.com/repos/dpla/KriKri/milestones{/number}","notifications_url":"https://api.github.com/repos/dpla/KriKri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpla/KriKri/labels{/name}","releases_url":"https://api.github.com/repos/dpla/KriKri/releases{/id}","created_at":"2014-10-12T02:41:01Z","updated_at":"2015-04-09T15:53:52Z","pushed_at":"2015-04-09T18:19:40Z","git_url":"git://github.com/dpla/KriKri.git","ssh_url":"git@github.com:dpla/KriKri.git","clone_url":"https://github.com/dpla/KriKri.git","svn_url":"https://github.com/dpla/KriKri","homepage":null,"size":5515,"stargazers_count":17,"watchers_count":17,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":17,"default_branch":"develop"}},"base":{"label":"dpla:develop","ref":"develop","sha":"51ec2dcd6896424eadb7953cb9546417288ab482","user":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"repo":{"id":25104780,"name":"KriKri","full_name":"dpla/KriKri","owner":{"login":"dpla","id":1252916,"avatar_url":"https://avatars.githubusercontent.com/u/1252916?v=3","gravatar_id":"","url":"https://api.github.com/users/dpla","html_url":"https://github.com/dpla","followers_url":"https://api.github.com/users/dpla/followers","following_url":"https://api.github.com/users/dpla/following{/other_user}","gists_url":"https://api.github.com/users/dpla/gists{/gist_id}","starred_url":"https://api.github.com/users/dpla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dpla/subscriptions","organizations_url":"https://api.github.com/users/dpla/orgs","repos_url":"https://api.github.com/users/dpla/repos","events_url":"https://api.github.com/users/dpla/events{/privacy}","received_events_url":"https://api.github.com/users/dpla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dpla/KriKri","description":"A Rails engine for metadata aggregation, enhancement, and quality control.","fork":false,"url":"https://api.github.com/repos/dpla/KriKri","forks_url":"https://api.github.com/repos/dpla/KriKri/forks","keys_url":"https://api.github.com/repos/dpla/KriKri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dpla/KriKri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dpla/KriKri/teams","hooks_url":"https://api.github.com/repos/dpla/KriKri/hooks","issue_events_url":"https://api.github.com/repos/dpla/KriKri/issues/events{/number}","events_url":"https://api.github.com/repos/dpla/KriKri/events","assignees_url":"https://api.github.com/repos/dpla/KriKri/assignees{/user}","branches_url":"https://api.github.com/repos/dpla/KriKri/branches{/branch}","tags_url":"https://api.github.com/repos/dpla/KriKri/tags","blobs_url":"https://api.github.com/repos/dpla/KriKri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dpla/KriKri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dpla/KriKri/git/refs{/sha}","trees_url":"https://api.github.com/repos/dpla/KriKri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dpla/KriKri/statuses/{sha}","languages_url":"https://api.github.com/repos/dpla/KriKri/languages","stargazers_url":"https://api.github.com/repos/dpla/KriKri/stargazers","contributors_url":"https://api.github.com/repos/dpla/KriKri/contributors","subscribers_url":"https://api.github.com/repos/dpla/KriKri/subscribers","subscription_url":"https://api.github.com/repos/dpla/KriKri/subscription","commits_url":"https://api.github.com/repos/dpla/KriKri/commits{/sha}","git_commits_url":"https://api.github.com/repos/dpla/KriKri/git/commits{/sha}","comments_url":"https://api.github.com/repos/dpla/KriKri/comments{/number}","issue_comment_url":"https://api.github.com/repos/dpla/KriKri/issues/comments{/number}","contents_url":"https://api.github.com/repos/dpla/KriKri/contents/{+path}","compare_url":"https://api.github.com/repos/dpla/KriKri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dpla/KriKri/merges","archive_url":"https://api.github.com/repos/dpla/KriKri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dpla/KriKri/downloads","issues_url":"https://api.github.com/repos/dpla/KriKri/issues{/number}","pulls_url":"https://api.github.com/repos/dpla/KriKri/pulls{/number}","milestones_url":"https://api.github.com/repos/dpla/KriKri/milestones{/number}","notifications_url":"https://api.github.com/repos/dpla/KriKri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dpla/KriKri/labels{/name}","releases_url":"https://api.github.com/repos/dpla/KriKri/releases{/id}","created_at":"2014-10-12T02:41:01Z","updated_at":"2015-04-09T15:53:52Z","pushed_at":"2015-04-09T18:19:40Z","git_url":"git://github.com/dpla/KriKri.git","ssh_url":"git@github.com:dpla/KriKri.git","clone_url":"https://github.com/dpla/KriKri.git","svn_url":"https://github.com/dpla/KriKri","homepage":null,"size":5515,"stargazers_count":17,"watchers_count":17,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":17,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/145"},"html":{"href":"https://github.com/dpla/KriKri/pull/145"},"issue":{"href":"https://api.github.com/repos/dpla/KriKri/issues/145"},"comments":{"href":"https://api.github.com/repos/dpla/KriKri/issues/145/comments"},"review_comments":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/145/comments"},"review_comment":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dpla/KriKri/pulls/145/commits"},"statuses":{"href":"https://api.github.com/repos/dpla/KriKri/statuses/7233c6acc4f90715059b4e361c9c825a4a9a88a7"}}}}