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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9461ef05c0846aa122ef660a4d7130c70d757bd772eb7cb865d8e6bdc0aa3168
4
- data.tar.gz: de060727420cb774bc5b4607592a8885fc0dadf4cce3405434faf2f4100245dd
3
+ metadata.gz: 8b3cb1e70cb66ff56cc1aefe94a48a1851a60151c71480da83ea11a983b5fe31
4
+ data.tar.gz: dce442ef03e2b5e08241f368974119433cdf0a6ab1799e12de25410b4b4f2dcc
5
5
  SHA512:
6
- metadata.gz: 9c35f8db94a19543d91cf9cb2085a33edf0bc82eb7707548c2cd4b6583b6f17ddacb585f7dc245e4187adf3fa72160bc095faf01ca8dc83add803b7274a4f7ce
7
- data.tar.gz: 43b1774680820638bedde2d6f515acf9eb1c5bd82ac458089a1144986cc0f3afe5d130beb890e18e6744302b7b68f5e696a3f4c259657a85e9fa9165b4c5b8ea
6
+ metadata.gz: 8ec9dfedebc14bcfb11096c297f02c280bd4cd0a085ce5e38cdf8b2009ecd64eec627ef432d1d2274fd1a5178b671207cd115aa5e615c848e012117b83089c82
7
+ data.tar.gz: 52215395e9ea37bcd5a7c57b4da34f33827bd0f57fb123494fdbde93cb29f087156baf600e54927c57e04125b71150d06121685b1dba9449708d91ae371c179c
@@ -1,30 +1,41 @@
1
- name: Ruby Gem
1
+ name: Publish
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ master ]
6
- pull_request:
7
- branches: [ master ]
5
+ branches:
6
+ - master
8
7
 
9
8
  jobs:
10
- build:
11
- name: Build + Publish
9
+ publish:
12
10
  runs-on: ubuntu-latest
13
-
14
11
  steps:
15
- - uses: actions/checkout@v2
16
- - name: Set up Ruby 2.7
17
- uses: actions/setup-ruby@v1
18
- with:
19
- ruby-version: 2.7.x
20
-
21
- - name: Publish to RubyGems
22
- run: |
23
- mkdir -p $HOME/.gem
24
- touch $HOME/.gem/credentials
25
- chmod 0600 $HOME/.gem/credentials
26
- printf -- "---\n:rubygems_api_key: ${RUBYGEMS_AUTH_TOKEN}\n" > $HOME/.gem/credentials
27
- gem build *.gemspec
28
- gem push *.gem
29
- env:
30
- RUBYGEMS_AUTH_TOKEN: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
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.0.0)
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.4)
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.9)
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.2.1)
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.0)
42
+ rspec-core (3.10.1)
43
43
  rspec-support (~> 3.10.0)
44
- rspec-expectations (3.10.0)
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.0)
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.0)
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.1.2
72
+ 2.2.17
data/README.md CHANGED
@@ -1,3 +1,4 @@
1
+ [![Gem Version](https://badge.fury.io/rb/obscured-heartbeat.svg)](https://badge.fury.io/rb/obscured-heartbeat)
1
2
  [![Vulnerabilities](https://snyk.io/test/github/gonace/obscured.heartbeat/badge.svg)](https://snyk.io/test/github/gonace/obscured.heartbeat)
2
3
  [![Build Status](https://travis-ci.org/gonace/Obscured.Heartbeat.svg?branch=master)](https://travis-ci.org/gonace/Obscured.Heartbeat)
3
4
  [![Test Coverage](https://codeclimate.com/github/gonace/Obscured.Heartbeat/badges/coverage.svg)](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', :git => 'https://github.com/gonace/Obscured.Heartbeat.git', :branch => 'master'
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
+ ```
@@ -12,7 +12,7 @@ require 'obscured-heartbeat/record'
12
12
  require 'obscured-heartbeat/service'
13
13
  require 'obscured-heartbeat/tracker'
14
14
 
15
- module Mongoid
15
+ module Obscured
16
16
  module Heartbeat
17
17
  end
18
18
  end
@@ -3,7 +3,7 @@
3
3
  require 'mongoid'
4
4
  require 'mongoid_search'
5
5
 
6
- module Mongoid
6
+ module Obscured
7
7
  module Heartbeat
8
8
  module Record
9
9
  extend ActiveSupport::Concern
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Mongoid
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 Mongoid::Heartbeat::Record
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 Mongoid
5
+ module Obscured
6
6
  module Heartbeat
7
7
  module Tracker
8
8
  extend ActiveSupport::Concern
9
9
 
10
10
  class Record
11
- include Mongoid::Heartbeat::Record
11
+ include Obscured::Heartbeat::Record
12
12
  end
13
13
 
14
14
  # Adds heartbeat to the x_heartbeat collection for document. This is
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Mongoid
3
+ module Obscured
4
4
  module Heartbeat
5
- VERSION = '1.0.1'
5
+ VERSION = '1.4.0'.freeze
6
6
  end
7
7
  end
@@ -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 = Mongoid::Heartbeat::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'
@@ -3,7 +3,7 @@
3
3
  require_relative '../../lib/obscured-heartbeat/record'
4
4
 
5
5
  FactoryBot.define do
6
- factory :heartbeat, class: Mongoid::Heartbeat::Record do
6
+ factory :heartbeat, class: Obscured::Heartbeat::Record do
7
7
  distribution {
8
8
  {
9
9
  name: 'Ubuntu',
@@ -4,7 +4,7 @@ module Obscured
4
4
  class Gateway
5
5
  include Mongoid::Document
6
6
  include Mongoid::Timestamps
7
- include Mongoid::Heartbeat::Tracker
7
+ include Obscured::Heartbeat::Tracker
8
8
 
9
9
  store_in collection: 'gateways'
10
10
 
@@ -4,7 +4,7 @@ module Obscured
4
4
  class Host
5
5
  include Mongoid::Document
6
6
  include Mongoid::Timestamps
7
- include Mongoid::Heartbeat::Tracker
7
+ include Obscured::Heartbeat::Tracker
8
8
 
9
9
  store_in collection: 'hosts'
10
10
 
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Mongoid
3
+ module Obscured
4
4
  module Heartbeat
5
5
  module Service
6
6
  class Host
7
- include Mongoid::Heartbeat::Service::Base
7
+ include Obscured::Heartbeat::Service::Base
8
8
  end
9
9
  end
10
10
  end
@@ -5,10 +5,10 @@ require_relative 'helpers/host_document'
5
5
  require_relative 'helpers/host_service'
6
6
 
7
7
 
8
- describe Mongoid::Heartbeat::Service::Host do
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) { Mongoid::Heartbeat::Service::Host.new }
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 Mongoid::Heartbeat::Tracker do
8
+ describe Obscured::Heartbeat::Tracker do
9
9
  let(:host) { FactoryBot.create(:host) }
10
10
  let(:gateway) { FactoryBot.create(:gateway) }
11
11
  let!(:template) {
@@ -4,7 +4,7 @@ require_relative 'setup'
4
4
  require_relative 'helpers/host_document'
5
5
 
6
6
 
7
- describe Mongoid::Heartbeat::Tracker do
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.1
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