{"action":"created","comment":{"url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/comments/64306602","id":64306602,"diff_hunk":"@@ -0,0 +1,27 @@\n+require 'csv_shaper_template'\n+\n+# CsvShaperHandler\n+# Template handler for Rails\n+class CsvShaperHandler\n+  cattr_accessor :default_format\n+  self.default_format = Mime[:csv]\n+\n+  # Expected `call` class method\n+  # Set response headers with filename\n+  # Primarily calls CsvShaperTemplate.encode, passing through the context (self)\n+  def self.call(template)\n+    %{\n+      if ( controller.present? ) && !( defined?(ActionMailer) && defined?(ActionMailer::Base) && controller.is_a?(ActionMailer::Base) )","path":"lib/csv_shaper_handler.rb","position":14,"original_position":14,"commit_id":"fe9a5f8559cc5ca669ad095bdbea09fc40681104","original_commit_id":"fe9a5f8559cc5ca669ad095bdbea09fc40681104","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","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":"Line is too long. [135/80]","created_at":"2016-05-23T23:26:41Z","updated_at":"2016-05-23T23:26:41Z","html_url":"https://github.com/paulspringett/csv_shaper/pull/27#discussion_r64306602","pull_request_url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27","_links":{"self":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/comments/64306602"},"html":{"href":"https://github.com/paulspringett/csv_shaper/pull/27#discussion_r64306602"},"pull_request":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27"}}},"pull_request":{"url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27","id":71121788,"html_url":"https://github.com/paulspringett/csv_shaper/pull/27","diff_url":"https://github.com/paulspringett/csv_shaper/pull/27.diff","patch_url":"https://github.com/paulspringett/csv_shaper/pull/27.patch","issue_url":"https://api.github.com/repos/paulspringett/csv_shaper/issues/27","number":27,"state":"open","locked":false,"title":"Expose Config object to Rails templates for template-specific configuration","user":{"login":"jimryan","id":796235,"avatar_url":"https://avatars.githubusercontent.com/u/796235?v=3","gravatar_id":"","url":"https://api.github.com/users/jimryan","html_url":"https://github.com/jimryan","followers_url":"https://api.github.com/users/jimryan/followers","following_url":"https://api.github.com/users/jimryan/following{/other_user}","gists_url":"https://api.github.com/users/jimryan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimryan/subscriptions","organizations_url":"https://api.github.com/users/jimryan/orgs","repos_url":"https://api.github.com/users/jimryan/repos","events_url":"https://api.github.com/users/jimryan/events{/privacy}","received_events_url":"https://api.github.com/users/jimryan/received_events","type":"User","site_admin":false},"body":"Previously, there was no easy way to configuring CSV output on a template-specific level when rendering through Rails.  This PR exposes the local config object to Rails templates via a new `config` method.  I've updated the README, and added spec coverage for scenarios with and without existing global configuration.  \r\n\r\nTo add test coverage for the `CsvShaperTemplate` class, I broke it out into a separate file from `CsvShaperHandler`, to avoid depending on Action Pack for `Mime::CSV`","created_at":"2016-05-23T21:14:00Z","updated_at":"2016-05-23T23:26:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e4cc6ff1a2ecff1eabc7503a8d2d870698a4ffbc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27/commits","review_comments_url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27/comments","review_comment_url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/comments{/number}","comments_url":"https://api.github.com/repos/paulspringett/csv_shaper/issues/27/comments","statuses_url":"https://api.github.com/repos/paulspringett/csv_shaper/statuses/fe9a5f8559cc5ca669ad095bdbea09fc40681104","head":{"label":"jimryan:local-config-in-rails-templates","ref":"local-config-in-rails-templates","sha":"fe9a5f8559cc5ca669ad095bdbea09fc40681104","user":{"login":"jimryan","id":796235,"avatar_url":"https://avatars.githubusercontent.com/u/796235?v=3","gravatar_id":"","url":"https://api.github.com/users/jimryan","html_url":"https://github.com/jimryan","followers_url":"https://api.github.com/users/jimryan/followers","following_url":"https://api.github.com/users/jimryan/following{/other_user}","gists_url":"https://api.github.com/users/jimryan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimryan/subscriptions","organizations_url":"https://api.github.com/users/jimryan/orgs","repos_url":"https://api.github.com/users/jimryan/repos","events_url":"https://api.github.com/users/jimryan/events{/privacy}","received_events_url":"https://api.github.com/users/jimryan/received_events","type":"User","site_admin":false},"repo":{"id":59514292,"name":"csv_shaper","full_name":"jimryan/csv_shaper","owner":{"login":"jimryan","id":796235,"avatar_url":"https://avatars.githubusercontent.com/u/796235?v=3","gravatar_id":"","url":"https://api.github.com/users/jimryan","html_url":"https://github.com/jimryan","followers_url":"https://api.github.com/users/jimryan/followers","following_url":"https://api.github.com/users/jimryan/following{/other_user}","gists_url":"https://api.github.com/users/jimryan/gists{/gist_id}","starred_url":"https://api.github.com/users/jimryan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jimryan/subscriptions","organizations_url":"https://api.github.com/users/jimryan/orgs","repos_url":"https://api.github.com/users/jimryan/repos","events_url":"https://api.github.com/users/jimryan/events{/privacy}","received_events_url":"https://api.github.com/users/jimryan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jimryan/csv_shaper","description":"Beautiful DSL for creating CSV output in Ruby & Rails","fork":true,"url":"https://api.github.com/repos/jimryan/csv_shaper","forks_url":"https://api.github.com/repos/jimryan/csv_shaper/forks","keys_url":"https://api.github.com/repos/jimryan/csv_shaper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jimryan/csv_shaper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jimryan/csv_shaper/teams","hooks_url":"https://api.github.com/repos/jimryan/csv_shaper/hooks","issue_events_url":"https://api.github.com/repos/jimryan/csv_shaper/issues/events{/number}","events_url":"https://api.github.com/repos/jimryan/csv_shaper/events","assignees_url":"https://api.github.com/repos/jimryan/csv_shaper/assignees{/user}","branches_url":"https://api.github.com/repos/jimryan/csv_shaper/branches{/branch}","tags_url":"https://api.github.com/repos/jimryan/csv_shaper/tags","blobs_url":"https://api.github.com/repos/jimryan/csv_shaper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jimryan/csv_shaper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jimryan/csv_shaper/git/refs{/sha}","trees_url":"https://api.github.com/repos/jimryan/csv_shaper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jimryan/csv_shaper/statuses/{sha}","languages_url":"https://api.github.com/repos/jimryan/csv_shaper/languages","stargazers_url":"https://api.github.com/repos/jimryan/csv_shaper/stargazers","contributors_url":"https://api.github.com/repos/jimryan/csv_shaper/contributors","subscribers_url":"https://api.github.com/repos/jimryan/csv_shaper/subscribers","subscription_url":"https://api.github.com/repos/jimryan/csv_shaper/subscription","commits_url":"https://api.github.com/repos/jimryan/csv_shaper/commits{/sha}","git_commits_url":"https://api.github.com/repos/jimryan/csv_shaper/git/commits{/sha}","comments_url":"https://api.github.com/repos/jimryan/csv_shaper/comments{/number}","issue_comment_url":"https://api.github.com/repos/jimryan/csv_shaper/issues/comments{/number}","contents_url":"https://api.github.com/repos/jimryan/csv_shaper/contents/{+path}","compare_url":"https://api.github.com/repos/jimryan/csv_shaper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jimryan/csv_shaper/merges","archive_url":"https://api.github.com/repos/jimryan/csv_shaper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jimryan/csv_shaper/downloads","issues_url":"https://api.github.com/repos/jimryan/csv_shaper/issues{/number}","pulls_url":"https://api.github.com/repos/jimryan/csv_shaper/pulls{/number}","milestones_url":"https://api.github.com/repos/jimryan/csv_shaper/milestones{/number}","notifications_url":"https://api.github.com/repos/jimryan/csv_shaper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jimryan/csv_shaper/labels{/name}","releases_url":"https://api.github.com/repos/jimryan/csv_shaper/releases{/id}","deployments_url":"https://api.github.com/repos/jimryan/csv_shaper/deployments","created_at":"2016-05-23T19:59:02Z","updated_at":"2016-05-23T19:59:03Z","pushed_at":"2016-05-23T23:26:37Z","git_url":"git://github.com/jimryan/csv_shaper.git","ssh_url":"git@github.com:jimryan/csv_shaper.git","clone_url":"https://github.com/jimryan/csv_shaper.git","svn_url":"https://github.com/jimryan/csv_shaper","homepage":"","size":172,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"paulspringett:master","ref":"master","sha":"4ce7fddd5babf26e82149954e8afc4aee08f3eff","user":{"login":"paulspringett","id":18322,"avatar_url":"https://avatars.githubusercontent.com/u/18322?v=3","gravatar_id":"","url":"https://api.github.com/users/paulspringett","html_url":"https://github.com/paulspringett","followers_url":"https://api.github.com/users/paulspringett/followers","following_url":"https://api.github.com/users/paulspringett/following{/other_user}","gists_url":"https://api.github.com/users/paulspringett/gists{/gist_id}","starred_url":"https://api.github.com/users/paulspringett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulspringett/subscriptions","organizations_url":"https://api.github.com/users/paulspringett/orgs","repos_url":"https://api.github.com/users/paulspringett/repos","events_url":"https://api.github.com/users/paulspringett/events{/privacy}","received_events_url":"https://api.github.com/users/paulspringett/received_events","type":"User","site_admin":false},"repo":{"id":3860347,"name":"csv_shaper","full_name":"paulspringett/csv_shaper","owner":{"login":"paulspringett","id":18322,"avatar_url":"https://avatars.githubusercontent.com/u/18322?v=3","gravatar_id":"","url":"https://api.github.com/users/paulspringett","html_url":"https://github.com/paulspringett","followers_url":"https://api.github.com/users/paulspringett/followers","following_url":"https://api.github.com/users/paulspringett/following{/other_user}","gists_url":"https://api.github.com/users/paulspringett/gists{/gist_id}","starred_url":"https://api.github.com/users/paulspringett/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paulspringett/subscriptions","organizations_url":"https://api.github.com/users/paulspringett/orgs","repos_url":"https://api.github.com/users/paulspringett/repos","events_url":"https://api.github.com/users/paulspringett/events{/privacy}","received_events_url":"https://api.github.com/users/paulspringett/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/paulspringett/csv_shaper","description":"Beautiful DSL for creating CSV output in Ruby & Rails","fork":false,"url":"https://api.github.com/repos/paulspringett/csv_shaper","forks_url":"https://api.github.com/repos/paulspringett/csv_shaper/forks","keys_url":"https://api.github.com/repos/paulspringett/csv_shaper/keys{/key_id}","collaborators_url":"https://api.github.com/repos/paulspringett/csv_shaper/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/paulspringett/csv_shaper/teams","hooks_url":"https://api.github.com/repos/paulspringett/csv_shaper/hooks","issue_events_url":"https://api.github.com/repos/paulspringett/csv_shaper/issues/events{/number}","events_url":"https://api.github.com/repos/paulspringett/csv_shaper/events","assignees_url":"https://api.github.com/repos/paulspringett/csv_shaper/assignees{/user}","branches_url":"https://api.github.com/repos/paulspringett/csv_shaper/branches{/branch}","tags_url":"https://api.github.com/repos/paulspringett/csv_shaper/tags","blobs_url":"https://api.github.com/repos/paulspringett/csv_shaper/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/paulspringett/csv_shaper/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/paulspringett/csv_shaper/git/refs{/sha}","trees_url":"https://api.github.com/repos/paulspringett/csv_shaper/git/trees{/sha}","statuses_url":"https://api.github.com/repos/paulspringett/csv_shaper/statuses/{sha}","languages_url":"https://api.github.com/repos/paulspringett/csv_shaper/languages","stargazers_url":"https://api.github.com/repos/paulspringett/csv_shaper/stargazers","contributors_url":"https://api.github.com/repos/paulspringett/csv_shaper/contributors","subscribers_url":"https://api.github.com/repos/paulspringett/csv_shaper/subscribers","subscription_url":"https://api.github.com/repos/paulspringett/csv_shaper/subscription","commits_url":"https://api.github.com/repos/paulspringett/csv_shaper/commits{/sha}","git_commits_url":"https://api.github.com/repos/paulspringett/csv_shaper/git/commits{/sha}","comments_url":"https://api.github.com/repos/paulspringett/csv_shaper/comments{/number}","issue_comment_url":"https://api.github.com/repos/paulspringett/csv_shaper/issues/comments{/number}","contents_url":"https://api.github.com/repos/paulspringett/csv_shaper/contents/{+path}","compare_url":"https://api.github.com/repos/paulspringett/csv_shaper/compare/{base}...{head}","merges_url":"https://api.github.com/repos/paulspringett/csv_shaper/merges","archive_url":"https://api.github.com/repos/paulspringett/csv_shaper/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/paulspringett/csv_shaper/downloads","issues_url":"https://api.github.com/repos/paulspringett/csv_shaper/issues{/number}","pulls_url":"https://api.github.com/repos/paulspringett/csv_shaper/pulls{/number}","milestones_url":"https://api.github.com/repos/paulspringett/csv_shaper/milestones{/number}","notifications_url":"https://api.github.com/repos/paulspringett/csv_shaper/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/paulspringett/csv_shaper/labels{/name}","releases_url":"https://api.github.com/repos/paulspringett/csv_shaper/releases{/id}","deployments_url":"https://api.github.com/repos/paulspringett/csv_shaper/deployments","created_at":"2012-03-28T22:34:00Z","updated_at":"2016-05-08T05:16:04Z","pushed_at":"2016-05-23T23:26:37Z","git_url":"git://github.com/paulspringett/csv_shaper.git","ssh_url":"git@github.com:paulspringett/csv_shaper.git","clone_url":"https://github.com/paulspringett/csv_shaper.git","svn_url":"https://github.com/paulspringett/csv_shaper","homepage":"","size":180,"stargazers_count":133,"watchers_count":133,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":17,"mirror_url":null,"open_issues_count":6,"forks":17,"open_issues":6,"watchers":133,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27"},"html":{"href":"https://github.com/paulspringett/csv_shaper/pull/27"},"issue":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/issues/27"},"comments":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/issues/27/comments"},"review_comments":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27/comments"},"review_comment":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/pulls/27/commits"},"statuses":{"href":"https://api.github.com/repos/paulspringett/csv_shaper/statuses/fe9a5f8559cc5ca669ad095bdbea09fc40681104"}}}}
{"actor":{"display_login":"houndci-bot"}}