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

depricated api fix #125

Closed
wants to merge 3 commits into from
Closed

depricated api fix #125

wants to merge 3 commits into from

Conversation

aap17
Copy link

@aap17 aap17 commented Sep 8, 2024

currenly the lib uses depricated Google API for topic management. We have fixed it

#122

@@ -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"
Copy link

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}"
Copy link

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)
Copy link

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.

@sabman
Copy link
Member

sabman commented Sep 8, 2024

Thanks for this @aap17 Can you please update the tests before we merge this?

@sabman
Copy link
Member

sabman commented Sep 8, 2024

ah looks like this PR #123 also has tests in addition to this PR. So gonna close this.

@sabman sabman closed this Sep 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants