salesforce_streamer 2.11.1 → 2.12.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: 780524c05e18382d33e0cb877d6ae13257607cb9ae604bb9391c1c7890349ce4
4
- data.tar.gz: 43d771153ab1d4c285e50b3cc6f7d9e724ede460e0e691ef1359e15d16734c9e
3
+ metadata.gz: 9eb88b28b430d6433cc65b3b899f05c9227531197022f60f8873acc4fa965b7e
4
+ data.tar.gz: 6b81c7a3f74e4e66f118f167661c2f3e71f00177cfaf1f810fcf0139b06d4866
5
5
  SHA512:
6
- metadata.gz: 6f9db9a5eab9014bd44002252cefa62fb753a75d7a4d95fa2f1c638b5bfd267a72315d94a7cfcc9855b27ac56de9c8432cb6755ef01f26fde5fb5c5d2162f23c
7
- data.tar.gz: 7f6e4e6626dc8f0f8cd576e38794ba28f1da0217d08db567a3f8ea9f147183e9b01113350c30f145822c2038a080642791967a098b71d5b8dcc4ed6c712637bc
6
+ metadata.gz: 0b9003968f441e27690b04711c7b01764dbaaefcbb634fab0534ea420cccba537de7a823297be13d96e184a2e1c7b3c1ceada46d3b58da8a3e084a62c196c3b2
7
+ data.tar.gz: b4ad204a8afc052001040344db98cfa33779a7022c4c81fd8646fe51cbbaf179c40e5a1d84161a4737cd26b943d0ddedd53c66377d66c50ecca6f2a23b8df800
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.5.7
1
+ 2.5.21
@@ -0,0 +1,15 @@
1
+ version: 2
2
+
3
+ updates:
4
+ - package-ecosystem: "bundler"
5
+ directory: "/"
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "08:00"
10
+ timezone: "UTC"
11
+ commit-message:
12
+ prefix: "[dependabot]"
13
+ labels:
14
+ - "automerge"
15
+ - "dependencies"
@@ -1,13 +1,14 @@
1
1
  name: Auto approve dependency upgrades and hot-fix PRs
2
2
  on:
3
3
  pull_request_target:
4
- types: [labeled, unlabeled, edited, ready_for_review, review_requested, auto_merge_enabled]
5
-
4
+ types:
5
+ - labeled
6
+ - ready_for_review
6
7
  jobs:
7
8
  auto-approve:
8
9
  runs-on: ubuntu-latest
9
10
  steps:
10
11
  - uses: hmarr/auto-approve-action@v3
11
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'dependencies')
12
+ if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev' || contains(github.event.pull_request.labels.*.name, 'HOTFIX-AUTO-APPROVE') || contains(github.event.pull_request.labels.*.name, 'self-approve') || contains(github.event.pull_request.labels.*.name, 'dependencies')
12
13
  with:
13
14
  github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -1,22 +1,31 @@
1
1
  name: automerge
2
2
  on:
3
+ pull_request_target:
4
+ types:
5
+ - labeled
3
6
  pull_request_review:
4
7
  types:
5
8
  - submitted
6
9
  check_suite:
7
10
  types:
8
11
  - completed
9
- label:
10
- types:
11
- - created
12
12
  status: {}
13
13
  jobs:
14
14
  automerge:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: automerge
18
- uses: pascalgn/automerge-action@v0.16.2
18
+ uses: pascalgn/automerge-action@v0.16.4
19
+ env:
20
+ GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
+ MERGE_METHOD: squash
22
+ MERGE_DELETE_BRANCH: true
23
+ MERGE_LABELS: "automerge,!automerge blocked"
24
+ - name: automerge-dependencies
25
+ uses: pascalgn/automerge-action@v0.16.4
19
26
  env:
20
27
  GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
28
  MERGE_METHOD: squash
22
29
  MERGE_DELETE_BRANCH: true
30
+ MERGE_LABELS: "dependencies,!automerge blocked"
31
+ MERGE_REMOVE_LABELS: ""
@@ -11,7 +11,7 @@ jobs:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: [3.1, 3.2, 3.3]
14
+ ruby-version: [3.2, 3.3]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
3
3
  Sorted so that the most recent change logs are near the top. Only significant
4
4
  changes are logged in the change log.
5
5
 
6
+ ## 2024-08-02 Krzysztof Knapik
7
+
8
+ v2.11.2 add SalesforceStreamer.logger
9
+
6
10
  ## 2024-04-05 Krzysztof Knapik
7
11
 
8
12
  v2.11 bump dependency constraints, restforce 7.3+
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- salesforce_streamer (2.11.1)
4
+ salesforce_streamer (2.12.0)
5
5
  cookiejar (~> 0.3)
6
6
  dry-initializer (~> 3.1)
7
7
  eventmachine (~> 1.2)
