alarmable 2.1.0 → 2.3.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d4c5fb3a2af50ea846e77391b001656aae22d3d42e03e4f69cacfd7b327e849d
4
- data.tar.gz: a4c351bd05b94b86e67be9facf8b70459ff6515ef97b8c82548d78ae1b3e9438
3
+ metadata.gz: 9653c19d01ae859d8c90447c7fe4c4a54c5edc794ae3e2b1d0f27c02438edde0
4
+ data.tar.gz: 692d07af53f03229aab9e074f01148ea2930d3d163abb91aee303607eb162882
5
5
  SHA512:
6
- metadata.gz: 48c45a04e459087749066905301acb1b915bf54e0c44d9c4dc6e0625f3392f7cfb35a8659f62ea66d2b30cced45950396a61c51183320e6669e77b7c895b84b5
7
- data.tar.gz: 33971096ba1d0a6df18fb82882e5b0c9cde69fd13fc96c34168795f1053c71fdc6b47508b9ab1814b27b4ab907fa1b6330ccf286a0af90b45c002536460ff2dd
6
+ metadata.gz: e6de41d4a31427542ac668ea648324d9c423fcc603606e1b01154e19fbfa80b80912ff04c70996492a6b2d94cdb274acd6b6634fd6dbaa076e9f00404c5a4ab3
7
+ data.tar.gz: 0b8c97c9f3fca97c16ce77b43d7cfc38964bbff672c1db0380cd651d415e0f21b25124cc0135b21ff3e22a62fb0e884b8fb34164052f8e12107e147625dcf0d0
@@ -20,10 +20,10 @@ jobs:
20
20
  steps:
21
21
  - uses: actions/checkout@v4
22
22
 
23
- - name: Install Ruby 3.2
23
+ - name: Install Ruby 3.3
24
24
  uses: ruby/setup-ruby@v1
25
25
  with:
26
- ruby-version: 3.2
26
+ ruby-version: 3.3
27
27
  bundler-cache: true
28
28
  rubygems: '3.6.9'
29
29
 
@@ -18,8 +18,8 @@ jobs:
18
18
  strategy:
19
19
  fail-fast: false
20
20
  matrix:
21
- ruby: ['3.2', '3.3', '3.4']
22
- rails: ['7.1', '7.2', '8.0', '8.1']
21
+ ruby: ['3.3', '3.4', '4.0']
22
+ rails: ['7.2', '8.0', '8.1']
23
23
  env:
24
24
  BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
25
25
  steps:
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,58 +9,24 @@ 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
14
15
  DisplayCopNames: true
15
- TargetRubyVersion: 3.2
16
- TargetRailsVersion: 7.1
16
+ TargetRubyVersion: 3.3
17
+ TargetRailsVersion: 7.2
17
18
  Exclude:
18
19
  - bin/**/*
19
20
  - vendor/**/*
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/Appraisals CHANGED
@@ -1,11 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- appraise 'rails-7.1' do
4
- gem 'activejob', '~> 7.1.0'
5
- gem 'activerecord', '~> 7.1.0'
6
- gem 'activesupport', '~> 7.1.0'
7
- end
8
-
9
3
  appraise 'rails-7.2' do
10
4
  gem 'activejob', '~> 7.2.0'
11
5
  gem 'activerecord', '~> 7.2.0'
data/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  * TODO: Replace this bullet point with an actual description of a change.
4
4
 
