devise-async-stretch 0.0.5 → 0.0.6

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MWIwYTBiZGI3Y2YwNWQ3NTMyM2NmZWY5MTZhZjk2Yjc1MmVlNWRmZg==
4
+ MTg2OWRjMjIyNTIwZGJiYWQ3MzAxMmYzOTRlMDAyZjQ5Yzk4ZTc4Nw==
5
5
  data.tar.gz: !binary |-
6
- Zjk1ZGQ3NWJhNGMyZjE2ZDJiYWNiNzMzMDZiZTQxNDJmNzliZTA4OQ==
6
+ ZGYyZjAxZGI5MGE2YzZjMmRlMGRiODY3OTljZjQ1MWRjNWEwMWRkYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTI2OGRlZDE3NWJhZWM5MzliMjcxYTM1ZGIyODc0MTM3MjljODc3OGM2OTU0
10
- YmIzMDRmM2ExODI0MTg3YWMxMjllYjQ1OWFhYzcwNWE2ZjI0OGFmY2JjZWJi
11
- MjY1ODIzZWJjZmUwNjJmNjVmOTdiYjUxZWE2NjhmZTcyN2RlOGM=
9
+ MWUwN2Q0NTE0MTA0NGM0OGZjNmUzMDQ4ZDQwYmRjYWYzOTM4NDdjZGY5ODU5
10
+ NGUwMjU4NTFjOWNhOTA5MTg3NTc3ZmE5NWU3YTYyYjBkMzQ0YzY3NDE4MjRm
11
+ NTJkODVkNzVjMmJkMGM4ZTczOTRmNDI3M2IwZDE3NjViNzQ0NTg=
12
12
  data.tar.gz: !binary |-
13
- MTcwMGEwODNiZmZkZGY4MjNkYjc0NWRmOGEyM2U2MjBiMjEzMDViNjlkNDQ0
14
- N2ZlMmE0ZjdjYWNhZTJhOWJlNzg3MTkxMjUxY2M0OThhMWJlMGZjZGIwMWM1
15
- NjY3ZGM4ZDRjMDUyODMyMGRjY2M5YjljZjMwM2YwMDIxN2I3N2E=
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
- # Don't use this. Everything will work in development, but once you deploy to production, users will get logged out once the bg job executes.
5
+ Who, why, and how? See the [website](http://devise-async-stretch.onsimplybuilt.com/).
6
6
 
7
7
  ## Contributing
8
8
 
@@ -1,7 +1,7 @@
1
1
  module Devise
2
2
  module Async
3
3
  module Stretch
4
- VERSION = "0.0.5"
4
+ VERSION = "0.0.6"
5
5
  end
6
6
  end
7
7
  end
@@ -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.5
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-26 00:00:00.000000000 Z
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