salesforce_streamer 1.1.0 → 1.1.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: '09ad08aaa928aa7a44918219c0e55e6b5fb2c8633655c6a641ffecb233b6c298'
4
- data.tar.gz: 79d364e45937c5d2333d98461a1ff891931a1663a5946973d3a4ea8985ff5067
3
+ metadata.gz: f626431375e34ca6523e657667bcf1121589bc801925608a91df81f5a052b916
4
+ data.tar.gz: 9c53ea7736694cb86d992fcbb81f5660321b8917f81deaa723f3b0d921ed3e1c
5
5
  SHA512:
6
- metadata.gz: 39bf85e6f4e04c21b93fc9ebeb82435a5fb745543f8bb44881bf52c377c490d5387bd994003184803800ba489ac0fe132fe9784a0ec30433d4fc85d50c24f0a1
7
- data.tar.gz: 66488e476812388579da4585e817dc6ae27a85a5969a8d0ca50b3e83df4ca8e514649a0cfa8b3b12f5fe23ef0dac96d059ae65614720cb94a0d6acfed821ce1f
6
+ metadata.gz: f6b94d4f6c2da921d21aed7fa4319c40a2c55b8067e8e940194444b8bdf034faee048222e922a41090e7967461b01c7682c22c8e59df1c6fa6e6f8b5b03aa65a
7
+ data.tar.gz: 90d7af5c35d8e2e624051269f07de481f975788a9f6c4448a707f71f65d3b2c6e500bb0caef83c21ea401feb56f804b70a1f48223bfa774a1ddde03bd9e9ac4c
@@ -0,0 +1,18 @@
1
+ version: 1
2
+
3
+ update_configs:
4
+ - package_manager: "ruby:bundler"
5
+ directory: "/"
6
+ update_schedule: "monthly"
7
+ commit_message:
8
+ prefix: "[dependabot]"
9
+ allowed_updates:
10
+ - match:
11
+ update_type: "all"
12
+ automerged_updates:
13
+ - match:
14
+ dependency_type: "development"
15
+ update_type: "all"
16
+ - match:
17
+ dependency_type: "production"
18
+ update_type: "all"
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- salesforce_streamer (1.1.0)
4
+ salesforce_streamer (1.1.1)
5
5
  faye (= 0.8.9)
6
6
  restforce (~> 4.2)
7
7
 
@@ -11,7 +11,7 @@ GEM
11
11
  addressable (2.7.0)
12
12
  public_suffix (>= 2.0.2, < 5.0)
13
13
  ast (2.4.0)
14
- byebug (11.0.1)
14
+ byebug (11.1.1)
15
15
  codecov (0.1.16)
16
16
  json
17
17
  simplecov
@@ -28,9 +28,9 @@ GEM
28
28
  em-socksify (0.3.2)
29
29
  eventmachine (>= 1.0.0.beta.4)
30
30
  eventmachine (1.2.7)
31
- faraday (0.17.1)
31
+ faraday (0.17.3)
32
32
  multipart-post (>= 1.2, < 3)
33
- faraday_middleware (0.13.1)
33
+ faraday_middleware (0.14.0)
34
34
  faraday (>= 0.7.4, < 1.0)
35
35
  faye (0.8.9)
36
36
  cookiejar (>= 0.3.0)
@@ -42,54 +42,57 @@ GEM
42
42
  faye-websocket (0.10.9)
43
43
  eventmachine (>= 0.12.0)
44
44
  websocket-driver (>= 0.5.1)
45
- hashie (4.0.0)
45
+ hashie (4.1.0)
46
46
  http_parser.rb (0.6.0)
47
47
  jaro_winkler (1.5.4)
48
48
  json (2.3.0)
49
49
  jwt (2.2.1)
50
50
  multipart-post (2.1.1)
51
51
  parallel (1.19.1)
52
- parser (2.6.5.0)
52
+ parser (2.7.0.3)
53
53
  ast (~> 2.4.0)
54
- public_suffix (4.0.1)
55
- rack (2.0.8)
54
+ public_suffix (4.0.3)
55
+ rack (2.2.2)
56
56
  rainbow (3.0.0)
57
57
  rake (13.0.1)
58
- restforce (4.2.1)
58
+ restforce (4.2.2)
59
59
  faraday (>= 0.9.0, <= 1.0)
60
60
  faraday_middleware (>= 0.8.8, <= 1.0)
61
61
  hashie (>= 1.2.0, < 5.0)
