{"action":"created","comment":{"url":"https://api.github.com/repos/activenetwork/actv/pulls/comments/32838958","id":32838958,"diff_hunk":"@@ -64,30 +36,49 @@ def footer\n     end\n \n     def inline_ad\n-      @inline_ad ||= begin\n-        val = tag_by_description 'inlinead'\n-        if val\n-          val.downcase == 'true'\n-        else\n-          true\n-        end\n-      end\n+      @inline_ad ||= resolve_inline_ad_tag\n     end\n     alias inline_ad? inline_ad\n \n-    private\n+    def author\n+      @author ||= author_from_reference || author_from_article\n+    end\n \n-      def get_from_author_footer(selector)\n-        node = nil\n+    def by_line\n+      @by_line ||= description_by_type 'articleByLine'\n+    end\n+\n+    def is_article?\n+      true\n+    end\n+\n+    def author_name_from_by_line\n+      author_name_regex = /by (.*)/i.match by_line\n+      author_name_regex[1].strip if author_name_regex.present?\n+    end\n+\n+    private\n \n-        if !author_footer.nil? && !author_footer.empty?\n-          doc = Nokogiri::HTML(author_footer)\n-          node = doc.css(selector).first\n-        end\n+    def author_from_article\n+      ACTV::Author.build_from_article self.to_hash","path":"lib/actv/article.rb","position":100,"original_position":100,"commit_id":"dffe9b907f04487d92b426612504f86cbdb7ea77","original_commit_id":"6a4343dc757f63a123a9d54a192cca36cf51d74e","user":{"login":"jaredplanter","id":4232036,"avatar_url":"https://avatars.githubusercontent.com/u/4232036?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredplanter","html_url":"https://github.com/jaredplanter","followers_url":"https://api.github.com/users/jaredplanter/followers","following_url":"https://api.github.com/users/jaredplanter/following{/other_user}","gists_url":"https://api.github.com/users/jaredplanter/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredplanter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredplanter/subscriptions","organizations_url":"https://api.github.com/users/jaredplanter/orgs","repos_url":"https://api.github.com/users/jaredplanter/repos","events_url":"https://api.github.com/users/jaredplanter/events{/privacy}","received_events_url":"https://api.github.com/users/jaredplanter/received_events","type":"User","site_admin":false},"body":"Possibly. I'll run some tests.","created_at":"2015-06-19T15:21:53Z","updated_at":"2015-06-19T15:21:53Z","html_url":"https://github.com/activenetwork/actv/pull/26#discussion_r32838958","pull_request_url":"https://api.github.com/repos/activenetwork/actv/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/activenetwork/actv/pulls/comments/32838958"},"html":{"href":"https://github.com/activenetwork/actv/pull/26#discussion_r32838958"},"pull_request":{"href":"https://api.github.com/repos/activenetwork/actv/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/activenetwork/actv/pulls/26","id":38084741,"html_url":"https://github.com/activenetwork/actv/pull/26","diff_url":"https://github.com/activenetwork/actv/pull/26.diff","patch_url":"https://github.com/activenetwork/actv/pull/26.patch","issue_url":"https://api.github.com/repos/activenetwork/actv/issues/26","number":26,"state":"open","locked":false,"title":"A3 1643 asset references","user":{"login":"jaredplanter","id":4232036,"avatar_url":"https://avatars.githubusercontent.com/u/4232036?v=3","gravatar_id":"","url":"https://api.github.com/users/jaredplanter","html_url":"https://github.com/jaredplanter","followers_url":"https://api.github.com/users/jaredplanter/followers","following_url":"https://api.github.com/users/jaredplanter/following{/other_user}","gists_url":"https://api.github.com/users/jaredplanter/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredplanter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredplanter/subscriptions","organizations_url":"https://api.github.com/users/jaredplanter/orgs","repos_url":"https://api.github.com/users/jaredplanter/repos","events_url":"https://api.github.com/users/jaredplanter/events{/privacy}","received_events_url":"https://api.github.com/users/jaredplanter/received_events","type":"User","site_admin":false},"body":"## Synopsis\r\nThese changes support the new Author asset and assetReference field from asset service. If an Article asset has an assetReferenceType of author, the referenced asset will be wrapped in an ACTV::Author object. If that asstReferenceType does not exist the article asset itself will be wrapped in an ACTV::Author object. Either way `ACTV::Article#author` returns an ACTV::Author object.\r\n\r\nIn addition, the ACTV::Client#asset endpoint has been refactored to return the proper asset object. Before, it was only returning an ACTV::Asset object. We've introduced ACTV::AssetFactory to determine which type of object to return, if one cannot be determined via logic provided in each asset classes #valid? (ie. ACTV::Author.valid?) method then it returns an ACTV::Asset object. ACTV::AssetFactory is called from ACTV::Asset.from_response.\r\n\r\nThese refactors open the door for many future refactors. This is just the beginning :)","created_at":"2015-06-19T07:58:49Z","updated_at":"2015-06-19T15:21:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a0f5a32c8466229cbc0fa8216fba1ae5b73c2df9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/activenetwork/actv/pulls/26/commits","review_comments_url":"https://api.github.com/repos/activenetwork/actv/pulls/26/comments","review_comment_url":"https://api.github.com/repos/activenetwork/actv/pulls/comments{/number}","comments_url":"https://api.github.com/repos/activenetwork/actv/issues/26/comments","statuses_url":"https://api.github.com/repos/activenetwork/actv/statuses/dffe9b907f04487d92b426612504f86cbdb7ea77","head":{"label":"activenetwork:a3-1643-asset-references","ref":"a3-1643-asset-references","sha":"dffe9b907f04487d92b426612504f86cbdb7ea77","user":{"login":"activenetwork","id":148571,"avatar_url":"https://avatars.githubusercontent.com/u/148571?v=3","gravatar_id":"","url":"https://api.github.com/users/activenetwork","html_url":"https://github.com/activenetwork","followers_url":"https://api.github.com/users/activenetwork/followers","following_url":"https://api.github.com/users/activenetwork/following{/other_user}","gists_url":"https://api.github.com/users/activenetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/activenetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activenetwork/subscriptions","organizations_url":"https://api.github.com/users/activenetwork/orgs","repos_url":"https://api.github.com/users/activenetwork/repos","events_url":"https://api.github.com/users/activenetwork/events{/privacy}","received_events_url":"https://api.github.com/users/activenetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":12438386,"name":"actv","full_name":"activenetwork/actv","owner":{"login":"activenetwork","id":148571,"avatar_url":"https://avatars.githubusercontent.com/u/148571?v=3","gravatar_id":"","url":"https://api.github.com/users/activenetwork","html_url":"https://github.com/activenetwork","followers_url":"https://api.github.com/users/activenetwork/followers","following_url":"https://api.github.com/users/activenetwork/following{/other_user}","gists_url":"https://api.github.com/users/activenetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/activenetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activenetwork/subscriptions","organizations_url":"https://api.github.com/users/activenetwork/orgs","repos_url":"https://api.github.com/users/activenetwork/repos","events_url":"https://api.github.com/users/activenetwork/events{/privacy}","received_events_url":"https://api.github.com/users/activenetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activenetwork/actv","description":"Library for Using Active.com's v2 search API","fork":false,"url":"https://api.github.com/repos/activenetwork/actv","forks_url":"https://api.github.com/repos/activenetwork/actv/forks","keys_url":"https://api.github.com/repos/activenetwork/actv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activenetwork/actv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activenetwork/actv/teams","hooks_url":"https://api.github.com/repos/activenetwork/actv/hooks","issue_events_url":"https://api.github.com/repos/activenetwork/actv/issues/events{/number}","events_url":"https://api.github.com/repos/activenetwork/actv/events","assignees_url":"https://api.github.com/repos/activenetwork/actv/assignees{/user}","branches_url":"https://api.github.com/repos/activenetwork/actv/branches{/branch}","tags_url":"https://api.github.com/repos/activenetwork/actv/tags","blobs_url":"https://api.github.com/repos/activenetwork/actv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activenetwork/actv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activenetwork/actv/git/refs{/sha}","trees_url":"https://api.github.com/repos/activenetwork/actv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activenetwork/actv/statuses/{sha}","languages_url":"https://api.github.com/repos/activenetwork/actv/languages","stargazers_url":"https://api.github.com/repos/activenetwork/actv/stargazers","contributors_url":"https://api.github.com/repos/activenetwork/actv/contributors","subscribers_url":"https://api.github.com/repos/activenetwork/actv/subscribers","subscription_url":"https://api.github.com/repos/activenetwork/actv/subscription","commits_url":"https://api.github.com/repos/activenetwork/actv/commits{/sha}","git_commits_url":"https://api.github.com/repos/activenetwork/actv/git/commits{/sha}","comments_url":"https://api.github.com/repos/activenetwork/actv/comments{/number}","issue_comment_url":"https://api.github.com/repos/activenetwork/actv/issues/comments{/number}","contents_url":"https://api.github.com/repos/activenetwork/actv/contents/{+path}","compare_url":"https://api.github.com/repos/activenetwork/actv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activenetwork/actv/merges","archive_url":"https://api.github.com/repos/activenetwork/actv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activenetwork/actv/downloads","issues_url":"https://api.github.com/repos/activenetwork/actv/issues{/number}","pulls_url":"https://api.github.com/repos/activenetwork/actv/pulls{/number}","milestones_url":"https://api.github.com/repos/activenetwork/actv/milestones{/number}","notifications_url":"https://api.github.com/repos/activenetwork/actv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activenetwork/actv/labels{/name}","releases_url":"https://api.github.com/repos/activenetwork/actv/releases{/id}","created_at":"2013-08-28T16:08:17Z","updated_at":"2015-05-08T01:56:56Z","pushed_at":"2015-06-19T15:15:59Z","git_url":"git://github.com/activenetwork/actv.git","ssh_url":"git@github.com:activenetwork/actv.git","clone_url":"https://github.com/activenetwork/actv.git","svn_url":"https://github.com/activenetwork/actv","homepage":null,"size":857,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":2,"default_branch":"master"}},"base":{"label":"activenetwork:master","ref":"master","sha":"9e555e4f0a3464aa5ba649bb1595ff771da87e24","user":{"login":"activenetwork","id":148571,"avatar_url":"https://avatars.githubusercontent.com/u/148571?v=3","gravatar_id":"","url":"https://api.github.com/users/activenetwork","html_url":"https://github.com/activenetwork","followers_url":"https://api.github.com/users/activenetwork/followers","following_url":"https://api.github.com/users/activenetwork/following{/other_user}","gists_url":"https://api.github.com/users/activenetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/activenetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activenetwork/subscriptions","organizations_url":"https://api.github.com/users/activenetwork/orgs","repos_url":"https://api.github.com/users/activenetwork/repos","events_url":"https://api.github.com/users/activenetwork/events{/privacy}","received_events_url":"https://api.github.com/users/activenetwork/received_events","type":"Organization","site_admin":false},"repo":{"id":12438386,"name":"actv","full_name":"activenetwork/actv","owner":{"login":"activenetwork","id":148571,"avatar_url":"https://avatars.githubusercontent.com/u/148571?v=3","gravatar_id":"","url":"https://api.github.com/users/activenetwork","html_url":"https://github.com/activenetwork","followers_url":"https://api.github.com/users/activenetwork/followers","following_url":"https://api.github.com/users/activenetwork/following{/other_user}","gists_url":"https://api.github.com/users/activenetwork/gists{/gist_id}","starred_url":"https://api.github.com/users/activenetwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/activenetwork/subscriptions","organizations_url":"https://api.github.com/users/activenetwork/orgs","repos_url":"https://api.github.com/users/activenetwork/repos","events_url":"https://api.github.com/users/activenetwork/events{/privacy}","received_events_url":"https://api.github.com/users/activenetwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/activenetwork/actv","description":"Library for Using Active.com's v2 search API","fork":false,"url":"https://api.github.com/repos/activenetwork/actv","forks_url":"https://api.github.com/repos/activenetwork/actv/forks","keys_url":"https://api.github.com/repos/activenetwork/actv/keys{/key_id}","collaborators_url":"https://api.github.com/repos/activenetwork/actv/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/activenetwork/actv/teams","hooks_url":"https://api.github.com/repos/activenetwork/actv/hooks","issue_events_url":"https://api.github.com/repos/activenetwork/actv/issues/events{/number}","events_url":"https://api.github.com/repos/activenetwork/actv/events","assignees_url":"https://api.github.com/repos/activenetwork/actv/assignees{/user}","branches_url":"https://api.github.com/repos/activenetwork/actv/branches{/branch}","tags_url":"https://api.github.com/repos/activenetwork/actv/tags","blobs_url":"https://api.github.com/repos/activenetwork/actv/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/activenetwork/actv/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/activenetwork/actv/git/refs{/sha}","trees_url":"https://api.github.com/repos/activenetwork/actv/git/trees{/sha}","statuses_url":"https://api.github.com/repos/activenetwork/actv/statuses/{sha}","languages_url":"https://api.github.com/repos/activenetwork/actv/languages","stargazers_url":"https://api.github.com/repos/activenetwork/actv/stargazers","contributors_url":"https://api.github.com/repos/activenetwork/actv/contributors","subscribers_url":"https://api.github.com/repos/activenetwork/actv/subscribers","subscription_url":"https://api.github.com/repos/activenetwork/actv/subscription","commits_url":"https://api.github.com/repos/activenetwork/actv/commits{/sha}","git_commits_url":"https://api.github.com/repos/activenetwork/actv/git/commits{/sha}","comments_url":"https://api.github.com/repos/activenetwork/actv/comments{/number}","issue_comment_url":"https://api.github.com/repos/activenetwork/actv/issues/comments{/number}","contents_url":"https://api.github.com/repos/activenetwork/actv/contents/{+path}","compare_url":"https://api.github.com/repos/activenetwork/actv/compare/{base}...{head}","merges_url":"https://api.github.com/repos/activenetwork/actv/merges","archive_url":"https://api.github.com/repos/activenetwork/actv/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/activenetwork/actv/downloads","issues_url":"https://api.github.com/repos/activenetwork/actv/issues{/number}","pulls_url":"https://api.github.com/repos/activenetwork/actv/pulls{/number}","milestones_url":"https://api.github.com/repos/activenetwork/actv/milestones{/number}","notifications_url":"https://api.github.com/repos/activenetwork/actv/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/activenetwork/actv/labels{/name}","releases_url":"https://api.github.com/repos/activenetwork/actv/releases{/id}","created_at":"2013-08-28T16:08:17Z","updated_at":"2015-05-08T01:56:56Z","pushed_at":"2015-06-19T15:15:59Z","git_url":"git://github.com/activenetwork/actv.git","ssh_url":"git@github.com:activenetwork/actv.git","clone_url":"https://github.com/activenetwork/actv.git","svn_url":"https://github.com/activenetwork/actv","homepage":null,"size":857,"stargazers_count":2,"watchers_count":2,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":4,"forks":3,"open_issues":4,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/activenetwork/actv/pulls/26"},"html":{"href":"https://github.com/activenetwork/actv/pull/26"},"issue":{"href":"https://api.github.com/repos/activenetwork/actv/issues/26"},"comments":{"href":"https://api.github.com/repos/activenetwork/actv/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/activenetwork/actv/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/activenetwork/actv/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/activenetwork/actv/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/activenetwork/actv/statuses/dffe9b907f04487d92b426612504f86cbdb7ea77"}}}}