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

chore(release): Switch to Ruby-based release reporter #244

Merged
merged 2 commits into from
Jan 13, 2025
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 1 addition & 3 deletions .kokoro/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH

gem install --no-document toys
toys release install-python-tools -v
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
toys release perform -v --force-republish --enable-docs --enable-rad < /dev/null
toys release perform -v --reporter-org=googleapis --force-republish --enable-docs --enable-rad < /dev/null
4 changes: 1 addition & 3 deletions lib/signet/oauth_1/signature_methods/hmac_sha1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
module Signet # :nodoc:
module OAuth1
module HMACSHA1
def self.generate_signature \
base_string, client_credential_secret, token_credential_secret

def self.generate_signature base_string, client_credential_secret, token_credential_secret
# Both the client secret and token secret must be escaped
client_credential_secret =
Signet::OAuth1.encode client_credential_secret
Expand Down
4 changes: 1 addition & 3 deletions lib/signet/oauth_1/signature_methods/plaintext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
module Signet # :nodoc:
module OAuth1
module PLAINTEXT
def self.generate_signature \
_base_string, client_credential_secret, token_credential_secret

def self.generate_signature _base_string, client_credential_secret, token_credential_secret
# Both the client secret and token secret must be escaped
client_credential_secret =
Signet::OAuth1.encode client_credential_secret
Expand Down
5 changes: 1 addition & 4 deletions lib/signet/oauth_1/signature_methods/rsa_sha1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
module Signet # :nodoc:
module OAuth1
module RSASHA1
def self.generate_signature \
base_string, client_credential_secret, _token_credential_secret


def self.generate_signature base_string, client_credential_secret, _token_credential_secret
private_key = OpenSSL::PKey::RSA.new client_credential_secret
signature = private_key.sign OpenSSL::Digest.new("SHA1"), base_string
# using strict_encode64 because the encode64 method adds newline characters after ever 60 chars
Expand Down
4 changes: 1 addition & 3 deletions lib/signet/oauth_2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,7 @@ def self.generate_basic_authorization_header client_id, client_password
#
# @return [String]
# The value for the HTTP Basic Authorization header.
def self.generate_bearer_authorization_header \
access_token, auth_params = nil

def self.generate_bearer_authorization_header access_token, auth_params = nil
# TODO: escaping?
header = "Bearer #{access_token}"
if auth_params && !auth_params.empty?
Expand Down
Loading