{"action":"created","comment":{"url":"https://api.github.com/repos/chef/chef/pulls/comments/31253860","id":31253860,"diff_hunk":"@@ -871,23 +864,53 @@ def after_created\n       nil\n     end\n \n-    #\n-    # The module where Chef should look for providers for this resource.\n-    # The provider for `MyResource` will be looked up using\n-    # `provider_base::MyResource`.  Defaults to `Chef::Provider`.\n-    #\n-    # @param arg [Module] The module containing providers for this resource\n-    # @return [Module] The module containing providers for this resource\n-    #\n-    # @example\n-    #   class MyResource < Chef::Resource\n-    #     provider_base Chef::Provider::Deploy\n-    #     # ...other stuff\n-    #   end\n-    #\n-    def self.provider_base(arg=nil)\n-      @provider_base ||= arg\n-      @provider_base ||= Chef::Provider\n+    # Provider lookup and naming\n+    class<<self\n+      #\n+      # The DSL name of this resource (e.g. `package` or `yum_package`)\n+      #\n+      # @return [String] The DSL name of this resource.\n+      #\n+      # @deprecated Use resource_name instead.\n+      #\n+      def dsl_name\n+        Chef::Log.deprecation \"Resource.dsl_name is deprecated and will be removed in Chef 13.  Use resource_name instead.\"\n+        if name\n+          name = self.name.split('::')[-1]\n+          convert_to_snake_case(name)\n+        end\n+      end\n+\n+      #\n+      # The display name of this resource type, for printing purposes.\n+      #\n+      # @return [Symbol] The name of this resource type (e.g. `:execute`).\n+      #\n+      attr_accessor :resource_name\n+      def resource_name(value=NULL_ARG)\n+        if value != NULL_ARG\n+          self.resource_name = value.to_sym\n+        end\n+        @resource_name\n+      end\n+\n+      #\n+      # The module where Chef should look for providers for this resource.\n+      # The provider for `MyResource` will be looked up using\n+      # `provider_base::MyResource`.  Defaults to `Chef::Provider`.\n+      #\n+      # @param arg [Module] The module containing providers for this resource\n+      # @return [Module] The module containing providers for this resource\n+      #\n+      # @example\n+      #   class MyResource < Chef::Resource\n+      #     provider_base Chef::Provider::Deploy\n+      #     # ...other stuff\n+      #   end\n+      #\n+      def provider_base(arg=nil)\n+        @provider_base ||= arg || Chef::Provider\n+      end","path":"lib/chef/resource.rb","position":123,"original_position":123,"commit_id":"b7144999c591909d57343ff5b20e6416d71624af","original_commit_id":"b7144999c591909d57343ff5b20e6416d71624af","user":{"login":"lamont-granquist","id":454857,"avatar_url":"https://avatars.githubusercontent.com/u/454857?v=3","gravatar_id":"","url":"https://api.github.com/users/lamont-granquist","html_url":"https://github.com/lamont-granquist","followers_url":"https://api.github.com/users/lamont-granquist/followers","following_url":"https://api.github.com/users/lamont-granquist/following{/other_user}","gists_url":"https://api.github.com/users/lamont-granquist/gists{/gist_id}","starred_url":"https://api.github.com/users/lamont-granquist/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lamont-granquist/subscriptions","organizations_url":"https://api.github.com/users/lamont-granquist/orgs","repos_url":"https://api.github.com/users/lamont-granquist/repos","events_url":"https://api.github.com/users/lamont-granquist/events{/privacy}","received_events_url":"https://api.github.com/users/lamont-granquist/received_events","type":"User","site_admin":false},"body":"can you please throw a deprecation warning here and then remove the call from the deploy resource?  This is more gross class heirarchy crap that nobody uses now.","created_at":"2015-05-28T16:51:58Z","updated_at":"2015-05-28T16:51:58Z","html_url":"https://github.com/chef/chef/pull/3442#discussion_r31253860","pull_request_url":"https://api.github.com/repos/chef/chef/pulls/3442","_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/comments/31253860"},"html":{"href":"https://github.com/chef/chef/pull/3442#discussion_r31253860"},"pull_request":{"href":"https://api.github.com/repos/chef/chef/pulls/3442"}}},"pull_request":{"url":"https://api.github.com/repos/chef/chef/pulls/3442","id":36356174,"html_url":"https://github.com/chef/chef/pull/3442","diff_url":"https://github.com/chef/chef/pull/3442.diff","patch_url":"https://github.com/chef/chef/pull/3442.patch","issue_url":"https://api.github.com/repos/chef/chef/issues/3442","number":3442,"state":"open","locked":false,"title":"Move resource_name to Resource, automatically populate it from `provides`","user":{"login":"jkeiser","id":654882,"avatar_url":"https://avatars.githubusercontent.com/u/654882?v=3","gravatar_id":"","url":"https://api.github.com/users/jkeiser","html_url":"https://github.com/jkeiser","followers_url":"https://api.github.com/users/jkeiser/followers","following_url":"https://api.github.com/users/jkeiser/following{/other_user}","gists_url":"https://api.github.com/users/jkeiser/gists{/gist_id}","starred_url":"https://api.github.com/users/jkeiser/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkeiser/subscriptions","organizations_url":"https://api.github.com/users/jkeiser/orgs","repos_url":"https://api.github.com/users/jkeiser/repos","events_url":"https://api.github.com/users/jkeiser/events{/privacy}","received_events_url":"https://api.github.com/users/jkeiser/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-05-27T22:38:11Z","updated_at":"2015-05-28T16:51:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0e57585a70ae1bf63d2924d5c0b833510d3e400","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/chef/chef/pulls/3442/commits","review_comments_url":"https://api.github.com/repos/chef/chef/pulls/3442/comments","review_comment_url":"https://api.github.com/repos/chef/chef/pulls/comments{/number}","comments_url":"https://api.github.com/repos/chef/chef/issues/3442/comments","statuses_url":"https://api.github.com/repos/chef/chef/statuses/b7144999c591909d57343ff5b20e6416d71624af","head":{"label":"chef:jk/resource_name","ref":"jk/resource_name","sha":"b7144999c591909d57343ff5b20e6416d71624af","user":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":false,"url":"https://api.github.com/repos/chef/chef","forks_url":"https://api.github.com/repos/chef/chef/forks","keys_url":"https://api.github.com/repos/chef/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/chef/teams","hooks_url":"https://api.github.com/repos/chef/chef/hooks","issue_events_url":"https://api.github.com/repos/chef/chef/issues/events{/number}","events_url":"https://api.github.com/repos/chef/chef/events","assignees_url":"https://api.github.com/repos/chef/chef/assignees{/user}","branches_url":"https://api.github.com/repos/chef/chef/branches{/branch}","tags_url":"https://api.github.com/repos/chef/chef/tags","blobs_url":"https://api.github.com/repos/chef/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/chef/languages","stargazers_url":"https://api.github.com/repos/chef/chef/stargazers","contributors_url":"https://api.github.com/repos/chef/chef/contributors","subscribers_url":"https://api.github.com/repos/chef/chef/subscribers","subscription_url":"https://api.github.com/repos/chef/chef/subscription","commits_url":"https://api.github.com/repos/chef/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/chef/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/chef/contents/{+path}","compare_url":"https://api.github.com/repos/chef/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/chef/merges","archive_url":"https://api.github.com/repos/chef/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/chef/downloads","issues_url":"https://api.github.com/repos/chef/chef/issues{/number}","pulls_url":"https://api.github.com/repos/chef/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/chef/labels{/name}","releases_url":"https://api.github.com/repos/chef/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-05-28T14:06:52Z","pushed_at":"2015-05-28T15:54:22Z","git_url":"git://github.com/chef/chef.git","ssh_url":"git@github.com:chef/chef.git","clone_url":"https://github.com/chef/chef.git","svn_url":"https://github.com/chef/chef","homepage":"http://www.chef.io/chef/","size":171162,"stargazers_count":3629,"watchers_count":3629,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1472,"mirror_url":null,"open_issues_count":437,"forks":1472,"open_issues":437,"watchers":3629,"default_branch":"master"}},"base":{"label":"chef:master","ref":"master","sha":"d8172e646d9fbf43e57bca5e20d0ac352ba9a66a","user":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"repo":{"id":108278,"name":"chef","full_name":"chef/chef","owner":{"login":"chef","id":29740,"avatar_url":"https://avatars.githubusercontent.com/u/29740?v=3","gravatar_id":"","url":"https://api.github.com/users/chef","html_url":"https://github.com/chef","followers_url":"https://api.github.com/users/chef/followers","following_url":"https://api.github.com/users/chef/following{/other_user}","gists_url":"https://api.github.com/users/chef/gists{/gist_id}","starred_url":"https://api.github.com/users/chef/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chef/subscriptions","organizations_url":"https://api.github.com/users/chef/orgs","repos_url":"https://api.github.com/users/chef/repos","events_url":"https://api.github.com/users/chef/events{/privacy}","received_events_url":"https://api.github.com/users/chef/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/chef/chef","description":"A systems integration framework, built to bring the benefits of configuration management to your entire infrastructure.","fork":false,"url":"https://api.github.com/repos/chef/chef","forks_url":"https://api.github.com/repos/chef/chef/forks","keys_url":"https://api.github.com/repos/chef/chef/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chef/chef/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chef/chef/teams","hooks_url":"https://api.github.com/repos/chef/chef/hooks","issue_events_url":"https://api.github.com/repos/chef/chef/issues/events{/number}","events_url":"https://api.github.com/repos/chef/chef/events","assignees_url":"https://api.github.com/repos/chef/chef/assignees{/user}","branches_url":"https://api.github.com/repos/chef/chef/branches{/branch}","tags_url":"https://api.github.com/repos/chef/chef/tags","blobs_url":"https://api.github.com/repos/chef/chef/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chef/chef/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chef/chef/git/refs{/sha}","trees_url":"https://api.github.com/repos/chef/chef/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chef/chef/statuses/{sha}","languages_url":"https://api.github.com/repos/chef/chef/languages","stargazers_url":"https://api.github.com/repos/chef/chef/stargazers","contributors_url":"https://api.github.com/repos/chef/chef/contributors","subscribers_url":"https://api.github.com/repos/chef/chef/subscribers","subscription_url":"https://api.github.com/repos/chef/chef/subscription","commits_url":"https://api.github.com/repos/chef/chef/commits{/sha}","git_commits_url":"https://api.github.com/repos/chef/chef/git/commits{/sha}","comments_url":"https://api.github.com/repos/chef/chef/comments{/number}","issue_comment_url":"https://api.github.com/repos/chef/chef/issues/comments{/number}","contents_url":"https://api.github.com/repos/chef/chef/contents/{+path}","compare_url":"https://api.github.com/repos/chef/chef/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chef/chef/merges","archive_url":"https://api.github.com/repos/chef/chef/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chef/chef/downloads","issues_url":"https://api.github.com/repos/chef/chef/issues{/number}","pulls_url":"https://api.github.com/repos/chef/chef/pulls{/number}","milestones_url":"https://api.github.com/repos/chef/chef/milestones{/number}","notifications_url":"https://api.github.com/repos/chef/chef/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chef/chef/labels{/name}","releases_url":"https://api.github.com/repos/chef/chef/releases{/id}","created_at":"2009-01-15T20:40:48Z","updated_at":"2015-05-28T14:06:52Z","pushed_at":"2015-05-28T15:54:22Z","git_url":"git://github.com/chef/chef.git","ssh_url":"git@github.com:chef/chef.git","clone_url":"https://github.com/chef/chef.git","svn_url":"https://github.com/chef/chef","homepage":"http://www.chef.io/chef/","size":171162,"stargazers_count":3629,"watchers_count":3629,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1472,"mirror_url":null,"open_issues_count":437,"forks":1472,"open_issues":437,"watchers":3629,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/chef/chef/pulls/3442"},"html":{"href":"https://github.com/chef/chef/pull/3442"},"issue":{"href":"https://api.github.com/repos/chef/chef/issues/3442"},"comments":{"href":"https://api.github.com/repos/chef/chef/issues/3442/comments"},"review_comments":{"href":"https://api.github.com/repos/chef/chef/pulls/3442/comments"},"review_comment":{"href":"https://api.github.com/repos/chef/chef/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/chef/chef/pulls/3442/commits"},"statuses":{"href":"https://api.github.com/repos/chef/chef/statuses/b7144999c591909d57343ff5b20e6416d71624af"}}}}