google-wrapper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fcef374be7f72c30ba09c7116c746b18ca46e44c
4
- data.tar.gz: 38fbc0e690203169f8f327cee5d63f4a1a919a4e
3
+ metadata.gz: b29a88b79d2d10d3c88d6107d286774ea3c7d6a0
4
+ data.tar.gz: e5ae2197369571067cadf2aea41047003ebef9ed
5
5
  SHA512:
6
- metadata.gz: 617bcd5537a30c319651f3f83591bfbee04bd5f243e687b2be2c448d28af497e24d103a5b1962f9cf93818970cf3a34b04c250a17f7931fa36eb0928528c0211
7
- data.tar.gz: f6f7180ab7d7c4bb23a0c0c6b693d527c0a92ab18dc6d39539bfa07dfdeecc8f9e858046b8a76d2ab951945a083055f86c8c7d686786ba0d260ce31684ec88e2
6
+ metadata.gz: 08c21a23649790fb4b59ca962df205d3b4e2e83d0f878d65c7f1546cae9b83e02171f577687b32ba476f367095be6a9a5c8c07877a5bb65624fd3c9a594eef79
7
+ data.tar.gz: 6dac2e5fcdbf7be896c278957a4ab562dc1fad3dcf594c9006d219390cdcb50f29910afbc8ae25723c2220d63336995badb5d872ba7035934b5c898a624b95ff
@@ -5,14 +5,11 @@ module Google
5
5
  class ClientBuilder
6
6
  extend ConstructionHelper
7
7
 
8
- PRIVATE_KEY = ENV.fetch("GOOGLE_API_PRIVATE_KEY").gsub("\\n", "\n")
9
- PRIVATE_KEY_SECRET = "notasecret" # static default for Google P12 auth
10
- SERVICE_ACCOUNT_EMAIL = ENV.fetch("GOOGLE_API_SERVICE_ACCOUNT")
11
-
12
8
  attr_accessor :user_email, :scopes, :authorize
13
9
 
14
10
  def self.key
15
- OpenSSL::PKey::RSA.new(PRIVATE_KEY, PRIVATE_KEY_SECRET)
11
+ OpenSSL::PKey::RSA.new(ENV.fetch("GOOGLE_API_PRIVATE_KEY").gsub("\\n", "\n"),
12
+ "notasecret") # static default for Google P12 auth
16
13
  end
17
14
 
18
15
  def initialize
@@ -32,7 +29,7 @@ module Google
32
29
  private
33
30
 
34
31
  def asserter
35
- Google::APIClient::JWTAsserter.new(SERVICE_ACCOUNT_EMAIL, scopes, self.class.key)
32
+ Google::APIClient::JWTAsserter.new(ENV.fetch("GOOGLE_API_SERVICE_ACCOUNT"), scopes, self.class.key)
36
33
  end
37
34
 
38
35
  def authorize?
@@ -1,5 +1,5 @@
1
1
  module Google
2
2
  module Wrapper
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Bohn