decidim-cdtb 0.5.4 → 0.5.5

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: 503b64bc8fc2ef3f45edcdabff3591d23a075cfb48e25cb624f061e7019f0f03
4
- data.tar.gz: 3574d5efd2e3d9f08e510f24df8f8c92ec9f45e3efea1e1308afc1ebcb58465d
3
+ metadata.gz: 47f434b218d1fb88fbf6a390e15eca202aa3e667c4d4736a21e559809045a4c2
4
+ data.tar.gz: d9f75458764ad9876bd895fdf2b5bb3c921026ae25ce2b0fa2eeeb72bfbbc146
5
5
  SHA512:
6
- metadata.gz: 37affa74d1f8761a42c1a6e64ecf93cbd9422208e169dc318d765b3fb650bdfc056fcf4a3a00ef2b1d95103ace679815e0fc933d5ebbda2447f3d47ba94f7902
7
- data.tar.gz: ece1b559779d9a45d378afb760f4df73aeca4866ef94c6b6561b599d9dfaf4db2033b2c7e674226e6753cd662728cc6db931389f19cbae3c8973a947701fa9ff
6
+ metadata.gz: 07f9b4824276022f7f5f6b971317209865e63e80ecc43131b40d54580075afae4cdfce1c0de1f93137595f89a34c150d9945371fc2f034cf14acd89c0c89e90a
7
+ data.tar.gz: adf5a07bfcb857aa18f602537e67fd5c3376352452550e69d32aa5014ce65f1b6c631b128fdf989913b950a7dca8beb3193cc68d69aad5aaa2093539846b09c1
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.5] - 2025-08-03 (patch - Esqueletic pero frenetic)
4
+
5
+ - Fix params in Users::Remover task
6
+
3
7
  ## [0.5.4] - 2025-07-10 (patch - Una festa que no resta)
4
8
 
5
9
  - Use `main` as default git branch in CI generators
data/Gemfile.lock CHANGED
@@ -141,7 +141,7 @@ GIT
141
141
  PATH
142
142
  remote: .
143
143
  specs:
144
- decidim-cdtb (0.5.4)
144
+ decidim-cdtb (0.5.5)
145
145
  decidim (>= 0.28.0)
146
146
  rails (>= 6)
147
147
  ruby-progressbar
@@ -7,8 +7,8 @@ module Decidim
7
7
  #
8
8
  # rubocop:disable Metrics/ClassLength
9
9
  class Remover < ::Decidim::Cdtb::Task
10
- def initialize(organization, csv_path, reporter_user_email)
11
- @organization= organization
10
+ def initialize(organization_id, csv_path, reporter_user_email)
11
+ @organization= Decidim::Organization.find_by(id: organization_id)
12
12
  @csv_path = csv_path
13
13
  @reporter_user_email = reporter_user_email
14
14
  progress_bar = { title: "Decidim::User" }
@@ -25,9 +25,7 @@ module Decidim
25
25
  def do_execution(context)
26
26
  progress_bar = context[:progress_bar]
27
27
 
28
- reporter_user = @organization.users.find_by(email: @reporter_user_email,
29
- organization: user.organization)
30
-
28
+ reporter_user = Decidim::User.find_by(email: @reporter_user_email, organization: @organization)
31
29
  emails_on_moderations = @organization.users.where(email_on_moderations: true).pluck(:email)
32
30
 
33
31
  disable_email_moderations(emails_on_moderations)
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Decidim
4
4
  module Cdtb
5
- VERSION = "0.5.4"
5
+ VERSION = "0.5.5"
6
6
  DECIDIM_MIN_VERSION = ">= 0.28.0"
7
7
  end
8
8
  end
data/lib/tasks/users.rake CHANGED
@@ -15,8 +15,8 @@ namespace :cdtb do
15
15
  desc <<~EODESC
16
16
  Remove Decidim::User's by IDs in a CSV.
17
17
  EODESC
18
- task :remove, %i[csv_path reporter_user_email] => [:environment] do |_taks, args|
19
- service = Decidim::Cdtb::Users::Remover.new(args.csv_path, args.reporter_user_email)
18
+ task :remove, %i[organization_id csv_path reporter_user_email] => [:environment] do |_taks, args|
19
+ service = Decidim::Cdtb::Users::Remover.new(args.organization_id, args.csv_path, args.reporter_user_email)
20
20
  service.execute!
21
21
  end
22
22
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-cdtb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oliver Valls
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-07-21 00:00:00.000000000 Z
11
+ date: 2025-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim