authentication-zero 4.0.2 → 4.0.3

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,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a27f54fb7d0351d835f355c5018136265f190a0b55929aa5e9a1ef4572dda2db
4
- data.tar.gz: 61003cd5539e38851b2de9125cfdc5e94ae73366eb9a0b66514a9fbd8e67a43d
3
+ metadata.gz: a20860b4e4e996ed12ee1f8627c322cee71785051bb58569e8d3694bd8d46860
4
+ data.tar.gz: da8ceac9a2cd8d53028b446fd988b9604bbc6a72ab8f89dfe4cc0442cd0facd7
5
5
  SHA512:
6
- metadata.gz: 6744a2f7059c69e90aefbc6053738f11a44379c37ee443ecb2ebbd4be139615399eef151bf97d9588fa940b516726c8f001b3fcb81eb6458d1a10e1141ee42b3
7
- data.tar.gz: 5ac18f8698a62505bb9fe8edf8298e077e2cc8a8b2031f285e71e4c8dc5d745bc6545125228dbbed8debe7a98b871485dba9ab98a80f554c29b1b32c46c9874a
6
+ metadata.gz: 03ba76dae5a7ae6862a45525d43bcbf1ca566b5e5bd1738a743f52a62d5af8c31838381e183d3eb2fd2776a7f909430c6a57746999c9bd4f4ead57bd67ccf6a1
7
+ data.tar.gz: 1d8aad9fc172635ba87cc4f154a25a1da38470967cd8a8e82f344318bf54e95e5a759f0956b38a48092d08ae29d6a626750d6076c45f40f84d96918db5c54f75
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## New version
2
2
 
3
+ ## Authentication Zero 4.0.3 ##
4
+
5
+ * We don't need to add `config.action_mailer.default_url_options` anymore
6
+ * Make gem add bcrypt more resilient
7
+
8
+ ## Authentication Zero 4.0.2 ##
9
+
3
10
  * Remove dependency on redis / kredis for sudoable
4
11
  * Fix --webauthn option. (add @github/webauthn-json)
5
12
  * Update application_controller to rails 8
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- authentication-zero (4.0.2)
4
+ authentication-zero (4.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module AuthenticationZero
2
- VERSION = "4.0.2"
2
+ VERSION = "4.0.3"
3
3
  end
@@ -19,7 +19,11 @@ class AuthenticationGenerator < Rails::Generators::Base
19
19
  source_root File.expand_path("templates", __dir__)
20
20
 
21
21
  def add_gems
22
- gem "bcrypt", "~> 3.1.7", comment: "Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]"
22
+ if bcrypt_present?
23
+ uncomment_lines "Gemfile", /gem "bcrypt"/
24
+ else
25
+ gem "bcrypt", "~> 3.1.7", comment: "Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]"
26
+ end
23
27
 
24
28
  if options.pwned?
25
29
  gem "pwned", comment: "Use Pwned to check if a password has been found in any of the huge data breaches [https://github.com/philnash/pwned]"
@@ -40,11 +44,6 @@ class AuthenticationGenerator < Rails::Generators::Base
40
44
  end
41
45
  end
42
46
 
43
- def add_environment_configurations
44
- application "config.action_mailer.default_url_options = { host: \"localhost\", port: 3000 }", env: "development"
45
- application "config.action_mailer.default_url_options = { host: \"localhost\", port: 3000 }", env: "test"
46
- end
47
-
48
47
  def create_configuration_files
49
48
  copy_file "config/initializers/omniauth.rb" if omniauthable?
50
49
  copy_file "config/initializers/webauthn.rb" if webauthn?
@@ -246,6 +245,10 @@ class AuthenticationGenerator < Rails::Generators::Base
246
245
  options.sudoable? && !options.api?
247
246
  end
248
247
 
248
+ def bcrypt_present?
249
+ File.read("Gemfile").include?('gem "bcrypt"')
250
+ end
251
+
249
252
  def importmaps?
250
253
  Rails.root.join("config/importmap.rb").exist?
251
254
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authentication-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nixon