62
62
  json (>= 1.7.5)
63
63
  jwt (>= 1.5.6)
64
+ rexml (3.2.4)
64
65
  rspec (3.9.0)
65
66
  rspec-core (~> 3.9.0)
66
67
  rspec-expectations (~> 3.9.0)
67
68
  rspec-mocks (~> 3.9.0)
68
- rspec-core (3.9.0)
69
- rspec-support (~> 3.9.0)
69
+ rspec-core (3.9.1)
70
+ rspec-support (~> 3.9.1)
70
71
  rspec-expectations (3.9.0)
71
72
  diff-lcs (>= 1.2.0, < 2.0)
72
73
  rspec-support (~> 3.9.0)
73
- rspec-mocks (3.9.0)
74
+ rspec-mocks (3.9.1)
74
75
  diff-lcs (>= 1.2.0, < 2.0)
75
76
  rspec-support (~> 3.9.0)
76
- rspec-support (3.9.0)
77
- rubocop (0.78.0)
77
+ rspec-support (3.9.2)
78
+ rubocop (0.80.0)
78
79
  jaro_winkler (~> 1.5.1)
79
80
  parallel (~> 1.10)
80
- parser (>= 2.6)
81
+ parser (>= 2.7.0.1)
81
82
  rainbow (>= 2.2.2, < 4.0)
83
+ rexml
82
84
  ruby-progressbar (~> 1.7)
83
85
  unicode-display_width (>= 1.4.0, < 1.7)
84
- rubocop-performance (1.5.1)
86
+ rubocop-performance (1.5.2)
85
87
  rubocop (>= 0.71.0)
88
+ rubocop-rspec (1.38.1)
89
+ rubocop (>= 0.68.1)
86
90
  ruby-progressbar (1.10.1)
87
- simplecov (0.17.1)
91
+ simplecov (0.18.5)
88
92
  docile (~> 1.1)
89
- json (>= 1.8, < 3)
90
- simplecov-html (~> 0.10.0)
91
- simplecov-html (0.10.2)
92
- unicode-display_width (1.6.0)
93
+ simplecov-html (~> 0.11)
94
+ simplecov-html (0.12.2)
95
+ unicode-display_width (1.6.1)
93
96
  url (0.3.2)
94
97
  websocket-driver (0.7.1)
95
98
  websocket-extensions (>= 0.1.0)
@@ -106,7 +109,8 @@ DEPENDENCIES
106
109
  rspec
107
110
  rubocop
108
111
  rubocop-performance
112
+ rubocop-rspec
109
113
  salesforce_streamer!
110
114
 
111
115
  BUNDLED WITH
112
- 2.0.2
116
+ 2.1.4
data/README.md CHANGED
@@ -63,16 +63,25 @@ push topic in Salesforce before starting the streaming server.
63
63
 
64
64
  ### Define Message Handlers
65
65
 
66
- Define your handlers somewhere in your project. They must respond to
67
- `.call(str)`.
66
+ Define your handlers somewhere in your project. They must respond to either
67
+ `.perform_async(str)` or `.call(str)`.
68
68
 
69
69
  ```ruby
70
70
  # lib/account_change_handler.rb
71
+ # Handle account changes inline
71
72
  class AccountChangeHandler
72
73
  def self.call(message)
73
74
  puts message
74
75
  end
75
76
  end
77
+
78
+ # Handle account changes asynchronously
79
+ class AccountChangeHandler
80
+ include Sidekiq::Worker
81
+ def perform(message)
82
+ puts message
83
+ end
84
+ end
76
85
  ```
77
86
 
78
87
  ### Prepare The Environment
data/Rakefile CHANGED
@@ -5,4 +5,4 @@ require 'rubocop/rake_task'
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
  RuboCop::RakeTask.new
7
7
 
8
- task default: %i[rubocop spec]
8
+ task default: %i[rubocop:auto_correct spec]
@@ -34,7 +34,7 @@ module SalesforceStreamer
34
34
  def initialize_push_topics
35
35
  Log.debug 'Loading and validating PushTopics configuration'
36
36
  @push_topics = []
37
- Configuration.instance.push_topic_data.values.each do |topic_data|
37
+ Configuration.instance.push_topic_data.each_value do |topic_data|
38
38
  Log.debug topic_data.to_s
39
39
  @push_topics << PushTopic.new(data: topic_data)
40
40
  end
