devise-async-stretch 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MTg2OWRjMjIyNTIwZGJiYWQ3MzAxMmYzOTRlMDAyZjQ5Yzk4ZTc4Nw==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZGYyZjAxZGI5MGE2YzZjMmRlMGRiODY3OTljZjQ1MWRjNWEwMWRkYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MWUwN2Q0NTE0MTA0NGM0OGZjNmUzMDQ4ZDQwYmRjYWYzOTM4NDdjZGY5ODU5
|
10
|
+
NGUwMjU4NTFjOWNhOTA5MTg3NTc3ZmE5NWU3YTYyYjBkMzQ0YzY3NDE4MjRm
|
11
|
+
NTJkODVkNzVjMmJkMGM4ZTczOTRmNDI3M2IwZDE3NjViNzQ0NTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NmE5ZjUzY2FkNTNkMjU5ZWNmOWFlMTM1MmNlZDc3ZWJmYTI4NjBlMWM5ZWU4
|
14
|
+
ZjhiMmUzYmNjNTk3Yzg2YWJlODlhMWNhNTYzOWI0ZmZkYjhjNTIxMzdmMGMy
|
15
|
+
NDkwMTFlOTdmNGNhNGYzNWM0OTJiODJlYzFlMDZjYTNlNzAxYmU=
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
Move password stretching into a background job for fast user creation but while maintaining difficult to crack storage.
|
4
4
|
|
5
|
-
|
5
|
+
Who, why, and how? See the [website](http://devise-async-stretch.onsimplybuilt.com/).
|
6
6
|
|
7
7
|
## Contributing
|
8
8
|
|
@@ -24,6 +24,14 @@ module Devise
|
|
24
24
|
rake "db:migrate"
|
25
25
|
end
|
26
26
|
|
27
|
+
def populate_stretch_marks
|
28
|
+
name.constantize.to_adapter.find_all.each do |record|
|
29
|
+
if record.stretch_mark.blank?
|
30
|
+
record.update(stretch_mark: SecureRandom.hex(15)[0,29])
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
27
35
|
end
|
28
36
|
end
|
29
37
|
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'rails/generators/named_base'
|
2
|
+
require 'rails/generators/active_record'
|
3
|
+
|
4
|
+
module Devise
|
5
|
+
module Async
|
6
|
+
module Stretch
|
7
|
+
class PopulateStretchMarksGenerator < Rails::Generators::NamedBase
|
8
|
+
|
9
|
+
desc "Sets the stretch_mark for existing records"
|
10
|
+
class_option :orm
|
11
|
+
|
12
|
+
def populate_stretch_marks
|
13
|
+
name.constantize.to_adapter.find_all.each do |record|
|
14
|
+
if record.stretch_mark.blank?
|
15
|
+
record.update(stretch_mark: SecureRandom.hex(15)[0,29])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: devise-async-stretch
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Westendorf
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-01-
|
11
|
+
date: 2015-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: devise
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- lib/devise/async/stretch/version.rb
|
163
163
|
- lib/devise/async/stretch/worker.rb
|
164
164
|
- lib/generators/devise/async/stretch/install_generator.rb
|
165
|
+
- lib/generators/devise/async/stretch/populate_stretch_marks_generator.rb
|
165
166
|
- lib/generators/templates/devise_async_stretch.rb
|
166
167
|
- test/devise/async/stretch/backend/active_job_test.rb
|
167
168
|
- test/devise/async/stretch/backend/base_test.rb
|