alarmable 2.1.0 → 2.2.0
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 +4 -4
- data/.rubocop.yml +4 -38
- data/CHANGELOG.md +5 -0
- data/Envfile +1 -0
- data/LICENSE +1 -1
- data/docker-compose.yml +1 -1
- data/lib/alarmable/version.rb +1 -1
- data/lib/alarmable.rb +1 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 956ddc795de786546c175450bbefaa7a5e37129fee88188eaf349f4ca345eeea
|
|
4
|
+
data.tar.gz: ab6ec26509dea630f5dabb4f34153446cc3756d2be9f772eb199c2a7be73a905
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4af5672f56a725fb3ebb9e5822f8a304c27f4a81993d1158fbd870714dbfe141a759973933fcf312bb2c45ac625d9b809e3f1670371b45fc4c69791e897e580a
|
|
7
|
+
data.tar.gz: 7ac47b411bd7036dbcf07ee7600c0f3d7859773ee3658f0446e1c8571c58518bf65e20f052e6608f2d78fbb6894a5a2528be98d80601b181fb1441c1a6a294ab
|
data/.rubocop.yml
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
inherit_from:
|
|
2
|
+
- https://potpourri.hausgold.de/config/rubocop.yml
|
|
3
|
+
- https://potpourri.hausgold.de/config/rubocop-gem.yml
|
|
4
|
+
|
|
1
5
|
plugins:
|
|
2
6
|
- rubocop-rspec
|
|
3
7
|
- rubocop-rails
|
|
@@ -5,9 +9,6 @@ plugins:
|
|
|
5
9
|
Rails:
|
|
6
10
|
Enabled: true
|
|
7
11
|
|
|
8
|
-
Style/Documentation:
|
|
9
|
-
Enabled: true
|
|
10
|
-
|
|
11
12
|
AllCops:
|
|
12
13
|
NewCops: enable
|
|
13
14
|
SuggestExtensions: false
|
|
@@ -20,43 +21,12 @@ AllCops:
|
|
|
20
21
|
- build/**/*
|
|
21
22
|
- gemfiles/**/*
|
|
22
23
|
|
|
23
|
-
Metrics/BlockLength:
|
|
24
|
-
Exclude:
|
|
25
|
-
- Rakefile
|
|
26
|
-
- '*.gemspec'
|
|
27
|
-
- spec/**/*.rb
|
|
28
|
-
- '**/*.rake'
|
|
29
|
-
- doc/**/*.rb
|
|
30
|
-
|
|
31
|
-
# MFA is not yet enabled for our gems yet.
|
|
32
|
-
Gemspec/RequireMFA:
|
|
33
|
-
Enabled: false
|
|
34
|
-
|
|
35
|
-
# Document all the things.
|
|
36
|
-
Style/DocumentationMethod:
|
|
37
|
-
Enabled: true
|
|
38
|
-
RequireForNonPublicMethods: true
|
|
39
|
-
|
|
40
24
|
# It's a deliberate idiom in RSpec.
|
|
41
25
|
# See: https://github.com/bbatsov/rubocop/issues/4222
|
|
42
26
|
Lint/AmbiguousBlockAssociation:
|
|
43
27
|
Exclude:
|
|
44
28
|
- "spec/**/*"
|
|
45
29
|
|
|
46
|
-
# Because +expect_any_instance_of().to have_received()+ is not
|
|
47
|
-
# supported with the +with(hash_including)+ matchers
|
|
48
|
-
RSpec/MessageSpies:
|
|
49
|
-
EnforcedStyle: receive
|
|
50
|
-
|
|
51
|
-
# We stay with the original Ruby Style Guide recommendation.
|
|
52
|
-
Layout/LineLength:
|
|
53
|
-
Max: 80
|
|
54
|
-
|
|
55
|
-
# Because nesting makes sense here to group the feature tests
|
|
56
|
-
# more effective. This increases maintainability.
|
|
57
|
-
RSpec/NestedGroups:
|
|
58
|
-
Max: 4
|
|
59
|
-
|
|
60
30
|
# Disable regular Rails spec paths.
|
|
61
31
|
Rails/FilePath:
|
|
62
32
|
Enabled: false
|
|
@@ -77,7 +47,3 @@ Rails/ApplicationJob:
|
|
|
77
47
|
# so when first evaluated it won't change.
|
|
78
48
|
RSpec/ExpectChange:
|
|
79
49
|
Enabled: false
|
|
80
|
-
|
|
81
|
-
# We highly depend on memoized helpers across the specs.
|
|
82
|
-
RSpec/MultipleMemoizedHelpers:
|
|
83
|
-
Enabled: false
|
data/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
|
4
4
|
|
|
5
|
+
### 2.2.0 (19 December 2025)
|
|
6
|
+
|
|
7
|
+
* Upgraded PostgreSQL to 18.1. ([#26](https://github.com/hausgold/alarmable/pull/26))
|
|
8
|
+
* Migrated to a shared Rubocop configuration for HAUSGOLD gems ([#27](https://github.com/hausgold/alarmable/pull/27))
|
|
9
|
+
|
|
5
10
|
### 2.1.0 (24 October 2025)
|
|
6
11
|
|
|
7
12
|
* Upgraded PostgreSQL to 17.6. ([#23](https://github.com/hausgold/alarmable/pull/23))
|
data/Envfile
CHANGED
data/LICENSE
CHANGED
data/docker-compose.yml
CHANGED
data/lib/alarmable/version.rb
CHANGED
data/lib/alarmable.rb
CHANGED
|
@@ -69,7 +69,6 @@ module Alarmable
|
|
|
69
69
|
attr_accessor :alarm_job, :alarm_base_date_property
|
|
70
70
|
end
|
|
71
71
|
|
|
72
|
-
# rubocop:disable Metrics/BlockLength -- because Active Support like it
|
|
73
72
|
included do
|
|
74
73
|
# Hooks
|
|
75
74
|
after_initialize :validate_alarm_settings, :alarm_defaults
|
|
@@ -121,7 +120,7 @@ module Alarmable
|
|
|
121
120
|
|
|
122
121
|
# Generate a unique and recalculatable identifier for a given alarm
|
|
123
122
|
# object. We build a hash of the primary keys (before_minutes and
|
|
124
|
-
# channel) to
|
|
123
|
+
# channel) to achieve this. Afterwards, this alarm id is used to
|
|
125
124
|
# reference dedicated scheduled jobs and track their updates. (Or cancel
|
|
126
125
|
# them accordingly)
|
|
127
126
|
#
|
|
@@ -141,8 +140,6 @@ module Alarmable
|
|
|
141
140
|
# @param alarm [Hash] The alarm object
|
|
142
141
|
# @return [Object] The new alarm_jobs instance (partial)
|
|
143
142
|
# Example: { "alarm id": "job id" }
|
|
144
|
-
#
|
|
145
|
-
# rubocop:disable Metrics/AbcSize -- because its already broken down
|
|
146
143
|
def reschedule_alarm_job(alarm)
|
|
147
144
|
# Symbolize the hash keys (just to be sure).
|
|
148
145
|
alarm = alarm.symbolize_keys
|
|
@@ -169,7 +166,6 @@ module Alarmable
|
|
|
169
166
|
# Construct a new alarm_jobs partial instance for this job
|
|
170
167
|
{ id => job.job_id }
|
|
171
168
|
end
|
|
172
|
-
# rubocop:enable Metrics/AbcSize
|
|
173
169
|
|
|
174
170
|
# Initiate a reschedule for each alarm in the alarm settings and
|
|
175
171
|
# cancel all left-overs.
|
|
@@ -204,5 +200,4 @@ module Alarmable
|
|
|
204
200
|
alarm_jobs.each_value { |job_id| alarm_job.cancel(job_id) }
|
|
205
201
|
end
|
|
206
202
|
end
|
|
207
|
-
# rubocop:enable Metrics/BlockLength
|
|
208
203
|
end
|