Ruby HTML Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app New login screen that fit the new color theme Mar 14, 2018
bin Fix the rails binstub Oct 20, 2016
config Removes alchemy translations Apr 5, 2018
db/migrate Set schema migration version Oct 24, 2017
lib Raising version to 4.1.0.beta Nov 6, 2017
spec
.gitignore Removes devise initializer from dummy app. Jan 22, 2015
.travis.yml Use recent Ruby versions on Travis Nov 6, 2017
Gemfile Build for Rails 5.1 Apr 12, 2018
LICENSE Fixes copyright year in license file May 18, 2016
README.md Update readme because of 4.0 release Nov 6, 2017
Rakefile Ensure that the database gets created before prepared Mar 1, 2018
alchemy-devise.gemspec Update gemspec Nov 6, 2017

README.md

Devise based authentication for Alchemy 4.0

Build Status

Gem Version Test Coverage Code Climate security Dependency Status

CAUTION: This master branch is a development branch that can contain bugs. For productive environments you should use the current Ruby gem version, or the latest stable branch (4.0-stable).

AlchemyCMS has no authentication in its core. So it is possibly to bring your own authentication and use it to authorize users in AlchemyCMS. If you don't have your own authentication, you can use this gem.

Install

Just put the gem into your projects Gemfile.

# Gemfile
gem 'alchemy-devise', github: 'AlchemyCMS/alchemy-devise', branch: 'master'

NOTE: You normally want to use a stable branch, like 4.0-stable.

and run bundle install.

Then run the installer:

$ bin/rails g alchemy:devise:install

Upgrading

After updating the gem, please run the installer again.

$ bundle update alchemy-devise
$ bin/rails g alchemy:devise:install

Devise modules

Default Devise modules included in Alchemy::User model

  • :database_authenticatable
  • :trackable
  • :validatable
  • :timeoutable
  • :recoverable

If you want to add additional modules into the Alchemy user class append them to Alchemy.devise_modules in an initializer in your app.

Register additional modules example

# config/initializers/alchemy.rb
Alchemy.devise_modules << :registerable

Using old encryption

If your app uses an old encryption that needs the +devise-encryptable+ gem you also need to load the devise module.

# config/initializers/alchemy.rb
Alchemy.devise_modules << :encryptable

Testing

If you want to contribute (and you should ^_^), you need to run the tests locally on your machine.

Just follow these pretty rails standard way of testing projects:

1. Once to prepare the test suite:

Clone the repo to your local harddrive. Then

$ bundle install
$ rake alchemy:spec:prepare

2. Run the tests with:

$ rspec

Optional: Even shorter

$ rake

That prepares the database and runs the Rspec task in one step.

Getting Help

  • If you have bugs, please use the issue tracker on Github.
  • For Q&A and general usage, please use the User Group or the IRC channel.
  • New features should be discussed on our Trello Board. PLEASE don't use the Github issues for new features.

Resources

License