5
+ ### 2.3.0 (26 December 2025)
6
+
7
+ * Added Ruby 4.0 support ([#29](https://github.com/hausgold/alarmable/pull/29))
8
+ * Dropped Ruby 3.2 and Rails 7.1 support ([#28](https://github.com/hausgold/alarmable/pull/28))
9
+
10
+ ### 2.2.0 (19 December 2025)
11
+
12
+ * Upgraded PostgreSQL to 18.1. ([#26](https://github.com/hausgold/alarmable/pull/26))
13
+ * Migrated to a shared Rubocop configuration for HAUSGOLD gems ([#27](https://github.com/hausgold/alarmable/pull/27))
14
+
5
15
  ### 2.1.0 (24 October 2025)
6
16
 
7
17
  * Upgraded PostgreSQL to 17.6. ([#23](https://github.com/hausgold/alarmable/pull/23))
data/Dockerfile CHANGED
@@ -1,4 +1,4 @@
1
- FROM hausgold/ruby:3.2
1
+ FROM hausgold/ruby:3.3
2
2
  LABEL org.opencontainers.image.authors="containers@hausgold.de"
3
3
 
4
4
  # Update system gem
data/Envfile CHANGED
@@ -1,3 +1,4 @@
1
1
  LANG=en_US.UTF-8
2
2
  LANGUAGE=en_US.UTF-8
3
3
  LC_ALL=en_US.UTF-8
4
+ RUBOCOP_CACHE_ROOT=/app/tmp
data/Gemfile CHANGED
@@ -9,11 +9,11 @@ gemspec
9
9
 
10
10
  # Development dependencies
11
11
  gem 'appraisal', '~> 2.4'
12
- gem 'bundler', '~> 2.6'
12
+ gem 'bundler', '>= 2.6', '< 5'
13
13
  gem 'countless', '~> 2.0'
14
14
  gem 'guard-rspec', '~> 4.7'
15
15
  gem 'pg', '~> 1.4'
16
- gem 'railties', '>= 7.1'
16
+ gem 'railties', '>= 7.2'
17
17
  gem 'rake', '~> 13.0'
18
18
  gem 'rspec', '~> 3.12'
19
19
  gem 'rubocop'
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 HAUSGOLD | talocasa GmbH
3
+ Copyright (c) 2025 HAUSGOLD | talocasa GmbH
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/Makefile CHANGED
@@ -88,7 +88,8 @@ all:
88
88
  install:
89
89
  # Install the dependencies
90
90
  @$(MKDIR) -p $(VENDOR_DIR)
91
- @$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
91
+ @$(call run-shell,$(BUNDLE) config set --local path '$(VENDOR_DIR)')
92
+ @$(call run-shell,$(BUNDLE) check || $(BUNDLE) install)
92
93
  @$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
93
94
 
94
95
  update:
@@ -120,7 +121,7 @@ test-style: \
120
121
  test-style-ruby:
121
122
  # Run the static code analyzer (rubocop)
122
123
  @$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
123
- || ($(TEST) $$($(RUBY_VERSION)) != '3.2' && true))
124
+ || ($(TEST) $$($(RUBY_VERSION)) != '3.3' && true))
124
125
 
125
126
  clean:
126
127
  # Clean the dependencies
data/alarmable.gemspec CHANGED
@@ -34,12 +34,12 @@ Gem::Specification.new do |spec|
34
34
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
35
35
  spec.require_paths = ['lib']
36
36
 
37
- spec.required_ruby_version = '>= 3.2'
37
+ spec.required_ruby_version = '>= 3.3'
38
38
 
39
- spec.add_dependency 'activejob', '>= 7.1'
39
+ spec.add_dependency 'activejob', '>= 7.2'
40
40
  spec.add_dependency 'activejob-cancel', '~> 0.3'
41
- spec.add_dependency 'activerecord', '>= 7.1'
42
- spec.add_dependency 'activesupport', '>= 7.1'
41
+ spec.add_dependency 'activerecord', '>= 7.2'
42
+ spec.add_dependency 'activesupport', '>= 7.2'
43
43
  spec.add_dependency 'base64', '>= 0.3'
44
44
  spec.add_dependency 'bigdecimal', '~> 3.1'
45
45
  spec.add_dependency 'hashdiff', '~> 1.0'
data/docker-compose.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  services:
2
2
  db:
3
- image: hausgold/postgres:17.6
3
+ image: hausgold/postgres:18.1
4
4
  network_mode: bridge
5
5
  ports: ["5432"]
6
6
  volumes:
@@ -3,11 +3,11 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.6"
6
+ gem "bundler", ">= 2.6", "< 5"
7
7
  gem "countless", "~> 2.0"
8
8
  gem "guard-rspec", "~> 4.7"
9
9
  gem "pg", "~> 1.4"
10
- gem "railties", ">= 7.1"
10
+ gem "railties", ">= 7.2"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
13
  gem "rubocop"
@@ -3,11 +3,11 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.6"
6
+ gem "bundler", ">= 2.6", "< 5"
7
7
  gem "countless", "~> 2.0"
8
8
  gem "guard-rspec", "~> 4.7"
9
9
  gem "pg", "~> 1.4"
10
- gem "railties", ">= 7.1"
10
+ gem "railties", ">= 7.2"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
13
  gem "rubocop"
@@ -3,11 +3,11 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.6"
6
+ gem "bundler", ">= 2.6", "< 5"
7
7
  gem "countless", "~> 2.0"
8
8
  gem "guard-rspec", "~> 4.7"
9
9
  gem "pg", "~> 1.4"
10
- gem "railties", ">= 7.1"
10
+ gem "railties", ">= 7.2"
11
11
  gem "rake", "~> 13.0"
12
12
  gem "rspec", "~> 3.12"
13
13
  gem "rubocop"
@@ -3,7 +3,7 @@
3
3
  # The gem version details.
4
4
  module Alarmable
5
5
  # The version of the +alarmable+ gem
6
- VERSION = '2.1.0'
6
+ VERSION = '2.3.0'
7
7
 
8
8
  class << self
9
9
  # Returns the version of gem as a string.
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 achive this. Afterwards, this alarm id is used 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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alarmable
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hermann Mayer
@@ -15,14 +15,14 @@ dependencies:
15
15
  requirements:
16
16
  - - ">="
17
17
  - !ruby/object:Gem::Version
18
- version: '7.1'
18
+ version: '7.2'
19
19
  type: :runtime
20
20
  prerelease: false
21
21
  version_requirements: !ruby/object:Gem::Requirement
22
22
  requirements:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
- version: '7.1'
25
+ version: '7.2'
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: activejob-cancel
28
28
  requirement: !ruby/object:Gem::Requirement
@@ -43,28 +43,28 @@ dependencies:
43
43
  requirements:
44
44
  - - ">="
45
45
  - !ruby/object:Gem::Version
46
- version: '7.1'
46
+ version: '7.2'
47
47
  type: :runtime
48
48
  prerelease: false
49
49
  version_requirements: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - ">="
52
52
  - !ruby/object:Gem::Version
53
- version: '7.1'
53
+ version: '7.2'
54
54
  - !ruby/object:Gem::Dependency
55
55
  name: activesupport
56
56
  requirement: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: '7.1'
60
+ version: '7.2'
61
61
  type: :runtime
62
62
  prerelease: false
63
63
  version_requirements: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - ">="
66
66
  - !ruby/object:Gem::Version
67
- version: '7.1'
67
+ version: '7.2'
68
68
  - !ruby/object:Gem::Dependency
69
69
  name: base64
70
70
  requirement: !ruby/object:Gem::Requirement
@@ -170,8 +170,6 @@ files:
170
170
  - config/docker/.inputrc
171
171
  - doc/assets/project.svg
172
172
  - docker-compose.yml
173
- - gemfiles/rails_6.1.gemfile
174
- - gemfiles/rails_7.1.gemfile
175
173
  - gemfiles/rails_7.2.gemfile
176
174
  - gemfiles/rails_8.0.gemfile
177
175
  - gemfiles/rails_8.1.gemfile
@@ -192,7 +190,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
192
190
  requirements:
193
191
  - - ">="
194
192
  - !ruby/object:Gem::Version
195
- version: '3.2'
193
+ version: '3.3'
196
194
  required_rubygems_version: !ruby/object:Gem::Requirement
197
195
  requirements:
198
196
  - - ">="
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.3"
7
- gem "countless", "~> 1.1"
8
- gem "guard-rspec", "~> 4.7"
9
- gem "pg", "~> 1.4"
10
- gem "railties", ">= 6.1"
11
- gem "rake", "~> 13.0"
12
- gem "rspec", "~> 3.12"
13
- gem "rubocop"
14
- gem "rubocop-rails"
15
- gem "rubocop-rspec"
16
- gem "simplecov", ">= 0.22"
17
- gem "yard", ">= 0.9.28"
18
- gem "yard-activesupport-concern", ">= 0.0.1"
19
- gem "activejob", "~> 6.1.0"
20
- gem "activerecord", "~> 6.1.0"
21
- gem "activesupport", "~> 6.1.0"
22
-
23
- gemspec path: "../"
@@ -1,23 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "appraisal", "~> 2.4"
6
- gem "bundler", "~> 2.6"
7
- gem "countless", "~> 2.0"
8
- gem "guard-rspec", "~> 4.7"
9
- gem "pg", "~> 1.4"
10
- gem "railties", ">= 7.1"
11
- gem "rake", "~> 13.0"
12
- gem "rspec", "~> 3.12"
13
- gem "rubocop"
14
- gem "rubocop-rails"
15
- gem "rubocop-rspec"
16
- gem "simplecov", ">= 0.22"
17
- gem "yard", ">= 0.9.28"
18
- gem "yard-activesupport-concern", ">= 0.0.1"
19
- gem "activejob", "~> 7.1.0"
20
- gem "activerecord", "~> 7.1.0"
21
- gem "activesupport", "~> 7.1.0"
22
-
23
- gemspec path: "../"