pub_sub_model_sync 1.7.0 → 1.7.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d12a6ec76834fc6254b81fdfb02f2fce4515b3cd388255a9dd0738983c5d6bfb
4
- data.tar.gz: 9e75e804660fdf8c5d572fe7498e6e11a72a8ccd35f55ec2c006e308da9d9733
3
+ metadata.gz: 4dbf0fae81e981722c2a5dc1023dc3db9c369cfcdc5558ef727e59b1d6c87a8a
4
+ data.tar.gz: 340032eb2b9d47de47aa4e57c3db389c5571280df75a92fee96b52de2cc8c19e
5
5
  SHA512:
6
- metadata.gz: cdec845c99322bf054087336aab30ce13aebab93b1c498ca099df5c74e86c0a40be3edf96b0af2762aaafa5eada55cf8ef004890edc28bbf04518d53fcd6796b
7
- data.tar.gz: 179990f6e198177919394d100052c923d12a8553fe04c6fc5c6e06655bfb2b852d717494878e2beebda82e37e57de0320a3e3dd5393bca030cc130db518bf392
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: # triggered once a git tag is published
4
+ tags: # Create a release once a git tag is published
4
5
  - '*'
5
6
 
6
- name: Create Release
7
-
8
7
  jobs:
9
- build:
10
- name: Create Release
11
- runs-on: ubuntu-latest
12
- steps:
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- pub_sub_model_sync (1.6.4)
4
+ pub_sub_model_sync (1.7.0)
5
5
  rails
6
6
 
7
7
  GEM
@@ -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
- notify_error(e)
24
+ print_error(e)
25
25
  raise
26
26
  end
27
27
 
28
28
  def process
29
- process! rescue nil # rubocop:disable Style/RescueModifier
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 notify_error(error)
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
- notify_error(e, payload)
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) rescue nil # rubocop:disable Style/RescueModifier
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
- def notify_error(exception, payload)
128
- info = [payload, exception.message, exception.backtrace]
129
- res = config.on_error_publish.call(exception, { payload: payload })
130
- log("Error publishing: #{info}", :error) if res != :skip_log
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)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PubSubModelSync
4
- VERSION = '1.7.0'
4
+ VERSION = '1.7.1'
5
5
  end
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.0
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-02 00:00:00.000000000 Z
11
+ date: 2022-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails