salesforce_streamer 2.8.0 → 2.10.0

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: 1d6ae7e694530c826f92d21697ecdecfa669d4cffb9dbe373532d204356e9d8a
4
- data.tar.gz: 42e5de80a42463d164f58a90474911d9c06ec60c04f99415a5d649ea82554090
3
+ metadata.gz: 2224158723e61b1fe1d6f7db83facc9b4e25c313f53dfae84144fd169bdcad2b
4
+ data.tar.gz: ae91ed3fc8aec6b472c04b082a51fd0fbfb9d6792310d89bfd39708dcaec811f
5
5
  SHA512:
6
- metadata.gz: ee7ca51c256e077f42ed010e5286a05353a6be4f39298d6d6f3cf1b198aa65d31e4594c72302d308e5748211beab5221d05c348f59f997f69bf36af3ee96c0ee
7
- data.tar.gz: b698338a1f1c3161bdfb7ad9a70840b8ae45c85efb8cfcf70c77732a86158ff89e1e2a040b9f7fc2dc55a8ece15706270d6b9f673dc8df50f84e4cc14222f6c2
6
+ metadata.gz: 31f95b291a0a8ebd4caf2437afa8f7ec49722e64c80a7682254bd04617abb815986f1bc04f3353493552ae9f0abcc9366e97e6e97935c8c9972fc169fc01b8b3
7
+ data.tar.gz: c992608b2053c88e89e98f8f8565fd3136c92b7df55f03e811f32994f418bf624098cc962390c41ef66df589d8affde044a7d64da629ee2686b826bedd8a6f66
data/.bundler-version CHANGED
@@ -1 +1 @@
1
- 2.4.5
1
+ 2.5.6
@@ -1,19 +1,15 @@
1
- version: 1
1
+ version: 2
2
2
 
3
- update_configs:
4
- - package_manager: "ruby:bundler"
3
+ updates:
4
+ - package-ecosystem: "bundler"
5
5
  directory: "/"
6
- update_schedule: "daily"
7
- commit_message:
6
+ schedule:
7
+ interval: "weekly"
8
+ day: "monday"
9
+ time: "08:00"
10
+ timezone: "UTC"
11
+ commit-message:
8
12
  prefix: "[dependabot]"
9
- allowed_updates:
10
- - match:
11
- dependency_type: "all"
12
- update_type: "security"
13
- automerged_updates:
14
- - match:
15
- dependency_type: "all"
16
- update_type: "security:patch"
17
13
  labels:
18
14
  - "automerge"
19
15
  - "dependencies"
@@ -1,14 +1,13 @@
1
- # automatically approve PRs submitted by Dependabot or Renofidev
2
- # this will allow Dependabot to automatically merge dependency update PRs where CI passes
3
- # from: https://github.com/hmarr/auto-approve-action
4
- name: Auto approve dependency upgrades PRs
5
- on: pull_request_target
1
+ name: Auto approve dependency upgrades and hot-fix PRs
2
+ on:
3
+ pull_request_target:
4
+ types: [labeled, unlabeled, edited, ready_for_review, review_requested, auto_merge_enabled]
6
5
 
7
6
  jobs:
8
7
  auto-approve:
9
8
  runs-on: ubuntu-latest
10
9
  steps:
11
- - uses: hmarr/auto-approve-action@v2
12
- if: github.actor == 'dependabot[bot]' || github.actor == 'dependabot-preview[bot]' || github.actor == 'renofidev'
13
- with:
14
- github-token: "${{ secrets.GITHUB_TOKEN }}"
10
+ - 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
+ with:
13
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
@@ -15,10 +15,10 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: automerge-dependencies
18
- uses: pascalgn/automerge-action@v0.15.5
18
+ uses: pascalgn/automerge-action@v0.16.2
19
19
  env:
20
20
  GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
21
  MERGE_METHOD: squash
22
22
  MERGE_DELETE_BRANCH: true
23
- MERGE_LABELS: dependencies
23
+ MERGE_LABELS: "dependencies,!automerge blocked"
24
24
  MERGE_REMOVE_LABELS: ""
@@ -15,7 +15,7 @@ jobs:
15
15
  runs-on: ubuntu-latest
16
16
  steps:
17
17
  - name: automerge
