You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
An additional install generator has been added using the extension's
namespace for consistency with the other extensions and for easier
future upgrades.
Provides authentication services for Solidus, using the Devise gem.
7
7
8
-
Installation
9
-
------------
8
+
## Usage
10
9
11
-
Just add this line to your `Gemfile`:
10
+
### Installation
12
11
13
-
```ruby
14
-
gem "solidus_auth_devise"
12
+
Add solidus_auth_devise to your Gemfile:
15
13
16
-
# For Solidus versions < 2.5
17
-
#gem 'deface'
14
+
```ruby
15
+
gem 'solidus_auth_devise'
18
16
```
19
17
20
18
Then, run `bundle install`.
@@ -27,11 +25,11 @@ bundle exec rake db:migrate
27
25
bundle exec rake db:seed
28
26
```
29
27
30
-
### Default Username/Password
28
+
####Default Username/Password
31
29
32
30
As part of running the above installation steps, you will be asked to set an admin email/password combination. The default values are `admin@example.com` and `test123`, respectively.
33
31
34
-
### Confirmable
32
+
####Confirmable
35
33
36
34
To enable Devise's Confirmable module, which will send the user an email with a link to confirm their account, you must do the following:
37
35
@@ -52,8 +50,7 @@ Devise.setup do |config|
52
50
end
53
51
```
54
52
55
-
Using in an existing application
56
-
--------------------------------
53
+
### Using in an existing application
57
54
58
55
If you are installing Solidus inside of a host application in which you want your own permission setup, you can do this using the `register_ability` method.
59
56
@@ -87,15 +84,69 @@ Inside of your host application you can then use CanCan like you normally would.
87
84
<% end %>
88
85
```
89
86
90
-
Testing
91
-
-------
87
+
## Development
88
+
89
+
### Testing the extension
90
+
91
+
First bundle your dependencies, then run `bin/rake`. `bin/rake` will default to building the dummy
92
+
app if it does not exist, then it will run specs. The dummy app can be regenerated by using
93
+
`bin/rake extension:test_app`.
94
+
95
+
```shell
96
+
bin/rake
97
+
```
98
+
99
+
To run [Rubocop](https://github.com/bbatsov/rubocop) static code analysis run
100
+
101
+
```shell
102
+
bundle exec rubocop
103
+
```
104
+
105
+
When testing your application's integration with this extension you may use its factories.
106
+
Simply add this require statement to your `spec/spec_helper.rb`:
0 commit comments