alarmable 1.6.0 → 2.0.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/.github/workflows/release.yml +3 -3
- data/.github/workflows/test.yml +3 -3
- data/.rubocop.yml +3 -3
- data/Appraisals +12 -6
- data/CHANGELOG.md +12 -0
- data/Dockerfile +3 -3
- data/Gemfile +6 -6
- data/Makefile +1 -1
- data/alarmable.gemspec +4 -4
- data/doc/assets/project.svg +7 -68
- data/docker-compose.yml +1 -2
- data/gemfiles/rails_6.1.gemfile +3 -3
- data/gemfiles/rails_7.1.gemfile +6 -6
- data/gemfiles/rails_7.2.gemfile +23 -0
- data/gemfiles/rails_8.0.gemfile +23 -0
- data/lib/alarmable/version.rb +1 -1
- data/lib/alarmable.rb +5 -9
- metadata +12 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 410b45f7e4abd1faea1d95f0e2449512de445627fc3488d0cbe69167fa8a48d8
|
4
|
+
data.tar.gz: 5e254b9e0e3985423e9dcf2e40f3ba454a9afbb363276a8c796122ce1c488eaa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8cfaf52562fedd1817f3d82ff2671b10646fa7a9aedbb71fe96a6caf82746c116302a0091df7d34a51eebe31aaf258cd8bddcc00266257d78f8ee219cb0342d8
|
7
|
+
data.tar.gz: 33982315842bc5d00eefdc5b1d283a764e2a72ee606d3477ceebb8e1f58cbf4278098ae1ecae07443bd7662707977f1b54463cacb03a2109f08112c95f2ff5de
|
@@ -20,12 +20,12 @@ jobs:
|
|
20
20
|
steps:
|
21
21
|
- uses: actions/checkout@v4
|
22
22
|
|
23
|
-
- name: Install Ruby 2
|
23
|
+
- name: Install Ruby 3.2
|
24
24
|
uses: ruby/setup-ruby@v1
|
25
25
|
with:
|
26
|
-
ruby-version: 2
|
26
|
+
ruby-version: 3.2
|
27
27
|
bundler-cache: true
|
28
|
-
rubygems: '3.
|
28
|
+
rubygems: '3.6.9'
|
29
29
|
|
30
30
|
- name: Prepare the virtual environment
|
31
31
|
uses: hausgold/actions/ci@master
|
data/.github/workflows/test.yml
CHANGED
@@ -18,8 +18,8 @@ jobs:
|
|
18
18
|
strategy:
|
19
19
|
fail-fast: false
|
20
20
|
matrix:
|
21
|
-
ruby: ['
|
22
|
-
rails: ['
|
21
|
+
ruby: ['3.2', '3.3', '3.4']
|
22
|
+
rails: ['7.1', '7.2', '8.0']
|
23
23
|
env:
|
24
24
|
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
|
25
25
|
steps:
|
@@ -30,7 +30,7 @@ jobs:
|
|
30
30
|
with:
|
31
31
|
ruby-version: ${{ matrix.ruby }}
|
32
32
|
bundler-cache: true
|
33
|
-
rubygems: '3.
|
33
|
+
rubygems: '3.6.9'
|
34
34
|
|
35
35
|
- name: Prepare the virtual environment
|
36
36
|
uses: hausgold/actions/ci@master
|
data/.rubocop.yml
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
plugins:
|
2
2
|
- rubocop-rspec
|
3
3
|
- rubocop-rails
|
4
4
|
|
@@ -12,7 +12,7 @@ AllCops:
|
|
12
12
|
NewCops: enable
|
13
13
|
SuggestExtensions: false
|
14
14
|
DisplayCopNames: true
|
15
|
-
TargetRubyVersion: 2
|
15
|
+
TargetRubyVersion: 3.2
|
16
16
|
TargetRailsVersion: 6.1
|
17
17
|
Exclude:
|
18
18
|
- bin/**/*
|
@@ -58,7 +58,7 @@ RSpec/NestedGroups:
|
|
58
58
|
Max: 4
|
59
59
|
|
60
60
|
# Disable regular Rails spec paths.
|
61
|
-
|
61
|
+
Rails/FilePath:
|
62
62
|
Enabled: false
|
63
63
|
|
64
64
|
# Because we just implemented the ActiveRecord API.
|
data/Appraisals
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
appraise 'rails-6.1' do
|
4
|
-
gem 'activejob', '~> 6.1.0'
|
5
|
-
gem 'activerecord', '~> 6.1.0'
|
6
|
-
gem 'activesupport', '~> 6.1.0'
|
7
|
-
end
|
8
|
-
|
9
3
|
appraise 'rails-7.1' do
|
10
4
|
gem 'activejob', '~> 7.1.0'
|
11
5
|
gem 'activerecord', '~> 7.1.0'
|
12
6
|
gem 'activesupport', '~> 7.1.0'
|
13
7
|
end
|
8
|
+
|
9
|
+
appraise 'rails-7.2' do
|
10
|
+
gem 'activejob', '~> 7.2.0'
|
11
|
+
gem 'activerecord', '~> 7.2.0'
|
12
|
+
gem 'activesupport', '~> 7.2.0'
|
13
|
+
end
|
14
|
+
|
15
|
+
appraise 'rails-8.0' do
|
16
|
+
gem 'activejob', '~> 8.0.0'
|
17
|
+
gem 'activerecord', '~> 8.0.0'
|
18
|
+
gem 'activesupport', '~> 8.0.0'
|
19
|
+
end
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
* TODO: Replace this bullet point with an actual description of a change.
|
4
4
|
|
5
|
+
### 2.0.0 (28 June 2025)
|
6
|
+
|
7
|
+
* Upgraded PostgreSQL to 17.5. ([#20](https://github.com/hausgold/alarmable/pull/20))
|
8
|
+
* Corrected some RuboCop glitches ([#21](https://github.com/hausgold/alarmable/pull/21))
|
9
|
+
* Drop Ruby 2 and end of life Rails (<7.1) ([#22](https://github.com/hausgold/alarmable/pull/22))
|
10
|
+
|
11
|
+
### 1.6.1 (21 May 2025)
|
12
|
+
|
13
|
+
* Corrected some RuboCop glitches ([#17](https://github.com/hausgold/alarmable/pull/17))
|
14
|
+
* Upgraded PostgreSQL to 17.4. ([#18](https://github.com/hausgold/alarmable/pull/18))
|
15
|
+
* Upgraded the rubocop dependencies ([#19](https://github.com/hausgold/alarmable/pull/19))
|
16
|
+
|
5
17
|
### 1.6.0 (30 January 2025)
|
6
18
|
|
7
19
|
* Added all versions up to Ruby 3.4 to the CI matrix ([#16](https://github.com/hausgold/alarmable/pull/16))
|
data/Dockerfile
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
FROM hausgold/ruby:2
|
2
|
-
|
1
|
+
FROM hausgold/ruby:3.2
|
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'
|
@@ -11,7 +11,7 @@ RUN apt-get update -yqqq && \
|
|
11
11
|
ca-certificates \
|
12
12
|
bash-completion inotify-tools && \
|
13
13
|
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
|
14
|
-
gem install bundler -v '~> 2.
|
14
|
+
gem install bundler -v '~> 2.6.9' --no-document --no-prerelease
|
15
15
|
|
16
16
|
# Add new web user
|
17
17
|
RUN mkdir /app && \
|
data/Gemfile
CHANGED
@@ -9,16 +9,16 @@ gemspec
|
|
9
9
|
|
10
10
|
# Development dependencies
|
11
11
|
gem 'appraisal', '~> 2.4'
|
12
|
-
gem 'bundler', '~> 2.
|
13
|
-
gem 'countless', '~>
|
12
|
+
gem 'bundler', '~> 2.6'
|
13
|
+
gem 'countless', '~> 2.0'
|
14
14
|
gem 'guard-rspec', '~> 4.7'
|
15
15
|
gem 'pg', '~> 1.4'
|
16
|
-
gem 'railties', '>=
|
16
|
+
gem 'railties', '>= 7.1'
|
17
17
|
gem 'rake', '~> 13.0'
|
18
18
|
gem 'rspec', '~> 3.12'
|
19
|
-
gem 'rubocop'
|
20
|
-
gem 'rubocop-rails'
|
21
|
-
gem 'rubocop-rspec'
|
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/Makefile
CHANGED
@@ -120,7 +120,7 @@ test-style: \
|
|
120
120
|
test-style-ruby:
|
121
121
|
# Run the static code analyzer (rubocop)
|
122
122
|
@$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a \
|
123
|
-
|| ($(TEST) $$($(RUBY_VERSION)) != '2
|
123
|
+
|| ($(TEST) $$($(RUBY_VERSION)) != '3.2' && true))
|
124
124
|
|
125
125
|
clean:
|
126
126
|
# 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 = '>= 2
|
37
|
+
spec.required_ruby_version = '>= 3.2'
|
38
38
|
|
39
|
-
spec.add_dependency 'activejob', '>=
|
39
|
+
spec.add_dependency 'activejob', '>= 7.1'
|
40
40
|
spec.add_dependency 'activejob-cancel', '~> 0.3'
|
41
|
-
spec.add_dependency 'activerecord', '>=
|
42
|
-
spec.add_dependency 'activesupport', '>=
|
41
|
+
spec.add_dependency 'activerecord', '>= 7.1'
|
42
|
+
spec.add_dependency 'activesupport', '>= 7.1'
|
43
43
|
spec.add_dependency 'base64', '~> 0.2.0'
|
44
44
|
spec.add_dependency 'bigdecimal', '~> 3.1'
|
45
45
|
spec.add_dependency 'hashdiff', '~> 1.0'
|
data/doc/assets/project.svg
CHANGED
@@ -1,68 +1,7 @@
|
|
1
|
-
|
2
|
-
<
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
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:'OpenSans-Bold'}.st4{font-size:29.5168px}.st5{fill-rule:evenodd;clip-rule:evenodd;fill:none}.st7{font-family:'OpenSans'}.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
data/gemfiles/rails_6.1.gemfile
CHANGED
@@ -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"
|
14
|
-
gem "rubocop-rails"
|
15
|
-
gem "rubocop-rspec"
|
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"
|
data/gemfiles/rails_7.1.gemfile
CHANGED
@@ -3,16 +3,16 @@
|
|
3
3
|
source "https://rubygems.org"
|
4
4
|
|
5
5
|
gem "appraisal", "~> 2.4"
|
6
|
-
gem "bundler", "~> 2.
|
7
|
-
gem "countless", "~>
|
6
|
+
gem "bundler", "~> 2.6"
|
7
|
+
gem "countless", "~> 2.0"
|
8
8
|
gem "guard-rspec", "~> 4.7"
|
9
9
|
gem "pg", "~> 1.4"
|
10
|
-
gem "railties", ">=
|
10
|
+
gem "railties", ">= 7.1"
|
11
11
|
gem "rake", "~> 13.0"
|
12
12
|
gem "rspec", "~> 3.12"
|
13
|
-
gem "rubocop"
|
14
|
-
gem "rubocop-rails"
|
15
|
-
gem "rubocop-rspec"
|
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"
|
@@ -0,0 +1,23 @@
|
|
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.2.0"
|
20
|
+
gem "activerecord", "~> 7.2.0"
|
21
|
+
gem "activesupport", "~> 7.2.0"
|
22
|
+
|
23
|
+
gemspec path: "../"
|
@@ -0,0 +1,23 @@
|
|
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", "~> 8.0.0"
|
20
|
+
gem "activerecord", "~> 8.0.0"
|
21
|
+
gem "activesupport", "~> 8.0.0"
|
22
|
+
|
23
|
+
gemspec path: "../"
|
data/lib/alarmable/version.rb
CHANGED
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
|
-
|
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
|
-
|
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,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: alarmable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 2.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
|
-
autorequire:
|
9
8
|
bindir: exe
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: activejob
|
@@ -16,14 +15,14 @@ dependencies:
|
|
16
15
|
requirements:
|
17
16
|
- - ">="
|
18
17
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
18
|
+
version: '7.1'
|
20
19
|
type: :runtime
|
21
20
|
prerelease: false
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
23
22
|
requirements:
|
24
23
|
- - ">="
|
25
24
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
25
|
+
version: '7.1'
|
27
26
|
- !ruby/object:Gem::Dependency
|
28
27
|
name: activejob-cancel
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,28 +43,28 @@ dependencies:
|
|
44
43
|
requirements:
|
45
44
|
- - ">="
|
46
45
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
46
|
+
version: '7.1'
|
48
47
|
type: :runtime
|
49
48
|
prerelease: false
|
50
49
|
version_requirements: !ruby/object:Gem::Requirement
|
51
50
|
requirements:
|
52
51
|
- - ">="
|
53
52
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
53
|
+
version: '7.1'
|
55
54
|
- !ruby/object:Gem::Dependency
|
56
55
|
name: activesupport
|
57
56
|
requirement: !ruby/object:Gem::Requirement
|
58
57
|
requirements:
|
59
58
|
- - ">="
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
60
|
+
version: '7.1'
|
62
61
|
type: :runtime
|
63
62
|
prerelease: false
|
64
63
|
version_requirements: !ruby/object:Gem::Requirement
|
65
64
|
requirements:
|
66
65
|
- - ">="
|
67
66
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
67
|
+
version: '7.1'
|
69
68
|
- !ruby/object:Gem::Dependency
|
70
69
|
name: base64
|
71
70
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,9 +172,10 @@ files:
|
|
173
172
|
- docker-compose.yml
|
174
173
|
- gemfiles/rails_6.1.gemfile
|
175
174
|
- gemfiles/rails_7.1.gemfile
|
175
|
+
- gemfiles/rails_7.2.gemfile
|
176
|
+
- gemfiles/rails_8.0.gemfile
|
176
177
|
- lib/alarmable.rb
|
177
178
|
- lib/alarmable/version.rb
|
178
|
-
homepage:
|
179
179
|
licenses:
|
180
180
|
- MIT
|
181
181
|
metadata:
|
@@ -184,7 +184,6 @@ metadata:
|
|
184
184
|
changelog_uri: https://github.com/hausgold/alarmable/blob/master/CHANGELOG.md
|
185
185
|
bug_tracker_uri: https://github.com/hausgold/alarmable/issues
|
186
186
|
documentation_uri: https://www.rubydoc.info/gems/alarmable
|
187
|
-
post_install_message:
|
188
187
|
rdoc_options: []
|
189
188
|
require_paths:
|
190
189
|
- lib
|
@@ -192,15 +191,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
192
191
|
requirements:
|
193
192
|
- - ">="
|
194
193
|
- !ruby/object:Gem::Version
|
195
|
-
version: '2
|
194
|
+
version: '3.2'
|
196
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
197
196
|
requirements:
|
198
197
|
- - ">="
|
199
198
|
- !ruby/object:Gem::Version
|
200
199
|
version: '0'
|
201
200
|
requirements: []
|
202
|
-
rubygems_version: 3.
|
203
|
-
signing_key:
|
201
|
+
rubygems_version: 3.6.9
|
204
202
|
specification_version: 4
|
205
203
|
summary: A reusable alarm extension to Active Record models
|
206
204
|
test_files: []
|