@@ -11,8 +11,8 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- addressable (2.8.6)
15
- public_suffix (>= 2.0.2, < 6.0)
14
+ addressable (2.8.7)
15
+ public_suffix (>= 2.0.2, < 7.0)
16
16
  ast (2.4.2)
17
17
  base64 (0.2.0)
18
18
  byebug (11.1.3)
@@ -25,16 +25,18 @@ GEM
25
25
  em-socksify (>= 0.3)
26
26
  eventmachine (>= 1.0.3)
27
27
  http_parser.rb (>= 0.6.0)
28
- em-socksify (0.3.2)
28
+ em-socksify (0.3.3)
29
+ base64
29
30
  eventmachine (>= 1.0.0.beta.4)
30
31
  eventmachine (1.2.7)
31
- faraday (2.9.0)
32
- faraday-net_http (>= 2.0, < 3.2)
32
+ faraday (2.11.0)
33
+ faraday-net_http (>= 2.0, < 3.4)
34
+ logger
33
35
  faraday-follow_redirects (0.3.0)
34
36
  faraday (>= 1, < 3)
35
37
  faraday-multipart (1.0.4)
36
38
  multipart-post (~> 2)
37
- faraday-net_http (3.1.0)
39
+ faraday-net_http (3.3.0)
38
40
  net-http
39
41
  faye (1.4.0)
40
42
  cookiejar (>= 0.3.0)
@@ -50,73 +52,63 @@ GEM
50
52
  hashie (5.0.0)
51
53
  http_parser.rb (0.8.0)
52
54
  json (2.7.2)
53
- jwt (2.8.1)
55
+ jwt (2.9.3)
54
56
  base64
55
57
  language_server-protocol (3.17.0.3)
58
+ logger (1.6.1)
56
59
  multi_json (1.15.0)
57
- multipart-post (2.4.0)
60
+ multipart-post (2.4.1)
58
61
  net-http (0.4.1)
59
62
  uri
60
- parallel (1.24.0)
61
- parser (3.3.0.5)
63
+ parallel (1.26.3)
64
+ parser (3.3.5.0)
62
65
  ast (~> 2.4.1)
63
66
  racc
64
- public_suffix (5.0.5)
65
- racc (1.7.3)
66
- rack (3.0.10)
67
+ public_suffix (6.0.1)
68
+ racc (1.8.1)
69
+ rack (3.1.8)
67
70
  rainbow (3.1.1)
68
71
  rake (13.2.1)
69
- regexp_parser (2.9.0)
70
- restforce (7.3.1)
71
- faraday (>= 1.1.0, < 2.10.0)
72
+ regexp_parser (2.9.2)
73
+ restforce (7.5.0)
74
+ faraday (>= 1.1.0, < 2.12.0)
72
75
  faraday-follow_redirects (<= 0.3.0, < 1.0.0)
73
76
  faraday-multipart (>= 1.0.0, < 2.0.0)
74
77
  faraday-net_http (< 4.0.0)
75
78
  hashie (>= 1.2.0, < 6.0)
76
79
  jwt (>= 1.5.6)
77
- rexml (3.2.6)
78
80
  rspec (3.13.0)
79
81
  rspec-core (~> 3.13.0)
80
82
  rspec-expectations (~> 3.13.0)
81
83
  rspec-mocks (~> 3.13.0)
82
- rspec-core (3.13.0)
84
+ rspec-core (3.13.1)
83
85
  rspec-support (~> 3.13.0)
84
- rspec-expectations (3.13.0)
86
+ rspec-expectations (3.13.3)
85
87
  diff-lcs (>= 1.2.0, < 2.0)
86
88
  rspec-support (~> 3.13.0)
87
- rspec-mocks (3.13.0)
89
+ rspec-mocks (3.13.2)
88
90
  diff-lcs (>= 1.2.0, < 2.0)
89
91
  rspec-support (~> 3.13.0)
90
92
  rspec-support (3.13.1)
91
- rubocop (1.63.0)
93
+ rubocop (1.67.0)
92
94
  json (~> 2.3)
93
95
  language_server-protocol (>= 3.17.0)
94
96
  parallel (~> 1.10)
95
97
  parser (>= 3.3.0.2)
96
98
  rainbow (>= 2.2.2, < 4.0)
97
- regexp_parser (>= 1.8, < 3.0)
98
- rexml (>= 3.2.5, < 4.0)
99
- rubocop-ast (>= 1.31.1, < 2.0)
99
+ regexp_parser (>= 2.4, < 3.0)
100
+ rubocop-ast (>= 1.32.2, < 2.0)
100
101
  ruby-progressbar (~> 1.7)
101
102
  unicode-display_width (>= 2.4.0, < 3.0)
