{"action":"created","comment":{"url":"https://api.github.com/repos/ethn/wagn/pulls/comments/25138880","id":25138880,"diff_hunk":"@@ -0,0 +1,48 @@\n+\n+require 'decko/engine'\n+require 'rails/all'\n+\n+module Wagn\n+  if defined? ::Rails::Railtie\n+    require 'rails'\n+    class Railtie < Rails::Railtie\n+\n+=begin\n+      initializer 'wagn.connect_on_load' do\n+        ActiveSupport.on_load(:after_initialize) do\n+          puts \"connect on load\"\n+          begin\n+            puts \"card #{defined? Card}\"\n+            require_dependency 'card' unless defined? Card\n+          rescue ActiveRecord::StatementInvalid => e\n+            puts \"db unavailable:#{::Rails.env}, #{e}, #{e.backtrace*\"\\n\"}\"\n+            ::Rails.logger.warn \"database not available[#{::Rails.env}] #{e}\"\n+          end\n+        end\n+      end\n+=end\n+\n+      # Remove me unless we actually use it\n+      initializer 'wagn.insert_into_active_record' do\n+        ActiveSupport.on_load :active_record do\n+          Wagn::Railtie.insert\n+        end\n+      end\n+    end\n+  end\n+\n+  class Railtie\n+    def self.insert\n+      #puts \"put insert rt\"\n+      # add the option first\n+      #Decko.options[:logger] = Rails.logger if defined?(Rails)\n+      \n+      # should this load engine, etc.?  Might be cleaner to put config stuff here?\n+      #if defined?(ActiveRecord)\n+        #ActiveRecord::Base.send(:include, Decko::Glue)\n+        #Decko.options[:logger] = ActiveRecord::Base.logger\n+      #end\n+\n+    end\n+  end\n+end","path":"wagn/lib/wagn/railtie.rb","position":48,"original_position":48,"commit_id":"13b38c6a82338534ecef56e6fa19d95c5c0ab009","original_commit_id":"01e330bcafe34bd6134b389eae227ade85866a0d","user":{"login":"GerryG","id":76243,"avatar_url":"https://avatars.githubusercontent.com/u/76243?v=3","gravatar_id":"","url":"https://api.github.com/users/GerryG","html_url":"https://github.com/GerryG","followers_url":"https://api.github.com/users/GerryG/followers","following_url":"https://api.github.com/users/GerryG/following{/other_user}","gists_url":"https://api.github.com/users/GerryG/gists{/gist_id}","starred_url":"https://api.github.com/users/GerryG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerryG/subscriptions","organizations_url":"https://api.github.com/users/GerryG/orgs","repos_url":"https://api.github.com/users/GerryG/repos","events_url":"https://api.github.com/users/GerryG/events{/privacy}","received_events_url":"https://api.github.com/users/GerryG/received_events","type":"User","site_admin":false},"body":"I'm not quite ready to give up on this stuff.  I think it may be necessary for getting certain things to work right.  But that work it on the generator branch.  I can clean this up in this branch (not delete, but get rid of all the dead code and comments.","created_at":"2015-02-22T23:58:39Z","updated_at":"2015-02-22T23:58:39Z","html_url":"https://github.com/ethn/wagn/pull/28#discussion_r25138880","pull_request_url":"https://api.github.com/repos/ethn/wagn/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/ethn/wagn/pulls/comments/25138880"},"html":{"href":"https://github.com/ethn/wagn/pull/28#discussion_r25138880"},"pull_request":{"href":"https://api.github.com/repos/ethn/wagn/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/ethn/wagn/pulls/28","id":29775965,"html_url":"https://github.com/ethn/wagn/pull/28","diff_url":"https://github.com/ethn/wagn/pull/28.diff","patch_url":"https://github.com/ethn/wagn/pull/28.patch","issue_url":"https://api.github.com/repos/ethn/wagn/issues/28","number":28,"state":"open","locked":false,"title":"Engine","user":{"login":"GerryG","id":76243,"avatar_url":"https://avatars.githubusercontent.com/u/76243?v=3","gravatar_id":"","url":"https://api.github.com/users/GerryG","html_url":"https://github.com/GerryG","followers_url":"https://api.github.com/users/GerryG/followers","following_url":"https://api.github.com/users/GerryG/following{/other_user}","gists_url":"https://api.github.com/users/GerryG/gists{/gist_id}","starred_url":"https://api.github.com/users/GerryG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerryG/subscriptions","organizations_url":"https://api.github.com/users/GerryG/orgs","repos_url":"https://api.github.com/users/GerryG/repos","events_url":"https://api.github.com/users/GerryG/events{/privacy}","received_events_url":"https://api.github.com/users/GerryG/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-22T20:17:37Z","updated_at":"2015-02-22T23:58:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6a5f0a733ca2cd115f06c791fd34eaad8be32608","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ethn/wagn/pulls/28/commits","review_comments_url":"https://api.github.com/repos/ethn/wagn/pulls/28/comments","review_comment_url":"https://api.github.com/repos/ethn/wagn/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ethn/wagn/issues/28/comments","statuses_url":"https://api.github.com/repos/ethn/wagn/statuses/13b38c6a82338534ecef56e6fa19d95c5c0ab009","head":{"label":"GerryG:engine","ref":"engine","sha":"13b38c6a82338534ecef56e6fa19d95c5c0ab009","user":{"login":"GerryG","id":76243,"avatar_url":"https://avatars.githubusercontent.com/u/76243?v=3","gravatar_id":"","url":"https://api.github.com/users/GerryG","html_url":"https://github.com/GerryG","followers_url":"https://api.github.com/users/GerryG/followers","following_url":"https://api.github.com/users/GerryG/following{/other_user}","gists_url":"https://api.github.com/users/GerryG/gists{/gist_id}","starred_url":"https://api.github.com/users/GerryG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerryG/subscriptions","organizations_url":"https://api.github.com/users/GerryG/orgs","repos_url":"https://api.github.com/users/GerryG/repos","events_url":"https://api.github.com/users/GerryG/events{/privacy}","received_events_url":"https://api.github.com/users/GerryG/received_events","type":"User","site_admin":false},"repo":{"id":182039,"name":"wagn","full_name":"GerryG/wagn","owner":{"login":"GerryG","id":76243,"avatar_url":"https://avatars.githubusercontent.com/u/76243?v=3","gravatar_id":"","url":"https://api.github.com/users/GerryG","html_url":"https://github.com/GerryG","followers_url":"https://api.github.com/users/GerryG/followers","following_url":"https://api.github.com/users/GerryG/following{/other_user}","gists_url":"https://api.github.com/users/GerryG/gists{/gist_id}","starred_url":"https://api.github.com/users/GerryG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/GerryG/subscriptions","organizations_url":"https://api.github.com/users/GerryG/orgs","repos_url":"https://api.github.com/users/GerryG/repos","events_url":"https://api.github.com/users/GerryG/events{/privacy}","received_events_url":"https://api.github.com/users/GerryG/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/GerryG/wagn","description":"the wiki on wheels: a Ruby on Rails app for building dynamic, structured websites out of wiki cards","fork":true,"url":"https://api.github.com/repos/GerryG/wagn","forks_url":"https://api.github.com/repos/GerryG/wagn/forks","keys_url":"https://api.github.com/repos/GerryG/wagn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/GerryG/wagn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/GerryG/wagn/teams","hooks_url":"https://api.github.com/repos/GerryG/wagn/hooks","issue_events_url":"https://api.github.com/repos/GerryG/wagn/issues/events{/number}","events_url":"https://api.github.com/repos/GerryG/wagn/events","assignees_url":"https://api.github.com/repos/GerryG/wagn/assignees{/user}","branches_url":"https://api.github.com/repos/GerryG/wagn/branches{/branch}","tags_url":"https://api.github.com/repos/GerryG/wagn/tags","blobs_url":"https://api.github.com/repos/GerryG/wagn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/GerryG/wagn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/GerryG/wagn/git/refs{/sha}","trees_url":"https://api.github.com/repos/GerryG/wagn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/GerryG/wagn/statuses/{sha}","languages_url":"https://api.github.com/repos/GerryG/wagn/languages","stargazers_url":"https://api.github.com/repos/GerryG/wagn/stargazers","contributors_url":"https://api.github.com/repos/GerryG/wagn/contributors","subscribers_url":"https://api.github.com/repos/GerryG/wagn/subscribers","subscription_url":"https://api.github.com/repos/GerryG/wagn/subscription","commits_url":"https://api.github.com/repos/GerryG/wagn/commits{/sha}","git_commits_url":"https://api.github.com/repos/GerryG/wagn/git/commits{/sha}","comments_url":"https://api.github.com/repos/GerryG/wagn/comments{/number}","issue_comment_url":"https://api.github.com/repos/GerryG/wagn/issues/comments{/number}","contents_url":"https://api.github.com/repos/GerryG/wagn/contents/{+path}","compare_url":"https://api.github.com/repos/GerryG/wagn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/GerryG/wagn/merges","archive_url":"https://api.github.com/repos/GerryG/wagn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/GerryG/wagn/downloads","issues_url":"https://api.github.com/repos/GerryG/wagn/issues{/number}","pulls_url":"https://api.github.com/repos/GerryG/wagn/pulls{/number}","milestones_url":"https://api.github.com/repos/GerryG/wagn/milestones{/number}","notifications_url":"https://api.github.com/repos/GerryG/wagn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/GerryG/wagn/labels{/name}","releases_url":"https://api.github.com/repos/GerryG/wagn/releases{/id}","created_at":"2009-04-21T19:16:29Z","updated_at":"2015-02-22T21:53:45Z","pushed_at":"2015-02-22T21:53:43Z","git_url":"git://github.com/GerryG/wagn.git","ssh_url":"git@github.com:GerryG/wagn.git","clone_url":"https://github.com/GerryG/wagn.git","svn_url":"https://github.com/GerryG/wagn","homepage":"http://www.wagn.org","size":52360,"stargazers_count":4,"watchers_count":4,"language":"JavaScript","has_issues":true,"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":4,"default_branch":"1_15"}},"base":{"label":"ethn:engine","ref":"engine","sha":"33db53692130fa437e4385f3923d78693e9966a7","user":{"login":"ethn","id":21904,"avatar_url":"https://avatars.githubusercontent.com/u/21904?v=3","gravatar_id":"","url":"https://api.github.com/users/ethn","html_url":"https://github.com/ethn","followers_url":"https://api.github.com/users/ethn/followers","following_url":"https://api.github.com/users/ethn/following{/other_user}","gists_url":"https://api.github.com/users/ethn/gists{/gist_id}","starred_url":"https://api.github.com/users/ethn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethn/subscriptions","organizations_url":"https://api.github.com/users/ethn/orgs","repos_url":"https://api.github.com/users/ethn/repos","events_url":"https://api.github.com/users/ethn/events{/privacy}","received_events_url":"https://api.github.com/users/ethn/received_events","type":"User","site_admin":false},"repo":{"id":379894,"name":"wagn","full_name":"ethn/wagn","owner":{"login":"ethn","id":21904,"avatar_url":"https://avatars.githubusercontent.com/u/21904?v=3","gravatar_id":"","url":"https://api.github.com/users/ethn","html_url":"https://github.com/ethn","followers_url":"https://api.github.com/users/ethn/followers","following_url":"https://api.github.com/users/ethn/following{/other_user}","gists_url":"https://api.github.com/users/ethn/gists{/gist_id}","starred_url":"https://api.github.com/users/ethn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ethn/subscriptions","organizations_url":"https://api.github.com/users/ethn/orgs","repos_url":"https://api.github.com/users/ethn/repos","events_url":"https://api.github.com/users/ethn/events{/privacy}","received_events_url":"https://api.github.com/users/ethn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ethn/wagn","description":"the wiki on wheels: a Ruby on Rails app for building dynamic, structured websites out of wiki cards","fork":true,"url":"https://api.github.com/repos/ethn/wagn","forks_url":"https://api.github.com/repos/ethn/wagn/forks","keys_url":"https://api.github.com/repos/ethn/wagn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ethn/wagn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ethn/wagn/teams","hooks_url":"https://api.github.com/repos/ethn/wagn/hooks","issue_events_url":"https://api.github.com/repos/ethn/wagn/issues/events{/number}","events_url":"https://api.github.com/repos/ethn/wagn/events","assignees_url":"https://api.github.com/repos/ethn/wagn/assignees{/user}","branches_url":"https://api.github.com/repos/ethn/wagn/branches{/branch}","tags_url":"https://api.github.com/repos/ethn/wagn/tags","blobs_url":"https://api.github.com/repos/ethn/wagn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ethn/wagn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ethn/wagn/git/refs{/sha}","trees_url":"https://api.github.com/repos/ethn/wagn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ethn/wagn/statuses/{sha}","languages_url":"https://api.github.com/repos/ethn/wagn/languages","stargazers_url":"https://api.github.com/repos/ethn/wagn/stargazers","contributors_url":"https://api.github.com/repos/ethn/wagn/contributors","subscribers_url":"https://api.github.com/repos/ethn/wagn/subscribers","subscription_url":"https://api.github.com/repos/ethn/wagn/subscription","commits_url":"https://api.github.com/repos/ethn/wagn/commits{/sha}","git_commits_url":"https://api.github.com/repos/ethn/wagn/git/commits{/sha}","comments_url":"https://api.github.com/repos/ethn/wagn/comments{/number}","issue_comment_url":"https://api.github.com/repos/ethn/wagn/issues/comments{/number}","contents_url":"https://api.github.com/repos/ethn/wagn/contents/{+path}","compare_url":"https://api.github.com/repos/ethn/wagn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ethn/wagn/merges","archive_url":"https://api.github.com/repos/ethn/wagn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ethn/wagn/downloads","issues_url":"https://api.github.com/repos/ethn/wagn/issues{/number}","pulls_url":"https://api.github.com/repos/ethn/wagn/pulls{/number}","milestones_url":"https://api.github.com/repos/ethn/wagn/milestones{/number}","notifications_url":"https://api.github.com/repos/ethn/wagn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ethn/wagn/labels{/name}","releases_url":"https://api.github.com/repos/ethn/wagn/releases{/id}","created_at":"2009-11-20T19:39:26Z","updated_at":"2015-02-15T04:43:56Z","pushed_at":"2015-02-22T21:47:16Z","git_url":"git://github.com/ethn/wagn.git","ssh_url":"git@github.com:ethn/wagn.git","clone_url":"https://github.com/ethn/wagn.git","svn_url":"https://github.com/ethn/wagn","homepage":"http://www.wagn.org","size":52895,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ethn/wagn/pulls/28"},"html":{"href":"https://github.com/ethn/wagn/pull/28"},"issue":{"href":"https://api.github.com/repos/ethn/wagn/issues/28"},"comments":{"href":"https://api.github.com/repos/ethn/wagn/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/ethn/wagn/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/ethn/wagn/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ethn/wagn/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/ethn/wagn/statuses/13b38c6a82338534ecef56e6fa19d95c5c0ab009"}}}}