@@ -6,13 +6,13 @@ module SalesforceStreamer
6
6
  :handler, :handler_constant, :api_version
7
7
 
8
8
  def initialize(data:)
9
- @handler = data['handler']
10
- @static_replay = data.dig('replay')&.to_i || -1
11
- @name = data.dig('salesforce', 'name')
12
- @api_version = data.dig('salesforce', 'api_version') || '41.0'
13
- @description = data.dig('salesforce', 'description') || @name
9
+ @handler = data['handler']
10
+ @static_replay = data.dig('replay')&.to_i || -1
11
+ @name = data.dig('salesforce', 'name')
12
+ @api_version = data.dig('salesforce', 'api_version') || '41.0'
13
+ @description = data.dig('salesforce', 'description') || @name
14
14
  @notify_for_fields = data.dig('salesforce', 'notify_for_fields') || 'Referenced'
15
- @query = strip_spaces(data.dig('salesforce', 'query'))
15
+ @query = strip_spaces(data.dig('salesforce', 'query'))
16
16
  validate!
17
17
  end
18
18
 
@@ -1,3 +1,3 @@
1
1
  module SalesforceStreamer
2
- VERSION = '1.1.0'.freeze
2
+ VERSION = '1.1.1'.freeze
3
3
  end
@@ -3,26 +3,26 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
  require 'salesforce_streamer/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = 'salesforce_streamer'
7
- spec.version = SalesforceStreamer::VERSION
8
- spec.authors = ['Scott Serok']
9
- spec.email = ['scott@renofi.com']
6
+ spec.name = 'salesforce_streamer'
7
+ spec.version = SalesforceStreamer::VERSION
8
+ spec.authors = ['Scott Serok', 'RenoFi Engineering Team']
9
+ spec.email = ['scott@renofi.com', 'engineering@renofi.com']
10
10
 
11
- spec.summary = 'A wrapper around the Restforce Streaming API with a built-in PushTopic manager.'
12
- spec.homepage = 'https://github.com/renofi/salesforce_streamer'
13
- spec.license = 'MIT'
11
+ spec.summary = 'A wrapper around the Restforce Streaming API with a built-in PushTopic manager.'
12
+ spec.homepage = 'https://github.com/renofi/salesforce_streamer'
13
+ spec.license = 'MIT'
14
14
 
15
- spec.metadata['homepage_uri'] = spec.homepage
15
+ spec.metadata['homepage_uri'] = spec.homepage
16
16
  spec.metadata['source_code_uri'] = spec.homepage
17
17
 
18
18
  spec.files = Dir.chdir(File.expand_path(__dir__)) do
19
19
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(bin/|spec/|\.rub)}) }
20
20
  end
21
- spec.bindir = 'exe'
22
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.bindir = 'exe'
22
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.required_ruby_version = '>= 2.5'
25
+ spec.required_ruby_version = '>= 2.6'
26
26
 
27
27
  spec.add_dependency 'faye', '0.8.9'
28
28
  spec.add_dependency 'restforce', '~> 4.2'
@@ -33,4 +33,5 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency 'rspec'
34
34
  spec.add_development_dependency 'rubocop'
35
35
  spec.add_development_dependency 'rubocop-performance'
36
+ spec.add_development_dependency 'rubocop-rspec'
36
37
  end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: salesforce_streamer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Serok
8
+ - RenoFi Engineering Team
8
9
  autorequire:
9
10
  bindir: exe
10
11
  cert_chain: []
11
- date: 2019-12-23 00:00:00.000000000 Z
12
+ date: 2020-02-28 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: faye
@@ -122,14 +123,30 @@ dependencies:
122
123
  - - ">="
123
124
  - !ruby/object:Gem::Version
124
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: rubocop-rspec
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
125
140
  description:
126
141
  email:
127
142
  - scott@renofi.com
143
+ - engineering@renofi.com
128
144
  executables:
129
145
  - streamer
130
146
  extensions: []
131
147
  extra_rdoc_files: []
132
148
  files:
149
+ - ".dependabot/config.yml"
133
150
  - ".gitignore"
134
151
  - ".rspec"
135
152
  - ".travis.yml"
@@ -171,7 +188,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
188
  requirements:
172
189
  - - ">="
173
190
  - !ruby/object:Gem::Version
174
- version: '2.5'
191
+ version: '2.6'
175
192
  required_rubygems_version: !ruby/object:Gem::Requirement
176
193
  requirements:
177
194
  - - ">="