pub_sub_model_sync 1.7.0 → 1.7.1
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dbf0fae81e981722c2a5dc1023dc3db9c369cfcdc5558ef727e59b1d6c87a8a
|
4
|
+
data.tar.gz: 340032eb2b9d47de47aa4e57c3db389c5571280df75a92fee96b52de2cc8c19e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f65eac76d6e247c89d863f75476539bf75324b12c510bdce2eaedc9667168381df82a39f3a2ee24c6da1c39b447159981512d9c744233b835c7000a95b514ac1
|
7
|
+
data.tar.gz: 1e549a6a809ecb162eaf6c4101a9a379f2ea2a1cccacb975854de02c1ddf928a54a05b9c432cdd26ac31863fcf5cffbefaa3baf0753f4301054fc509167d3316
|
@@ -1,43 +1,11 @@
|
|
1
|
+
name: Create release from tag
|
1
2
|
on:
|
2
3
|
push:
|
3
|
-
tags: #
|
4
|
+
tags: # Create a release once a git tag is published
|
4
5
|
- '*'
|
5
6
|
|
6
|
-
name: Create Release
|
7
|
-
|
8
7
|
jobs:
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
- name: Checkout code
|
14
|
-
uses: actions/checkout@v2
|
15
|
-
with:
|
16
|
-
fetch-depth: 0
|
17
|
-
|
18
|
-
# Changelog action adaptations
|
19
|
-
- name: Create required package.json
|
20
|
-
run: test -f package.json || echo '{}' >package.json
|
21
|
-
- name: Detect Previous Tag (action not detecting very well)
|
22
|
-
run: echo "::set-output name=previous_tag::$(git describe --abbrev=0 --tags `git rev-list --tags --skip=1 --max-count=1`)"
|
23
|
-
id: tag_checker
|
24
|
-
|
25
|
-
- name: Generate Changelog
|
26
|
-
uses: scottbrenner/generate-changelog-action@master
|
27
|
-
id: Changelog
|
28
|
-
with:
|
29
|
-
from-tag: ${{steps.tag_checker.outputs.previous_tag}}
|
30
|
-
to-tag: HEAD
|
31
|
-
|
32
|
-
- name: Create Release
|
33
|
-
id: create_release
|
34
|
-
uses: actions/create-release@latest
|
35
|
-
env:
|
36
|
-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
|
37
|
-
with:
|
38
|
-
tag_name: ${{ github.ref }}
|
39
|
-
release_name: Release ${{ github.ref }}
|
40
|
-
body: |
|
41
|
-
${{ steps.Changelog.outputs.changelog }}
|
42
|
-
draft: false
|
43
|
-
prerelease: false
|
8
|
+
release-builder:
|
9
|
+
uses: owen2345/reusable-ci-cd-actions/.github/workflows/release_builder_from_tag.yml@main
|
10
|
+
with:
|
11
|
+
commit_mode: true # If true, then fetches all commit titles from all changes. If false, then fetches only the PR titles from all changes.
|
data/Gemfile.lock
CHANGED
@@ -21,12 +21,14 @@ module PubSubModelSync
|
|
21
21
|
log("No subscribers found for #{payload_info}", :warn) if config.debug && subscribers.empty?
|
22
22
|
subscribers.each(&method(:run_subscriber))
|
23
23
|
rescue => e
|
24
|
-
|
24
|
+
print_error(e)
|
25
25
|
raise
|
26
26
|
end
|
27
27
|
|
28
28
|
def process
|
29
|
-
process!
|
29
|
+
process!
|
30
|
+
rescue => e
|
31
|
+
config.on_error_processing.call(e, { payload: payload })
|
30
32
|
end
|
31
33
|
|
32
34
|
private
|
@@ -51,14 +53,10 @@ module PubSubModelSync
|
|
51
53
|
end
|
52
54
|
|
53
55
|
# @param error (StandardError, Exception)
|
54
|
-
def
|
55
|
-
error_msg = 'Error processing message:
|
56
|
+
def print_error(error)
|
57
|
+
error_msg = 'Error processing message:'
|
56
58
|
error_details = [payload, error.message, error.backtrace]
|
57
|
-
res = config.on_error_processing.call(error, { payload: payload })
|
58
|
-
log("#{error_msg} #{error_details}", :error) if res != :skip_log
|
59
|
-
rescue => e
|
60
59
|
log("#{error_msg} #{error_details}", :error)
|
61
|
-
raise(e)
|
62
60
|
end
|
63
61
|
|
64
62
|
# @param error [StandardError]
|
@@ -81,14 +81,16 @@ module PubSubModelSync
|
|
81
81
|
block&.call
|
82
82
|
payload
|
83
83
|
rescue => e
|
84
|
-
|
84
|
+
print_error(e, payload)
|
85
85
|
raise
|
86
86
|
end
|
87
87
|
|
88
88
|
# Similar to :publish! method but ignores the error if failed
|
89
89
|
# @return Payload
|
90
90
|
def publish(payload, &block)
|
91
|
-
publish!(payload, &block)
|
91
|
+
publish!(payload, &block)
|
92
|
+
rescue => e
|
93
|
+
config.on_error_publish.call(e, { payload: payload })
|
92
94
|
end
|
93
95
|
|
94
96
|
def connector_publish(payload)
|
@@ -124,10 +126,11 @@ module PubSubModelSync
|
|
124
126
|
!cancelled
|
125
127
|
end
|
126
128
|
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
129
|
+
# @param error (StandardError, Exception)
|
130
|
+
def print_error(error, payload)
|
131
|
+
error_msg = 'Error publishing:'
|
132
|
+
error_details = [payload, error.message, error.backtrace]
|
133
|
+
log("#{error_msg} #{error_details}", :error)
|
131
134
|
end
|
132
135
|
|
133
136
|
def define_transaction_key(payload)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pub_sub_model_sync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Owen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|