102
- rubocop-ast (1.31.2)
103
- parser (>= 3.3.0.4)
104
- rubocop-capybara (2.20.0)
105
- rubocop (~> 1.41)
106
- rubocop-factory_bot (2.25.1)
107
- rubocop (~> 1.41)
103
+ rubocop-ast (1.32.3)
104
+ parser (>= 3.3.1.0)
108
105
  rubocop-rake (0.6.0)
109
106
  rubocop (~> 1.0)
110
- rubocop-rspec (2.29.1)
111
- rubocop (~> 1.40)
112
- rubocop-capybara (~> 2.17)
113
- rubocop-factory_bot (~> 2.22)
114
- rubocop-rspec_rails (~> 2.28)
115
- rubocop-rspec_rails (2.28.2)
116
- rubocop (~> 1.40)
107
+ rubocop-rspec (3.1.0)
108
+ rubocop (~> 1.61)
117
109
  ruby-progressbar (1.13.0)
118
- unicode-display_width (2.5.0)
119
- uri (0.13.0)
110
+ unicode-display_width (2.6.0)
111
+ uri (0.13.1)
120
112
  websocket-driver (0.7.6)
121
113
  websocket-extensions (>= 0.1.0)
122
114
  websocket-extensions (0.1.5)
@@ -134,4 +126,4 @@ DEPENDENCIES
134
126
  salesforce_streamer!
135
127
 
136
128
  BUNDLED WITH
137
- 2.5.7
129
+ 2.5.16
@@ -8,7 +8,7 @@ module SalesforceStreamer
8
8
  option :name
9
9
  option :query, ->(v) { v.gsub(/\s+/, ' ') }
10
10
  option :handler, ->(v) { prepare_handler_proc(Object.const_get(v)) }
11
- option :replay, ->(v) { v.to_i }, default: -> { -1 }
11
+ option :replay, lambda(&:to_i), default: -> { -1 }
12
12
  option :api_version, proc(&:to_s), default: -> { DEFAULT_API_VERSION }
13
13
  option :notify_for_fields, default: -> { 'Referenced' }
14
14
  option :id, optional: true
@@ -18,6 +18,8 @@ module SalesforceStreamer
18
18
 
19
19
  def handle(message)
20
20
  message['topic'] = @name
21
+ message['hostname'] = ENV['HOSTNAME']
22
+ message['k8s_pod_name'] = ENV['K8S_POD_NAME']
21
23
  message_middleware.call(message)
22
24
  rescue StandardError => e
23
25
  Log.error e
@@ -55,7 +57,7 @@ module SalesforceStreamer
55
57
  if constant.respond_to? :call
56
58
  constant
57
59
  elsif constant.respond_to? :perform_async
58
- proc { |message| constant.perform_async message }
60
+ proc { |message| constant.perform_async(message) }
59
61
  else
60
62
  fail(UnprocessableHandlerError, constant)
61
63
  end
@@ -1,3 +1,3 @@
1
1
  module SalesforceStreamer
2
- VERSION = '2.11.1'.freeze
2
+ VERSION = '2.12.0'.freeze
3
3
  end
@@ -59,6 +59,10 @@ module SalesforceStreamer
59
59
  Configuration.instance
60
60
  end
61
61
 
62
+ def self.logger
63
+ config.logger
64
+ end
65
+
62
66
  def self.configure
63
67
  yield Configuration.instance
64
68
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
25
25
  spec.require_paths = ['lib']
26
26
 
27
- spec.required_ruby_version = Gem::Requirement.new('>= 3.1.0')
27
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.2.0')
28
28
 
29
29
  spec.add_dependency 'cookiejar', '~> 0.3'
30
30
  spec.add_dependency 'dry-initializer', '~> 3.1'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salesforce_streamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.1
4
+ version: 2.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Serok
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2024-04-10 00:00:00.000000000 Z
12
+ date: 2024-10-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cookiejar
@@ -96,6 +96,7 @@ files:
96
96
  - ".github/ISSUE_TEMPLATE/config.yml"
97
97
  - ".github/ISSUE_TEMPLATE/story.md"
98
98
  - ".github/PULL_REQUEST_TEMPLATE.md"
99
+ - ".github/dependabot.yml"
99
100
  - ".github/workflows/auto-approve.yml"
100
101
  - ".github/workflows/auto-merge.yml"
101
102
  - ".github/workflows/ci.yml"
@@ -138,14 +139,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
138
139
  requirements:
139
140
  - - ">="
140
141
  - !ruby/object:Gem::Version
141
- version: 3.1.0
142
+ version: 3.2.0
142
143
  required_rubygems_version: !ruby/object:Gem::Requirement
143
144
  requirements:
144
145
  - - ">="
145
146
  - !ruby/object:Gem::Version
146
147
  version: '0'
147
148
  requirements: []
148
- rubygems_version: 3.5.7
149
+ rubygems_version: 3.5.21
149
150
  signing_key:
150
151
  specification_version: 4
151
152
  summary: A wrapper around the Restforce Streaming API with a built-in PushTopic manager.