18
- uses: pascalgn/automerge-action@v0.15.5
18
+ uses: pascalgn/automerge-action@v0.16.2
19
19
  env:
20
20
  GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
21
21
  MERGE_METHOD: squash
@@ -7,11 +7,11 @@ on:
7
7
  branches: [ main ]
8
8
 
9
9
  jobs:
10
- test:
10
+ ci_tests_ruby:
11
11
  runs-on: ubuntu-latest
12
12
  strategy:
13
13
  matrix:
14
- ruby-version: ['3.0', 3.1]
14
+ ruby-version: [3.1, 3.2]
15
15
 
16
16
  steps:
17
17
  - uses: actions/checkout@v3
data/CHANGELOG.md CHANGED
@@ -3,6 +3,14 @@
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-02-29 Krzysztof Knapik
7
+
8
+ v2.10 Drop ruby 3.0 and add ruby 3.3 support
9
+
10
+ ## 2023-07-26 Krzysztof Knapik
11
+
12
+ v2.9 take default api version from `SALESFORCE_API_VERSION` env var
13
+
6
14
  ## 2023-02-14 Krzysztof Knapik
7
15
 
8
16
  v2.8 bump dependency constraints, restforce 6.2+
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- salesforce_streamer (2.8.0)
4
+ salesforce_streamer (2.10.0)
5
5
  cookiejar (~> 0.3)
6
6
  dry-initializer (~> 3.1)
7
7
  eventmachine (~> 1.2)
@@ -11,14 +11,15 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- addressable (2.8.1)
14
+ addressable (2.8.6)
15
15
  public_suffix (>= 2.0.2, < 6.0)
16
16
  ast (2.4.2)
17
+ base64 (0.2.0)
17
18
  byebug (11.1.3)
18
19
  codecov (0.6.0)
19
20
  simplecov (>= 0.15, < 0.22)
20
- cookiejar (0.3.3)
21
- diff-lcs (1.5.0)
21
+ cookiejar (0.3.4)
22
+ diff-lcs (1.5.1)
22
23
  docile (1.4.0)
23
24
  dry-initializer (3.1.1)
24
25
  em-http-request (1.1.7)
@@ -30,14 +31,14 @@ GEM
30
31
  em-socksify (0.3.2)
31
32
  eventmachine (>= 1.0.0.beta.4)
32
33
  eventmachine (1.2.7)
33
- faraday (2.7.4)
34
- faraday-net_http (>= 2.0, < 3.1)
34
+ faraday (2.0.0)
35
35
  ruby2_keywords (>= 0.0.4)
36
36
  faraday-follow_redirects (0.3.0)
37
37
  faraday (>= 1, < 3)
38
38
  faraday-multipart (1.0.4)
39
39
  multipart-post (~> 2)
40
- faraday-net_http (3.0.2)
40
+ faraday-net_http (3.1.0)
41
+ net-http
41
42
  faye (1.4.0)
42
43
  cookiejar (>= 0.3.0)
43
44
  em-http-request (>= 1.1.6)
@@ -46,64 +47,76 @@ GEM
46
47
  multi_json (>= 1.0.0)
47
48
  rack (>= 1.0.0)
48
49
  websocket-driver (>= 0.5.1)
49
- faye-websocket (0.11.1)
50
+ faye-websocket (0.11.3)
50
51
  eventmachine (>= 0.12.0)
51
52
  websocket-driver (>= 0.5.1)
52
53
  hashie (5.0.0)
53
54
  http_parser.rb (0.8.0)
54
- json (2.6.3)
55
- jwt (2.7.0)
55
+ json (2.7.1)
56
+ jwt (2.8.1)
57
+ base64
58
+ language_server-protocol (3.17.0.3)
56
59
  multi_json (1.15.0)
57
- multipart-post (2.3.0)
58
- parallel (1.22.1)
59
- parser (3.2.1.0)
60
+ multipart-post (2.4.0)
61
+ net-http (0.4.1)
62
+ uri
63
+ parallel (1.24.0)
64
+ parser (3.3.0.5)
60
65
  ast (~> 2.4.1)
61
- public_suffix (5.0.1)
62
- rack (3.0.4.1)
66
+ racc
67
+ prism (0.24.0)
68
+ public_suffix (5.0.4)
69
+ racc (1.7.3)
70
+ rack (3.0.9.1)
63
71
  rainbow (3.1.1)
