alarmable 0.1.1 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/documentation.yml +39 -0
- data/.github/workflows/test.yml +72 -0
- data/.gitignore +1 -1
- data/.rspec +2 -1
- data/.rubocop.yml +59 -3
- data/.simplecov +12 -0
- data/.yardopts +6 -0
- data/Appraisals +4 -20
- data/CHANGELOG.md +13 -0
- data/Dockerfile +28 -0
- data/Envfile +3 -0
- data/Guardfile +44 -0
- data/{LICENSE.txt → LICENSE} +1 -1
- data/Makefile +75 -10
- data/README.md +4 -4
- data/Rakefile +11 -0
- data/alarmable.gemspec +44 -26
- data/config/docker/.bash_profile +3 -0
- data/config/docker/.bashrc +48 -0
- data/config/docker/.inputrc +17 -0
- data/docker-compose.yml +4 -2
- data/gemfiles/rails_5.2.gemfile +3 -3
- data/lib/alarmable/concern.rb +2 -4
- data/lib/alarmable/version.rb +19 -1
- metadata +157 -59
- data/.travis.yml +0 -36
- data/gemfiles/rails_4.gemfile +0 -9
- data/gemfiles/rails_5.0.gemfile +0 -9
- data/gemfiles/rails_5.1.gemfile +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '079b8b2c656b50417dde03ebcccbb4d7b55dc249d90cee9974b1eed7f5089415'
|
4
|
+
data.tar.gz: 476c6acbe31bda140cf04b3840e7db36328ad57f05734a95f43a9683986ee180
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 540427e743f6a1fff246966b2ddb29c12a86de7f0e537d62bc8be3d0b6d8ac1c21830949577b238a3b509acaa2b26f886bc931fe41f550757381752840351e16
|
7
|
+
data.tar.gz: 1fd04a3f3effb30f4db9fd2d2b47d0bd00fcd0bbbfcf82cc6da0466c9b90b4d6853807f8b8fcd10e360b7ebbfe0e3551c9152db0dbaa488b1cae52b5e93c414f
|
@@ -0,0 +1,39 @@
|
|
1
|
+
name: Build Documentation
|
2
|
+
on:
|
3
|
+
repository_dispatch:
|
4
|
+
types: [documentation]
|
5
|
+
|
6
|
+
concurrency:
|
7
|
+
group: 'docs'
|
8
|
+
|
9
|
+
jobs:
|
10
|
+
docs:
|
11
|
+
name: Build gem documentation
|
12
|
+
runs-on: ubuntu-22.04
|
13
|
+
timeout-minutes: 5
|
14
|
+
steps:
|
15
|
+
- uses: actions/checkout@v3
|
16
|
+
|
17
|
+
- name: Install the correct Ruby version
|
18
|
+
uses: ruby/setup-ruby@v1
|
19
|
+
with:
|
20
|
+
ruby-version: 2.5
|
21
|
+
bundler-cache: true
|
22
|
+
rubygems: '3.3.26'
|
23
|
+
|
24
|
+
- name: Prepare the virtual environment
|
25
|
+
uses: hausgold/actions/ci@master
|
26
|
+
with:
|
27
|
+
clone_token: '${{ secrets.CLONE_TOKEN }}'
|
28
|
+
settings: '${{ github.repository }}'
|
29
|
+
target: ci/gem-test
|
30
|
+
|
31
|
+
- name: Build gem documentation
|
32
|
+
run: make docs
|
33
|
+
|
34
|
+
- name: Upload the code coverage report
|
35
|
+
run: coverage
|
36
|
+
|
37
|
+
- name: Add this job to the commit status
|
38
|
+
run: commit-status '${{ job.status }}'
|
39
|
+
if: always()
|
@@ -0,0 +1,72 @@
|
|
1
|
+
name: Test
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- '**'
|
6
|
+
schedule:
|
7
|
+
- cron: '0 0 * * MON'
|
8
|
+
|
9
|
+
concurrency:
|
10
|
+
group: '${{ github.ref }}'
|
11
|
+
cancel-in-progress: true
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
test:
|
15
|
+
name: 'Test the gem (Ruby ${{ matrix.ruby }}, Rails ${{ matrix.rails }})'
|
16
|
+
runs-on: ubuntu-22.04
|
17
|
+
timeout-minutes: 5
|
18
|
+
strategy:
|
19
|
+
fail-fast: false
|
20
|
+
matrix:
|
21
|
+
ruby: ['2.5', '2.7']
|
22
|
+
rails: ['5.2']
|
23
|
+
env:
|
24
|
+
BUNDLE_GEMFILE: 'gemfiles/rails_${{ matrix.rails }}.gemfile'
|
25
|
+
steps:
|
26
|
+
- uses: actions/checkout@v3
|
27
|
+
|
28
|
+
- name: Install the correct Ruby version
|
29
|
+
uses: ruby/setup-ruby@v1
|
30
|
+
with:
|
31
|
+
ruby-version: ${{ matrix.ruby }}
|
32
|
+
bundler-cache: true
|
33
|
+
rubygems: '3.3.26'
|
34
|
+
|
35
|
+
- name: Prepare the virtual environment
|
36
|
+
uses: hausgold/actions/ci@master
|
37
|
+
with:
|
38
|
+
clone_token: '${{ secrets.CLONE_TOKEN }}'
|
39
|
+
settings: '${{ github.repository }}'
|
40
|
+
target: ci/gem-test
|
41
|
+
|
42
|
+
- name: Setup mDNS
|
43
|
+
run: setup-mdns
|
44
|
+
|
45
|
+
- name: Start the dependent services
|
46
|
+
run: docker-compose up -d db
|
47
|
+
|
48
|
+
- name: Wait for database to be ready
|
49
|
+
run: await-tcp-open 'db.alarmable.local' '5432'
|
50
|
+
|
51
|
+
- name: Run the gem tests
|
52
|
+
run: make test
|
53
|
+
|
54
|
+
- name: Upload the code coverage report
|
55
|
+
run: coverage
|
56
|
+
|
57
|
+
trigger-docs:
|
58
|
+
name: Trigger the documentation upload
|
59
|
+
runs-on: ubuntu-22.04
|
60
|
+
timeout-minutes: 2
|
61
|
+
needs: test
|
62
|
+
if: github.ref == 'refs/heads/master'
|
63
|
+
steps:
|
64
|
+
- name: Prepare the virtual environment
|
65
|
+
uses: hausgold/actions/ci@master
|
66
|
+
with:
|
67
|
+
clone_token: '${{ secrets.CLONE_TOKEN }}'
|
68
|
+
settings: '${{ github.repository }}'
|
69
|
+
target: ci/noop
|
70
|
+
|
71
|
+
- name: Trigger the documentation upload
|
72
|
+
run: workflow documentation
|
data/.gitignore
CHANGED
data/.rspec
CHANGED
data/.rubocop.yml
CHANGED
@@ -1,27 +1,83 @@
|
|
1
|
-
require:
|
1
|
+
require:
|
2
|
+
- rubocop-rspec
|
3
|
+
- rubocop-rails
|
2
4
|
|
3
5
|
Rails:
|
4
6
|
Enabled: true
|
5
7
|
|
6
|
-
Documentation:
|
8
|
+
Style/Documentation:
|
7
9
|
Enabled: true
|
8
10
|
|
9
11
|
AllCops:
|
12
|
+
NewCops: enable
|
13
|
+
SuggestExtensions: false
|
10
14
|
DisplayCopNames: true
|
11
|
-
TargetRubyVersion: 2.
|
15
|
+
TargetRubyVersion: 2.5
|
16
|
+
TargetRailsVersion: 5.2
|
17
|
+
Exclude:
|
18
|
+
- bin/**/*
|
19
|
+
- vendor/**/*
|
20
|
+
- build/**/*
|
21
|
+
- gemfiles/**/*
|
12
22
|
|
13
23
|
Metrics/BlockLength:
|
14
24
|
Exclude:
|
15
25
|
- Rakefile
|
26
|
+
- '*.gemspec'
|
16
27
|
- spec/**/*.rb
|
17
28
|
- '**/*.rake'
|
29
|
+
- doc/**/*.rb
|
30
|
+
|
31
|
+
# MFA is not yet enabled for our gems yet.
|
32
|
+
Gemspec/RequireMFA:
|
33
|
+
Enabled: false
|
18
34
|
|
19
35
|
# Document all the things.
|
20
36
|
Style/DocumentationMethod:
|
21
37
|
Enabled: true
|
22
38
|
RequireForNonPublicMethods: true
|
23
39
|
|
40
|
+
# It's a deliberate idiom in RSpec.
|
41
|
+
# See: https://github.com/bbatsov/rubocop/issues/4222
|
42
|
+
Lint/AmbiguousBlockAssociation:
|
43
|
+
Exclude:
|
44
|
+
- "spec/**/*"
|
45
|
+
|
24
46
|
# Because +expect_any_instance_of().to have_received()+ is not
|
25
47
|
# supported with the +with(hash_including)+ matchers
|
26
48
|
RSpec/MessageSpies:
|
27
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
|
+
# Disable regular Rails spec paths.
|
61
|
+
RSpec/FilePath:
|
62
|
+
Enabled: false
|
63
|
+
|
64
|
+
# Because we just implemented the ActiveRecord API.
|
65
|
+
Rails/SkipsModelValidations:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
# We do not have a full Rails application here.
|
69
|
+
Rails/ApplicationRecord:
|
70
|
+
Enabled: false
|
71
|
+
|
72
|
+
# We do not have a full Rails application here.
|
73
|
+
Rails/ApplicationJob:
|
74
|
+
Enabled: false
|
75
|
+
|
76
|
+
# Because +enqueued_jobs+ is a method not a memoized variable,
|
77
|
+
# so when first evaluated it won't change.
|
78
|
+
RSpec/ExpectChange:
|
79
|
+
Enabled: false
|
80
|
+
|
81
|
+
# We highly depend on memoized helpers across the specs.
|
82
|
+
RSpec/MultipleMemoizedHelpers:
|
83
|
+
Enabled: false
|
data/.simplecov
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'simplecov-html'
|
4
|
+
require 'simplecov_json_formatter'
|
5
|
+
|
6
|
+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new(
|
7
|
+
[
|
8
|
+
SimpleCov::Formatter::HTMLFormatter,
|
9
|
+
SimpleCov::Formatter::JSONFormatter
|
10
|
+
]
|
11
|
+
)
|
12
|
+
|
1
13
|
SimpleCov.start 'test_frameworks' do
|
2
14
|
add_filter '/vendor/bundle/'
|
3
15
|
end
|
data/.yardopts
ADDED
data/Appraisals
CHANGED
@@ -1,23 +1,7 @@
|
|
1
|
-
|
2
|
-
gem 'activejob', '4.2.10'
|
3
|
-
gem 'activerecord', '4.2.10'
|
4
|
-
gem 'activesupport', '4.2.10'
|
5
|
-
end
|
6
|
-
|
7
|
-
appraise 'rails-5.0' do
|
8
|
-
gem 'activejob', '5.0.6'
|
9
|
-
gem 'activerecord', '5.0.6'
|
10
|
-
gem 'activesupport', '5.0.6'
|
11
|
-
end
|
12
|
-
|
13
|
-
appraise 'rails-5.1' do
|
14
|
-
gem 'activejob', '5.1.4'
|
15
|
-
gem 'activerecord', '5.1.4'
|
16
|
-
gem 'activesupport', '5.1.4'
|
17
|
-
end
|
1
|
+
# frozen_string_literal: true
|
18
2
|
|
19
3
|
appraise 'rails-5.2' do
|
20
|
-
gem 'activejob', '5.2.0'
|
21
|
-
gem 'activerecord', '5.2.0'
|
22
|
-
gem 'activesupport', '5.2.0'
|
4
|
+
gem 'activejob', '~> 5.2.0'
|
5
|
+
gem 'activerecord', '~> 5.2.0'
|
6
|
+
gem 'activesupport', '~> 5.2.0'
|
23
7
|
end
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 1.0.0
|
2
|
+
|
3
|
+
* Bundler >= 2.3 is from now on required as minimal version (#4)
|
4
|
+
* Dropped support for Ruby < 2.5 (#4)
|
5
|
+
* Dropped support for Rails < 5.2 (#4)
|
6
|
+
* Updated all development/runtime gems to their latest
|
7
|
+
Ruby 2.5 compatible version (#4)
|
8
|
+
|
9
|
+
### 0.1.2
|
10
|
+
|
11
|
+
* Migrated to Github Actions
|
12
|
+
* Migrated to our own coverage reporting
|
13
|
+
|
1
14
|
### 0.1.1
|
2
15
|
|
3
16
|
* Added test coverage reports
|
data/Dockerfile
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
FROM hausgold/ruby:2.5
|
2
|
+
MAINTAINER Hermann Mayer <hermann.mayer@hausgold.de>
|
3
|
+
|
4
|
+
# Update system gem
|
5
|
+
RUN gem update --system '3.3.26'
|
6
|
+
|
7
|
+
# Install system packages and the latest bundler
|
8
|
+
RUN apt-get update -yqqq && \
|
9
|
+
apt-get install -y \
|
10
|
+
build-essential locales sudo vim \
|
11
|
+
ca-certificates \
|
12
|
+
bash-completion inotify-tools && \
|
13
|
+
echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen && /usr/sbin/locale-gen && \
|
14
|
+
gem install bundler -v '~> 2.3.0' --no-document --no-prerelease
|
15
|
+
|
16
|
+
# Add new web user
|
17
|
+
RUN mkdir /app && \
|
18
|
+
adduser web --home /home/web --shell /bin/bash \
|
19
|
+
--disabled-password --gecos ""
|
20
|
+
COPY config/docker/* /home/web/
|
21
|
+
RUN chown web:web -R /app /home/web /usr/local/bundle && \
|
22
|
+
mkdir -p /home/web/.ssh
|
23
|
+
|
24
|
+
# Set the root password and grant root access to web
|
25
|
+
RUN echo 'root:root' | chpasswd
|
26
|
+
RUN echo 'web ALL=(ALL) NOPASSWD: ALL' >> /etc/sudoers
|
27
|
+
|
28
|
+
WORKDIR /app
|
data/Envfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# A sample Guardfile
|
4
|
+
# More info at https://github.com/guard/guard#readme
|
5
|
+
|
6
|
+
## Uncomment and set this to only include directories you want to watch
|
7
|
+
(directories %w[lib spec]).select do |d|
|
8
|
+
if Dir.exist?(d)
|
9
|
+
d
|
10
|
+
else
|
11
|
+
UI.warning("Directory #{d} does not exist")
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
## Note: if you are using the `directories` clause above and you are not
|
16
|
+
## watching the project directory ('.'), then you will want to move
|
17
|
+
## the Guardfile to a watched dir and symlink it back, e.g.
|
18
|
+
#
|
19
|
+
# $ mkdir config
|
20
|
+
# $ mv Guardfile config/
|
21
|
+
# $ ln -s config/Guardfile .
|
22
|
+
#
|
23
|
+
# and, you'll have to watch "config/Guardfile" instead of "Guardfile"
|
24
|
+
|
25
|
+
# NOTE: The cmd option is now required due to the increasing number of ways
|
26
|
+
# rspec may be run, below are examples of the most common uses.
|
27
|
+
# * bundler: 'bundle exec rspec'
|
28
|
+
# * bundler binstubs: 'bin/rspec'
|
29
|
+
# * spring: 'bin/rspec' (This will use spring if running and you have
|
30
|
+
# installed the spring binstubs per the docs)
|
31
|
+
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
32
|
+
# * 'just' rspec: 'rspec'
|
33
|
+
|
34
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
35
|
+
watch('spec/spec_helper.rb') { 'spec' }
|
36
|
+
watch(%r{^lib/alarmable.rb}) { 'spec' }
|
37
|
+
watch(%r{^spec/.+_spec\.rb$})
|
38
|
+
watch(%r{^lib/alarmable/([^\\]+)\.rb$}) do |m|
|
39
|
+
"spec/#{m[1]}_spec.rb"
|
40
|
+
end
|
41
|
+
watch(%r{^lib/alarmable/([^\\]+)/(.*)\.rb$}) do |m|
|
42
|
+
"spec/#{m[1]}/#{m[2]}_spec.rb"
|
43
|
+
end
|
44
|
+
end
|
data/{LICENSE.txt → LICENSE}
RENAMED
data/Makefile
CHANGED
@@ -9,6 +9,7 @@ SHELL := bash
|
|
9
9
|
# Environment switches
|
10
10
|
MAKE_ENV ?= docker
|
11
11
|
COMPOSE_RUN_SHELL_FLAGS ?= --rm
|
12
|
+
BASH_RUN_SHELL_FLAGS ?=
|
12
13
|
|
13
14
|
# Directories
|
14
15
|
VENDOR_DIR ?= vendor/bundle
|
@@ -22,9 +23,13 @@ MKDIR ?= mkdir
|
|
22
23
|
RM ?= rm
|
23
24
|
|
24
25
|
# Container binaries
|
25
|
-
BUNDLE ?= bundle
|
26
26
|
APPRAISAL ?= appraisal
|
27
|
+
BUNDLE ?= bundle
|
28
|
+
GUARD ?= guard
|
27
29
|
RAKE ?= rake
|
30
|
+
RSPEC ?= rspec
|
31
|
+
RUBOCOP ?= rubocop
|
32
|
+
YARD ?= yard
|
28
33
|
|
29
34
|
# Files
|
30
35
|
GEMFILES ?= $(subst _,-,$(patsubst $(GEMFILES_DIR)/%.gemfile,%,\
|
@@ -37,8 +42,9 @@ ifeq ($(MAKE_ENV),docker)
|
|
37
42
|
define run-shell
|
38
43
|
$(COMPOSE) run $(COMPOSE_RUN_SHELL_FLAGS) \
|
39
44
|
-e LANG=en_US.UTF-8 -e LANGUAGE=en_US.UTF-8 -e LC_ALL=en_US.UTF-8 \
|
40
|
-
-e HOME=/
|
41
|
-
-u `$(ID) -u` test
|
45
|
+
-e HOME=/home/web -e BUNDLE_APP_CONFIG=/app/.bundle \
|
46
|
+
-u `$(ID) -u` test \
|
47
|
+
bash $(BASH_RUN_SHELL_FLAGS) -c 'sleep 0.1; echo; $(1)'
|
42
48
|
endef
|
43
49
|
else ifeq ($(MAKE_ENV),baremetal)
|
44
50
|
define run-shell
|
@@ -50,30 +56,67 @@ all:
|
|
50
56
|
# Alarmable
|
51
57
|
#
|
52
58
|
# install Install the dependencies
|
53
|
-
#
|
59
|
+
# update Update the local Gemset dependencies
|
54
60
|
# clean Clean the dependencies
|
55
61
|
#
|
62
|
+
# test Run the whole test suite
|
63
|
+
# test-style Test the code styles
|
64
|
+
# watch Watch for code changes and rerun the test suite
|
65
|
+
#
|
66
|
+
# docs Generate the Ruby documentation of the library
|
67
|
+
# stats Print the code statistics (library and test suite)
|
68
|
+
# notes Print all the notes from the code
|
69
|
+
# release Release a new Gem version (maintainers only)
|
70
|
+
#
|
56
71
|
# shell Run an interactive shell on the container
|
57
72
|
# shell-irb Run an interactive IRB shell on the container
|
58
73
|
|
74
|
+
.interactive:
|
75
|
+
@$(eval BASH_RUN_SHELL_FLAGS = --login)
|
76
|
+
|
59
77
|
install:
|
60
78
|
# Install the dependencies
|
61
79
|
@$(MKDIR) -p $(VENDOR_DIR)
|
62
80
|
@$(call run-shell,$(BUNDLE) check || $(BUNDLE) install --path $(VENDOR_DIR))
|
63
81
|
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) install)
|
64
82
|
|
65
|
-
|
83
|
+
update:
|
84
|
+
# Install the dependencies
|
85
|
+
@$(MKDIR) -p $(VENDOR_DIR)
|
86
|
+
@$(call run-shell,$(BUNDLE) update)
|
87
|
+
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) update)
|
88
|
+
|
89
|
+
watch: install .interactive
|
90
|
+
# Watch for code changes and rerun the test suite
|
91
|
+
@$(call run-shell,$(BUNDLE) exec $(GUARD))
|
92
|
+
|
93
|
+
test: \
|
94
|
+
test-specs \
|
95
|
+
test-style
|
96
|
+
|
97
|
+
test-specs:
|
66
98
|
# Run the whole test suite
|
67
|
-
@$(call run-shell,$(BUNDLE) exec $(RAKE))
|
99
|
+
@$(call run-shell,$(BUNDLE) exec $(RAKE) stats spec)
|
68
100
|
|
69
101
|
$(TEST_GEMFILES): GEMFILE=$(@:test-%=%)
|
70
102
|
$(TEST_GEMFILES):
|
71
103
|
# Run the whole test suite ($(GEMFILE))
|
72
|
-
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(
|
104
|
+
@$(call run-shell,$(BUNDLE) exec $(APPRAISAL) $(GEMFILE) $(RSPEC))
|
105
|
+
|
106
|
+
test-style: \
|
107
|
+
test-style-ruby
|
108
|
+
|
109
|
+
test-style-ruby:
|
110
|
+
# Run the static code analyzer (rubocop)
|
111
|
+
@$(call run-shell,$(BUNDLE) exec $(RUBOCOP) -a)
|
73
112
|
|
74
113
|
clean:
|
75
114
|
# Clean the dependencies
|
76
115
|
@$(RM) -rf $(VENDOR_DIR)
|
116
|
+
@$(RM) -rf $(GEMFILES_DIR)/vendor
|
117
|
+
@$(RM) -rf $(GEMFILES_DIR)/*.lock
|
118
|
+
@$(RM) -rf .bundle .yardoc coverage pkg Gemfile.lock doc/api \
|
119
|
+
.rspec_status
|
77
120
|
|
78
121
|
clean-containers:
|
79
122
|
# Clean running containers
|
@@ -81,16 +124,38 @@ ifeq ($(MAKE_ENV),docker)
|
|
81
124
|
@$(COMPOSE) down
|
82
125
|
endif
|
83
126
|
|
84
|
-
|
127
|
+
clean-images:
|
128
|
+
# Clean build images
|
129
|
+
|
130
|
+
ifeq ($(MAKE_ENV),docker)
|
131
|
+
@-$(DOCKER) images | $(GREP) $(shell basename "`pwd`") \
|
132
|
+
| $(AWK) '{ print $$3 }' \
|
133
|
+
| $(XARGS) -rn1 $(DOCKER) rmi -f
|
134
|
+
endif
|
135
|
+
|
136
|
+
distclean: clean clean-containers clean-images
|
85
137
|
|
86
|
-
shell:
|
138
|
+
shell:
|
87
139
|
# Run an interactive shell on the container
|
88
140
|
@$(call run-shell,$(BASH) -i)
|
89
141
|
|
90
|
-
shell-irb:
|
142
|
+
shell-irb:
|
91
143
|
# Run an interactive IRB shell on the container
|
92
144
|
@$(call run-shell,bin/console)
|
93
145
|
|
146
|
+
docs:
|
147
|
+
# Build the API documentation
|
148
|
+
@$(call run-shell,$(BUNDLE) exec $(YARD) -q && \
|
149
|
+
$(BUNDLE) exec $(YARD) stats --list-undoc --compact)
|
150
|
+
|
151
|
+
notes:
|
152
|
+
# Print the code statistics (library and test suite)
|
153
|
+
@$(call run-shell,$(BUNDLE) exec $(RAKE) notes)
|
154
|
+
|
155
|
+
stats:
|
156
|
+
# Print all the notes from the code
|
157
|
+
@$(call run-shell,$(BUNDLE) exec $(RAKE) stats)
|
158
|
+
|
94
159
|
release:
|
95
160
|
# Release a new gem version
|
96
161
|
@$(BUNDLE) exec $(RAKE) release
|
data/README.md
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
![Alarmable](doc/assets/project.svg)
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Continuous Integration](https://github.com/hausgold/alarmable/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/hausgold/alarmable/actions/workflows/test.yml)
|
4
4
|
[![Gem Version](https://badge.fury.io/rb/alarmable.svg)](https://badge.fury.io/rb/alarmable)
|
5
|
-
[![
|
6
|
-
[![Test
|
7
|
-
[![API docs](https://
|
5
|
+
[![Test Coverage](https://automate-api.hausgold.de/v1/coverage_reports/alarmable/coverage.svg)](https://knowledge.hausgold.de/coverage)
|
6
|
+
[![Test Ratio](https://automate-api.hausgold.de/v1/coverage_reports/alarmable/ratio.svg)](https://knowledge.hausgold.de/coverage)
|
7
|
+
[![API docs](https://automate-api.hausgold.de/v1/coverage_reports/alarmable/documentation.svg)](https://www.rubydoc.info/gems/alarmable)
|
8
8
|
|
9
9
|
This is a reusable alarm concern for Active Record models. It adds support for
|
10
10
|
the automatic maintenance of Active Job's which are scheduled for the given
|
data/Rakefile
CHANGED
@@ -2,7 +2,18 @@
|
|
2
2
|
|
3
3
|
require 'bundler/gem_tasks'
|
4
4
|
require 'rspec/core/rake_task'
|
5
|
+
require 'countless/rake_tasks'
|
5
6
|
|
6
7
|
RSpec::Core::RakeTask.new(:spec)
|
7
8
|
|
8
9
|
task default: :spec
|
10
|
+
|
11
|
+
# Configure all code statistics directories
|
12
|
+
Countless.configure do |config|
|
13
|
+
config.stats_base_directories = [
|
14
|
+
{ name: 'Top-levels', dir: 'lib',
|
15
|
+
pattern: %r{/lib(/alarmable)?/[^/]+\.rb$} },
|
16
|
+
{ name: 'Top-levels specs', test: true, dir: 'spec',
|
17
|
+
pattern: %r{/spec(/alarmable)?/[^/]+_spec\.rb$} }
|
18
|
+
]
|
19
|
+
end
|
data/alarmable.gemspec
CHANGED
@@ -1,41 +1,59 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
lib = File.expand_path('
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
4
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
5
|
require 'alarmable/version'
|
6
6
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
|
-
spec.name
|
9
|
-
spec.version
|
10
|
-
spec.authors
|
11
|
-
spec.email
|
8
|
+
spec.name = 'alarmable'
|
9
|
+
spec.version = Alarmable::VERSION
|
10
|
+
spec.authors = ['Hermann Mayer']
|
11
|
+
spec.email = ['hermann.mayer92@gmail.com']
|
12
12
|
|
13
|
-
spec.
|
14
|
-
spec.
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
spec.license = 'MIT'
|
14
|
+
spec.summary = 'A reusable alarm extension to Active Record models'
|
15
|
+
spec.description = 'This is a reusable alarm concern for Active Record' \
|
16
|
+
'models. It adds support for the automatic maintenance' \
|
17
|
+
'of Active Job\'s which are scheduled for the given' \
|
18
|
+
'alarms.'
|
18
19
|
|
19
|
-
|
20
|
-
spec.
|
20
|
+
base_uri = "https://github.com/hausgold/#{spec.name}"
|
21
|
+
spec.metadata = {
|
22
|
+
'homepage_uri' => base_uri,
|
23
|
+
'source_code_uri' => base_uri,
|
24
|
+
'changelog_uri' => "#{base_uri}/blob/master/CHANGELOG.md",
|
25
|
+
'bug_tracker_uri' => "#{base_uri}/issues",
|
26
|
+
'documentation_uri' => "https://www.rubydoc.info/gems/#{spec.name}"
|
27
|
+
}
|
21
28
|
|
22
|
-
spec.files
|
29
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
23
30
|
f.match(%r{^(test|spec|features)/})
|
24
31
|
end
|
25
|
-
|
26
|
-
spec.
|
32
|
+
|
33
|
+
spec.bindir = 'exe'
|
34
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
35
|
spec.require_paths = ['lib']
|
28
36
|
|
29
|
-
spec.
|
37
|
+
spec.required_ruby_version = '>= 2.5'
|
38
|
+
|
39
|
+
spec.add_dependency 'activejob', '>= 5.2'
|
30
40
|
spec.add_dependency 'activejob-cancel', '~> 0.3'
|
31
|
-
spec.add_dependency 'activerecord', '>=
|
32
|
-
spec.add_dependency 'activesupport', '>=
|
33
|
-
spec.add_dependency 'hashdiff', '~> 0
|
34
|
-
|
35
|
-
spec.add_development_dependency 'appraisal'
|
36
|
-
spec.add_development_dependency 'bundler', '
|
37
|
-
spec.add_development_dependency '
|
38
|
-
spec.add_development_dependency 'rspec', '~>
|
39
|
-
spec.add_development_dependency 'pg', '~>
|
40
|
-
spec.add_development_dependency '
|
41
|
+
spec.add_dependency 'activerecord', '>= 5.2'
|
42
|
+
spec.add_dependency 'activesupport', '>= 5.2'
|
43
|
+
spec.add_dependency 'hashdiff', '~> 1.0'
|
44
|
+
|
45
|
+
spec.add_development_dependency 'appraisal', '~> 2.4'
|
46
|
+
spec.add_development_dependency 'bundler', '~> 2.3'
|
47
|
+
spec.add_development_dependency 'countless', '~> 1.1'
|
48
|
+
spec.add_development_dependency 'guard-rspec', '~> 4.7'
|
49
|
+
spec.add_development_dependency 'pg', '~> 1.4'
|
50
|
+
spec.add_development_dependency 'railties', '>= 5.2'
|
51
|
+
spec.add_development_dependency 'rake', '~> 13.0'
|
52
|
+
spec.add_development_dependency 'rspec', '~> 3.12'
|
53
|
+
spec.add_development_dependency 'rubocop', '~> 1.28'
|
54
|
+
spec.add_development_dependency 'rubocop-rails', '~> 2.14'
|
55
|
+
spec.add_development_dependency 'rubocop-rspec', '~> 2.10'
|
56
|
+
spec.add_development_dependency 'simplecov', '>= 0.22'
|
57
|
+
spec.add_development_dependency 'yard', '>= 0.9.28'
|
58
|
+
spec.add_development_dependency 'yard-activesupport-concern', '>= 0.0.1'
|
41
59
|
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
# ~/.bashrc: executed by bash(1) for non-login shells.
|
2
|
+
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
3
|
+
# for examples
|
4
|
+
|
5
|
+
_GEM_PATHS=$(ls -d1 ${HOME}/.gem/ruby/*/bin 2>/dev/null | paste -sd ':')
|
6
|
+
_APP_PATHS=$(ls -d1 /app/vendor/bundle/ruby/*/bin 2>/dev/null | paste -sd ':')
|
7
|
+
|
8
|
+
export PATH="${_GEM_PATHS}:${_APP_PATHS}:${PATH}"
|
9
|
+
export PATH="/app/node_modules/.bin:${HOME}/.bin:/app/bin:${PATH}"
|
10
|
+
export MAKE_ENV=baremetal
|
11
|
+
|
12
|
+
# Disable the autostart of all supervisord units
|
13
|
+
sudo sed -i 's/autostart=.*/autostart=false/g' /etc/supervisor/conf.d/*
|
14
|
+
|
15
|
+
# Start the supervisord (empty, no units)
|
16
|
+
sudo supervisord >/dev/null 2>&1 &
|
17
|
+
|
18
|
+
# Wait for supervisord
|
19
|
+
while ! supervisorctl status >/dev/null 2>&1; do sleep 1; done
|
20
|
+
|
21
|
+
# Boot the mDNS stack
|
22
|
+
echo '# Start the mDNS stack'
|
23
|
+
sudo supervisorctl start dbus avahi
|
24
|
+
echo
|
25
|
+
|
26
|
+
function watch-make-test()
|
27
|
+
{
|
28
|
+
while [ 1 ]; do
|
29
|
+
inotifywait --quiet -r `pwd` -e close_write --format '%e -> %w%f'
|
30
|
+
make test
|
31
|
+
done
|
32
|
+
}
|
33
|
+
|
34
|
+
function watch-make()
|
35
|
+
{
|
36
|
+
while [ 1 ]; do
|
37
|
+
inotifywait --quiet -r `pwd` -e close_write --format '%e -> %w%f'
|
38
|
+
make $@
|
39
|
+
done
|
40
|
+
}
|
41
|
+
|
42
|
+
function watch-run()
|
43
|
+
{
|
44
|
+
while [ 1 ]; do
|
45
|
+
inotifywait --quiet -r `pwd` -e close_write --format '%e -> %w%f'
|
46
|
+
bash -c "$@"
|
47
|
+
done
|
48
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# mappings for Ctrl-left-arrow and Ctrl-right-arrow for word moving
|
2
|
+
"\e[1;5C": forward-word
|
3
|
+
"\e[1;5D": backward-word
|
4
|
+
"\e[5C": forward-word
|
5
|
+
"\e[5D": backward-word
|
6
|
+
"\e\e[C": forward-word
|
7
|
+
"\e\e[D": backward-word
|
8
|
+
|
9
|
+
# handle common Home/End escape codes
|
10
|
+
"\e[1~": beginning-of-line
|
11
|
+
"\e[4~": end-of-line
|
12
|
+
"\e[7~": beginning-of-line
|
13
|
+
"\e[8~": end-of-line
|
14
|
+
"\eOH": beginning-of-line
|
15
|
+
"\eOF": end-of-line
|
16
|
+
"\e[H": beginning-of-line
|
17
|
+
"\e[F": end-of-line
|
data/docker-compose.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
version: "3"
|
2
2
|
services:
|
3
3
|
db:
|
4
|
-
image: postgres:
|
4
|
+
image: hausgold/postgres:14.4
|
5
5
|
network_mode: bridge
|
6
6
|
ports: ["5432"]
|
7
7
|
volumes:
|
@@ -10,9 +10,11 @@ services:
|
|
10
10
|
POSTGRES_USER: postgres
|
11
11
|
POSTGRES_PASSWORD: postgres
|
12
12
|
POSTGRES_DB: alarmable
|
13
|
+
MDNS_HOSTNAME: db.alarmable.local
|
13
14
|
|
14
15
|
test:
|
15
|
-
|
16
|
+
build: .
|
17
|
+
env_file: Envfile
|
16
18
|
network_mode: bridge
|
17
19
|
working_dir: /app
|
18
20
|
volumes:
|
data/gemfiles/rails_5.2.gemfile
CHANGED
data/lib/alarmable/concern.rb
CHANGED
@@ -160,14 +160,13 @@ module Alarmable
|
|
160
160
|
job = alarm_job.set(wait_until: notify_at).perform_later(self.id, alarm)
|
161
161
|
|
162
162
|
# Construct a new alarm_jobs partial instance for this job
|
163
|
-
|
163
|
+
{ id => job.job_id }
|
164
164
|
end
|
165
165
|
# rubocop:enable Metrics/AbcSize
|
166
166
|
|
167
167
|
# Initiate a reschedule for each alarm in the alarm settings and
|
168
168
|
# cancel all left-overs.
|
169
169
|
#
|
170
|
-
# rubocop:disable Rails/SkipsModelValidations because we need to skip them
|
171
170
|
# :reek:TooManyStatements because its already broken down
|
172
171
|
def reschedule_alarm_jobs
|
173
172
|
# Perform the reschedule of all the current alarms.
|
@@ -178,7 +177,7 @@ module Alarmable
|
|
178
177
|
# Detect the differences from the original alarm_jobs hash to the new
|
179
178
|
# built (by partials) alarm_jobs hash. The jobs from negative differences
|
180
179
|
# must be canceled.
|
181
|
-
diff =
|
180
|
+
diff = Hashdiff.diff(alarm_jobs, new_alarm_jobs)
|
182
181
|
|
183
182
|
diff.select { |prop| prop.first == '-' }.each do |prop|
|
184
183
|
alarm_job.cancel(prop.last)
|
@@ -189,7 +188,6 @@ module Alarmable
|
|
189
188
|
# endless create-update loops.
|
190
189
|
update_columns(alarm_jobs: new_alarm_jobs)
|
191
190
|
end
|
192
|
-
# rubocop:enable Rails/SkipsModelValidations
|
193
191
|
|
194
192
|
# Reschedule only on updates when the alarm settings are changed.
|
195
193
|
def alarms_update_callback
|
data/lib/alarmable/version.rb
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# The gem version details.
|
3
4
|
module Alarmable
|
4
|
-
|
5
|
+
# The version of the +alarmable+ gem
|
6
|
+
VERSION = '1.0.0'
|
7
|
+
|
8
|
+
class << self
|
9
|
+
# Returns the version of gem as a string.
|
10
|
+
#
|
11
|
+
# @return [String] the gem version as string
|
12
|
+
def version
|
13
|
+
VERSION
|
14
|
+
end
|
15
|
+
|
16
|
+
# Returns the version of the gem as a +Gem::Version+.
|
17
|
+
#
|
18
|
+
# @return [Gem::Version] the gem version as object
|
19
|
+
def gem_version
|
20
|
+
Gem::Version.new VERSION
|
21
|
+
end
|
22
|
+
end
|
5
23
|
end
|
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: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hermann Mayer
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activejob
|
@@ -16,20 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
- - "<"
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: '6'
|
19
|
+
version: '5.2'
|
23
20
|
type: :runtime
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '
|
30
|
-
- - "<"
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '6'
|
26
|
+
version: '5.2'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: activejob-cancel
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -50,182 +44,286 @@ dependencies:
|
|
50
44
|
requirements:
|
51
45
|
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
|
-
version: '
|
54
|
-
- - "<"
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version: '6'
|
47
|
+
version: '5.2'
|
57
48
|
type: :runtime
|
58
49
|
prerelease: false
|
59
50
|
version_requirements: !ruby/object:Gem::Requirement
|
60
51
|
requirements:
|
61
52
|
- - ">="
|
62
53
|
- !ruby/object:Gem::Version
|
63
|
-
version: '
|
64
|
-
- - "<"
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
version: '6'
|
54
|
+
version: '5.2'
|
67
55
|
- !ruby/object:Gem::Dependency
|
68
56
|
name: activesupport
|
69
57
|
requirement: !ruby/object:Gem::Requirement
|
70
58
|
requirements:
|
71
59
|
- - ">="
|
72
60
|
- !ruby/object:Gem::Version
|
73
|
-
version: '
|
74
|
-
- - "<"
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: '6'
|
61
|
+
version: '5.2'
|
77
62
|
type: :runtime
|
78
63
|
prerelease: false
|
79
64
|
version_requirements: !ruby/object:Gem::Requirement
|
80
65
|
requirements:
|
81
66
|
- - ">="
|
82
67
|
- !ruby/object:Gem::Version
|
83
|
-
version: '
|
84
|
-
- - "<"
|
85
|
-
- !ruby/object:Gem::Version
|
86
|
-
version: '6'
|
68
|
+
version: '5.2'
|
87
69
|
- !ruby/object:Gem::Dependency
|
88
70
|
name: hashdiff
|
89
71
|
requirement: !ruby/object:Gem::Requirement
|
90
72
|
requirements:
|
91
73
|
- - "~>"
|
92
74
|
- !ruby/object:Gem::Version
|
93
|
-
version: 0
|
75
|
+
version: '1.0'
|
94
76
|
type: :runtime
|
95
77
|
prerelease: false
|
96
78
|
version_requirements: !ruby/object:Gem::Requirement
|
97
79
|
requirements:
|
98
80
|
- - "~>"
|
99
81
|
- !ruby/object:Gem::Version
|
100
|
-
version: 0
|
82
|
+
version: '1.0'
|
101
83
|
- !ruby/object:Gem::Dependency
|
102
84
|
name: appraisal
|
103
85
|
requirement: !ruby/object:Gem::Requirement
|
104
86
|
requirements:
|
105
|
-
- - "
|
87
|
+
- - "~>"
|
106
88
|
- !ruby/object:Gem::Version
|
107
|
-
version: '
|
89
|
+
version: '2.4'
|
108
90
|
type: :development
|
109
91
|
prerelease: false
|
110
92
|
version_requirements: !ruby/object:Gem::Requirement
|
111
93
|
requirements:
|
112
|
-
- - "
|
94
|
+
- - "~>"
|
113
95
|
- !ruby/object:Gem::Version
|
114
|
-
version: '
|
96
|
+
version: '2.4'
|
115
97
|
- !ruby/object:Gem::Dependency
|
116
98
|
name: bundler
|
117
99
|
requirement: !ruby/object:Gem::Requirement
|
118
100
|
requirements:
|
119
|
-
- - "
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '2.3'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '2.3'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: countless
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.1'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: guard-rspec
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '4.7'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
120
137
|
- !ruby/object:Gem::Version
|
121
|
-
version: '
|
122
|
-
|
138
|
+
version: '4.7'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: pg
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
123
144
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
145
|
+
version: '1.4'
|
125
146
|
type: :development
|
126
147
|
prerelease: false
|
127
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.4'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: railties
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
128
156
|
requirements:
|
129
157
|
- - ">="
|
130
158
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
132
|
-
|
159
|
+
version: '5.2'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
133
165
|
- !ruby/object:Gem::Version
|
134
|
-
version: '
|
166
|
+
version: '5.2'
|
135
167
|
- !ruby/object:Gem::Dependency
|
136
168
|
name: rake
|
137
169
|
requirement: !ruby/object:Gem::Requirement
|
138
170
|
requirements:
|
139
171
|
- - "~>"
|
140
172
|
- !ruby/object:Gem::Version
|
141
|
-
version: '
|
173
|
+
version: '13.0'
|
142
174
|
type: :development
|
143
175
|
prerelease: false
|
144
176
|
version_requirements: !ruby/object:Gem::Requirement
|
145
177
|
requirements:
|
146
178
|
- - "~>"
|
147
179
|
- !ruby/object:Gem::Version
|
148
|
-
version: '
|
180
|
+
version: '13.0'
|
149
181
|
- !ruby/object:Gem::Dependency
|
150
182
|
name: rspec
|
151
183
|
requirement: !ruby/object:Gem::Requirement
|
152
184
|
requirements:
|
153
185
|
- - "~>"
|
154
186
|
- !ruby/object:Gem::Version
|
155
|
-
version: '3.
|
187
|
+
version: '3.12'
|
156
188
|
type: :development
|
157
189
|
prerelease: false
|
158
190
|
version_requirements: !ruby/object:Gem::Requirement
|
159
191
|
requirements:
|
160
192
|
- - "~>"
|
161
193
|
- !ruby/object:Gem::Version
|
162
|
-
version: '3.
|
194
|
+
version: '3.12'
|
163
195
|
- !ruby/object:Gem::Dependency
|
164
|
-
name:
|
196
|
+
name: rubocop
|
165
197
|
requirement: !ruby/object:Gem::Requirement
|
166
198
|
requirements:
|
167
199
|
- - "~>"
|
168
200
|
- !ruby/object:Gem::Version
|
169
|
-
version: '
|
201
|
+
version: '1.28'
|
170
202
|
type: :development
|
171
203
|
prerelease: false
|
172
204
|
version_requirements: !ruby/object:Gem::Requirement
|
173
205
|
requirements:
|
174
206
|
- - "~>"
|
175
207
|
- !ruby/object:Gem::Version
|
176
|
-
version: '
|
208
|
+
version: '1.28'
|
177
209
|
- !ruby/object:Gem::Dependency
|
178
|
-
name:
|
210
|
+
name: rubocop-rails
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '2.14'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '2.14'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rubocop-rspec
|
179
225
|
requirement: !ruby/object:Gem::Requirement
|
180
226
|
requirements:
|
181
227
|
- - "~>"
|
182
228
|
- !ruby/object:Gem::Version
|
183
|
-
version: '
|
229
|
+
version: '2.10'
|
184
230
|
type: :development
|
185
231
|
prerelease: false
|
186
232
|
version_requirements: !ruby/object:Gem::Requirement
|
187
233
|
requirements:
|
188
234
|
- - "~>"
|
189
235
|
- !ruby/object:Gem::Version
|
190
|
-
version: '
|
236
|
+
version: '2.10'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: simplecov
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0.22'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0.22'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: yard
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: 0.9.28
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: 0.9.28
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: yard-activesupport-concern
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: 0.0.1
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: 0.0.1
|
191
279
|
description: This is a reusable alarm concern for Active Recordmodels. It adds support
|
192
280
|
for the automatic maintenanceof Active Job's which are scheduled for the givenalarms.
|
193
281
|
email:
|
194
|
-
- hermann.
|
282
|
+
- hermann.mayer92@gmail.com
|
195
283
|
executables: []
|
196
284
|
extensions: []
|
197
285
|
extra_rdoc_files: []
|
198
286
|
files:
|
199
287
|
- ".editorconfig"
|
288
|
+
- ".github/workflows/documentation.yml"
|
289
|
+
- ".github/workflows/test.yml"
|
200
290
|
- ".gitignore"
|
201
291
|
- ".rspec"
|
202
292
|
- ".rubocop.yml"
|
203
293
|
- ".simplecov"
|
204
|
-
- ".
|
294
|
+
- ".yardopts"
|
205
295
|
- Appraisals
|
206
296
|
- CHANGELOG.md
|
207
297
|
- CODE_OF_CONDUCT.md
|
298
|
+
- Dockerfile
|
299
|
+
- Envfile
|
208
300
|
- Gemfile
|
209
|
-
-
|
301
|
+
- Guardfile
|
302
|
+
- LICENSE
|
210
303
|
- Makefile
|
211
304
|
- README.md
|
212
305
|
- Rakefile
|
213
306
|
- alarmable.gemspec
|
214
307
|
- bin/console
|
215
308
|
- bin/setup
|
309
|
+
- config/docker/.bash_profile
|
310
|
+
- config/docker/.bashrc
|
311
|
+
- config/docker/.inputrc
|
216
312
|
- doc/assets/project.svg
|
217
313
|
- docker-compose.yml
|
218
|
-
- gemfiles/rails_4.gemfile
|
219
|
-
- gemfiles/rails_5.0.gemfile
|
220
|
-
- gemfiles/rails_5.1.gemfile
|
221
314
|
- gemfiles/rails_5.2.gemfile
|
222
315
|
- lib/alarmable.rb
|
223
316
|
- lib/alarmable/concern.rb
|
224
317
|
- lib/alarmable/version.rb
|
225
|
-
homepage:
|
318
|
+
homepage:
|
226
319
|
licenses:
|
227
320
|
- MIT
|
228
|
-
metadata:
|
321
|
+
metadata:
|
322
|
+
homepage_uri: https://github.com/hausgold/alarmable
|
323
|
+
source_code_uri: https://github.com/hausgold/alarmable
|
324
|
+
changelog_uri: https://github.com/hausgold/alarmable/blob/master/CHANGELOG.md
|
325
|
+
bug_tracker_uri: https://github.com/hausgold/alarmable/issues
|
326
|
+
documentation_uri: https://www.rubydoc.info/gems/alarmable
|
229
327
|
post_install_message:
|
230
328
|
rdoc_options: []
|
231
329
|
require_paths:
|
@@ -234,14 +332,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
234
332
|
requirements:
|
235
333
|
- - ">="
|
236
334
|
- !ruby/object:Gem::Version
|
237
|
-
version: '
|
335
|
+
version: '2.5'
|
238
336
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
239
337
|
requirements:
|
240
338
|
- - ">="
|
241
339
|
- !ruby/object:Gem::Version
|
242
340
|
version: '0'
|
243
341
|
requirements: []
|
244
|
-
rubygems_version: 3.
|
342
|
+
rubygems_version: 3.3.8
|
245
343
|
signing_key:
|
246
344
|
specification_version: 4
|
247
345
|
summary: A reusable alarm extension to Active Record models
|
data/.travis.yml
DELETED
@@ -1,36 +0,0 @@
|
|
1
|
-
sudo: false
|
2
|
-
|
3
|
-
env:
|
4
|
-
global:
|
5
|
-
- CC_TEST_REPORTER_ID=31e005b4d2d190f26dcb055d5ac3a9ccfd492da2c335e5abfafbd438488f8b08
|
6
|
-
|
7
|
-
addons:
|
8
|
-
postgresql: "9.6"
|
9
|
-
|
10
|
-
services:
|
11
|
-
- postgresql
|
12
|
-
|
13
|
-
language: ruby
|
14
|
-
rvm:
|
15
|
-
- 2.6
|
16
|
-
- 2.5
|
17
|
-
- 2.4
|
18
|
-
- 2.3
|
19
|
-
|
20
|
-
gemfile:
|
21
|
-
- gemfiles/rails_4.gemfile
|
22
|
-
- gemfiles/rails_5.0.gemfile
|
23
|
-
- gemfiles/rails_5.1.gemfile
|
24
|
-
- gemfiles/rails_5.2.gemfile
|
25
|
-
|
26
|
-
before_install:
|
27
|
-
- gem install bundler
|
28
|
-
- psql -c 'create database alarmable;' -U postgres
|
29
|
-
|
30
|
-
before_script:
|
31
|
-
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
|
32
|
-
- chmod +x ./cc-test-reporter
|
33
|
-
- ./cc-test-reporter before-build
|
34
|
-
script: bundle exec rake
|
35
|
-
after_script:
|
36
|
-
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
|
data/gemfiles/rails_4.gemfile
DELETED
data/gemfiles/rails_5.0.gemfile
DELETED