diff --git a/CHANGELOG.md b/CHANGELOG.md index 4ed60f1..bf2f54d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ This project is in BETA, but going to be tested in production. ## next version: +## Version 0.0.5 (MINOR) +- Make gem compatible with Decidim v0.20 (tested against decidim v0.21) +- Remove initializer to force `Decidim::CurrentOrganization` to be executed before `Warden::Manager`. It is already done in Decidim since v0.16 + ## Version 0.0.4 (PATCH) - Remove Gemfile.lock to avoid problems with apps using this gem and solving devise vulneravility: https://github.com/plataformatec/devise/issues/4981. diff --git a/README.md b/README.md index e70346f..ac9279d 100644 --- a/README.md +++ b/README.md @@ -37,9 +37,6 @@ Omniauth's configuration is setted in `config/initializers/omniauth_idcat_mobil. Refer to `omniauth-idcat_mobil` gem for further documentation. -## TODO -After decidim v0.16, remove from `lib/decidim/idcat_mobil/engine.rb:23` the `initializer "decidim.middleware"`. - ## Contributing See [Decidim](https://github.com/decidim/decidim). diff --git a/config/initializers/omniauth_idcat_mobil.rb b/config/initializers/omniauth_idcat_mobil.rb index c53d6ef..9e24f07 100644 --- a/config/initializers/omniauth_idcat_mobil.rb +++ b/config/initializers/omniauth_idcat_mobil.rb @@ -7,5 +7,3 @@ ENV["IDCAT_MOBIL_SITE_URL"], scope: :autenticacio_usuari end - -Decidim::User.omniauth_providers << :idcat_mobil diff --git a/decidim-idcat_mobil.gemspec b/decidim-idcat_mobil.gemspec index 6089025..3a2e45d 100644 --- a/decidim-idcat_mobil.gemspec +++ b/decidim-idcat_mobil.gemspec @@ -19,7 +19,7 @@ Gem::Specification.new do |s| s.files = Dir["{app,config,lib}/**/*", "LICENSE-AGPLv3.txt", "Rakefile", "README.md"] s.add_dependency "omniauth-idcat_mobil", "~> 0.2.0" - DECIDIM_VERSION= ">= 0.13.1" + DECIDIM_VERSION= ">= 0.20.0" s.add_dependency "decidim", DECIDIM_VERSION s.add_dependency "decidim-core", DECIDIM_VERSION s.add_development_dependency "decidim-dev", DECIDIM_VERSION diff --git a/lib/decidim/idcat_mobil/engine.rb b/lib/decidim/idcat_mobil/engine.rb index f7a53e9..35963b4 100644 --- a/lib/decidim/idcat_mobil/engine.rb +++ b/lib/decidim/idcat_mobil/engine.rb @@ -16,17 +16,17 @@ class Engine < ::Rails::Engine # root to: "idcat_mobil#index" end - # - # Force `Decidim::CurrentOrganization` to be executed before `Warden::Manager` to avoid path generation problems. - # NOTE: Remove this initializer when in Decidim 0.16.0 where it has been fixed. - # - initializer "decidim.middleware" do |app| - # as `app.config.middleware` is just a proxy made available for configuration purposes - # and acts as a command recorder that executes deletes always at the end - # we can not remove and re-insert, but only duplicate `Decidim::CurrentOrganization`. - # app.config.middleware.delete Decidim::CurrentOrganization - app.config.middleware.insert_before Warden::Manager, Decidim::CurrentOrganization - end + # # + # # Force `Decidim::CurrentOrganization` to be executed before `Warden::Manager` to avoid path generation problems. + # # NOTE: Remove this initializer when in Decidim 0.16.0 where it has been fixed. + # # + # initializer "decidim.middleware" do |app| + # # as `app.config.middleware` is just a proxy made available for configuration purposes + # # and acts as a command recorder that executes deletes always at the end + # # we can not remove and re-insert, but only duplicate `Decidim::CurrentOrganization`. + # # app.config.middleware.delete Decidim::CurrentOrganization + # app.config.middleware.insert_before Warden::Manager, Decidim::CurrentOrganization + # end # initializer "decidim_idcat_mobil.assets" do |app| # app.config.assets.precompile += %w[decidim_idcat_mobil_manifest.js decidim_idcat_mobil_manifest.css] diff --git a/lib/decidim/idcat_mobil/version.rb b/lib/decidim/idcat_mobil/version.rb index 28a8d6b..f55c08b 100644 --- a/lib/decidim/idcat_mobil/version.rb +++ b/lib/decidim/idcat_mobil/version.rb @@ -4,7 +4,7 @@ module Decidim module IdcatMobil def self.version # See CHANGELOG.md to see what changed - "0.0.4" + "0.0.5" end end end