{"action":"created","comment":{"url":"https://api.github.com/repos/rails/rails/pulls/comments/26264797","id":26264797,"diff_hunk":"@@ -14,20 +14,27 @@ module ClassMethods\n       # Specify the backend queue provider. The default queue adapter\n       # is the :inline queue. See QueueAdapters for more\n       # information.\n-      def queue_adapter=(name_or_adapter)\n-        @@queue_adapter = \\\n-          case name_or_adapter\n-          when Symbol, String\n-            load_adapter(name_or_adapter)\n+      def queue_adapter=(name_or_adapter_or_class)\n+        case name_or_adapter_or_class\n+        when Symbol, String\n+          self.queue_adapter = load_adapter(name_or_adapter_or_class)\n+        else\n+          @@queue_adapter = if name_or_adapter_or_class.respond_to?(:enqueue)\n+            name_or_adapter_or_class\n+          elsif name_or_adapter_or_class.is_a?(Class) && name_or_adapter_or_class.public_method_defined?(:enqueue)\n+            ActiveSupport::Deprecation.warn 'Passing a Class is deprecated. Please pass an instance instead.'\n+            name_or_adapter_or_class.new\n           else\n-            name_or_adapter if name_or_adapter.respond_to?(:enqueue)\n+            raise ArgumentError","path":"activejob/lib/active_job/queue_adapter.rb","position":null,"original_position":21,"commit_id":"fb26645c1ed9d3b74ec421839c9732706f74f5c0","original_commit_id":"1ecb4a1ffa2435dbe6c289f745171155ce2c9577","user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"body":"as discussed, leaving as is","created_at":"2015-03-11T22:59:41Z","updated_at":"2015-03-11T22:59:41Z","html_url":"https://github.com/rails/rails/pull/19295#discussion_r26264797","pull_request_url":"https://api.github.com/repos/rails/rails/pulls/19295","_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/comments/26264797"},"html":{"href":"https://github.com/rails/rails/pull/19295#discussion_r26264797"},"pull_request":{"href":"https://api.github.com/repos/rails/rails/pulls/19295"}}},"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/19295","id":30989602,"html_url":"https://github.com/rails/rails/pull/19295","diff_url":"https://github.com/rails/rails/pull/19295.diff","patch_url":"https://github.com/rails/rails/pull/19295.patch","issue_url":"https://api.github.com/repos/rails/rails/issues/19295","number":19295,"state":"open","locked":false,"title":"`ActiveJob::QueueAdapters::*` are no longer singletons","user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"body":"@matthewd @jeremy ","created_at":"2015-03-11T21:58:46Z","updated_at":"2015-03-11T22:59:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"65b3a8786662e3994420f9d52006d59c813ba940","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rails/rails/pulls/19295/commits","review_comments_url":"https://api.github.com/repos/rails/rails/pulls/19295/comments","review_comment_url":"https://api.github.com/repos/rails/rails/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rails/rails/issues/19295/comments","statuses_url":"https://api.github.com/repos/rails/rails/statuses/fb26645c1ed9d3b74ec421839c9732706f74f5c0","head":{"label":"square:aj-instances","ref":"aj-instances","sha":"fb26645c1ed9d3b74ec421839c9732706f74f5c0","user":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"repo":{"id":1838587,"name":"rails","full_name":"square/rails","owner":{"login":"square","id":82592,"avatar_url":"https://avatars.githubusercontent.com/u/82592?v=3","gravatar_id":"","url":"https://api.github.com/users/square","html_url":"https://github.com/square","followers_url":"https://api.github.com/users/square/followers","following_url":"https://api.github.com/users/square/following{/other_user}","gists_url":"https://api.github.com/users/square/gists{/gist_id}","starred_url":"https://api.github.com/users/square/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/square/subscriptions","organizations_url":"https://api.github.com/users/square/orgs","repos_url":"https://api.github.com/users/square/repos","events_url":"https://api.github.com/users/square/events{/privacy}","received_events_url":"https://api.github.com/users/square/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/square/rails","description":"Ruby on Rails","fork":true,"url":"https://api.github.com/repos/square/rails","forks_url":"https://api.github.com/repos/square/rails/forks","keys_url":"https://api.github.com/repos/square/rails/keys{/key_id}","collaborators_url":"https://api.github.com/repos/square/rails/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/square/rails/teams","hooks_url":"https://api.github.com/repos/square/rails/hooks","issue_events_url":"https://api.github.com/repos/square/rails/issues/events{/number}","events_url":"https://api.github.com/repos/square/rails/events","assignees_url":"https://api.github.com/repos/square/rails/assignees{/user}","branches_url":"https://api.github.com/repos/square/rails/branches{/branch}","tags_url":"https://api.github.com/repos/square/rails/tags","blobs_url":"https://api.github.com/repos/square/rails/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/square/rails/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/square/rails/git/refs{/sha}","trees_url":"https://api.github.com/repos/square/rails/git/trees{/sha}","statuses_url":"https://api.github.com/repos/square/rails/statuses/{sha}","languages_url":"https://api.github.com/repos/square/rails/languages","stargazers_url":"https://api.github.com/repos/square/rails/stargazers","contributors_url":"https://api.github.com/repos/square/rails/contributors","subscribers_url":"https://api.github.com/repos/square/rails/subscribers","subscription_url":"https://api.github.com/repos/square/rails/subscription","commits_url":"https://api.github.com/repos/square/rails/commits{/sha}","git_commits_url":"https://api.github.com/repos/square/rails/git/commits{/sha}","comments_url":"https://api.github.com/repos/square/rails/comments{/number}","issue_comment_url":"https://api.github.com/repos/square/rails/issues/comments{/number}","contents_url":"https://api.github.com/repos/square/rails/contents/{+path}","compare_url":"https://api.github.com/repos/square/rails/compare/{base}...{head}","merges_url":"https://api.github.com/repos/square/rails/merges","archive_url":"https://api.github.com/repos/square/rails/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/square/rails/downloads","issues_url":"https://api.github.com/repos/square/rails/issues{/number}","pulls_url":"https://api.github.com/repos/square/rails/pulls{/number}","milestones_url":"https://api.github.com/repos/square/rails/milestones{/number}","notifications_url":"https://api.github.com/repos/square/rails/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/square/rails/labels{/name}","releases_url":"https://api.github.com/repos/square/rails/releases{/id}","created_at":"2011-06-02T18:12:29Z","updated_at":"2015-02-24T12:26:30Z","pushed_at":"2015-03-11T22:58:48Z","git_url":"git://github.com/square/rails.git","ssh_url":"git@github.com:square/rails.git","clone_url":"https://github.com/square/rails.git","svn_url":"https://github.com/square/rails","homepage":"http://rubyonrails.org","size":126502,"stargazers_count":3,"watchers_count":3,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":0,"forks":6,"open_issues":0,"watchers":3,"default_branch":"4-0-square"}},"base":{"label":"rails:master","ref":"master","sha":"d31c941413ed484762ec819de8f35d413d84a9d6","user":{"login":"rails","id":4223,"avatar_url":"https://avatars.githubusercontent.com/u/4223?v=3","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=3","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":"2015-03-11T22:50:59Z","pushed_at":"2015-03-11T22:09:04Z","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":388052,"stargazers_count":25236,"watchers_count":25236,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9866,"mirror_url":null,"open_issues_count":721,"forks":9866,"open_issues":721,"watchers":25236,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rails/rails/pulls/19295"},"html":{"href":"https://github.com/rails/rails/pull/19295"},"issue":{"href":"https://api.github.com/repos/rails/rails/issues/19295"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/19295/comments"},"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/19295/comments"},"review_comment":{"href":"https://api.github.com/repos/rails/rails/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rails/rails/pulls/19295/commits"},"statuses":{"href":"https://api.github.com/repos/rails/rails/statuses/fb26645c1ed9d3b74ec421839c9732706f74f5c0"}}}}