Remove embedded version #s, use Gemfile
This commit is contained in:
parent
6a37993df7
commit
e421d1734d
1
Gemfile
1
Gemfile
|
@ -9,6 +9,7 @@ gem 'autoparse', '>= 0.3.2'
|
||||||
gem 'faraday', '~> 0.8.1'
|
gem 'faraday', '~> 0.8.1'
|
||||||
gem 'multi_json', '>= 1.0.0'
|
gem 'multi_json', '>= 1.0.0'
|
||||||
gem 'extlib', '>= 0.9.15'
|
gem 'extlib', '>= 0.9.15'
|
||||||
|
gem 'jwt', '~> 0.1.5'
|
||||||
gem 'jruby-openssl', :platforms => :jruby
|
gem 'jruby-openssl', :platforms => :jruby
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
|
|
|
@ -10,11 +10,8 @@ OAUTH_SERVER_PORT = 12736
|
||||||
|
|
||||||
require 'rubygems'
|
require 'rubygems'
|
||||||
require 'optparse'
|
require 'optparse'
|
||||||
|
|
||||||
gem 'faraday', '~> 0.8.1'
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'faraday/utils'
|
require 'faraday/utils'
|
||||||
|
|
||||||
require 'webrick'
|
require 'webrick'
|
||||||
require 'google/api_client/version'
|
require 'google/api_client/version'
|
||||||
require 'google/api_client'
|
require 'google/api_client'
|
||||||
|
@ -187,7 +184,6 @@ HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
def client
|
def client
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_1/client'
|
require 'signet/oauth_1/client'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
require 'irb'
|
require 'irb'
|
||||||
|
@ -281,7 +277,6 @@ HTML
|
||||||
]
|
]
|
||||||
|
|
||||||
def oauth_1_login
|
def oauth_1_login
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_1/client'
|
require 'signet/oauth_1/client'
|
||||||
require 'launchy'
|
require 'launchy'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
@ -349,7 +344,6 @@ HTML
|
||||||
end
|
end
|
||||||
|
|
||||||
def oauth_2_login
|
def oauth_2_login
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_2/client'
|
require 'signet/oauth_2/client'
|
||||||
require 'launchy'
|
require 'launchy'
|
||||||
require 'yaml'
|
require 'yaml'
|
||||||
|
@ -471,9 +465,8 @@ HTML
|
||||||
method = options[:http_method]
|
method = options[:http_method]
|
||||||
method ||= request_body == '' ? 'GET' : 'POST'
|
method ||= request_body == '' ? 'GET' : 'POST'
|
||||||
method.upcase!
|
method.upcase!
|
||||||
request = [method, uri.to_str, headers, [request_body]]
|
response = client.execute(:http_method => method, :uri => uri.to_str,
|
||||||
request = client.generate_authenticated_request(:request => request)
|
:headers => headers, :body => request_body)
|
||||||
response = client.transmit(request)
|
|
||||||
puts response.body
|
puts response.body
|
||||||
exit(0)
|
exit(0)
|
||||||
else
|
else
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
gem 'multi_json', '>= 1.0.0'
|
|
||||||
require 'multi_json'
|
require 'multi_json'
|
||||||
|
|
||||||
if !MultiJson.respond_to?(:load) || MultiJson.method(:load).owner == Kernel
|
if !MultiJson.respond_to?(:load) || MultiJson.method(:load).owner == Kernel
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
gem 'faraday', '~> 0.8.1'
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'faraday/utils'
|
require 'faraday/utils'
|
||||||
require 'multi_json'
|
require 'multi_json'
|
||||||
|
@ -114,7 +113,6 @@ module Google
|
||||||
def authorization=(new_authorization)
|
def authorization=(new_authorization)
|
||||||
case new_authorization
|
case new_authorization
|
||||||
when :oauth_1, :oauth
|
when :oauth_1, :oauth
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_1/client'
|
require 'signet/oauth_1/client'
|
||||||
# NOTE: Do not rely on this default value, as it may change
|
# NOTE: Do not rely on this default value, as it may change
|
||||||
new_authorization = Signet::OAuth1::Client.new(
|
new_authorization = Signet::OAuth1::Client.new(
|
||||||
|
@ -128,7 +126,6 @@ module Google
|
||||||
:client_credential_secret => 'anonymous'
|
:client_credential_secret => 'anonymous'
|
||||||
)
|
)
|
||||||
when :two_legged_oauth_1, :two_legged_oauth
|
when :two_legged_oauth_1, :two_legged_oauth
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_1/client'
|
require 'signet/oauth_1/client'
|
||||||
# NOTE: Do not rely on this default value, as it may change
|
# NOTE: Do not rely on this default value, as it may change
|
||||||
new_authorization = Signet::OAuth1::Client.new(
|
new_authorization = Signet::OAuth1::Client.new(
|
||||||
|
@ -137,7 +134,6 @@ module Google
|
||||||
:two_legged => true
|
:two_legged => true
|
||||||
)
|
)
|
||||||
when :oauth_2
|
when :oauth_2
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_2/client'
|
require 'signet/oauth_2/client'
|
||||||
# NOTE: Do not rely on this default value, as it may change
|
# NOTE: Do not rely on this default value, as it may change
|
||||||
new_authorization = Signet::OAuth2::Client.new(
|
new_authorization = Signet::OAuth2::Client.new(
|
||||||
|
@ -449,7 +445,6 @@ module Google
|
||||||
# an ID token supplied by an untrusted client-side mechanism is valid.
|
# an ID token supplied by an untrusted client-side mechanism is valid.
|
||||||
# Raises an error if the token is invalid or missing.
|
# Raises an error if the token is invalid or missing.
|
||||||
def verify_id_token!
|
def verify_id_token!
|
||||||
gem 'jwt', '~> 0.1.4'
|
|
||||||
require 'jwt'
|
require 'jwt'
|
||||||
require 'openssl'
|
require 'openssl'
|
||||||
@certificates ||= {}
|
@certificates ||= {}
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
|
||||||
gem 'faraday', '~> 0.8.1'
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'faraday/utils'
|
require 'faraday/utils'
|
||||||
require 'multi_json'
|
require 'multi_json'
|
||||||
|
|
|
@ -17,15 +17,11 @@
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
gem 'faraday', '~> 0.8.1'
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'faraday/utils'
|
require 'faraday/utils'
|
||||||
require 'multi_json'
|
require 'multi_json'
|
||||||
require 'compat/multi_json'
|
require 'compat/multi_json'
|
||||||
|
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_1/client'
|
require 'signet/oauth_1/client'
|
||||||
|
|
||||||
require 'google/api_client'
|
require 'google/api_client'
|
||||||
require 'google/api_client/version'
|
require 'google/api_client/version'
|
||||||
|
|
||||||
|
|
|
@ -14,13 +14,9 @@
|
||||||
|
|
||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
gem 'faraday', '~> 0.8.1'
|
|
||||||
require 'faraday'
|
require 'faraday'
|
||||||
require 'faraday/utils'
|
require 'faraday/utils'
|
||||||
|
|
||||||
gem 'signet', '~> 0.4.0'
|
|
||||||
require 'signet/oauth_1/client'
|
require 'signet/oauth_1/client'
|
||||||
|
|
||||||
require 'google/api_client'
|
require 'google/api_client'
|
||||||
require 'google/api_client/version'
|
require 'google/api_client/version'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue