/hello

Rails Gem to authenticate you and your users

Primary LanguageRubyMIT LicenseMIT

Hello

We want enjoyable Rails authentication

This gem is in rapid development, currently in Beta

Status

Build Status Code Climate Code Climate Dependency Status Inline docs

Tested With

Ruby Versions Rails Versions
Ruby 2.0.0 Rails 4.1.*
Ruby 2.1.5 Rails 4.2.*
Ruby 2.2.1 Rails 5 beta (soon)

Install

Add this line to your application's Gemfile:

gem 'hello', github: 'hello-gem/hello' # latest from github while this gem is in rapid development

And then execute:

bundle install
bundle exec rails generate hello:install
bundle exec rake db:migrate
bundle exec rails generate hello:extensions # optional
bundle exec rails generate hello:views   # optional

Customizing - behavior and views

These files are generated when you install this gem.

They are simple to customize, just open them.

├── app/
│   ├── controllers/
│   │   ├── onboarding_controller.rb
│   │   └── users_controller.rb
│   ├── models/
│   │   ├── credential.rb
│   │   ├── active_session.rb
│   │   └── user.rb
│   ├── views/
│   │   ├── hello/
│   │   │   └── [...optional...]
│   │   ├── layouts/
│   │   │   └── application.html.erb
│   │   ├── onboarding/
│   │   │   └── index.html.erb
│   │   └── users/
│   │       ├── index.html.erb
│   │       └── show.html.erb
│   └── lib/
│       └── hello/
│           └── extensions/
│               └── [...optional...]
├── config/
│   └── initializers
│       └── hello.rb
└── db/
    └── migrate/
        ├── 1_create_credentials.hello.rb
        ├── 2_create_accesses.hello.rb
        └── 3_create_users.hello.rb

Customizing

class User < ActiveRecord::Base
  validates_presence_of :username
end

module Hello
  module Extensions
    module EmailSignUp

      def success
        deliver_welcome_email
        deliver_confirmation_email
        redirect_to root_path
      end

      def failure
        render action: 'index'
      end

    end
  end
end

References

Support

Demo

Want to see it in action?

Thank You

Tim Lucas, John Nunemaker, Dan Everton and Johan Andersson or their open source gem user_agent_parser. As well as Tobie Langel and everybody involved in BrowserScope (full list), as our device and browser detection derives from their open-source work.

Iain Hecker for his open source gem http_accept_language that helps us understand browser's favorite locales.

Brian Landau and Ryan Foster for NavLynx as well as everybody on the Bootstrap Team as we use these open source projects on our generated view code.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Versioning

Hello uses Semantic Versioning 2.0.0

Copyright

Copyright 2013-2014 James Pinto – Released under MIT License

Additional

Look for these terms in the source code

"TODO", "KNOWNBUG"

Known bugs

  1. (Rails 4.0 only) Top Feature Set: Current User Feature Set: Settings Feature: Cancel Account Invalid Scenarios Validation: has_many restrict_with_error Scenario 2: User has dependent grandchildren

To Do

  1. One translation missing: config/locales/*.yml

  2. Test this method: Hello::Rails::Controller::AccessRestrictionConcern::ClassMethods#restrict_if_role_is

  3. Generate Access Token Feature