decidim-cleaner 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d719f430907247b84a0cc288639ab222c6120d27e6dc407d6b04f5547fe82a2e
4
- data.tar.gz: f176026b4e7218680433e383c266587ce6fa47ea360ac42972452bc4e4446b73
3
+ metadata.gz: c9fd35840bd986218c10726232aa523b811331ec05cb78d6ae52b0352e434862
4
+ data.tar.gz: 2edf1e583c38516e4d7eefd51f4116cb883e4f823643c605df4f40ae4718684f
5
5
  SHA512:
6
- metadata.gz: 148df6e0913bb0965c4660449f332a647bac902d1ce35c902880ac7e11b4ce07515bef36b7b92d238e2259ba6dc9f4a4d9f956e24e070bcd4ddb4205f8146048
7
- data.tar.gz: '073996a639f9961296aea2a95329e400441524e5a088f04fcfa6bf130d81be7658fc29ed4a66d3e5fbbf4b34c38e77f067c48eb0ad03782df06c9eab1bc42823'
6
+ metadata.gz: e0c59579a5fe21080c697d6553b2983b21f242d62687c7fb7e700e86c5a01617762cdd8019a0b9258719d1534f5be29a00faa0580208ae92c31dc6fedb6d536f
7
+ data.tar.gz: aca024679460c2a7fd0896e426c3b2de5f6aee923595b572bdfae1f2cb419090ae5a5dba6d898d4e38a744b67a0caff17b2ed2eb583bd883156cad4c063df912
@@ -9,7 +9,9 @@ module Decidim
9
9
  Decidim::Organization.find_each do |organization|
10
10
  next unless organization.delete_admin_logs?
11
11
 
12
- Decidim::ActionLog.where(organization:).where("created_at < ?", Time.zone.now - (organization.delete_admin_logs_after || 365).days).delete_all
12
+ Decidim::ActionLog.where(organization: organization)
13
+ .where("created_at < ?", Time.zone.now - (organization.delete_admin_logs_after || 365).days)
14
+ .delete_all
13
15
  end
14
16
  end
15
17
  end
@@ -9,10 +9,11 @@ module Decidim
9
9
  Decidim::Organization.find_each do |organization|
10
10
  next unless organization.delete_inactive_users?
11
11
 
12
- send_warning(Decidim::User.where(organization:)
12
+ send_warning(Decidim::User.where(organization: organization)
13
13
  .where("last_sign_in_at < ?", Time.zone.now - (organization.delete_inactive_users_email_after || 365).days)
14
14
  .where("last_sign_in_at > ?", Time.zone.now - (organization.delete_inactive_users_email_after || 365).days - 1.day))
15
- delete_user_and_send_email(Decidim::User.where(organization:).where("last_sign_in_at < ?", Time.zone.now - (organization.delete_inactive_users_after || 390).days))
15
+ delete_user_and_send_email(Decidim::User.where(organization: organization)
16
+ .where("last_sign_in_at < ?", Time.zone.now - (organization.delete_inactive_users_after || 390).days))
16
17
  end
17
18
  end
18
19
 
@@ -13,7 +13,7 @@ module Decidim
13
13
  "decidim.cleaner.inactive_users_mailer.warning_inactive.subject",
14
14
  organization_name: @organization.name
15
15
  )
16
- mail(to: user.email, subject:)
16
+ mail(to: user.email, subject: subject)
17
17
  end
18
18
  end
19
19
 
@@ -25,7 +25,7 @@ module Decidim
25
25
  "decidim.cleaner.inactive_users_mailer.warning_deletion.subject",
26
26
  organization_name: @organization.name
27
27
  )
28
- mail(to: user.email, subject:)
28
+ mail(to: user.email, subject: subject)
29
29
  end
30
30
  end
31
31
  end
@@ -5,7 +5,7 @@ module Decidim
5
5
  # This holds the decidim-meetings version.
6
6
  module Cleaner
7
7
  def self.version
8
- "1.0.0"
8
+ "1.0.1"
9
9
  end
10
10
 
11
11
  def self.decidim_version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: decidim-cleaner
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Quentinchampenois
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-03 00:00:00.000000000 Z
11
+ date: 2023-03-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: decidim-core
@@ -76,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: '3.1'
79
+ version: 2.7.5
80
80
  required_rubygems_version: !ruby/object:Gem::Requirement
81
81
  requirements:
82
82
  - - ">="