Some brief translations of gem (You are welcome to raise questions for discussion ).

Source: Internet
Author: User

Some brief translations of gem (You are welcome to raise questions for discussion ).

This article is mainly used in two aspects.

1. I hope to provide some help to rails colleagues. The translation level is limited. I will post Chinese and English documents. please correct me if the translation is incorrect. Thank you very much. Please mark the source for reprinting. Thank you.

2. Deepen the author's understanding of gem. If you need to learn more about installation and use, you can click the link in the article to go to the gem sources details.

3. Irregular updates

 

1. mjackson/Rack-accept

Version: 0.4.5

Rack: AcceptIs 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 wide edge cases

Rack: AcceptIt is a Ruby/Rack application tool that simplifies the complexity of building an application and explains an acceptable Http Request Header series. Some functions of this library are as follows:

1. strictly abide by RFC 2616. For details, see section 14.

2. Full supportAccept, Accept-Charset, Accept-Encoding,AndAccept-LanguageHTTP request header.

3. Can be used independently or used as RACK Middleware

4. A comprehensive test suite covering many edge situations

 

Ii. dkubb/Descendants_tracker

Version: 0.0.4

Small module to track descendants in an unobtrusive way.

Some inconspicuous ways to track the modules of a derived class

 

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

This gem is the HTML and ERB file into the silm template language script, want to know slim right (slim-lang.org)

It is not perfect, but it will certainly help you a lot!

It is based on Hprico. I am an old driver.

 

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

Official Ruby-on-Rails integration with Sass

This gem provides official integration of Ruby on Rails and Sass.

 

5. lautis/Uglifier

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

This gem compresses JavaScript files and packages them as UglifyJS to access ruby.

 

6. 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 provides the Slim language Generator for Rails3 and Rails4. It is based on haml-rails and has the same features, as shown below:

1. Whenever and wherever you use rails to generate a controller or scaffolding, you will get a Slim language template (replacing ERB, so the ERB file disappears ).

2. When you load a Rails application, Slim will be automatically initialized and loaded.

3. When accessing the cache, the Slim template will be treated with caution.

 

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

This readme file also has a more user-friendly and operable format page.

Devise is a Warden-based, more flexible identity authentication rails solution.

1. Based on Rack

2. It is a complete MVC solution based on the Rails engine.

3. Allow multiple modules to log on simultaneously

4. modular concept: use only what you need

It consists of 10 modules:

1. Database Authentication: the password is encrypted and stored in the database for identity authentication at the same time as the registration information. This is supported in both POST request submission and HTTP basic identity authentication.

2. Omniauthable authentication: added OmniAuth (https://github.com/intridea/omniauth) authentication.

3. Email confirmation: A verification email is sent at login to confirm that the email has been confirmed.

4. Password Reset: reset the password and send a password reset email.

5. Registration: controls the functions of registered users. Registered users can edit and delete their accounts.

6. Memory cookie function: Manage the memory tokens for creating and clearing the cookies that the user has saved.

7. traceable: Number, time, and IP address of the tracked account.

8. Session Timeout Management: The session expires at a specific time.

9. Verification Information: Provide the verification email and password. This feature is optional and customizable, so you can define the verification you need.

10. lockable: the account is locked after a specified number of failed logins. you can unlock the account by specifying the time limit or email verification.

Devise is secured by a third party on the YARV Virtual Machine and is in progress on Jruby.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.