{"action":"created","comment":{"url":"https://api.github.com/repos/thoughtbot/scenic/pulls/comments/168159942","pull_request_review_id":96480300,"id":168159942,"diff_hunk":"@@ -2,22 +2,51 @@\n \n module Scenic\n   describe Definition do\n+    describe \"find_definition\" do\n+      it \"raises an error if file cant be found\" do\n+        definition = Definition.new(\"not_valid\", 1)\n+\n+        expect {","path":"spec/scenic/definition_spec.rb","position":8,"original_position":8,"commit_id":"97f40b2b7250aadee90184205b45a1271c8a407e","original_commit_id":"97f40b2b7250aadee90184205b45a1271c8a407e","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"Avoid using {...} for multi-line blocks.","created_at":"2018-02-14T12:32:54Z","updated_at":"2018-02-14T12:32:54Z","html_url":"https://github.com/thoughtbot/scenic/pull/237#discussion_r168159942","pull_request_url":"https://api.github.com/repos/thoughtbot/scenic/pulls/237","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/scenic/pulls/comments/168159942"},"html":{"href":"https://github.com/thoughtbot/scenic/pull/237#discussion_r168159942"},"pull_request":{"href":"https://api.github.com/repos/thoughtbot/scenic/pulls/237"}}},"pull_request":{"url":"https://api.github.com/repos/thoughtbot/scenic/pulls/237","id":169097876,"html_url":"https://github.com/thoughtbot/scenic/pull/237","diff_url":"https://github.com/thoughtbot/scenic/pull/237.diff","patch_url":"https://github.com/thoughtbot/scenic/pull/237.patch","issue_url":"https://api.github.com/repos/thoughtbot/scenic/issues/237","number":237,"state":"open","locked":false,"title":"Support multiple views paths","user":{"login":"smdern","id":595639,"avatar_url":"https://avatars1.githubusercontent.com/u/595639?v=4","gravatar_id":"","url":"https://api.github.com/users/smdern","html_url":"https://github.com/smdern","followers_url":"https://api.github.com/users/smdern/followers","following_url":"https://api.github.com/users/smdern/following{/other_user}","gists_url":"https://api.github.com/users/smdern/gists{/gist_id}","starred_url":"https://api.github.com/users/smdern/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smdern/subscriptions","organizations_url":"https://api.github.com/users/smdern/orgs","repos_url":"https://api.github.com/users/smdern/repos","events_url":"https://api.github.com/users/smdern/events{/privacy}","received_events_url":"https://api.github.com/users/smdern/received_events","type":"User","site_admin":false},"body":"I needed to use this in a rails engine and didn't want to have to copy db_views over for every rails app. \r\n\r\nThis makes it so the the definition is searched for in multiple paths when trying to call `to_sql`. Generator paths aren't affected. I leveraged Rails' `config.paths` for configuring additional `db/views` paths. I could change it so that the paths are apart of `Scenic::Configuration`, I just thought putting it in `Rails.config.paths['db/views']` would pair nicely with `Rails.config.paths['db/migrations']` works.\r\n\r\nI'm able to make this work with a rails engine by using the following in `engine.rb`\r\n\r\n```ruby\r\n    initializer :append_migrations do |app|\r\n      app.config.paths[\"db/views\"] << root.join(\"db/views\")\r\n\r\n      unless app.root.to_s.match? root.to_s\r\n        config.paths[\"db/migrate\"].expanded.each do |expanded_path|\r\n          app.config.paths[\"db/migrate\"] << expanded_path\r\n        end\r\n      end\r\n    end\r\n```\r\n\r\n ","created_at":"2018-02-14T12:32:44Z","updated_at":"2018-02-14T12:32:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"57eaa72d2fb4c6054d2ebe54e007af11cda66ea2","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/thoughtbot/scenic/pulls/237/commits","review_comments_url":"https://api.github.com/repos/thoughtbot/scenic/pulls/237/comments","review_comment_url":"https://api.github.com/repos/thoughtbot/scenic/pulls/comments{/number}","comments_url":"https://api.github.com/repos/thoughtbot/scenic/issues/237/comments","statuses_url":"https://api.github.com/repos/thoughtbot/scenic/statuses/97f40b2b7250aadee90184205b45a1271c8a407e","head":{"label":"substantial:support-multiple-views-paths","ref":"support-multiple-views-paths","sha":"97f40b2b7250aadee90184205b45a1271c8a407e","user":{"login":"substantial","id":79686,"avatar_url":"https://avatars3.githubusercontent.com/u/79686?v=4","gravatar_id":"","url":"https://api.github.com/users/substantial","html_url":"https://github.com/substantial","followers_url":"https://api.github.com/users/substantial/followers","following_url":"https://api.github.com/users/substantial/following{/other_user}","gists_url":"https://api.github.com/users/substantial/gists{/gist_id}","starred_url":"https://api.github.com/users/substantial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/substantial/subscriptions","organizations_url":"https://api.github.com/users/substantial/orgs","repos_url":"https://api.github.com/users/substantial/repos","events_url":"https://api.github.com/users/substantial/events{/privacy}","received_events_url":"https://api.github.com/users/substantial/received_events","type":"Organization","site_admin":false},"repo":{"id":121411439,"name":"scenic","full_name":"substantial/scenic","owner":{"login":"substantial","id":79686,"avatar_url":"https://avatars3.githubusercontent.com/u/79686?v=4","gravatar_id":"","url":"https://api.github.com/users/substantial","html_url":"https://github.com/substantial","followers_url":"https://api.github.com/users/substantial/followers","following_url":"https://api.github.com/users/substantial/following{/other_user}","gists_url":"https://api.github.com/users/substantial/gists{/gist_id}","starred_url":"https://api.github.com/users/substantial/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/substantial/subscriptions","organizations_url":"https://api.github.com/users/substantial/orgs","repos_url":"https://api.github.com/users/substantial/repos","events_url":"https://api.github.com/users/substantial/events{/privacy}","received_events_url":"https://api.github.com/users/substantial/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/substantial/scenic","description":"Versioned database views for Rails","fork":true,"url":"https://api.github.com/repos/substantial/scenic","forks_url":"https://api.github.com/repos/substantial/scenic/forks","keys_url":"https://api.github.com/repos/substantial/scenic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/substantial/scenic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/substantial/scenic/teams","hooks_url":"https://api.github.com/repos/substantial/scenic/hooks","issue_events_url":"https://api.github.com/repos/substantial/scenic/issues/events{/number}","events_url":"https://api.github.com/repos/substantial/scenic/events","assignees_url":"https://api.github.com/repos/substantial/scenic/assignees{/user}","branches_url":"https://api.github.com/repos/substantial/scenic/branches{/branch}","tags_url":"https://api.github.com/repos/substantial/scenic/tags","blobs_url":"https://api.github.com/repos/substantial/scenic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/substantial/scenic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/substantial/scenic/git/refs{/sha}","trees_url":"https://api.github.com/repos/substantial/scenic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/substantial/scenic/statuses/{sha}","languages_url":"https://api.github.com/repos/substantial/scenic/languages","stargazers_url":"https://api.github.com/repos/substantial/scenic/stargazers","contributors_url":"https://api.github.com/repos/substantial/scenic/contributors","subscribers_url":"https://api.github.com/repos/substantial/scenic/subscribers","subscription_url":"https://api.github.com/repos/substantial/scenic/subscription","commits_url":"https://api.github.com/repos/substantial/scenic/commits{/sha}","git_commits_url":"https://api.github.com/repos/substantial/scenic/git/commits{/sha}","comments_url":"https://api.github.com/repos/substantial/scenic/comments{/number}","issue_comment_url":"https://api.github.com/repos/substantial/scenic/issues/comments{/number}","contents_url":"https://api.github.com/repos/substantial/scenic/contents/{+path}","compare_url":"https://api.github.com/repos/substantial/scenic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/substantial/scenic/merges","archive_url":"https://api.github.com/repos/substantial/scenic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/substantial/scenic/downloads","issues_url":"https://api.github.com/repos/substantial/scenic/issues{/number}","pulls_url":"https://api.github.com/repos/substantial/scenic/pulls{/number}","milestones_url":"https://api.github.com/repos/substantial/scenic/milestones{/number}","notifications_url":"https://api.github.com/repos/substantial/scenic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/substantial/scenic/labels{/name}","releases_url":"https://api.github.com/repos/substantial/scenic/releases{/id}","deployments_url":"https://api.github.com/repos/substantial/scenic/deployments","created_at":"2018-02-13T17:15:06Z","updated_at":"2018-02-13T17:15:08Z","pushed_at":"2018-02-14T12:21:36Z","git_url":"git://github.com/substantial/scenic.git","ssh_url":"git@github.com:substantial/scenic.git","clone_url":"https://github.com/substantial/scenic.git","svn_url":"https://github.com/substantial/scenic","homepage":"","size":273,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"thoughtbot:master","ref":"master","sha":"c6542a394debccc0c0d28125294c5532ed04eccc","user":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars3.githubusercontent.com/u/6183?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"repo":{"id":19283674,"name":"scenic","full_name":"thoughtbot/scenic","owner":{"login":"thoughtbot","id":6183,"avatar_url":"https://avatars3.githubusercontent.com/u/6183?v=4","gravatar_id":"","url":"https://api.github.com/users/thoughtbot","html_url":"https://github.com/thoughtbot","followers_url":"https://api.github.com/users/thoughtbot/followers","following_url":"https://api.github.com/users/thoughtbot/following{/other_user}","gists_url":"https://api.github.com/users/thoughtbot/gists{/gist_id}","starred_url":"https://api.github.com/users/thoughtbot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thoughtbot/subscriptions","organizations_url":"https://api.github.com/users/thoughtbot/orgs","repos_url":"https://api.github.com/users/thoughtbot/repos","events_url":"https://api.github.com/users/thoughtbot/events{/privacy}","received_events_url":"https://api.github.com/users/thoughtbot/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/thoughtbot/scenic","description":"Versioned database views for Rails","fork":false,"url":"https://api.github.com/repos/thoughtbot/scenic","forks_url":"https://api.github.com/repos/thoughtbot/scenic/forks","keys_url":"https://api.github.com/repos/thoughtbot/scenic/keys{/key_id}","collaborators_url":"https://api.github.com/repos/thoughtbot/scenic/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/thoughtbot/scenic/teams","hooks_url":"https://api.github.com/repos/thoughtbot/scenic/hooks","issue_events_url":"https://api.github.com/repos/thoughtbot/scenic/issues/events{/number}","events_url":"https://api.github.com/repos/thoughtbot/scenic/events","assignees_url":"https://api.github.com/repos/thoughtbot/scenic/assignees{/user}","branches_url":"https://api.github.com/repos/thoughtbot/scenic/branches{/branch}","tags_url":"https://api.github.com/repos/thoughtbot/scenic/tags","blobs_url":"https://api.github.com/repos/thoughtbot/scenic/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/thoughtbot/scenic/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/thoughtbot/scenic/git/refs{/sha}","trees_url":"https://api.github.com/repos/thoughtbot/scenic/git/trees{/sha}","statuses_url":"https://api.github.com/repos/thoughtbot/scenic/statuses/{sha}","languages_url":"https://api.github.com/repos/thoughtbot/scenic/languages","stargazers_url":"https://api.github.com/repos/thoughtbot/scenic/stargazers","contributors_url":"https://api.github.com/repos/thoughtbot/scenic/contributors","subscribers_url":"https://api.github.com/repos/thoughtbot/scenic/subscribers","subscription_url":"https://api.github.com/repos/thoughtbot/scenic/subscription","commits_url":"https://api.github.com/repos/thoughtbot/scenic/commits{/sha}","git_commits_url":"https://api.github.com/repos/thoughtbot/scenic/git/commits{/sha}","comments_url":"https://api.github.com/repos/thoughtbot/scenic/comments{/number}","issue_comment_url":"https://api.github.com/repos/thoughtbot/scenic/issues/comments{/number}","contents_url":"https://api.github.com/repos/thoughtbot/scenic/contents/{+path}","compare_url":"https://api.github.com/repos/thoughtbot/scenic/compare/{base}...{head}","merges_url":"https://api.github.com/repos/thoughtbot/scenic/merges","archive_url":"https://api.github.com/repos/thoughtbot/scenic/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/thoughtbot/scenic/downloads","issues_url":"https://api.github.com/repos/thoughtbot/scenic/issues{/number}","pulls_url":"https://api.github.com/repos/thoughtbot/scenic/pulls{/number}","milestones_url":"https://api.github.com/repos/thoughtbot/scenic/milestones{/number}","notifications_url":"https://api.github.com/repos/thoughtbot/scenic/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/thoughtbot/scenic/labels{/name}","releases_url":"https://api.github.com/repos/thoughtbot/scenic/releases{/id}","deployments_url":"https://api.github.com/repos/thoughtbot/scenic/deployments","created_at":"2014-04-29T16:36:17Z","updated_at":"2018-02-13T23:03:07Z","pushed_at":"2018-02-14T12:32:45Z","git_url":"git://github.com/thoughtbot/scenic.git","ssh_url":"git@github.com:thoughtbot/scenic.git","clone_url":"https://github.com/thoughtbot/scenic.git","svn_url":"https://github.com/thoughtbot/scenic","homepage":"","size":271,"stargazers_count":1561,"watchers_count":1561,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":109,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":109,"open_issues":12,"watchers":1561,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/thoughtbot/scenic/pulls/237"},"html":{"href":"https://github.com/thoughtbot/scenic/pull/237"},"issue":{"href":"https://api.github.com/repos/thoughtbot/scenic/issues/237"},"comments":{"href":"https://api.github.com/repos/thoughtbot/scenic/issues/237/comments"},"review_comments":{"href":"https://api.github.com/repos/thoughtbot/scenic/pulls/237/comments"},"review_comment":{"href":"https://api.github.com/repos/thoughtbot/scenic/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/thoughtbot/scenic/pulls/237/commits"},"statuses":{"href":"https://api.github.com/repos/thoughtbot/scenic/statuses/97f40b2b7250aadee90184205b45a1271c8a407e"}},"author_association":"NONE"}}
{"actor":{"display_login":"houndci-bot"}}