{"action":"created","comment":{"url":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments/42777104","id":42777104,"diff_hunk":"@@ -293,6 +293,23 @@ def as_json(options = {})\n     end\n   end\n \n+  def worksheet_name\n+    name = self.name\n+    name = name.truncate(31) if self.name.size > 31\n+    name = name.gsub(\n+      /[\\[\\]\\*\\\\?\\:\\/]/, {\n+        '[' => '(',\n+        ']' => ')',\n+        '*' => '∗',\n+        '?' => '',\n+        ':' => '-',\n+        '\\\\' => '-',\n+        '/' => '-'\n+      }\n+    )\n+    name\n+  end\n+","path":"app/models/option_set.rb","position":20,"original_position":20,"commit_id":"5396767d1b2a8a39f2c04ae1097eafaae26febd4","original_commit_id":"5396767d1b2a8a39f2c04ae1097eafaae26febd4","user":{"login":"hooverlunch","id":702320,"avatar_url":"https://avatars.githubusercontent.com/u/702320?v=3","gravatar_id":"","url":"https://api.github.com/users/hooverlunch","html_url":"https://github.com/hooverlunch","followers_url":"https://api.github.com/users/hooverlunch/followers","following_url":"https://api.github.com/users/hooverlunch/following{/other_user}","gists_url":"https://api.github.com/users/hooverlunch/gists{/gist_id}","starred_url":"https://api.github.com/users/hooverlunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hooverlunch/subscriptions","organizations_url":"https://api.github.com/users/hooverlunch/orgs","repos_url":"https://api.github.com/users/hooverlunch/repos","events_url":"https://api.github.com/users/hooverlunch/events{/privacy}","received_events_url":"https://api.github.com/users/hooverlunch/received_events","type":"User","site_admin":false},"body":"I mean you could always do a PORO -- WorksheetBuilder or something. But like I say, not a big deal.","created_at":"2015-10-22T17:16:52Z","updated_at":"2015-10-22T17:16:52Z","html_url":"https://github.com/thecartercenter/elmo/pull/152#discussion_r42777104","pull_request_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/152","_links":{"self":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments/42777104"},"html":{"href":"https://github.com/thecartercenter/elmo/pull/152#discussion_r42777104"},"pull_request":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/152"}}},"pull_request":{"url":"https://api.github.com/repos/thecartercenter/elmo/pulls/152","id":48236255,"html_url":"https://github.com/thecartercenter/elmo/pull/152","diff_url":"https://github.com/thecartercenter/elmo/pull/152.diff","patch_url":"https://github.com/thecartercenter/elmo/pull/152.patch","issue_url":"https://api.github.com/repos/thecartercenter/elmo/issues/152","number":152,"state":"open","locked":false,"title":"3390: Fixes option set export bug","user":{"login":"meltheadorable","id":10450274,"avatar_url":"https://avatars.githubusercontent.com/u/10450274?v=3","gravatar_id":"","url":"https://api.github.com/users/meltheadorable","html_url":"https://github.com/meltheadorable","followers_url":"https://api.github.com/users/meltheadorable/followers","following_url":"https://api.github.com/users/meltheadorable/following{/other_user}","gists_url":"https://api.github.com/users/meltheadorable/gists{/gist_id}","starred_url":"https://api.github.com/users/meltheadorable/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meltheadorable/subscriptions","organizations_url":"https://api.github.com/users/meltheadorable/orgs","repos_url":"https://api.github.com/users/meltheadorable/repos","events_url":"https://api.github.com/users/meltheadorable/events{/privacy}","received_events_url":"https://api.github.com/users/meltheadorable/received_events","type":"User","site_admin":false},"body":"Fixes bug where option set names longer than 31 characters or with special characters would cause the export to fail.\r\n\r\n* Adds `worksheet_name` method to OptionSet model\r\n* Updates export view to use `worksheet_name` for the export","created_at":"2015-10-20T18:03:58Z","updated_at":"2015-10-22T17:16:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"710f17c87ac064846f1cdbc4084db019ec992b7b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/152/commits","review_comments_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/152/comments","review_comment_url":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thecartercenter/elmo/issues/152/comments","statuses_url":"https://api.github.com/repos/thecartercenter/elmo/statuses/5396767d1b2a8a39f2c04ae1097eafaae26febd4","head":{"label":"thecartercenter:3390_option_set_export","ref":"3390_option_set_export","sha":"5396767d1b2a8a39f2c04ae1097eafaae26febd4","user":{"login":"thecartercenter","id":5075178,"avatar_url":"https://avatars.githubusercontent.com/u/5075178?v=3","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"repo":{"id":11615188,"name":"elmo","full_name":"thecartercenter/elmo","owner":{"login":"thecartercenter","id":5075178,"avatar_url":"https://avatars.githubusercontent.com/u/5075178?v=3","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thecartercenter/elmo","description":"","fork":false,"url":"https://api.github.com/repos/thecartercenter/elmo","forks_url":"https://api.github.com/repos/thecartercenter/elmo/forks","keys_url":"https://api.github.com/repos/thecartercenter/elmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thecartercenter/elmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thecartercenter/elmo/teams","hooks_url":"https://api.github.com/repos/thecartercenter/elmo/hooks","issue_events_url":"https://api.github.com/repos/thecartercenter/elmo/issues/events{/number}","events_url":"https://api.github.com/repos/thecartercenter/elmo/events","assignees_url":"https://api.github.com/repos/thecartercenter/elmo/assignees{/user}","branches_url":"https://api.github.com/repos/thecartercenter/elmo/branches{/branch}","tags_url":"https://api.github.com/repos/thecartercenter/elmo/tags","blobs_url":"https://api.github.com/repos/thecartercenter/elmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thecartercenter/elmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thecartercenter/elmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thecartercenter/elmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thecartercenter/elmo/statuses/{sha}","languages_url":"https://api.github.com/repos/thecartercenter/elmo/languages","stargazers_url":"https://api.github.com/repos/thecartercenter/elmo/stargazers","contributors_url":"https://api.github.com/repos/thecartercenter/elmo/contributors","subscribers_url":"https://api.github.com/repos/thecartercenter/elmo/subscribers","subscription_url":"https://api.github.com/repos/thecartercenter/elmo/subscription","commits_url":"https://api.github.com/repos/thecartercenter/elmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thecartercenter/elmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thecartercenter/elmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thecartercenter/elmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thecartercenter/elmo/contents/{+path}","compare_url":"https://api.github.com/repos/thecartercenter/elmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thecartercenter/elmo/merges","archive_url":"https://api.github.com/repos/thecartercenter/elmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thecartercenter/elmo/downloads","issues_url":"https://api.github.com/repos/thecartercenter/elmo/issues{/number}","pulls_url":"https://api.github.com/repos/thecartercenter/elmo/pulls{/number}","milestones_url":"https://api.github.com/repos/thecartercenter/elmo/milestones{/number}","notifications_url":"https://api.github.com/repos/thecartercenter/elmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thecartercenter/elmo/labels{/name}","releases_url":"https://api.github.com/repos/thecartercenter/elmo/releases{/id}","created_at":"2013-07-23T17:56:04Z","updated_at":"2015-08-01T19:23:18Z","pushed_at":"2015-10-20T20:48:25Z","git_url":"git://github.com/thecartercenter/elmo.git","ssh_url":"git@github.com:thecartercenter/elmo.git","clone_url":"https://github.com/thecartercenter/elmo.git","svn_url":"https://github.com/thecartercenter/elmo","homepage":null,"size":41514,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":5,"forks":20,"open_issues":5,"watchers":14,"default_branch":"master"}},"base":{"label":"thecartercenter:develop","ref":"develop","sha":"e5063c462bb27d4387fbe09550a968668e45bdfb","user":{"login":"thecartercenter","id":5075178,"avatar_url":"https://avatars.githubusercontent.com/u/5075178?v=3","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"repo":{"id":11615188,"name":"elmo","full_name":"thecartercenter/elmo","owner":{"login":"thecartercenter","id":5075178,"avatar_url":"https://avatars.githubusercontent.com/u/5075178?v=3","gravatar_id":"","url":"https://api.github.com/users/thecartercenter","html_url":"https://github.com/thecartercenter","followers_url":"https://api.github.com/users/thecartercenter/followers","following_url":"https://api.github.com/users/thecartercenter/following{/other_user}","gists_url":"https://api.github.com/users/thecartercenter/gists{/gist_id}","starred_url":"https://api.github.com/users/thecartercenter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thecartercenter/subscriptions","organizations_url":"https://api.github.com/users/thecartercenter/orgs","repos_url":"https://api.github.com/users/thecartercenter/repos","events_url":"https://api.github.com/users/thecartercenter/events{/privacy}","received_events_url":"https://api.github.com/users/thecartercenter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thecartercenter/elmo","description":"","fork":false,"url":"https://api.github.com/repos/thecartercenter/elmo","forks_url":"https://api.github.com/repos/thecartercenter/elmo/forks","keys_url":"https://api.github.com/repos/thecartercenter/elmo/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thecartercenter/elmo/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thecartercenter/elmo/teams","hooks_url":"https://api.github.com/repos/thecartercenter/elmo/hooks","issue_events_url":"https://api.github.com/repos/thecartercenter/elmo/issues/events{/number}","events_url":"https://api.github.com/repos/thecartercenter/elmo/events","assignees_url":"https://api.github.com/repos/thecartercenter/elmo/assignees{/user}","branches_url":"https://api.github.com/repos/thecartercenter/elmo/branches{/branch}","tags_url":"https://api.github.com/repos/thecartercenter/elmo/tags","blobs_url":"https://api.github.com/repos/thecartercenter/elmo/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thecartercenter/elmo/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thecartercenter/elmo/git/refs{/sha}","trees_url":"https://api.github.com/repos/thecartercenter/elmo/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thecartercenter/elmo/statuses/{sha}","languages_url":"https://api.github.com/repos/thecartercenter/elmo/languages","stargazers_url":"https://api.github.com/repos/thecartercenter/elmo/stargazers","contributors_url":"https://api.github.com/repos/thecartercenter/elmo/contributors","subscribers_url":"https://api.github.com/repos/thecartercenter/elmo/subscribers","subscription_url":"https://api.github.com/repos/thecartercenter/elmo/subscription","commits_url":"https://api.github.com/repos/thecartercenter/elmo/commits{/sha}","git_commits_url":"https://api.github.com/repos/thecartercenter/elmo/git/commits{/sha}","comments_url":"https://api.github.com/repos/thecartercenter/elmo/comments{/number}","issue_comment_url":"https://api.github.com/repos/thecartercenter/elmo/issues/comments{/number}","contents_url":"https://api.github.com/repos/thecartercenter/elmo/contents/{+path}","compare_url":"https://api.github.com/repos/thecartercenter/elmo/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thecartercenter/elmo/merges","archive_url":"https://api.github.com/repos/thecartercenter/elmo/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thecartercenter/elmo/downloads","issues_url":"https://api.github.com/repos/thecartercenter/elmo/issues{/number}","pulls_url":"https://api.github.com/repos/thecartercenter/elmo/pulls{/number}","milestones_url":"https://api.github.com/repos/thecartercenter/elmo/milestones{/number}","notifications_url":"https://api.github.com/repos/thecartercenter/elmo/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thecartercenter/elmo/labels{/name}","releases_url":"https://api.github.com/repos/thecartercenter/elmo/releases{/id}","created_at":"2013-07-23T17:56:04Z","updated_at":"2015-08-01T19:23:18Z","pushed_at":"2015-10-20T20:48:25Z","git_url":"git://github.com/thecartercenter/elmo.git","ssh_url":"git@github.com:thecartercenter/elmo.git","clone_url":"https://github.com/thecartercenter/elmo.git","svn_url":"https://github.com/thecartercenter/elmo","homepage":null,"size":41514,"stargazers_count":14,"watchers_count":14,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":5,"forks":20,"open_issues":5,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/152"},"html":{"href":"https://github.com/thecartercenter/elmo/pull/152"},"issue":{"href":"https://api.github.com/repos/thecartercenter/elmo/issues/152"},"comments":{"href":"https://api.github.com/repos/thecartercenter/elmo/issues/152/comments"},"review_comments":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/152/comments"},"review_comment":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thecartercenter/elmo/pulls/152/commits"},"statuses":{"href":"https://api.github.com/repos/thecartercenter/elmo/statuses/5396767d1b2a8a39f2c04ae1097eafaae26febd4"}}}}