-
Notifications
You must be signed in to change notification settings - Fork 234
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
Ruby 3 preparation #4092
Ruby 3 preparation #4092
Conversation
d884e69
to
e359899
Compare
e359899
to
f961a80
Compare
VaultClientWrapper.new( | ||
DEFAULT_CLIENT_OPTIONS.merge( | ||
address: address, | ||
ssl_cert_store: cert_store, | ||
ssl_verify: tls_verify, | ||
token: token, | ||
versioned_kv: versioned_kv? | ||
) | ||
**DEFAULT_CLIENT_OPTIONS, | ||
address: address, | ||
ssl_cert_store: cert_store, | ||
ssl_verify: tls_verify, | ||
token: token, | ||
versioned_kv: versioned_kv? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The VaultClientWrapper
class accepts keyword arguments in its initializer. Update this call to match.
def initialize(versioned_kv:, **client_args) |
@@ -24,5 +24,5 @@ class SamsonPlugin < Rails::Engine | |||
|
|||
Samson::Hooks.callback :error do |exception, **options| | |||
sentry_options = options.slice(:contexts, :extra, :tags, :user, :level, :fingerprint) | |||
Sentry.capture_exception(exception, sentry_options) | |||
Sentry.capture_exception(exception, **sentry_options) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Sentry.capture_exception
method accepts keyword arguments. Update this method call to match.
@@ -32,7 +32,7 @@ def new | |||
case params[:type] | |||
when "users" | |||
options = user_filter | |||
send_data UserCsvPresenter.to_csv(options), type: :csv, filename: "Users_#{options[:datetime]}.csv" | |||
send_data UserCsvPresenter.to_csv(**options), type: :csv, filename: "Users_#{options[:datetime]}.csv" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The UserCsvPresenter.to_csv
method accepts keyword arguments. Update this method call to match.
samson/app/presenters/user_csv_presenter.rb
Lines 15 to 17 in a370be7
def self.to_csv( | |
inherited: false, deleted: false, project_id: nil, user_id: nil, datetime: (Time.now.strftime "%Y%m%d_%H%M") | |
) |
ActionCable.server.broadcast channel_name, count: count | ||
ActionCable.server.broadcast(channel_name, {count: count}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The message
sent via the the ActionCable::Server::Broadcasting#broadcast method is a Hash.
Explicitly send a hash in this method call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉
Context
There's a change in Ruby 3.0 that separates positional and keyword arguments.
Change
In preparation for the Ruby 3.0 upgrade, update classes to correctly pass keyword arguments in method calls.