一些gem的簡要翻譯(歡迎提出問題共同討論)

寫這篇文章主要有兩方面用途html

1.但願給rails同行必定的幫助,翻譯水平有限,貼出中英文,翻譯有誤的地方歡迎指正,很是感謝,轉載請標明出處,謝謝。git

2.加深做者對gem的理解,有須要更詳細瞭解安裝以及使用的朋友能夠點擊文章中的連接進入gem sources詳細介紹。github

3.不按期更新spring

 

一.mjackson/rack-accept 數據庫

版本:0.4.5緩存

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.sass

Some features of the library are:安全

Rack::Accept是一套Ruby/Rack應用的工具,該工具簡化了創建應用的複雜性,解釋了可接受的Http請求頭系列。本庫的一些功能以下:ruby

        1.嚴格遵照RFC 2616,具體請看section 14cookie

   2.全面支持1中的Accept, Accept-Charset, Accept-Encoding,Accept-Language HTTP請求頭。

   3.能夠獨立使用或者用作RACK中間件

   4.擁有一個很全面的測試套間,涵蓋了許多邊緣狀況

 

二.dkubb/descendants_tracker

版本:0.0.4

Small module to track descendants in an unobtrusive way.

一些不顯眼的方式追蹤派生類的模塊

 

三.slim-template/html2slim

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。呵呵,我是一個老司機。

 

四.rails/sass-rails

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語言的官方集成

 

五.lautis/uglifier

 Uglifier minifies JavaScript files by wrapping UglifyJS to be accessible in Ruby

本gem壓縮JavaScript文件包裝爲UglifyJS來訪問ruby。

 

六.slim-template/slim-rails

 

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模板將會被慎重對待。

 

七.plataformatec/devise

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上第三方安全正在進行中。

八.rails/jbuilder

Create JSON structures via a Builder-style DSL

Jbuilder gives you a simple DSL for declaring JSON structures that beats massaging giant hash structures. This is particularly helpful when the generation process is fraught with conditionals and loops.

用相似ruby語法的領域語言(看了下代碼,仍是有些不同)創建JSON結構的文件

使用Jbuilder,它能給你一個簡單的DSL語言,JSON結構能控制偉大的哈希結構.當你創建一個條件句或者環形結構時,會特別有幫助。

.rails/spring

Spring is a Rails application preloader. It speeds up development by keeping your application running in the background so you don't need to boot it every time you run a test, rake task or migration.

spring是一個rails應用預載器。他大大加快了開發效率,不管你運行測試,仍是rake任務或數據,他都會保持後臺運行,因此免去了你時刻啓動的煩惱。

相關文章
相關標籤/搜索