{"action":"created","issue":{"url":"https://api.github.com/repos/mikejsavage/flea/issues/8","repository_url":"https://api.github.com/repos/mikejsavage/flea","labels_url":"https://api.github.com/repos/mikejsavage/flea/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/mikejsavage/flea/issues/8/comments","events_url":"https://api.github.com/repos/mikejsavage/flea/issues/8/events","html_url":"https://github.com/mikejsavage/flea/issues/8","id":162207788,"number":8,"title":"flea.config","user":{"login":"abyxcos","id":662820,"avatar_url":"https://avatars.githubusercontent.com/u/662820?v=3","gravatar_id":"","url":"https://api.github.com/users/abyxcos","html_url":"https://github.com/abyxcos","followers_url":"https://api.github.com/users/abyxcos/followers","following_url":"https://api.github.com/users/abyxcos/following{/other_user}","gists_url":"https://api.github.com/users/abyxcos/gists{/gist_id}","starred_url":"https://api.github.com/users/abyxcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abyxcos/subscriptions","organizations_url":"https://api.github.com/users/abyxcos/orgs","repos_url":"https://api.github.com/users/abyxcos/repos","events_url":"https://api.github.com/users/abyxcos/events{/privacy}","received_events_url":"https://api.github.com/users/abyxcos/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-06-24T18:48:51Z","updated_at":"2016-06-27T19:30:34Z","closed_at":null,"body":"This is a multi-part bug. \r\n\r\n1.) Flea could really use a flea.conf.sample. Right now, flea.conf is required, but none of the components use it. If I understand the code right, it just inserts tables into flea.config?\r\n2.) secret.lua requires config.secret_path. This is already set by flea.lua, but inside the flea.config namespace, so it can't be accessed by secret.lua. \r\n3.) I'm using mayhemwiki as the reference application. This just sets config directly in the main file, and never uses flea.config, mostly bypassing this issue. It still requires a `touch flea.conf` to start though. \r\n\r\nI think flea.lua should only source flea.conf if it exists, else just dump defaults into flea.config. I'm not sure the appropriate way for secret.lua to access flea.config though. "},"comment":{"url":"https://api.github.com/repos/mikejsavage/flea/issues/comments/228850024","html_url":"https://github.com/mikejsavage/flea/issues/8#issuecomment-228850024","issue_url":"https://api.github.com/repos/mikejsavage/flea/issues/8","id":228850024,"user":{"login":"abyxcos","id":662820,"avatar_url":"https://avatars.githubusercontent.com/u/662820?v=3","gravatar_id":"","url":"https://api.github.com/users/abyxcos","html_url":"https://github.com/abyxcos","followers_url":"https://api.github.com/users/abyxcos/followers","following_url":"https://api.github.com/users/abyxcos/following{/other_user}","gists_url":"https://api.github.com/users/abyxcos/gists{/gist_id}","starred_url":"https://api.github.com/users/abyxcos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abyxcos/subscriptions","organizations_url":"https://api.github.com/users/abyxcos/orgs","repos_url":"https://api.github.com/users/abyxcos/repos","events_url":"https://api.github.com/users/abyxcos/events{/privacy}","received_events_url":"https://api.github.com/users/abyxcos/received_events","type":"User","site_admin":false},"created_at":"2016-06-27T19:30:34Z","updated_at":"2016-06-27T19:30:34Z","body":"So, I like the idea of flea.conf. It's a simple way to pull out some application and site configuration. I would probably prefer a yaml syntax, but that's just a require \"lyaml\" away, so no reason to complicate the default config code. \r\n\r\nAs for secret.bin management, I just ended up dropping that in my database directory. In mayhemwiki, you have both of those in root, but this organization structure accidentally manages to avoid the git leaks (as you most likely don't want your users database on git either, so that whole directory can/should be backed up separately.)\r\n\r\nFor actual application flow, I think I would try and read `flea.conf`, then fall back on the defaults in flea.lua (or the user override to flea.config) to try `db/secret.bin`. If neither of those exists, I think it's then safe to just print an error and exit (current behavior.)"}}
{"actor":{"display_login":"abyxcos"}}