google-oauth2-installed 0.0.2 → 0.0.3

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: c8293b37b76bb0614df78839a1d7bada0e31b7ee
4
- data.tar.gz: 176281aa13e9959b16cf18a5efccd734c7b4ddba
3
+ metadata.gz: 95b5c8efb29171eafe7639e80724f2aa13c1b964
4
+ data.tar.gz: 587b84d73dec719055cdb7112cacb835bf5f9d5a
5
5
  SHA512:
6
- metadata.gz: 10c5bef42e1d8891ad1502d917b2d7af12a3347977ff1e70b1e1bdc085d739e160c528d54fc45e6cb93c695b277702f0d22805fe226d00d04877cefa3254d613
7
- data.tar.gz: be0b42019d4d5baf09f35d231c4580adb0f3288cdbb6f7bd759ce4d27f4ef55ca589db4fc0d8836400038ac594b1fff9add4925c4e7a036da654b4a8dd4c1b86
6
+ metadata.gz: 30bcc8f5453dc332138c80dc67c7b04c17e3b17038f42d85a49bf9797c35ababd5ffb827027b9c0fe7a38436eccff61a629fa9b96ae7ec2ab38d31055e6c816c
7
+ data.tar.gz: 1d3d68b22cd22e1c68870de111bd07ddc55bb3c333163d0d4b3589d2d5c058b64f53746a58a2ee328f1ec94c9a93bf1465d39f0806154408e7ffd08f8b9e9af5
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google-oauth2-installed (0.0.2)
4
+ google-oauth2-installed (0.0.3)
5
5
  oauth2
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -88,7 +88,7 @@ Once you have these environment variables defined, run this rake task and
88
88
  authenticate to google with the user you need access as.
89
89
 
90
90
  ```
91
- rake googleoauthinstalled:get_access_token
91
+ rake googleoauth2installed:get_access_token
92
92
  ```
93
93
 
94
94
  This rake task will give you a url to load up in the browser. You will need to log in
@@ -96,6 +96,8 @@ to Google, allow access to the requested scopes, and copy the provided code. Pas
96
96
  this code back in to the rake task that is waiting for you. It will then output the
97
97
  rest of the environment variables you need to authenticate.
98
98
 
99
+ (If the URL shows an error, you may need to supply a Product Name under the Consent Screen section of your Google Developers Console.)
100
+
99
101
  If you are using `.env`, it should now look something like:
100
102
 
101
103
  ```shell
@@ -4,9 +4,8 @@ module GoogleOauth2Installed
4
4
  class AccessToken < Struct.new(:credentials)
5
5
 
6
6
  def access_token
7
- OAuth2::AccessToken.from_hash(client, token_hash).tap do |token|
8
- token.refresh! if token.expired?
9
- end
7
+ token = OAuth2::AccessToken.from_hash(client, token_hash)
8
+ token.expired? ? token.refresh! : token
10
9
  end
11
10
 
12
11
  private
@@ -1,3 +1,3 @@
1
1
  module GoogleOauth2Installed
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-oauth2-installed
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Amiel Martin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-19 00:00:00.000000000 Z
12
+ date: 2014-04-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: oauth2