64
- rake (13.0.6)
65
- regexp_parser (2.7.0)
66
- restforce (6.2.1)
72
+ rake (13.1.0)
73
+ regexp_parser (2.9.0)
74
+ restforce (6.2.4)
67
75
  faraday (>= 1.1.0, < 2.8.0)
68
76
  faraday-follow_redirects (<= 0.3.0, < 1.0.0)
69
77
  faraday-multipart (>= 1.0.0, < 2.0.0)
70
78
  faraday-net_http (< 4.0.0)
71
79
  hashie (>= 1.2.0, < 6.0)
72
80
  jwt (>= 1.5.6)
73
- rexml (3.2.5)
74
- rspec (3.12.0)
75
- rspec-core (~> 3.12.0)
76
- rspec-expectations (~> 3.12.0)
77
- rspec-mocks (~> 3.12.0)
78
- rspec-core (3.12.1)
79
- rspec-support (~> 3.12.0)
80
- rspec-expectations (3.12.2)
81
+ rexml (3.2.6)
82
+ rspec (3.13.0)
83
+ rspec-core (~> 3.13.0)
84
+ rspec-expectations (~> 3.13.0)
85
+ rspec-mocks (~> 3.13.0)
86
+ rspec-core (3.13.0)
87
+ rspec-support (~> 3.13.0)
88
+ rspec-expectations (3.13.0)
81
89
  diff-lcs (>= 1.2.0, < 2.0)
82
- rspec-support (~> 3.12.0)
83
- rspec-mocks (3.12.3)
90
+ rspec-support (~> 3.13.0)
91
+ rspec-mocks (3.13.0)
84
92
  diff-lcs (>= 1.2.0, < 2.0)
85
- rspec-support (~> 3.12.0)
86
- rspec-support (3.12.0)
87
- rubocop (1.45.1)
93
+ rspec-support (~> 3.13.0)
94
+ rspec-support (3.13.1)
95
+ rubocop (1.61.0)
88
96
  json (~> 2.3)
97
+ language_server-protocol (>= 3.17.0)
89
98
  parallel (~> 1.10)
90
- parser (>= 3.2.0.0)
99
+ parser (>= 3.3.0.2)
91
100
  rainbow (>= 2.2.2, < 4.0)
92
101
  regexp_parser (>= 1.8, < 3.0)
93
102
  rexml (>= 3.2.5, < 4.0)
94
- rubocop-ast (>= 1.24.1, < 2.0)
103
+ rubocop-ast (>= 1.30.0, < 2.0)
95
104
  ruby-progressbar (~> 1.7)
96
105
  unicode-display_width (>= 2.4.0, < 3.0)
97
- rubocop-ast (1.26.0)
98
- parser (>= 3.2.1.0)
99
- rubocop-capybara (2.17.0)
106
+ rubocop-ast (1.31.0)
107
+ parser (>= 3.3.0.4)
108
+ prism (>= 0.24.0)
109
+ rubocop-capybara (2.20.0)
110
+ rubocop (~> 1.41)
111
+ rubocop-factory_bot (2.25.1)
100
112
  rubocop (~> 1.41)
101
113
  rubocop-rake (0.6.0)
102
114
  rubocop (~> 1.0)
103
- rubocop-rspec (2.18.1)
104
- rubocop (~> 1.33)
115
+ rubocop-rspec (2.26.1)
116
+ rubocop (~> 1.40)
105
117
  rubocop-capybara (~> 2.17)
106
- ruby-progressbar (1.11.0)
118
+ rubocop-factory_bot (~> 2.22)
119
+ ruby-progressbar (1.13.0)
107
120
  ruby2_keywords (0.0.5)
108
121
  simplecov (0.21.2)
109
122
  docile (~> 1.1)
@@ -111,8 +124,9 @@ GEM
111
124
  simplecov_json_formatter (~> 0.1)
112
125
  simplecov-html (0.12.3)
113
126
  simplecov_json_formatter (0.1.4)
114
- unicode-display_width (2.4.2)
115
- websocket-driver (0.7.5)
127
+ unicode-display_width (2.5.0)
128
+ uri (0.13.0)
129
+ websocket-driver (0.7.6)
116
130
  websocket-extensions (>= 0.1.0)
