alarmable 1.5.1 → 1.6.1

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: 577dcfa9cb1b37ba1ee9a4025ce045d19f36ae61d371270049310e696c5ee32c
4
- data.tar.gz: 38bccc14a3f155e50d1397a23a3582b7546c0995785b47da3dd8598e83743c4c
3
+ metadata.gz: be844d4a81b2b81bc4518e875010b0b47b1c335fa282eb876d12cba6bd75b47a
4
+ data.tar.gz: d99c96a19350d820ecfd162675d4cd971265ce0b6cf367636814777e61a9a2fe
5
5
  SHA512:
6
- metadata.gz: '087f42cdcbe1e7fcd64b88ef7f8c7ec60607296cc071861974692b3cafbefbfd22943d4432962a6e78dfb7d170d06ae0fae5e32f23d2b4bb082c14b75b1b6049'
7
- data.tar.gz: 36c38cacac483c1a242e2f21fd033d0bdb6e226fbcd452d4596d3aae55c7550340c11cfb7ba643daf43699796f041f6a4bacd0a8c4f5bc954537ea8dbfb0069c
6
+ metadata.gz: 45c0edf448213751ddd857158238a12f2a4471cc5cb7c59596657b470236bca4ee4254194921235cd46ffc848ad99bbd08ee89620aedbaa1a3d72e2a179c4bb4
7
+ data.tar.gz: b10ef88bd4afcebe042fc4239de002493668bad5504b9ffb5aef4a4dba3ec3ac8424e8012fb8fa1e875f8594cbeee0204e5f7a3ad375f410bc30379304f90670
@@ -18,7 +18,7 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby: ['2.7', '3.0']
21
+ ruby: ['2.7', '3.0', '3.1', '3.2', '3.3', '3.4']
22
22
  rails: ['6.1', '7.1']
23
23
  env:
24
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
data/.rubocop.yml CHANGED
@@ -1,4 +1,4 @@
1
- require:
1
+ plugins:
2
2
  - rubocop-rspec
3
3
  - rubocop-rails
4
4
 
@@ -58,7 +58,7 @@ RSpec/NestedGroups:
58
58
  Max: 4
59
59
 
60
60
  # Disable regular Rails spec paths.
61
- RSpec/FilePath:
61
+ Rails/FilePath:
62
62
  Enabled: false
63
63
 
64
64
  # Because we just implemented the ActiveRecord API.
