![Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility](https://cdn.sanity.io/images/cgdhsj6q/production/97774ea8c88cc8f4bed2766c31994ebc38116948-1664x1366.png?w=400&fit=max&auto=format)
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Provides authentication services for Solidus, using the Devise gem.
Add solidus_auth_devise to your Gemfile:
gem 'solidus_auth_devise'
Then, run bundle install
.
After that's done, you can install and run the necessary migrations, then seed the database:
bundle exec rake solidus_auth:install:migrations
bundle exec rake db:migrate
bundle exec rake db:seed
As part of running the above installation steps, you will be asked to set an admin email/password combination. The default values are admin@example.com
and test123
, respectively.
To enable Devise's Confirmable module, which will send the user an email with a link to confirm their account, you must do the following:
config/initializers/spree.rb
):Spree::Auth::Config[:confirmable] = true
config/initializers/devise.rb
):Devise.setup do |config|
# Required so users don't lose their carts when they need to confirm.
config.allow_unconfirmed_access_for = 1.days
# Add any other devise configurations here, as they will override the defaults provided by solidus_auth_devise.
end
If you are installing Solidus inside of a host application in which you want your own permission setup, you can do this using the register_ability
method.
First create your own CanCan Ability class following the CanCan documentation.
For example: app/models/super_abilities.rb
class SuperAbilities
include CanCan::Ability
def initialize user
if user.is? "Superman"
can :stop, Bullet
end
end
end
Then register your class in your spree initializer: config/initializers/spree.rb
Spree::Ability.register_ability(SuperAbilities)
Inside of your host application you can then use CanCan like you normally would.
<% if can? :stop Bullet %>
...
<% end %>
First bundle your dependencies, then run bin/rake
. bin/rake
will default to building the dummy
app if it does not exist, then it will run specs. The dummy app can be regenerated by using
bin/rake extension:test_app
.
bin/rake
To run Rubocop static code analysis run
bundle exec rubocop
When testing your application's integration with this extension you may use its factories.
Simply add this require statement to your spec/spec_helper.rb
:
require 'solidus_auth_devise/testing_support/factories'
Or, if you are using FactoryBot.definition_file_paths
, you can load Solidus core
factories along with this extension's factories using this statement:
SolidusDevSupport::TestingSupport::Factories.load_for(SolidusAuthDevise::Engine)
To run this extension in a sandboxed Solidus application, you can run bin/sandbox
. The path for
the sandbox app is ./sandbox
and bin/rails
will forward any Rails commands to
sandbox/bin/rails
.
Here's an example:
$ bin/rails server
=> Booting Puma
=> Rails 6.0.2.1 application starting in development
* Listening on tcp://127.0.0.1:3000
Use Ctrl-C to stop
Before and after releases the changelog should be updated to reflect the up-to-date status of the project:
bin/rake changelog
git add CHANGELOG.md
git commit -m "Update the changelog"
Please refer to the dedicated page on Solidus wiki.
Copyright (c) 2022 Solidus Team, released under the New BSD License.
FAQs
Unknown package
We found that solidus_auth_devise demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.