$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem's version:
require "alchemy/devise/version"

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
  s.name        = "alchemy-devise"
  s.version     = Alchemy::Devise::VERSION
  s.authors     = ["Thomas von Deyen"]
  s.email       = ["thomas@vondeyen.com"]
  s.homepage    = "http://alchemy-cms.com"
  s.summary     = "Devise based user authentication for AlchemyCMS."
  s.description = "Devise based user authentication for AlchemyCMS."

  s.files = Dir["{app,config,db,lib}/**/*", "LICENSE", "Rakefile", "README.md"]
  s.test_files = Dir["spec/**/*"]

  s.add_dependency "alchemy_cms", [">= 4.1.0.beta", "< 4.99"]
  s.add_dependency "devise",      [">= 4.0", "< 4.99"]

  s.add_development_dependency "capybara"
  s.add_development_dependency "factory_bot_rails"
  s.add_development_dependency "rspec-activemodel-mocks", "~> 1.0"
  s.add_development_dependency "rspec-rails",             "~> 3.1"

  s.post_install_message =<<-MSG
In order to complete the installation or the upgrade of Alchemy::Devise run:

  $ bin/rails g alchemy:devise:install

MSG
end

$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem's version:
require "alchemy/devise/version"

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
  s.name        = "alchemy-devise"
  s.version     = Alchemy::Devise::VERSION
  s.authors     = ["Thomas von Deyen"]
  s.email       = ["thomas@vondeyen.com"]
  s.homepage    = "http://alchemy-cms.com"
  s.summary     = "Devise based user authentication for AlchemyCMS."
  s.description = "Devise based user authentication for AlchemyCMS."

  s.files = Dir["{app,config,db,lib}/**/*", "LICENSE", "Rakefile", "README.md"]
  s.test_files = Dir["spec/**/*"]

  s.add_dependency "alchemy_cms", [">= 4.1.0.beta", "< 4.99"]
  s.add_dependency "devise",      [">= 4.6.0", "< 4.99"]

  s.add_development_dependency "capybara"
  s.add_development_dependency "factory_bot_rails"
  s.add_development_dependency "rspec-activemodel-mocks", "~> 1.0"
  s.add_development_dependency "rspec-rails",             "~> 3.1"

  s.post_install_message =<<-MSG
In order to complete the installation or the upgrade of Alchemy::Devise run:

  $ bin/rails g alchemy:devise:install

MSG
end

Use at least Devise 4.6 for security patch
Use at least Devise 4.6 for security patch

Devise ruby gem before 4.6.0 when the lockable module is used is vulnerable to a time-of-check time-of-use (TOCTOU) race condition due to increment_failed_attempts within the `Devise::Models::Lockable` class not being concurrency safe.
