{"action":"created","issue":{"url":"https://api.github.com/repos/spree/spree/issues/6263","labels_url":"https://api.github.com/repos/spree/spree/issues/6263/labels{/name}","comments_url":"https://api.github.com/repos/spree/spree/issues/6263/comments","events_url":"https://api.github.com/repos/spree/spree/issues/6263/events","html_url":"https://github.com/spree/spree/pull/6263","id":66623064,"number":6263,"title":"Generate preference skeleton code from spree_cmd extension","user":{"login":"j1mr10rd4n","id":946427,"avatar_url":"https://avatars.githubusercontent.com/u/946427?v=3","gravatar_id":"","url":"https://api.github.com/users/j1mr10rd4n","html_url":"https://github.com/j1mr10rd4n","followers_url":"https://api.github.com/users/j1mr10rd4n/followers","following_url":"https://api.github.com/users/j1mr10rd4n/following{/other_user}","gists_url":"https://api.github.com/users/j1mr10rd4n/gists{/gist_id}","starred_url":"https://api.github.com/users/j1mr10rd4n/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/j1mr10rd4n/subscriptions","organizations_url":"https://api.github.com/users/j1mr10rd4n/orgs","repos_url":"https://api.github.com/users/j1mr10rd4n/repos","events_url":"https://api.github.com/users/j1mr10rd4n/events{/privacy}","received_events_url":"https://api.github.com/users/j1mr10rd4n/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-04-06T14:59:14Z","updated_at":"2015-04-20T17:25:14Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/spree/spree/pulls/6263","html_url":"https://github.com/spree/spree/pull/6263","diff_url":"https://github.com/spree/spree/pull/6263.diff","patch_url":"https://github.com/spree/spree/pull/6263.patch"},"body":"I found myself using [Spree Preferences](https://guides.spreecommerce.com/developer/preferences.html) often enough in my extensions that I added some skeleton code to the `spree_cmd` extension templates. Maybe others would find these useful as well.\r\n\r\nThe following options have been added to `spree extension`:\r\n\r\n`--preferences`\r\nGenerates a namespaced configuration class for the extension. `engine.rb` initializes this and assigns it to a constant for use in the application.\r\n\r\n`--preference-pane`\r\nAs above plus a backend page and controller for editing/updating the extension's preferences. A sub-menu is appended to the `Configuration` menu.\r\n\r\nThe extension tutorial has been updated to describe these new options.\r\n\r\nBefore adding this new section to the extension tutorial, I added some improvements (well I think they are!) [0381159](https://github.com/spree/spree/commit/0381159ad9567f38a2462b1d596f65a707a77917) encapsulates these."},"comment":{"url":"https://api.github.com/repos/spree/spree/issues/comments/94515424","html_url":"https://github.com/spree/spree/pull/6263#issuecomment-94515424","issue_url":"https://api.github.com/repos/spree/spree/issues/6263","id":94515424,"user":{"login":"JDutil","id":25104,"avatar_url":"https://avatars.githubusercontent.com/u/25104?v=3","gravatar_id":"","url":"https://api.github.com/users/JDutil","html_url":"https://github.com/JDutil","followers_url":"https://api.github.com/users/JDutil/followers","following_url":"https://api.github.com/users/JDutil/following{/other_user}","gists_url":"https://api.github.com/users/JDutil/gists{/gist_id}","starred_url":"https://api.github.com/users/JDutil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JDutil/subscriptions","organizations_url":"https://api.github.com/users/JDutil/orgs","repos_url":"https://api.github.com/users/JDutil/repos","events_url":"https://api.github.com/users/JDutil/events{/privacy}","received_events_url":"https://api.github.com/users/JDutil/received_events","type":"User","site_admin":false},"created_at":"2015-04-20T17:25:14Z","updated_at":"2015-04-20T17:25:14Z","body":"Good point @BenMorganIO I do think this could be confusing to newer developers, and encourage them to use preferences when they probably shouldn't be."}}