-
Notifications
You must be signed in to change notification settings - Fork 155
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
depricated api fix #125
depricated api fix #125
Conversation
Migration send_to_topic_condition for v1
@@ -226,7 +237,8 @@ def for_uri(uri, extra_headers = {}) | |||
) do |faraday| | |||
faraday.adapter Faraday.default_adapter | |||
faraday.headers["Content-Type"] = "application/json" | |||
faraday.headers['Authorization'] = "key=#{@api_key}" | |||
faraday.headers["Authorization"] = "Bearer #{jwt_token}" | |||
faraday.headers["access_token_auth"]= "true" |
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.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Layout/SpaceAroundOperators: Surrounding space missing for operator =.
@@ -226,7 +237,8 @@ def for_uri(uri, extra_headers = {}) | |||
) do |faraday| | |||
faraday.adapter Faraday.default_adapter | |||
faraday.headers["Content-Type"] = "application/json" | |||
faraday.headers['Authorization'] = "key=#{@api_key}" | |||
faraday.headers["Authorization"] = "Bearer #{jwt_token}" |
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.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
@@ -217,6 +215,19 @@ def send_to_topic_condition(condition, options = {}) | |||
end | |||
end | |||
|
|||
def send_to_topic_condition_v1(condition, options = {}) | |||
if validate_condition?(condition) |
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.
Style/GuardClause: Use a guard clause instead of wrapping the code inside a conditional expression.
Thanks for this @aap17 Can you please update the tests before we merge this? |
ah looks like this PR #123 also has tests in addition to this PR. So gonna close this. |
currenly the lib uses depricated Google API for topic management. We have fixed it
#122