administrate-field-password 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +15 -10
- data/administrate-field-password.gemspec +2 -3
- data/spec/lib/administrate/field/password_spec.rb +1 -1
- metadata +7 -25
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ae7497f83f3607daa307c3b9eb75039610864805
|
4
|
+
data.tar.gz: 70b90a2f96f74f62a0eed492d3afc77a4026b561
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f5578ef6ebf51724fc2b67ead08afd5da0c2e39eaab11f6a08567f627b6fc781a4ac57c87de774a0ba002e34776382f965fe6fdb2fa44138db2b2de3903a603
|
7
|
+
data.tar.gz: ce22babca8c052791a374e3a5dd0456f1ef26f2ec0c864b2c779a655dfeda7a5ff83a31f396d97cc8492f7bfdfac996eef7f44681ca06c7398d075d053f96adf
|
data/Gemfile
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 DisruptiveAngels
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# AdministrateFieldPassword
|
2
|
+
[![Gem](https://img.shields.io/gem/v/administrate-field-password.svg)]()
|
2
3
|
|
3
4
|
All you need to integrate Password with Administrate.
|
4
5
|
|
@@ -12,27 +13,27 @@ gem 'administrate-field-password'
|
|
12
13
|
|
13
14
|
And then execute:
|
14
15
|
```
|
15
|
-
$ bundle
|
16
|
+
$ bundle install
|
16
17
|
```
|
17
18
|
|
18
19
|
## Usage
|
19
20
|
|
20
|
-
In your Dashboard
|
21
|
+
In your Dashboard use the field type `Field::Password` for your password attribute in `ATTRIBUTE_TYPES` i.e.
|
21
22
|
```ruby
|
22
23
|
ATTRIBUTE_TYPES = {
|
23
|
-
|
24
|
+
user_password: Field::Password
|
24
25
|
}
|
25
26
|
```
|
26
|
-
|
27
|
-
By default all `Password` options are false, you can set them to true like this:
|
27
|
+
And then add the attribute to the `FORM_ATTRIBUTES` list.
|
28
28
|
```ruby
|
29
|
-
|
30
|
-
|
31
|
-
|
29
|
+
FORM_ATTRIBUTES = [
|
30
|
+
# Some other attributes...
|
31
|
+
:user_password
|
32
|
+
].freeze
|
32
33
|
```
|
33
34
|
|
34
|
-
If in you are displaying the password field on your forms, add this
|
35
|
-
```
|
35
|
+
If in you are displaying the password field on your forms, add this to your `UserController`
|
36
|
+
```ruby
|
36
37
|
module Admin
|
37
38
|
class UsersController < Admin::ApplicationController
|
38
39
|
def update
|
@@ -46,3 +47,7 @@ end
|
|
46
47
|
## Contributing
|
47
48
|
|
48
49
|
Bug reports and pull requests are welcome on GitHub at https://github.com/DisruptiveAngels/administrate-field-password.
|
50
|
+
|
51
|
+
## License
|
52
|
+
[MIT License](https://github.com/DisruptiveAngels/administrate-field-password/blob/better_readme/LICENSE)
|
53
|
+
|
@@ -2,7 +2,7 @@ $:.push File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |gem|
|
4
4
|
gem.name = 'administrate-field-password'
|
5
|
-
gem.version =
|
5
|
+
gem.version = '0.0.4'
|
6
6
|
gem.authors = ['Adrian Rangel']
|
7
7
|
gem.email = ['adrian@disruptiveangels.com']
|
8
8
|
gem.homepage = 'https://github.com/disruptiveangels/administrate-field-password'
|
@@ -14,6 +14,5 @@ Gem::Specification.new do |gem|
|
|
14
14
|
gem.files = `git ls-files`.split("\n")
|
15
15
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
16
16
|
|
17
|
-
gem.add_dependency 'administrate'
|
18
|
-
gem.add_dependency 'rails', '>= 4.2'
|
17
|
+
gem.add_dependency 'administrate'
|
19
18
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: administrate-field-password
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Rangel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
@@ -16,34 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 0.3.0
|
23
|
-
type: :runtime
|
24
|
-
prerelease: false
|
25
|
-
version_requirements: !ruby/object:Gem::Requirement
|
26
|
-
requirements:
|
27
|
-
- - ">="
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
version: 0.2.0.rc1
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 0.3.0
|
33
|
-
- !ruby/object:Gem::Dependency
|
34
|
-
name: rails
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
36
|
-
requirements:
|
37
|
-
- - ">="
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '4.2'
|
19
|
+
version: '0'
|
40
20
|
type: :runtime
|
41
21
|
prerelease: false
|
42
22
|
version_requirements: !ruby/object:Gem::Requirement
|
43
23
|
requirements:
|
44
24
|
- - ">="
|
45
25
|
- !ruby/object:Gem::Version
|
46
|
-
version: '
|
26
|
+
version: '0'
|
47
27
|
description: Easily add Password fields to your administrate views
|
48
28
|
email:
|
49
29
|
- adrian@disruptiveangels.com
|
@@ -53,6 +33,7 @@ extra_rdoc_files: []
|
|
53
33
|
files:
|
54
34
|
- ".gitignore"
|
55
35
|
- Gemfile
|
36
|
+
- LICENSE
|
56
37
|
- README.md
|
57
38
|
- administrate-field-password.gemspec
|
58
39
|
- app/views/fields/password/_form.html.erb
|
@@ -80,9 +61,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
61
|
version: '0'
|
81
62
|
requirements: []
|
82
63
|
rubyforge_project:
|
83
|
-
rubygems_version: 2.5.
|
64
|
+
rubygems_version: 2.5.2
|
84
65
|
signing_key:
|
85
66
|
specification_version: 4
|
86
67
|
summary: Add Password fields to Administrate
|
87
68
|
test_files:
|
88
69
|
- spec/lib/administrate/field/password_spec.rb
|
70
|
+
has_rdoc:
|