Just use the existing ClassMethods module which is properly extended with AS::Concern.
This leaks into Devise mappings overriding the existing :admin one, so depending on the test seed it fails like this: $ TESTOPTS="--seed=9972" rake ==> Devise.orm = :active_record Run options: --seed=9972 ... 1) Failure: MappingTest#test_allows_path_to_be_given [./test/mapping_test.rb:31]: Expected: "admin_area" Actual: "admin" Using a different name should avoid any test randomization issues.
Previously the test was raising an ArgumentError by mistake: ArgumentError: wrong number of arguments (0 for 1) actionpack (4.1.4) lib/action_dispatch/routing/route_set.rb:328:in `eval_block'` The #eval_block method expects a proc/lambda argument that can be instance_exec'ed, not a real block. In the Rails implementation the block is passed to #draw, which calls #eval_block internally passing the block along, but as a Proc argument and not as a block. Also the error we were raising from #devise_for was a RuntimeError, changed to the expected ArgumentError. Adding an assertion on top of the expected message should ensure we won't have this issue again. This was introduced in 29da146, related to #2802.
Also refactor tests to remove the custom failure app class only used once in favor of an inline class for the specific test, makes it easier to follow what's going on.
No need to have a named class inside the test.
Update Travis config to test on ruby 2.1.2 instead of 2.1.1
explain that it's the configurability and not the functionality which is new
Add migration setup detail to README
Make minor changes to readme grammar.
Outdated reference to CanCan in README
Remove reference to CanCan - it is no longer maintained
Fix grammar and capitalization errors in README
Changes to support devise-neo4j
Add more description on the way I18n.locale has to be set in case of multi-locale app.
Helper methods for groups of mappings
… (neo4j, in this case)
Fixed incorrect method definition.