写这篇文章主要有两方面用途
1.希望给rails同行一定的帮助,翻译水平有限,贴出中英文,翻译有误的地方欢迎指正,非常感谢,转载请标明出处,谢谢。
2.加深作者对gem的理解,有需要更详细了解安装以及使用的朋友可以点击文章中的链接进入gem sources详细介绍。
3.不定期更新
Rack::Accept is a suite of tools for Ruby/Rack applications that eases the complexity of building and interpreting the Accept* family of HTTP request headers.
Some features of the library are:
- Strict adherence to RFC 2616, specifically section 14
- Full support for the Accept, Accept-Charset, Accept-Encoding, and Accept-Language HTTP request headers
- May be used as Rack middleware or standalone
- A comprehensive test suite that covers many edge cases
Rack::Accept是一套Ruby/Rack应用的工具,该工具简化了建立应用的复杂性,解释了可接受的Http请求头系列。本库的一些功能如下:
1.严格遵守RFC 2616,具体请看section 14
2.全面支持1中的Accept, Accept-Charset, Accept-Encoding, 和Accept-Language HTTP请求头。
3.可以独立使用或者用做RACK中间件
4.拥有一个很全面的测试套间,涵盖了许多边缘情况
Script for converting HTML and ERB files to slim (slim-lang.org).
It's not perfect, but certainly it helps a lot!
It's based on Hpricot. Yeah, I'm old school.
本gem是把HTML和ERB文件转换为silm模板语言的脚本,想了解slim的出门右转(slim-lang.org)
它不完美,但是无疑能帮助你很多!
它基于Hprico。呵呵,我是一个老司机。
Official Ruby-on-Rails Integration with Sass
This gem provides official integration for Ruby on Rails projects with the Sass stylesheet language.
官方Ruby-on-Rails集成Sass
本gem提供Ruby on Rails与Sass语言的官方集成
Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby
本gem压缩JavaScript文件包装为UglifyJS来访问ruby。
slim-rails provides Slim generators for Rails 3 and 4. It was based on haml-rails and it does basically the same:
- Any time you generate a controller or scaffold, you'll get Slim templates (instead of ERB)
- When your Rails application loads, Slim will be loaded and initialized automatically
- Slim templates will be respected by the view template cache digestor
slim_rails提供了为Rails3和Rails4的Slim语言生成器,它基于haml-rails,而且他们特点基本上是相同的,如下:
1.无论何时何地你用rails生成了一个控制器或者脚手架,你都会得到Slim语言的模板(替代ERB,因此ERB文件就消失了)。
2.当你加载Rails应用时,Slim将会自动初始化和加载。
3.当访问缓存器的时候,Slim模板将会被慎重对待。
This README is also available in a friendly navigable format.
Devise is a flexible authentication solution for Rails based on Warden. It:
- Is Rack based;
- Is a complete MVC solution based on Rails engines;
- Allows you to have multiple models signed in at the same time;
- Is based on a modularity concept: use only what you really need.
It's composed of 10 modules:
- Database Authenticatable: encrypts and stores a password in the database to validate the authenticity of a user while signing in. The authentication can be done both through POST requests or HTTP Basic Authentication.
- Omniauthable: adds OmniAuth (https://github.com/intridea/omniauth) support.
- Confirmable: sends emails with confirmation instructions and verifies whether an account is already confirmed during sign in.
- Recoverable: resets the user password and sends reset instructions.
- Registerable: handles signing up users through a registration process, also allowing them to edit and destroy their account.
- Rememberable: manages generating and clearing a token for remembering the user from a saved cookie.
- Trackable: tracks sign in count, timestamps and IP address.
- Timeoutable: expires sessions that have not been active in a specified period of time.
- Validatable: provides validations of email and password. It's optional and can be customized, so you're able to define your own validations.
- Lockable: locks an account after a specified number of failed sign-in attempts. Can unlock via email or after a specified time period.
Devise is guaranteed to be thread-safe on YARV. Thread-safety support on JRuby is in progress.
本自述文件也有更友好的可操纵的格式页面
Devise是一个基于Warden的,更加灵活的身份验证的rails解决方案。
1.基于Rack
2.是一个基于Rails引擎的完整MVC解决方案
3.允许多个模块同时登陆
4.基于模块化的概念:只使用你需要的
它由10个模块组成:
1.数据库验证:注册信息的同时将密码加密并且储存在数据库中以便于身份验证,无论提交POST请求还是HTTP基本身份验证的情况下都支持。
2.Omniauthable验证:添加了OmniAuth(https://github.com/intridea/omniauth)身份验证。
3.邮件确认:在登陆时发送验证邮件确认邮件已被确认。
4.重获密码:重新设置密码并且发送重设密码邮件
5.注册:控制已注册用户的功能,已注册用户可以编辑和删除他们的账户。
6.记忆cookie功能:管理创建和清楚用户已保存的cookie的记忆令牌。
7.可追踪的:追踪账户的数量,时间以及IP地址。
8.会话超时管理:在特定的时间内会话到期。
9.验证信息:提供验证邮件和密码。此功能是可选择和定制的,所以你可以定义你自己需要的验证。
10.可锁定的:在指定数量的失败登陆后锁定账户,可以通过限定时间或者邮件验证解锁账户。
Devise在YARV虚拟机上是第三方安全的,在Jruby上第三方安全正在进行中。