gdpr_admin 1.7.0 → 1.8.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: 21ae4f0cc358a36bf2fb706fea22477ca990d633448425a080b8565872d748b9
4
- data.tar.gz: 9dbe6843c8f5f99316c08e2f504a7210a4dcb347355d7233cfc8cd9f2937dafe
3
+ metadata.gz: 172250ede69ee6974d2fc726b72ab0677c36f3351908fad095021993c9dd58d9
4
+ data.tar.gz: d3657ee4898b7dce3287f3ca85eae1bfdfd906976cce57d8a9605c5c44670b43
5
5
  SHA512:
6
- metadata.gz: c2b146740a0b6ba12e216ea77a1fdb3a23545c9c121206f56cb8ca548cadf627fc2a4a2822543b020f2bf2d1a7c5ff2365aa40086c966cfed339faa9d2e4dfa7
7
- data.tar.gz: 106627fe529e2344ec2e7ba01a0120c6ccaf61ca16241df0ead44f8b06d573168a1c2cc141db4f7f5656d6c783364d28cdf4ae66fa6d4f0e54748779d9e693c4
6
+ metadata.gz: 57543c6cb8f3ddcca87add6b21b627bfc06e4e44fa62a3df50308bc432aa0e2dc6ba88f46acdee88b384ec1bd9b431b6b5da609d16fdfc8f17f13df4a616e637
7
+ data.tar.gz: 75a2c55441cce17d181b6a47368c7e3cb491cce5e9e53c354ffc55428c64059c3d4547bfb8e36703022716848b9df910ca3ae4d9e64c23f84372bdbc374bd32b
@@ -6,10 +6,11 @@ module GdprAdmin
6
6
  belongs_to :requester, polymorphic: true, optional: true
7
7
 
8
8
  VALID_STATUS_TRANSITIONS = {
9
- pending: %i[processing],
9
+ pending: %i[processing canceled],
10
10
  processing: %i[completed failed],
11
11
  completed: [],
12
12
  failed: %i[pending],
13
+ canceled: %i[],
13
14
  }.freeze
14
15
 
15
16
  enum status: {
@@ -17,6 +18,7 @@ module GdprAdmin
17
18
  processing: 'processing',
18
19
  completed: 'completed',
19
20
  failed: 'failed',
21
+ canceled: 'canceled',
20
22
  }
21
23
 
22
24
  enum request_type: {
@@ -33,6 +35,10 @@ module GdprAdmin
33
35
  validates :subject, absence: true, unless: :subject_request?
34
36
  validate :valid_status_transition?
35
37
 
38
+ def cancel!
39
+ canceled!
40
+ end
41
+
36
42
  def process!
37
43
  GdprAdmin.load_data_policies
38
44
  reload.with_lock { processing! }
@@ -20,6 +20,8 @@ module GdprAdmin
20
20
  return addr.mask(24).to_s if addr.ipv4?
21
21
 
22
22
  addr.mask(48).to_s
23
+ rescue IPAddr::InvalidAddressError
24
+ value
23
25
  end
24
26
  end
25
27
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  # :nocov:
4
4
  module GdprAdmin
5
- VERSION = '1.7.0'
5
+ VERSION = '1.8.1'
6
6
  end
7
7
  # :nocov:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gdpr_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Colex
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-13 00:00:00.000000000 Z
11
+ date: 2023-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails