有人用 Ruby 创建了 Sinatra 和 Datamapper 的 Web 应用程序混合吗?
我厌倦了重写登录表单和用户帐户管理页面以及注册新帐户、更改密码、更改电子邮件和关联电子邮件等常见用例。 (这适用于不接受 OAuth/OpenID 解决方案的客户端)。因此,我正在使用 Sinatra 和 Datamapper 只包含那些最精炼形式的功能。
我想做的就是将该网站打包成一个 gem,以便有人可以将其放入现有的应用程序中并进行自定义。我认为这可能会变得棘手,因为该应用程序定义了自己的数据库和网络服务器。因此,它们必须重新设计为 Sinatra::App 和 Datamapper::Model 的混合。
还有其他人尝试过这个吗?
I got sick of rewriting login forms and user account management pages with the usual use-cases of registering a new account, changing password, changing e-mail, w/ associated e-mails. (This is for clients that won't accept an OAuth/OpenID solution). So I am creating a sample site with Sinatra and Datamapper that contains nothing but those features in their most distilled form.
What I'd like to do is package that site into a gem that someone could drop into an existing app and customize. I think it could get tricky because the app defines its own database and web server. So they would have to be redesigned as mix-ins for a Sinatra::App and Datamapper::Model.
Has anyone else tried this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我创建了 Ruby gem“帐户”来为使用 Sinatra 的 Web 应用程序提供此功能。可以在 https://github.com/lsiden/accounts 克隆或分叉它。
I created the Ruby gem "accounts" to provide this functionality for web-apps using Sinatra. It can be cloned or forked at https://github.com/lsiden/accounts.