Skip to content

Commit

Permalink
chore(release): Switch to Ruby-based release reporter (#244)
Browse files Browse the repository at this point in the history
  • Loading branch information
dazuma authored Jan 13, 2025
1 parent 0bc1395 commit 094e66d
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 16 deletions.
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

0 comments on commit 094e66d

Please sign in to comment.