obscured-heartbeat 1.0.1 → 1.4.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/publish.yml +34 -23
- data/CHANGELOG.md +46 -0
- data/Gemfile.lock +10 -9
- data/README.md +3 -2
- data/lib/obscured-heartbeat.rb +1 -1
- data/lib/obscured-heartbeat/record.rb +1 -1
- data/lib/obscured-heartbeat/service.rb +2 -2
- data/lib/obscured-heartbeat/tracker.rb +2 -2
- data/lib/obscured-heartbeat/version.rb +2 -2
- data/obscured-heartbeat.gemspec +1 -1
- data/spec/factories/heartbeat_factory.rb +1 -1
- data/spec/helpers/gateway_document.rb +1 -1
- data/spec/helpers/host_document.rb +1 -1
- data/spec/helpers/host_service.rb +2 -2
- data/spec/host_service_spec.rb +2 -2
- data/spec/tracker_multiple_spec.rb +1 -1
- data/spec/tracker_single_spec.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8b3cb1e70cb66ff56cc1aefe94a48a1851a60151c71480da83ea11a983b5fe31
|
|
4
|
+
data.tar.gz: dce442ef03e2b5e08241f368974119433cdf0a6ab1799e12de25410b4b4f2dcc
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8ec9dfedebc14bcfb11096c297f02c280bd4cd0a085ce5e38cdf8b2009ecd64eec627ef432d1d2274fd1a5178b671207cd115aa5e615c848e012117b83089c82
|
|
7
|
+
data.tar.gz: 52215395e9ea37bcd5a7c57b4da34f33827bd0f57fb123494fdbde93cb29f087156baf600e54927c57e04125b71150d06121685b1dba9449708d91ae371c179c
|
|
@@ -1,30 +1,41 @@
|
|
|
1
|
-
name:
|
|
1
|
+
name: Publish
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
push:
|
|
5
|
-
branches:
|
|
6
|
-
|
|
7
|
-
branches: [ master ]
|
|
5
|
+
branches:
|
|
6
|
+
- master
|
|
8
7
|
|
|
9
8
|
jobs:
|
|
10
|
-
|
|
11
|
-
name: Build + Publish
|
|
9
|
+
publish:
|
|
12
10
|
runs-on: ubuntu-latest
|
|
13
|
-
|
|
14
11
|
steps:
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
12
|
+
- uses: GoogleCloudPlatform/release-please-action@v2
|
|
13
|
+
id: release
|
|
14
|
+
with:
|
|
15
|
+
release-type: ruby
|
|
16
|
+
package-name: obscured-heartbeat
|
|
17
|
+
bump-minor-pre-major: true
|
|
18
|
+
version-file: "lib/obscured-heartbeat/version.rb"
|
|
19
|
+
# Checkout code if release was created
|
|
20
|
+
- uses: actions/checkout@v2
|
|
21
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
22
|
+
# Setup ruby if a release was created
|
|
23
|
+
- uses: actions/setup-ruby@v1
|
|
24
|
+
with:
|
|
25
|
+
ruby-version: 2.7.x
|
|
26
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
27
|
+
# Bundle install
|
|
28
|
+
- run: bundle install
|
|
29
|
+
if: ${{ steps.release.outputs.release_created }}
|
|
30
|
+
# Publish
|
|
31
|
+
- name: Publish to RubyGems
|
|
32
|
+
run: |
|
|
33
|
+
mkdir -p $HOME/.gem
|
|
34
|
+
touch $HOME/.gem/credentials
|
|
35
|
+
chmod 0600 $HOME/.gem/credentials
|
|
36
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
|
|
37
|
+
gem build *.gemspec
|
|
38
|
+
gem push *.gem
|
|
39
|
+
env:
|
|
40
|
+
RUBYGEMS_AUTH_TOKEN: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
|
|
41
|
+
if: ${{ steps.release.outputs.release_created }}
|
data/CHANGELOG.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.4.0](https://www.github.com/gonace/Obscured.Heartbeat/compare/v0.3.0...v0.4.0) (2021-05-13)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### ⚠ BREAKING CHANGES
|
|
7
|
+
|
|
8
|
+
* done some refactoring" && git push origin master
|
|
9
|
+
|
|
10
|
+
### Features
|
|
11
|
+
|
|
12
|
+
* Updated namespace ([d74628c](https://www.github.com/gonace/Obscured.Heartbeat/commit/d74628c1a108c817475e4a4dd7a040d2d4219019))
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Code Refactoring
|
|
16
|
+
|
|
17
|
+
* done some refactoring" && git push origin master ([54b6254](https://www.github.com/gonace/Obscured.Heartbeat/commit/54b62549c3cb99af1dd68c3a85c5463202be6138))
|
|
18
|
+
|
|
19
|
+
## [0.3.0](https://www.github.com/gonace/Obscured.Heartbeat/compare/v0.2.0...v0.3.0) (2021-05-13)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Features
|
|
23
|
+
|
|
24
|
+
* Updated namespace ([455cb06](https://www.github.com/gonace/Obscured.Heartbeat/commit/455cb06442a93a1807706fa52f099bab459cbaf5))
|
|
25
|
+
|
|
26
|
+
## [0.2.0](https://www.github.com/gonace/Obscured.Heartbeat/compare/v0.1.0...v0.2.0) (2021-05-13)
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
### Features
|
|
30
|
+
|
|
31
|
+
* updated bundler and version ([67eae54](https://www.github.com/gonace/Obscured.Heartbeat/commit/67eae548c9c58a80fa433befc00f82e2cf8bcbbf))
|
|
32
|
+
|
|
33
|
+
## 0.1.0 (2021-05-13)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### Features
|
|
37
|
+
|
|
38
|
+
* 1.0.2 updated bundler and version ([dbb6224](https://www.github.com/gonace/Obscured.Heartbeat/commit/dbb6224c031164a1e52cc89e1a0902d21db3b2b1))
|
|
39
|
+
* updated bundler and version ([6cc2ec6](https://www.github.com/gonace/Obscured.Heartbeat/commit/6cc2ec69e7c6bc4f18da1142b6303d631e690239))
|
|
40
|
+
|
|
41
|
+
## 1.0.1 (2021-05-13)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
### Features
|
|
45
|
+
|
|
46
|
+
* Initial release
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
obscured-heartbeat (1.
|
|
4
|
+
obscured-heartbeat (1.4.0)
|
|
5
5
|
activesupport
|
|
6
6
|
mongoid
|
|
7
7
|
mongoid_search
|
|
@@ -20,16 +20,16 @@ GEM
|
|
|
20
20
|
bson (4.12.0)
|
|
21
21
|
concurrent-ruby (1.1.8)
|
|
22
22
|
diff-lcs (1.4.4)
|
|
23
|
-
docile (1.3.
|
|
23
|
+
docile (1.3.5)
|
|
24
24
|
factory_bot (6.1.0)
|
|
25
25
|
activesupport (>= 5.0.0)
|
|
26
26
|
fast-stemmer (1.0.2)
|
|
27
|
-
i18n (1.8.
|
|
27
|
+
i18n (1.8.10)
|
|
28
28
|
concurrent-ruby (~> 1.0)
|
|
29
29
|
minitest (5.14.4)
|
|
30
30
|
mongo (2.14.0)
|
|
31
31
|
bson (>= 4.8.2, < 5.0.0)
|
|
32
|
-
mongoid (7.
|
|
32
|
+
mongoid (7.3.0)
|
|
33
33
|
activemodel (>= 5.1, < 6.2)
|
|
34
34
|
mongo (>= 2.10.5, < 3.0.0)
|
|
35
35
|
mongoid_search (0.4.0)
|
|
@@ -39,15 +39,15 @@ GEM
|
|
|
39
39
|
rspec-core (~> 3.10.0)
|
|
40
40
|
rspec-expectations (~> 3.10.0)
|
|
41
41
|
rspec-mocks (~> 3.10.0)
|
|
42
|
-
rspec-core (3.10.
|
|
42
|
+
rspec-core (3.10.1)
|
|
43
43
|
rspec-support (~> 3.10.0)
|
|
44
|
-
rspec-expectations (3.10.
|
|
44
|
+
rspec-expectations (3.10.1)
|
|
45
45
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
46
46
|
rspec-support (~> 3.10.0)
|
|
47
|
-
rspec-mocks (3.10.
|
|
47
|
+
rspec-mocks (3.10.2)
|
|
48
48
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
49
49
|
rspec-support (~> 3.10.0)
|
|
50
|
-
rspec-support (3.10.
|
|
50
|
+
rspec-support (3.10.2)
|
|
51
51
|
simplecov (0.21.2)
|
|
52
52
|
docile (~> 1.1)
|
|
53
53
|
simplecov-html (~> 0.11)
|
|
@@ -60,6 +60,7 @@ GEM
|
|
|
60
60
|
|
|
61
61
|
PLATFORMS
|
|
62
62
|
ruby
|
|
63
|
+
x86_64-linux
|
|
63
64
|
|
|
64
65
|
DEPENDENCIES
|
|
65
66
|
factory_bot
|
|
@@ -68,4 +69,4 @@ DEPENDENCIES
|
|
|
68
69
|
simplecov
|
|
69
70
|
|
|
70
71
|
BUNDLED WITH
|
|
71
|
-
2.
|
|
72
|
+
2.2.17
|
data/README.md
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
[](https://badge.fury.io/rb/obscured-heartbeat)
|
|
1
2
|
[](https://snyk.io/test/github/gonace/obscured.heartbeat)
|
|
2
3
|
[](https://travis-ci.org/gonace/Obscured.Heartbeat)
|
|
3
4
|
[](https://codeclimate.com/github/gonace/Obscured.Heartbeat)
|
|
@@ -15,7 +16,7 @@ Obscured Heartbeat adds heartbeat to a separate collection for an entity (Docume
|
|
|
15
16
|
|
|
16
17
|
##### Add this line to your application's Gemfile
|
|
17
18
|
```ruby
|
|
18
|
-
gem 'obscured-heartbeat'
|
|
19
|
+
gem 'obscured-heartbeat'
|
|
19
20
|
```
|
|
20
21
|
|
|
21
22
|
##### Execute
|
|
@@ -85,4 +86,4 @@ module Obscured
|
|
|
85
86
|
end
|
|
86
87
|
end
|
|
87
88
|
end
|
|
88
|
-
```
|
|
89
|
+
```
|
data/lib/obscured-heartbeat.rb
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
|
-
module
|
|
3
|
+
module Obscured
|
|
4
4
|
module Heartbeat
|
|
5
5
|
module Service
|
|
6
6
|
module Base
|
|
@@ -45,7 +45,7 @@ module Mongoid
|
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
class Record
|
|
48
|
-
include
|
|
48
|
+
include Obscured::Heartbeat::Record
|
|
49
49
|
end
|
|
50
50
|
end
|
|
51
51
|
end
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
require 'active_support/concern'
|
|
4
4
|
|
|
5
|
-
module
|
|
5
|
+
module Obscured
|
|
6
6
|
module Heartbeat
|
|
7
7
|
module Tracker
|
|
8
8
|
extend ActiveSupport::Concern
|
|
9
9
|
|
|
10
10
|
class Record
|
|
11
|
-
include
|
|
11
|
+
include Obscured::Heartbeat::Record
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
# Adds heartbeat to the x_heartbeat collection for document. This is
|
data/obscured-heartbeat.gemspec
CHANGED
|
@@ -6,7 +6,7 @@ require 'obscured-heartbeat/version'
|
|
|
6
6
|
|
|
7
7
|
Gem::Specification.new do |gem|
|
|
8
8
|
gem.name = 'obscured-heartbeat'
|
|
9
|
-
gem.version =
|
|
9
|
+
gem.version = Obscured::Heartbeat::VERSION
|
|
10
10
|
gem.authors = ['Erik Hennerfors']
|
|
11
11
|
gem.email = ['erik.hennerfors@obscured.se']
|
|
12
12
|
gem.description = 'Default database heartbeat ability'
|
data/spec/host_service_spec.rb
CHANGED
|
@@ -5,10 +5,10 @@ require_relative 'helpers/host_document'
|
|
|
5
5
|
require_relative 'helpers/host_service'
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
describe
|
|
8
|
+
describe Obscured::Heartbeat::Service::Host do
|
|
9
9
|
let!(:host) { FactoryBot.create(:host) }
|
|
10
10
|
let!(:host2) { FactoryBot.create(:host, hostname: 'host2.domain.tld') }
|
|
11
|
-
let!(:service) {
|
|
11
|
+
let!(:service) { Obscured::Heartbeat::Service::Host.new }
|
|
12
12
|
let!(:template) {
|
|
13
13
|
{
|
|
14
14
|
distribution: {
|
|
@@ -5,7 +5,7 @@ require_relative 'helpers/host_document'
|
|
|
5
5
|
require_relative 'helpers/gateway_document'
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
describe
|
|
8
|
+
describe Obscured::Heartbeat::Tracker do
|
|
9
9
|
let(:host) { FactoryBot.create(:host) }
|
|
10
10
|
let(:gateway) { FactoryBot.create(:gateway) }
|
|
11
11
|
let!(:template) {
|
data/spec/tracker_single_spec.rb
CHANGED
|
@@ -4,7 +4,7 @@ require_relative 'setup'
|
|
|
4
4
|
require_relative 'helpers/host_document'
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
describe
|
|
7
|
+
describe Obscured::Heartbeat::Tracker do
|
|
8
8
|
let(:host) { FactoryBot.create(:host) }
|
|
9
9
|
let(:host2) { FactoryBot.create(:host, hostname: 'host2.domain.tld') }
|
|
10
10
|
let!(:template) {
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: obscured-heartbeat
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.4.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Erik Hennerfors
|
|
@@ -110,6 +110,7 @@ files:
|
|
|
110
110
|
- ".ruby-version"
|
|
111
111
|
- ".simplecov"
|
|
112
112
|
- ".travis.yml"
|
|
113
|
+
- CHANGELOG.md
|
|
113
114
|
- Gemfile
|
|
114
115
|
- Gemfile.lock
|
|
115
116
|
- README.md
|