GitHub PullRequestReviewCommentEvent at 2014-10-18 20:02:12
Repository: rails
Actor: seuros
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/19056009","id":19056009,"diff_hunk":"@@ -26,13 +26,16 @@ def queue_as(part_name=nil, &block)\n       def queue_name_from_part(part_name) #:nodoc:\n         queue_name = part_name || default_queue_name\n         name_parts = [queue_name_prefix.presence, queue_name]\n-        name_parts.compact.join('_')\n+        name_parts.compact.join(queue_name_prefix_delimiter)\n       end\n     end\n \n     included do\n       class_attribute :queue_name, instance_accessor: false\n+      class_attribute :queue_name_prefix_delimiter, instance_accessor: false\n+\n       self.queue_name = default_queue_name\n+      self.queue_name_prefix_delimiter = '_' # set default delimiter to '_'","path":"activejob/lib/active_job/queue_name.rb","position":14,"original_position":14,"commit_id":"f37c822a41f31357655cb49b2d9a27f716c18b6b","original_commit_id":"f37c822a41f31357655cb49b2d9a27f716c18b6b","user":{"login":"seuros","id":2394703,"avatar_url":"https://avatars.githubusercontent.com/u/2394703?v=2","gravatar_id":"","url":"https://api.github.com/users/seuros","html_url":"https://github.com/seuros","followers_url":"https://api.github.com/users/seuros/followers","following_url":"https://api.github.com/users/seuros/following{/other_user}","gists_url":"https://api.github.com/users/seuros/gists{/gist_id}","starred_url":"https://api.github.com/users/seuros/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seuros/subscriptions","organizations_url":"https://api.github.com/users/seuros/orgs","repos_url":"https://api.github.com/users/seuros/repos","events_url":"https://api.github.com/users/seuros/events{/privacy}","received_events_url":"https://api.github.com/users/seuros/received_events","type":"User","site_admin":false},"body":"https://github.com/zv1n/rails/blob/add_prefix_delimiter/activejob/lib/active_job/queue_name.rb#L6","created_at":"2014-10-18T20:02:12Z","updated_at":"2014-10-18T20:02:12Z","html_url":"https://github.com/rails/rails/pull/17039#discussion_r19056009","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/17039","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/19056009"},"html":{"href":"https://github.com/rails/rails/pull/17039#discussion_r19056009"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/17039"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/17039","id":21676452,"html_url":"https://github.com/rails/rails/pull/17039","diff_url":"https://github.com/rails/rails/pull/17039.diff","patch_url":"https://github.com/rails/rails/pull/17039.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/17039","number":17039,"state":"open","locked":false,"title":"Added ability to configure the queue_name_prefix delimiter to ActiveJob::QueueName.","user":{"login":"zv1n","id":1707726,"avatar_url":"https://avatars.githubusercontent.com/u/1707726?v=2","gravatar_id":"","url":"https://api.github.com/users/zv1n","html_url":"https://github.com/zv1n","followers_url":"https://api.github.com/users/zv1n/followers","following_url":"https://api.github.com/users/zv1n/following{/other_user}","gists_url":"https://api.github.com/users/zv1n/gists{/gist_id}","starred_url":"https://api.github.com/users/zv1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zv1n/subscriptions","organizations_url":"https://api.github.com/users/zv1n/orgs","repos_url":"https://api.github.com/users/zv1n/repos","events_url":"https://api.github.com/users/zv1n/events{/privacy}","received_events_url":"https://api.github.com/users/zv1n/received_events","type":"User","site_admin":false},"body":"@seuros @cristianbica @jeremy,\r\n\r\nI'm currently trying to update my project to use ActiveJob for delayed work, but we use queue names following an `amqp.appname.queue` format, which is incompatible with ActiveJob's current implementation of `queue_name_from_part` (hard coded '_' delimiter).  This PR adds the ability to define the prefix delimiter on a per application or per class basis.\r\n\r\n- Added `class_attribute :queue_name_prefix_delimiter` to `ActiveJob::QueueName` to allow for developers using ActiveJob to change the delimiter.\r\n- Added tests to ensure custom delimiters operate properly.\r\n- Updated source guide to include a blurb about the prefix delimiter.\r\n\r\n","created_at":"2014-09-23T21:12:21Z","updated_at":"2014-10-18T20:02:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b30b5bc066f29a9572be6219c65bb5d16ecb35ac","assignee":null,"milestone":{"url":"https://api.github.com/repos/rails/rails/milestones/24","labels_url":"https://api.github.com/repos/rails/rails/milestones/24/labels","id":297919,"number":24,"title":"4.2.0","description":"","creator":{"login":"rafaelfranca","id":47848,"avatar_url":"https://avatars.githubusercontent.com/u/47848?v=2","gravatar_id":"","url":"https://api.github.com/users/rafaelfranca","html_url":"https://github.com/rafaelfranca","followers_url":"https://api.github.com/users/rafaelfranca/followers","following_url":"https://api.github.com/users/rafaelfranca/following{/other_user}","gists_url":"https://api.github.com/users/rafaelfranca/gists{/gist_id}","starred_url":"https://api.github.com/users/rafaelfranca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rafaelfranca/subscriptions","organizations_url":"https://api.github.com/users/rafaelfranca/orgs","repos_url":"https://api.github.com/users/rafaelfranca/repos","events_url":"https://api.github.com/users/rafaelfranca/events{/privacy}","received_events_url":"https://api.github.com/users/rafaelfranca/received_events","type":"User","site_admin":false},"open_issues":21,"closed_issues":145,"state":"open","created_at":"2013-03-27T19:29:42Z","updated_at":"2014-10-18T16:44:24Z","due_on":"2014-11-01T07:00:00Z"},"commits_url":"https://api.github.com/repos/rails/rails/pulls/17039/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/17039/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments/{number}","comments_url":"https://api.github.com/repos/rails/rails/issues/17039/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/f37c822a41f31357655cb49b2d9a27f716c18b6b","head":{"label":"zv1n:add_prefix_delimiter","ref":"add_prefix_delimiter","sha":"f37c822a41f31357655cb49b2d9a27f716c18b6b","user":{"login":"zv1n","id":1707726,"avatar_url":"https://avatars.githubusercontent.com/u/1707726?v=2","gravatar_id":"","url":"https://api.github.com/users/zv1n","html_url":"https://github.com/zv1n","followers_url":"https://api.github.com/users/zv1n/followers","following_url":"https://api.github.com/users/zv1n/following{/other_user}","gists_url":"https://api.github.com/users/zv1n/gists{/gist_id}","starred_url":"https://api.github.com/users/zv1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zv1n/subscriptions","organizations_url":"https://api.github.com/users/zv1n/orgs","repos_url":"https://api.github.com/users/zv1n/repos","events_url":"https://api.github.com/users/zv1n/events{/privacy}","received_events_url":"https://api.github.com/users/zv1n/received_events","type":"User","site_admin":false},"repo":{"id":24341484,"name":"rails","full_name":"zv1n/rails","owner":{"login":"zv1n","id":1707726,"avatar_url":"https://avatars.githubusercontent.com/u/1707726?v=2","gravatar_id":"","url":"https://api.github.com/users/zv1n","html_url":"https://github.com/zv1n","followers_url":"https://api.github.com/users/zv1n/followers","following_url":"https://api.github.com/users/zv1n/following{/other_user}","gists_url":"https://api.github.com/users/zv1n/gists{/gist_id}","starred_url":"https://api.github.com/users/zv1n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zv1n/subscriptions","organizations_url":"https://api.github.com/users/zv1n/orgs","repos_url":"https://api.github.com/users/zv1n/repos","events_url":"https://api.github.com/users/zv1n/events{/privacy}","received_events_url":"https://api.github.com/users/zv1n/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/zv1n/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/zv1n/rails","forks_url":"https://api.github.com/repos/zv1n/rails/forks","keys_url":"https://api.github.com/repos/zv1n/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zv1n/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zv1n/rails/teams","hooks_url":"https://api.github.com/repos/zv1n/rails/hooks","issue_events_url":"https://api.github.com/repos/zv1n/rails/issues/events{/number}","events_url":"https://api.github.com/repos/zv1n/rails/events","assignees_url":"https://api.github.com/repos/zv1n/rails/assignees{/user}","branches_url":"https://api.github.com/repos/zv1n/rails/branches{/branch}","tags_url":"https://api.github.com/repos/zv1n/rails/tags","blobs_url":"https://api.github.com/repos/zv1n/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zv1n/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zv1n/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/zv1n/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zv1n/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/zv1n/rails/languages","stargazers_url":"https://api.github.com/repos/zv1n/rails/stargazers","contributors_url":"https://api.github.com/repos/zv1n/rails/contributors","subscribers_url":"https://api.github.com/repos/zv1n/rails/subscribers","subscription_url":"https://api.github.com/repos/zv1n/rails/subscription","commits_url":"https://api.github.com/repos/zv1n/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/zv1n/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/zv1n/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/zv1n/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/zv1n/rails/contents/{+path}","compare_url":"https://api.github.com/repos/zv1n/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zv1n/rails/merges","archive_url":"https://api.github.com/repos/zv1n/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zv1n/rails/downloads","issues_url":"https://api.github.com/repos/zv1n/rails/issues{/number}","pulls_url":"https://api.github.com/repos/zv1n/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/zv1n/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/zv1n/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zv1n/rails/labels{/name}","releases_url":"https://api.github.com/repos/zv1n/rails/releases{/id}","created_at":"2014-09-22T19:02:47Z","updated_at":"2014-09-22T18:36:32Z","pushed_at":"2014-10-18T17:07:00Z","git_url":"git://github.com/zv1n/rails.git","ssh_url":"git@github.com:zv1n/rails.git","clone_url":"https://github.com/zv1n/rails.git","svn_url":"https://github.com/zv1n/rails","homepage":"http://rubyonrails.org","size":120617,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":false,"has_downloads":true,"has_wiki":false,"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":"rails:master","ref":"master","sha":"c33b5e841b54357c1589942dc70192ab0b51fc1e","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=2","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"repo":{"id":8514,"name":"rails","full_name":"rails/rails","owner":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=2","gravatar_id":"","url":"https://api.github.com/users/rails","html_url":"https://github.com/rails","followers_url":"https://api.github.com/users/rails/followers","following_url":"https://api.github.com/users/rails/following{/other_user}","gists_url":"https://api.github.com/users/rails/gists{/gist_id}","starred_url":"https://api.github.com/users/rails/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rails/subscriptions","organizations_url":"https://api.github.com/users/rails/orgs","repos_url":"https://api.github.com/users/rails/repos","events_url":"https://api.github.com/users/rails/events{/privacy}","received_events_url":"https://api.github.com/users/rails/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rails/rails","description":"Ruby on Rails","fork":false,"url":"https://api.github.com/repos/rails/rails","forks_url":"https://api.github.com/repos/rails/rails/forks","keys_url":"https://api.github.com/repos/rails/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rails/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rails/rails/teams","hooks_url":"https://api.github.com/repos/rails/rails/hooks","issue_events_url":"https://api.github.com/repos/rails/rails/issues/events{/number}","events_url":"https://api.github.com/repos/rails/rails/events","assignees_url":"https://api.github.com/repos/rails/rails/assignees{/user}","branches_url":"https://api.github.com/repos/rails/rails/branches{/branch}","tags_url":"https://api.github.com/repos/rails/rails/tags","blobs_url":"https://api.github.com/repos/rails/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rails/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rails/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/rails/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rails/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/rails/rails/languages","stargazers_url":"https://api.github.com/repos/rails/rails/stargazers","contributors_url":"https://api.github.com/repos/rails/rails/contributors","subscribers_url":"https://api.github.com/repos/rails/rails/subscribers","subscription_url":"https://api.github.com/repos/rails/rails/subscription","commits_url":"https://api.github.com/repos/rails/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/rails/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/rails/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/rails/rails/issues/comments/{number}","contents_url":"https://api.github.com/repos/rails/rails/contents/{+path}","compare_url":"https://api.github.com/repos/rails/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rails/rails/merges","archive_url":"https://api.github.com/repos/rails/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rails/rails/downloads","issues_url":"https://api.github.com/repos/rails/rails/issues{/number}","pulls_url":"https://api.github.com/repos/rails/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/rails/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/rails/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rails/rails/labels{/name}","releases_url":"https://api.github.com/repos/rails/rails/releases{/id}","created_at":"2008-04-11T02:19:47Z","updated_at":"2014-10-18T17:47:16Z","pushed_at":"2014-10-18T19:43:24Z","git_url":"git://github.com/rails/rails.git","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","svn_url":"https://github.com/rails/rails","homepage":"http://rubyonrails.org","size":394530,"stargazers_count":23538,"watchers_count":23538,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":8987,"mirror_url":null,"open_issues_count":751,"forks":8987,"open_issues":751,"watchers":23538,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/17039"},"html":{"href":"https://github.com/rails/rails/pull/17039"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/17039"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/17039/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/17039/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/17039/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/f37c822a41f31357655cb49b2d9a27f716c18b6b"}}}}