administrate-field-password 0.0.1 → 0.0.2
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 +20 -8
- data/administrate-field-password.gemspec +1 -1
- data/lib/administrate/field/password.rb +1 -1
- metadata +13 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d72c121862e393c988588db74d4b3d5a6fee1a5c
|
4
|
+
data.tar.gz: f277363ab603895be15cc5513b17a64b47b8739f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7f028f823dbdb2675b06eb8308744991bb63f43e4f7bca4236a793fc48782b4323ff1b897b39a869ed600ae8de1f4964cb1ef7334035fcdfdbabeb06e1a97d7
|
7
|
+
data.tar.gz: 03b326dfd4daabd39b48d43a5c9f3bf1d84704ef02e97e4171f776d501d756746f20b70ca0bf28e0d3e0192c283305cd5d0c9f5ccb055c32ee9698f797b8c97d
|
data/README.md
CHANGED
@@ -1,13 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# AdministrateFieldPassword
|
2
2
|
|
3
|
-
All you need to integrate
|
3
|
+
All you need to integrate Password with Administrate.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
7
|
Add this line to your application's Gemfile:
|
8
8
|
|
9
9
|
```ruby
|
10
|
-
gem 'administrate-field-
|
10
|
+
gem 'administrate-field-password'
|
11
11
|
```
|
12
12
|
|
13
13
|
And then execute:
|
@@ -17,20 +17,32 @@ $ bundle
|
|
17
17
|
|
18
18
|
## Usage
|
19
19
|
|
20
|
-
In your Dashboard `ATTRIBUTE_TYPES` use the field type `
|
20
|
+
In your Dashboard `ATTRIBUTE_TYPES` use the field type `PasswordField`. i.e.
|
21
21
|
```ruby
|
22
22
|
ATTRIBUTE_TYPES = {
|
23
|
-
images_files:
|
23
|
+
images_files: FieldPassword
|
24
24
|
}
|
25
25
|
```
|
26
26
|
|
27
|
-
By default all `
|
27
|
+
By default all `Password` options are false, you can set them to true like this:
|
28
28
|
```ruby
|
29
29
|
ATTRIBUTE_TYPES = {
|
30
|
-
images_files:
|
30
|
+
images_files: FieldPassword.with_options(direct: true, presigned: true, multiple: true)
|
31
31
|
}
|
32
32
|
```
|
33
33
|
|
34
|
+
If in you are displaying the password field on your forms, add this on you `UserController`
|
35
|
+
```
|
36
|
+
module Admin
|
37
|
+
class UsersController < Admin::ApplicationController
|
38
|
+
def update
|
39
|
+
params[:user].delete(:password) if params[:user][:password].blank?
|
40
|
+
super
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
```
|
45
|
+
|
34
46
|
## Contributing
|
35
47
|
|
36
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/DisruptiveAngels/
|
48
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/DisruptiveAngels/administrate-field-password.
|
@@ -16,6 +16,6 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.files = `git ls-files`.split("\n")
|
17
17
|
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
|
19
|
-
gem.add_dependency 'administrate', '
|
19
|
+
gem.add_dependency 'administrate', '>= 0.2.0.rc1', '< 0.3.0'
|
20
20
|
gem.add_dependency 'rails', '~> 4.2'
|
21
21
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
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.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Rangel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02
|
11
|
+
date: 2016-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: administrate
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.2.0.rc1
|
20
|
+
- - "<"
|
18
21
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
22
|
+
version: 0.3.0
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 0.2.0.rc1
|
30
|
+
- - "<"
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
32
|
+
version: 0.3.0
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: rails
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,10 +80,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
80
|
version: '0'
|
75
81
|
requirements: []
|
76
82
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.
|
83
|
+
rubygems_version: 2.6.1
|
78
84
|
signing_key:
|
79
85
|
specification_version: 4
|
80
86
|
summary: Add Password fields to Administrate
|
81
87
|
test_files:
|
82
88
|
- spec/lib/administrate/field/password_spec.rb
|
83
|
-
has_rdoc:
|