{"action":"created","comment":{"url":"https://api.github.com/repos/wagn/wagn/pulls/comments/25109871","id":25109871,"diff_hunk":"@@ -0,0 +1,14 @@\n+# -*- encoding : utf-8 -*-\n+\n+class CreateDeckRoutesFile < ActiveRecord::Migration\n+  def up\n+    routes_path = File.join Wagn.root, 'config', 'routes.rb'\n+    if !File.exist? routes_path\n+      template_path = File.join Wagn.gem_root, 'lib', 'wagn', 'generators', 'wagn', 'templates', 'config', 'routes.erb'\n+      @include_jasmine_engine = false\n+      decko_path = ''\n+      routes = ERB.new(File.read template_path).result binding\n+      File.open(routes_path, \"w\") { |f|  f.write routes }\n+    end\n+  end\n+end","path":"card/db/migrate/20150220141031_create_deck_routes_file.rb","position":14,"original_position":14,"commit_id":"ac7b76c76e9147c8335d8c3cf9ef5517ec7d6f0d","original_commit_id":"ac7b76c76e9147c8335d8c3cf9ef5517ec7d6f0d","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},"body":"mentioned this in call, but I don't think file management belongs in migrations.  that would mean, eg, you could copy a migrated db to an installation without a routes.rb file, and it would then be broken and there wouldn't be a clear mechanism for fixing it.\r\n\r\nIf we were sure we wanted routes.rb files in app decks, we would probably be better off with a rake task that creates a routes.rb file when it doesn't exist.  Then we could have `wagn update` run that task.\r\n\r\nHOWEVER, I think I would suggest this, instead:\r\n1. for now, app decks should use the old pattern: routes.rb in gem.\r\n2. deck apps, on the other hand, will need it generated.\r\n3. if app deck managers want to override this, they can add something like this to their application.rb\r\n````\r\nconfig.paths.add 'config/routes', :with=>'config/routes.rb'\r\n````\r\nWe could also add a method like `use_local_routes` as a shortcut.\r\n","created_at":"2015-02-20T22:45:40Z","updated_at":"2015-02-20T22:45:40Z","html_url":"https://github.com/wagn/wagn/pull/329#discussion_r25109871","pull_request_url":"https://api.github.com/repos/wagn/wagn/pulls/329","_links":{"self":{"href":"https://api.github.com/repos/wagn/wagn/pulls/comments/25109871"},"html":{"href":"https://github.com/wagn/wagn/pull/329#discussion_r25109871"},"pull_request":{"href":"https://api.github.com/repos/wagn/wagn/pulls/329"}}},"pull_request":{"url":"https://api.github.com/repos/wagn/wagn/pulls/329","id":29696791,"html_url":"https://github.com/wagn/wagn/pull/329","diff_url":"https://github.com/wagn/wagn/pull/329.diff","patch_url":"https://github.com/wagn/wagn/pull/329.patch","issue_url":"https://api.github.com/repos/wagn/wagn/issues/329","number":329,"state":"open","locked":false,"title":"\"follow\" updates","user":{"login":"xithan","id":13584,"avatar_url":"https://avatars.githubusercontent.com/u/13584?v=3","gravatar_id":"","url":"https://api.github.com/users/xithan","html_url":"https://github.com/xithan","followers_url":"https://api.github.com/users/xithan/followers","following_url":"https://api.github.com/users/xithan/following{/other_user}","gists_url":"https://api.github.com/users/xithan/gists{/gist_id}","starred_url":"https://api.github.com/users/xithan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xithan/subscriptions","organizations_url":"https://api.github.com/users/xithan/orgs","repos_url":"https://api.github.com/users/xithan/repos","events_url":"https://api.github.com/users/xithan/events{/privacy}","received_events_url":"https://api.github.com/users/xithan/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-02-20T13:51:20Z","updated_at":"2015-02-20T22:45:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"accd5dabef56f0ac34c720649b63ae1353484e36","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wagn/wagn/pulls/329/commits","review_comments_url":"https://api.github.com/repos/wagn/wagn/pulls/329/comments","review_comment_url":"https://api.github.com/repos/wagn/wagn/pulls/comments/{number}","comments_url":"https://api.github.com/repos/wagn/wagn/issues/329/comments","statuses_url":"https://api.github.com/repos/wagn/wagn/statuses/ac7b76c76e9147c8335d8c3cf9ef5517ec7d6f0d","head":{"label":"xithan:boot-and-follow","ref":"boot-and-follow","sha":"ac7b76c76e9147c8335d8c3cf9ef5517ec7d6f0d","user":{"login":"xithan","id":13584,"avatar_url":"https://avatars.githubusercontent.com/u/13584?v=3","gravatar_id":"","url":"https://api.github.com/users/xithan","html_url":"https://github.com/xithan","followers_url":"https://api.github.com/users/xithan/followers","following_url":"https://api.github.com/users/xithan/following{/other_user}","gists_url":"https://api.github.com/users/xithan/gists{/gist_id}","starred_url":"https://api.github.com/users/xithan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xithan/subscriptions","organizations_url":"https://api.github.com/users/xithan/orgs","repos_url":"https://api.github.com/users/xithan/repos","events_url":"https://api.github.com/users/xithan/events{/privacy}","received_events_url":"https://api.github.com/users/xithan/received_events","type":"User","site_admin":false},"repo":{"id":19449327,"name":"wagn","full_name":"xithan/wagn","owner":{"login":"xithan","id":13584,"avatar_url":"https://avatars.githubusercontent.com/u/13584?v=3","gravatar_id":"","url":"https://api.github.com/users/xithan","html_url":"https://github.com/xithan","followers_url":"https://api.github.com/users/xithan/followers","following_url":"https://api.github.com/users/xithan/following{/other_user}","gists_url":"https://api.github.com/users/xithan/gists{/gist_id}","starred_url":"https://api.github.com/users/xithan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xithan/subscriptions","organizations_url":"https://api.github.com/users/xithan/orgs","repos_url":"https://api.github.com/users/xithan/repos","events_url":"https://api.github.com/users/xithan/events{/privacy}","received_events_url":"https://api.github.com/users/xithan/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xithan/wagn","description":"Ruby on rails wiki platform for collaborating to build custom web systems","fork":true,"url":"https://api.github.com/repos/xithan/wagn","forks_url":"https://api.github.com/repos/xithan/wagn/forks","keys_url":"https://api.github.com/repos/xithan/wagn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xithan/wagn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xithan/wagn/teams","hooks_url":"https://api.github.com/repos/xithan/wagn/hooks","issue_events_url":"https://api.github.com/repos/xithan/wagn/issues/events{/number}","events_url":"https://api.github.com/repos/xithan/wagn/events","assignees_url":"https://api.github.com/repos/xithan/wagn/assignees{/user}","branches_url":"https://api.github.com/repos/xithan/wagn/branches{/branch}","tags_url":"https://api.github.com/repos/xithan/wagn/tags","blobs_url":"https://api.github.com/repos/xithan/wagn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xithan/wagn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xithan/wagn/git/refs{/sha}","trees_url":"https://api.github.com/repos/xithan/wagn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xithan/wagn/statuses/{sha}","languages_url":"https://api.github.com/repos/xithan/wagn/languages","stargazers_url":"https://api.github.com/repos/xithan/wagn/stargazers","contributors_url":"https://api.github.com/repos/xithan/wagn/contributors","subscribers_url":"https://api.github.com/repos/xithan/wagn/subscribers","subscription_url":"https://api.github.com/repos/xithan/wagn/subscription","commits_url":"https://api.github.com/repos/xithan/wagn/commits{/sha}","git_commits_url":"https://api.github.com/repos/xithan/wagn/git/commits{/sha}","comments_url":"https://api.github.com/repos/xithan/wagn/comments{/number}","issue_comment_url":"https://api.github.com/repos/xithan/wagn/issues/comments/{number}","contents_url":"https://api.github.com/repos/xithan/wagn/contents/{+path}","compare_url":"https://api.github.com/repos/xithan/wagn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xithan/wagn/merges","archive_url":"https://api.github.com/repos/xithan/wagn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xithan/wagn/downloads","issues_url":"https://api.github.com/repos/xithan/wagn/issues{/number}","pulls_url":"https://api.github.com/repos/xithan/wagn/pulls{/number}","milestones_url":"https://api.github.com/repos/xithan/wagn/milestones{/number}","notifications_url":"https://api.github.com/repos/xithan/wagn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xithan/wagn/labels{/name}","releases_url":"https://api.github.com/repos/xithan/wagn/releases{/id}","created_at":"2014-05-05T08:31:06Z","updated_at":"2014-08-26T16:41:50Z","pushed_at":"2015-02-20T13:49:45Z","git_url":"git://github.com/xithan/wagn.git","ssh_url":"git@github.com:xithan/wagn.git","clone_url":"https://github.com/xithan/wagn.git","svn_url":"https://github.com/xithan/wagn","homepage":"http://www.wagn.org","size":51074,"stargazers_count":1,"watchers_count":1,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"develop"}},"base":{"label":"wagn:1_15","ref":"1_15","sha":"8f64ba644b692051a9abd30bdd1fe51e23ddc102","user":{"login":"wagn","id":20722,"avatar_url":"https://avatars.githubusercontent.com/u/20722?v=3","gravatar_id":"","url":"https://api.github.com/users/wagn","html_url":"https://github.com/wagn","followers_url":"https://api.github.com/users/wagn/followers","following_url":"https://api.github.com/users/wagn/following{/other_user}","gists_url":"https://api.github.com/users/wagn/gists{/gist_id}","starred_url":"https://api.github.com/users/wagn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagn/subscriptions","organizations_url":"https://api.github.com/users/wagn/orgs","repos_url":"https://api.github.com/users/wagn/repos","events_url":"https://api.github.com/users/wagn/events{/privacy}","received_events_url":"https://api.github.com/users/wagn/received_events","type":"User","site_admin":false},"repo":{"id":44462,"name":"wagn","full_name":"wagn/wagn","owner":{"login":"wagn","id":20722,"avatar_url":"https://avatars.githubusercontent.com/u/20722?v=3","gravatar_id":"","url":"https://api.github.com/users/wagn","html_url":"https://github.com/wagn","followers_url":"https://api.github.com/users/wagn/followers","following_url":"https://api.github.com/users/wagn/following{/other_user}","gists_url":"https://api.github.com/users/wagn/gists{/gist_id}","starred_url":"https://api.github.com/users/wagn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wagn/subscriptions","organizations_url":"https://api.github.com/users/wagn/orgs","repos_url":"https://api.github.com/users/wagn/repos","events_url":"https://api.github.com/users/wagn/events{/privacy}","received_events_url":"https://api.github.com/users/wagn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/wagn/wagn","description":"Ruby on rails wiki platform for collaborating to build custom web systems","fork":false,"url":"https://api.github.com/repos/wagn/wagn","forks_url":"https://api.github.com/repos/wagn/wagn/forks","keys_url":"https://api.github.com/repos/wagn/wagn/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wagn/wagn/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wagn/wagn/teams","hooks_url":"https://api.github.com/repos/wagn/wagn/hooks","issue_events_url":"https://api.github.com/repos/wagn/wagn/issues/events{/number}","events_url":"https://api.github.com/repos/wagn/wagn/events","assignees_url":"https://api.github.com/repos/wagn/wagn/assignees{/user}","branches_url":"https://api.github.com/repos/wagn/wagn/branches{/branch}","tags_url":"https://api.github.com/repos/wagn/wagn/tags","blobs_url":"https://api.github.com/repos/wagn/wagn/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wagn/wagn/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wagn/wagn/git/refs{/sha}","trees_url":"https://api.github.com/repos/wagn/wagn/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wagn/wagn/statuses/{sha}","languages_url":"https://api.github.com/repos/wagn/wagn/languages","stargazers_url":"https://api.github.com/repos/wagn/wagn/stargazers","contributors_url":"https://api.github.com/repos/wagn/wagn/contributors","subscribers_url":"https://api.github.com/repos/wagn/wagn/subscribers","subscription_url":"https://api.github.com/repos/wagn/wagn/subscription","commits_url":"https://api.github.com/repos/wagn/wagn/commits{/sha}","git_commits_url":"https://api.github.com/repos/wagn/wagn/git/commits{/sha}","comments_url":"https://api.github.com/repos/wagn/wagn/comments{/number}","issue_comment_url":"https://api.github.com/repos/wagn/wagn/issues/comments/{number}","contents_url":"https://api.github.com/repos/wagn/wagn/contents/{+path}","compare_url":"https://api.github.com/repos/wagn/wagn/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wagn/wagn/merges","archive_url":"https://api.github.com/repos/wagn/wagn/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wagn/wagn/downloads","issues_url":"https://api.github.com/repos/wagn/wagn/issues{/number}","pulls_url":"https://api.github.com/repos/wagn/wagn/pulls{/number}","milestones_url":"https://api.github.com/repos/wagn/wagn/milestones{/number}","notifications_url":"https://api.github.com/repos/wagn/wagn/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wagn/wagn/labels{/name}","releases_url":"https://api.github.com/repos/wagn/wagn/releases{/id}","created_at":"2008-08-21T00:36:11Z","updated_at":"2015-02-15T04:43:59Z","pushed_at":"2015-02-20T14:08:57Z","git_url":"git://github.com/wagn/wagn.git","ssh_url":"git@github.com:wagn/wagn.git","clone_url":"https://github.com/wagn/wagn.git","svn_url":"https://github.com/wagn/wagn","homepage":"http://www.wagn.org","size":55091,"stargazers_count":246,"watchers_count":246,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":54,"mirror_url":null,"open_issues_count":5,"forks":54,"open_issues":5,"watchers":246,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wagn/wagn/pulls/329"},"html":{"href":"https://github.com/wagn/wagn/pull/329"},"issue":{"href":"https://api.github.com/repos/wagn/wagn/issues/329"},"comments":{"href":"https://api.github.com/repos/wagn/wagn/issues/329/comments"},"review_comments":{"href":"https://api.github.com/repos/wagn/wagn/pulls/329/comments"},"review_comment":{"href":"https://api.github.com/repos/wagn/wagn/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/wagn/wagn/pulls/329/commits"},"statuses":{"href":"https://api.github.com/repos/wagn/wagn/statuses/ac7b76c76e9147c8335d8c3cf9ef5517ec7d6f0d"}}}}