117
131
  websocket-extensions (0.1.5)
118
132
 
@@ -130,4 +144,4 @@ DEPENDENCIES
130
144
  salesforce_streamer!
131
145
 
132
146
  BUNDLED WITH
133
- 2.3.26
147
+ 2.5.6
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 RenoFi Engineering Team
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -54,7 +54,7 @@ module SalesforceStreamer
54
54
  def push_topic_data
55
55
  return @push_topic_data if @push_topic_data
56
56
 
57
- data = YAML.safe_load(File.read(config_file), aliases: true)
57
+ data = YAML.safe_load_file(config_file, aliases: true)
58
58
  @push_topic_data = data[environment.to_s]
59
59
  end
60
60
 
@@ -3,31 +3,31 @@ module SalesforceStreamer
3
3
 
4
4
  class MissingCLIFlagError < StandardError
5
5
  def initialize(flag)
6
- super "Missing required command line flag: #{flag}"
6
+ super("Missing required command line flag: #{flag}")
7
7
  end
8
8
  end
9
9
 
10
10
  class NilQueryError < StandardError
11
11
  def initialize(name)
12
- super "Query not defined for #{name}"
12
+ super("Query not defined for #{name}")
13
13
  end
14
14
  end
15
15
 
16
16
  class PushTopicHandlerMissingError < StandardError
17
17
  def initialize(message)
18
- super "Unable to load constant #{message}."
18
+ super("Unable to load constant #{message}.")
19
19
  end
20
20
  end
21
21
 
22
22
  class PushTopicNameTooLongError < StandardError
23
23
  def initialize(name)
24
- super "PushTopic name: #{name} (#{name.size}/25)"
24
+ super("PushTopic name: #{name} (#{name.size}/25)")
25
25
  end
26
26
  end
27
27
 
28
28
  class UnprocessableHandlerError < StandardError
29
29
  def initialize(constant)
30
- super "#{constant} does not repond to .call or .perform_async"
30
+ super("#{constant} does not repond to .call or .perform_async")
31
31
  end
32
32
  end
33
33
  end
@@ -3,11 +3,13 @@ module SalesforceStreamer
3
3
  class PushTopic
4
4
  extend Dry::Initializer
5
5
 
6
+ DEFAULT_API_VERSION = ENV.fetch('SALESFORCE_API_VERSION', '58.0')
7
+
6
8
  option :name
7
9
  option :query, ->(v) { v.gsub(/\s+/, ' ') }
8
10
  option :handler, ->(v) { prepare_handler_proc(Object.const_get(v)) }
9
11
  option :replay, ->(v) { v.to_i }, default: -> { -1 }
10
- option :api_version, proc(&:to_s), default: -> { '49.0' }
12
+ option :api_version, proc(&:to_s), default: -> { DEFAULT_API_VERSION }
11
13
  option :notify_for_fields, default: -> { 'Referenced' }
12
14
  option :id, optional: true
13
15
  option :description, optional: true
@@ -8,8 +8,8 @@ module SalesforceStreamer
8
8
  @client.authenticate!
9
9
  end
10
10
 
11
- def subscribe(*args, &block)
12
- @client.subscribe(args, &block)
11
+ def subscribe(*args, &)
12
+ @client.subscribe(args, &)
13
13
  end
14
14
 
15
15
  # Returns nil or an instance of Restforce::SObject
@@ -1,3 +1,3 @@
1
1
  module SalesforceStreamer
2
- VERSION = '2.8.0'.freeze
2
+ VERSION = '2.10.0'.freeze
3
3
  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 = '>= 3.0'
27
+ spec.required_ruby_version = Gem::Requirement.new('>= 3.1.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.8.0
4
+ version: 2.10.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: 2023-02-14 00:00:00.000000000 Z
12
+ date: 2024-02-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cookiejar
@@ -105,6 +105,7 @@ files:
105
105
  - CHANGELOG.md
106
106
  - Gemfile
107
107
  - Gemfile.lock
108
+ - LICENSE
108
109
  - README.md
109
110
  - Rakefile
110
111
  - exe/streamer
@@ -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.0'
142
+ version: 3.1.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.4.6
149
+ rubygems_version: 3.5.3
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.