data/CHANGELOG.md CHANGED
@@ -2,13 +2,23 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 1.6.1 (21 May 2025)
6
+
7
+ * Corrected some RuboCop glitches ([#17](https://github.com/hausgold/alarmable/pull/17))
8
+ * Upgraded PostgreSQL to 17.4. ([#18](https://github.com/hausgold/alarmable/pull/18))
9
+ * Upgraded the rubocop dependencies ([#19](https://github.com/hausgold/alarmable/pull/19))
10
+
11
+ ### 1.6.0 (30 January 2025)
12
+
13
+ * Added all versions up to Ruby 3.4 to the CI matrix ([#16](https://github.com/hausgold/alarmable/pull/16))
14
+
5
15
  ### 1.5.1 (17 January 2025)
6
16
 
7
- * Added the logger dependency (#15)
17
+ * Added the logger dependency ([#15](https://github.com/hausgold/alarmable/pull/15))
8
18
 
9
19
  ### 1.5.0 (14 January 2025)
10
20
 
11
- * Switched to Zeitwerk as autoloader (#14)
21
+ * Switched to Zeitwerk as autoloader ([#14](https://github.com/hausgold/alarmable/pull/14))
12
22
 
13
23
  ### 1.4.0 (12 January 2025)
14
24
 
@@ -16,10 +26,10 @@
16
26
 
17
27
  ### 1.3.0 (3 January 2025)
18
28
 
19
- * Upgraded PostgreSQL to 16.4 (#10)
20
- * Upgraded PostgreSQL to 16.6 (#11)
21
- * Upgraded PostgreSQL to 17.2 (#12)
22
- * Raised minimum supported Ruby/Rails version to 2.7/6.1 (#13)
29
+ * Upgraded PostgreSQL to 16.4 ([#10](https://github.com/hausgold/alarmable/pull/10))
30
+ * Upgraded PostgreSQL to 16.6 ([#11](https://github.com/hausgold/alarmable/pull/11))
31
+ * Upgraded PostgreSQL to 17.2 ([#12](https://github.com/hausgold/alarmable/pull/12))
32
+ * Raised minimum supported Ruby/Rails version to 2.7/6.1 ([#13](https://github.com/hausgold/alarmable/pull/13))
23
33
 
24
34
  ### 1.2.4 (15 August 2024)
25
35
 
@@ -35,13 +45,13 @@
35
45
 
36
46
  ### 1.2.1 (9 August 2024)
37
47
 
38
- * Added API docs building to continuous integration (#9)
48
+ * Added API docs building to continuous integration ([#9](https://github.com/hausgold/alarmable/pull/9))
39
49
 
40
50
  ### 1.2.0 (8 July 2024)
41
51
 
42
- * Upgraded to PostgreSQL 15.2 and Redis 7.0 (#5)
43
- * Moved the development dependencies from the gemspec to the Gemfile (#6)
44
- * Dropped support for Ruby <2.7 (#8)
52
+ * Upgraded to PostgreSQL 15.2 and Redis 7.0 ([#5](https://github.com/hausgold/alarmable/pull/5))
53
+ * Moved the development dependencies from the gemspec to the Gemfile ([#6](https://github.com/hausgold/alarmable/pull/6))
54
+ * Dropped support for Ruby <2.7 ([#8](https://github.com/hausgold/alarmable/pull/8))
45
55
 
46
56
  ### 1.1.0 (24 February 2023)
47
57
 
@@ -49,11 +59,11 @@
49
59
 
50
60
  ### 1.0.0 (18 January 2023)
51
61
 
52
- * Bundler >= 2.3 is from now on required as minimal version (#4)
53
- * Dropped support for Ruby < 2.5 (#4)
54
- * Dropped support for Rails < 5.2 (#4)
62
+ * Bundler >= 2.3 is from now on required as minimal version ([#4](https://github.com/hausgold/alarmable/pull/4))
63
+ * Dropped support for Ruby < 2.5 ([#4](https://github.com/hausgold/alarmable/pull/4))
64
+ * Dropped support for Rails < 5.2 ([#4](https://github.com/hausgold/alarmable/pull/4))
55
65
  * Updated all development/runtime gems to their latest
56
- Ruby 2.5 compatible version (#4)
66
+ Ruby 2.5 compatible version ([#4](https://github.com/hausgold/alarmable/pull/4))
57
67
 
58
68
  ### 0.1.2 (15 October 2021)
59
69
 
@@ -68,7 +78,7 @@
68
78
  * Configured simplecov correctly
69
79
  * Switched to SVG project teasers
70
80
  * Dropped support for EOL Ruby 2.2 and added 2.6
71
- * Updated Code Climate configs (#1)
81
+ * Updated Code Climate configs ([#1](https://github.com/hausgold/alarmable/pull/1))
72
82
  * Changed travis-ci.org to travis-ci.com links
73
83
  * Corrected the GNU Make release target
74
84
 
data/Dockerfile CHANGED
@@ -1,5 +1,5 @@
1
1
  FROM hausgold/ruby:2.7
2
- MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
2
+ LABEL org.opencontainers.image.authors="containers@hausgold.de"
3
3
 
4
4
  # Update system gem
5
5
  RUN gem update --system '3.4.22'
data/Gemfile CHANGED
@@ -16,9 +16,9 @@ gem 'pg', '~> 1.4'
16
16
  gem 'railties', '>= 6.1'
17
17
  gem 'rake', '~> 13.0'
18
18
  gem 'rspec', '~> 3.12'
19
- gem 'rubocop', '~> 1.28'
20
- gem 'rubocop-rails', '~> 2.14'
21
- gem 'rubocop-rspec', '~> 2.10'
19
+ gem 'rubocop'
20
+ gem 'rubocop-rails'
21
+ gem 'rubocop-rspec'
22
22
  gem 'simplecov', '>= 0.22'
23
23
  gem 'yard', '>= 0.9.28'
24
24
  gem 'yard-activesupport-concern', '>= 0.0.1'
data/alarmable.gemspec CHANGED
@@ -40,6 +40,9 @@ Gem::Specification.new do |spec|
40
40
  spec.add_dependency 'activejob-cancel', '~> 0.3'
41
41
  spec.add_dependency 'activerecord', '>= 6.1'
42
42
  spec.add_dependency 'activesupport', '>= 6.1'
43
+ spec.add_dependency 'base64', '~> 0.2.0'
44
+ spec.add_dependency 'bigdecimal', '~> 3.1'
43
45
  spec.add_dependency 'hashdiff', '~> 1.0'
46
+ spec.add_dependency 'mutex_m', '~> 0.3.0'
44
47
  spec.add_dependency 'zeitwerk', '~> 2.6'
45
48
  end
@@ -1,68 +1,7 @@
1
- <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
- <svg
3
- xmlns:dc="http://purl.org/dc/elements/1.1/"
4
- xmlns:cc="http://creativecommons.org/ns#"
5
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
6
- xmlns:svg="http://www.w3.org/2000/svg"
7
- xmlns="http://www.w3.org/2000/svg"
8
- version="1.1"
9
- id="Ebene_1"
10
- x="0px"
11
- y="0px"
12
- viewBox="0 0 800 200"
13
- xml:space="preserve"
14
- width="800"
15
- height="200"><metadata
16
- id="metadata33"><rdf:RDF><cc:Work
17
- rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
18
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
19
- id="defs31" />
20
- <style
21
- type="text/css"
22
- id="style2">
23
- .st0{fill-rule:evenodd;clip-rule:evenodd;fill:#E73E11;}
24
- .st1{fill-rule:evenodd;clip-rule:evenodd;fill:#0371B9;}
25
- .st2{fill:#132E48;}
26
- .st3{font-family:'OpenSans-Bold';}
27
- .st4{font-size:29.5168px;}
28
- .st5{fill-rule:evenodd;clip-rule:evenodd;fill:none;}
29
- .st6{opacity:0.5;fill:#132E48;}
30
- .st7{font-family:'OpenSans';}
31
- .st8{font-size:12px;}
32
- </style>
33
- <g
34
- transform="translate(0,1.53584)"
35
- id="g828"><g
36
- transform="translate(35.93985,35.66416)"
37
- id="g8">
38
- <path
39
- style="clip-rule:evenodd;fill:#e73e11;fill-rule:evenodd"
40
- id="path4"
41
- d="m -0.1,124.4 c 0,0 33.7,-123.2 66.7,-123.2 12.8,0 26.9,21.9 38.8,47.2 -23.6,27.9 -66.6,59.7 -94,76 -7.1,0 -11.5,0 -11.5,0 z"
42
- class="st0" />
43
- <path
44
- style="clip-rule:evenodd;fill:#0371b9;fill-rule:evenodd"
45
- id="path6"
46
- d="m 88.1,101.8 c 13.5,-10.4 18.4,-16.2 27.1,-25.4 10,25.7 16.7,48 16.7,48 0,0 -41.4,0 -78,0 14.6,-7.9 18.7,-10.7 34.2,-22.6 z"
47
- class="st1" />
48
- </g><text
49
- y="106.40316"
50
- x="192.43155"
51
- style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:29.51733398px;font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;writing-mode:lr-tb;text-anchor:start;fill:#132e48"
52
- id="text10"
53
- class="st2 st3 st4">Alarmable</text>
54
- <rect
55
- style="clip-rule:evenodd;fill:none;fill-rule:evenodd"
56
- id="rect12"
57
- height="24"
58
- width="314.5"
59
- class="st5"
60
- y="118.06416"
61
- x="194.23985" /><text
62
- y="127.22146"
63
- x="194.21715"
64
- style="font-size:12px;font-family:'Open Sans', sans-serif;opacity:0.5;fill:#132e48;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-weight:normal;font-style:normal;font-stretch:normal;font-variant:normal;text-anchor:start;text-align:start;writing-mode:lr;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;"
65
- id="text14"
66
- class="st6 st7 st8">A reusable alarm extension to ActiveRecord models</text>
67
- </g>
68
- </svg>
1
+ <svg id="hg-readme-banner-v2" viewBox="0 0 800 200" width="800" height="200" xmlns="http://www.w3.org/2000/svg"><defs><linearGradient id="a" x1="112.46" y1="309.13" x2="314.5" y2="309.13" gradientUnits="userSpaceOnUse" gradientTransform="translate(-33.985 -122.816)"><stop offset="0" stop-color="#1992f4" /><stop offset="1" stop-color="#2b8af6" /></linearGradient></defs><style>.st3{font-family:&apos;OpenSans-Bold&apos;}.st4{font-size:29.5168px}.st5{fill-rule:evenodd;clip-rule:evenodd;fill:none}.st7{font-family:&apos;OpenSans&apos;}.st8{font-size:12px}@media (prefers-color-scheme:dark){text{fill:#f0f6fc!important}}</style>
2
+ <text y="107.939" x="192.432" style="font-family:'Open Sans', sans-serif;-inkscape-font-specification:'OpenSans-Bold, Bold';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" class="st3 st4" font-weight="700" font-size="29.517" font-family="'Open Sans',sans-serif" fill="#3f3e4b"
3
+ >Alarmable</text>
4
+ <path class="st5" clip-rule="evenodd" fill="none" fill-rule="evenodd" d="M194.24 119.6h314.5v24h-314.5z"/>
5
+ <text y="128.757" x="194.217" style="font-family:'Open Sans', sans-serif;-inkscape-font-specification:'Open Sans, sans-serif, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start" class="st7 st8" font-weight="400" font-size="12" font-family="'Open Sans',sans-serif" opacity=".75" fill="#3f3e4b"
6
+ >A reusable alarm extension to ActiveRecord models</text>
7
+ <g transform="translate(33.985 122.816)"><path d="M129.427 32.4q-7-20.71-14.09-41.44c-.33-1-.52-1.18-1.34-.25-3.1 3.48-6.25 6.92-9.49 10.26a180.23 180.23 0 0 1-18.54 16.15 193.7 193.7 0 0 1-21.95 15.43c-2.53 1.47-5.08 2.91-7.62 4.36l.11.27h73.05c1 .1 1.4-.13 1-1.22-.4-1.09-.73-2.38-1.13-3.56z" fill="url(#a)" /><path d="M89.077-63.87c-3.57-5.58-7.42-10.95-12.62-15.17-3.93-3.19-8.28-5-13.42-3.32a23 23 0 0 0-8.76 5.6 66.77 66.77 0 0 0-10.34 13.09c-8 12.68-14.06 26.28-19.28 40.25-4.6 12.33-8.82 24.8-12.95 37.29-2.45 7.41-4.39 15-6.61 22.49-.26.88 0 1 .79 1h7.4c1.23 0 2.44.14 3.6-.68 9.17-6.45 18.51-12.67 27.55-19.31a396.21 396.21 0 0 0 37.36-31.3 245.79 245.79 0 0 0 20.74-22 1.6 1.6 0 0 0 .26-2 224.45 224.45 0 0 0-13.72-25.94z" fill="#f2686d" /></g></svg>
data/docker-compose.yml CHANGED
@@ -1,7 +1,7 @@
1
1
  version: "3"
2
2
  services:
3
3
  db:
4
- image: hausgold/postgres:17.2
4
+ image: hausgold/postgres:17.4
5
5
  network_mode: bridge
6
6
  ports: ["5432"]
7
7
  volumes:
@@ -10,9 +10,9 @@ gem "pg", "~> 1.4"
10
10
  gem "railties", ">= 6.1"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
- gem "rubocop", "~> 1.28"
14
- gem "rubocop-rails", "~> 2.14"
15
- gem "rubocop-rspec", "~> 2.10"
13
+ gem "rubocop"
14
+ gem "rubocop-rails"
15
+ gem "rubocop-rspec"
16
16
  gem "simplecov", ">= 0.22"
17
17
  gem "yard", ">= 0.9.28"
18
18
  gem "yard-activesupport-concern", ">= 0.0.1"
@@ -10,9 +10,9 @@ gem "pg", "~> 1.4"
10
10
  gem "railties", ">= 6.1"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
- gem "rubocop", "~> 1.28"
14
- gem "rubocop-rails", "~> 2.14"
15
- gem "rubocop-rspec", "~> 2.10"
13
+ gem "rubocop"
14
+ gem "rubocop-rails"
15
+ gem "rubocop-rspec"
16
16
  gem "simplecov", ">= 0.22"
17
17
  gem "yard", ">= 0.9.28"
18
18
  gem "yard-activesupport-concern", ">= 0.0.1"
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module Alarmable
5
5
  # The version of the +alarmable+ gem
6
- VERSION = '1.5.1'
6
+ VERSION = '1.6.1'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
data/lib/alarmable.rb CHANGED
@@ -71,7 +71,7 @@ module Alarmable
71
71
  attr_accessor :alarm_job, :alarm_base_date_property
72
72
  end
73
73
 
74
- # rubocop:disable Metrics/BlockLength because Active Support like it
74
+ # rubocop:disable Metrics/BlockLength -- because Active Support like it
75
75
  included do
76
76
  # Hooks
77
77
  after_initialize :validate_alarm_settings, :alarm_defaults
@@ -89,16 +89,12 @@ module Alarmable
89
89
  # Getter for the alarm job class.
90
90
  #
91
91
  # @return [Class] The alarm job class
92
- def alarm_job
93
- self.class.alarm_job
94
- end
92
+ delegate :alarm_job, to: :class
95
93
 
96
94
  # Getter for the alarm base date property.
97
95
  #
98
96
  # @return [Symbol] The user defined base date property
99
- def alarm_base_date_property
100
- self.class.alarm_base_date_property
101
- end
97
+ delegate :alarm_base_date_property, to: :class
102
98
 
103
99
  # Set some defaults on the relevant alarm properties.
104
100
  def alarm_defaults
@@ -110,7 +106,7 @@ module Alarmable
110
106
  # of the specified class. Also validate the +alarm_base_date_property+
111
107
  # setting.
112
108
  #
113
- # rubocop:disable Style/GuardClause because its fine like this
109
+ # rubocop:disable Style/GuardClause -- because its fine like this
114
110
  # :reek:NilCheck because we validate concern usage
115
111
  def validate_alarm_settings
116
112
  raise 'Alarmable +alarm_job+ is not configured' if alarm_job.nil?
@@ -151,7 +147,7 @@ module Alarmable
151
147
  # @return [Object] The new alarm_jobs instance (partial)
152
148
  # Example: { "alarm id": "job id" }
153
149
  #
154
- # rubocop:disable Metrics/AbcSize because its already broken down
150
+ # rubocop:disable Metrics/AbcSize -- because its already broken down
155
151
  # :reek:TooManyStatements because see above
156
152
  # :reek:NilCheck because we dont want to cancel 'nil' job id
157
153
  # :reek:DuplicateMethodCall because hash access is fast
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alarmable
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.1
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-01-17 00:00:00.000000000 Z
11
+ date: 2025-05-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activejob
@@ -66,6 +66,34 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '6.1'
69
+ - !ruby/object:Gem::Dependency
70
+ name: base64
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.2.0
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.2.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: bigdecimal
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.1'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.1'
69
97
  - !ruby/object:Gem::Dependency
70
98
  name: hashdiff
71
99
  requirement: !ruby/object:Gem::Requirement
@@ -80,6 +108,20 @@ dependencies:
80
108
  - - "~>"
81
109
  - !ruby/object:Gem::Version
82
110
  version: '1.0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: mutex_m
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 0.3.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 0.3.0
83
125
  - !ruby/object:Gem::Dependency
84
126
  name: zeitwerk
85
127
  requirement: !ruby/object:Gem::Requirement
@@ -157,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
199
  - !ruby/object:Gem::Version
158
200
  version: '0'
159
201
  requirements: []
160
- rubygems_version: 3.3.26
202
+ rubygems_version: 3.4.22
161
203
  signing_key:
162
204
  specification_version: 4
163
205
  summary: A reusable alarm extension to Active Record models