easy_login 1.2.3 → 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -2
- data/lib/easy_login/version.rb +1 -1
- data/lib/generators/easy_login/init_generator.rb +12 -0
- data/lib/generators/templates/http_permissions.yml +12 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c71315035ea81df325d76eab8ab2f4818f8ce99d
|
4
|
+
data.tar.gz: f210d6d83509cfdc458b1827eccf4c35b8fca874
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 81479889ff8dcf1b261b2290b684b8f814091b253d3f7215680baf5f70f36150edfefd4cfdbae4ba492937dfefdeb0b427878bca076938a26c147102e461bcef
|
7
|
+
data.tar.gz: 6461bea509ef705b122446a57e0aec9deb24a75cc424df4efd54a8b764f219a161db92856170d7f446056106abff61d0bfb2327fbaaf02060d17e14c52a24cba
|
data/README.md
CHANGED
@@ -21,6 +21,10 @@ Install it yourself as:
|
|
21
21
|
|
22
22
|
$ gem install easy_login
|
23
23
|
|
24
|
+
And then run command to init a config file
|
25
|
+
|
26
|
+
$ bundle exec rails generate easy_login:init
|
27
|
+
|
24
28
|
## Usage
|
25
29
|
|
26
30
|
Add config in `config/application.rb` or `config/environments/*.rb`
|
@@ -42,8 +46,9 @@ include EasyLogin
|
|
42
46
|
And then abosultely use all methods above in controller and view
|
43
47
|
|
44
48
|
Also you can declare a redirect schema for differenct user accessing differect
|
45
|
-
controller and action
|
46
|
-
|
49
|
+
controller and action by editing config file `config/http_permissions.yml`
|
50
|
+
|
51
|
+
The following is a default code of `config/http_permissions.yml`
|
47
52
|
|
48
53
|
```yaml
|
49
54
|
default:
|
data/lib/easy_login/version.rb
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'rails/generators/base'
|
2
|
+
|
3
|
+
module EasyLogin
|
4
|
+
class InitGenerator < Rails::Generators::Base
|
5
|
+
source_root File.expand_path('../../templates', __FILE__)
|
6
|
+
desc 'EasyLogin Initialize'
|
7
|
+
|
8
|
+
def init_steps
|
9
|
+
copy_file 'http_permissions.yml', 'config/http_permissions.yml'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: easy_login
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- goshan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -79,6 +79,8 @@ files:
|
|
79
79
|
- lib/easy_login/permission.rb
|
80
80
|
- lib/easy_login/session.rb
|
81
81
|
- lib/easy_login/version.rb
|
82
|
+
- lib/generators/easy_login/init_generator.rb
|
83
|
+
- lib/generators/templates/http_permissions.yml
|
82
84
|
- pkg/easy_login-0.1.0.gem
|
83
85
|
- pkg/easy_login-0.1.1.gem
|
84
86
|
- pkg/easy_login-0.1.2.gem
|