Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add settings to connect to Salesforce MyDomain url #28

Merged
merged 14 commits into from
Nov 11, 2021
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/logstash/inputs/salesforce.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ class LogStash::Inputs::Salesforce < LogStash::Inputs::Base
# Set this to true to connect to a sandbox sfdc instance
# logging in through test.salesforce.com
config :use_test_sandbox, :validate => :boolean, :default => false
# Set this to the custom MyDomain url of your sfdc instance
# logging in through instance url
config :sfdc_instance_url, :validate => :string, :required => false
# By default, this uses the default Restforce API version.
# To override this, set this to something like "32.0" for example
config :api_version, :validate => :string, :required => false
Expand Down Expand Up @@ -131,7 +134,8 @@ def client_options
:client_id => @client_id,
:client_secret => @client_secret
}
options.merge!({ :host => "test.salesforce.com" }) if @use_test_sandbox
options.merge!({ :host => @sfdc_instance_url }) if @sfdc_instance_url
options.merge!({ :host => "test.salesforce.com" }) if @use_test_sandbox and not @sfdc_instance_url
mkreth marked this conversation as resolved.
Show resolved Hide resolved
options.merge!({ :api_version => @api_version }) if @api_version
return options
end
Expand Down
6 changes: 3 additions & 3 deletions logstash-input-salesforce.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ Gem::Specification.new do |s|

# Gem dependencies
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
s.add_runtime_dependency 'logstash-codec-plain'
s.add_runtime_dependency 'restforce', '>= 3.2', '< 5'
s.add_runtime_dependency "logstash-codec-plain", ">= 3.0", "< 4"
mkreth marked this conversation as resolved.
Show resolved Hide resolved
s.add_runtime_dependency "restforce", ">= 5", "< 5.2"
s.add_development_dependency 'logstash-devutils'
s.add_development_dependency 'vcr'
s.add_development_dependency 'webmock'
s.add_development_dependency 'json'
s.add_development_dependency 'public_suffix', '~> 1.4.6' # required due to ruby < 2.0
s.add_development_dependency 'public_suffix', '>= 1.4' # required due to ruby < 2.0
end