google-api-client 0.8.1.1 → 0.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/CHANGELOG.md +5 -2
- data/README.md +1 -1
- data/google-api-client.gemspec +2 -1
- data/lib/cacerts.pem +2183 -0
- data/lib/google/api_client/auth/file_storage.rb +3 -6
- data/lib/google/api_client/auth/installed_app.rb +7 -7
- data/lib/google/api_client/version.rb +2 -2
- metadata +3 -2
@@ -29,12 +29,10 @@ module Google
|
|
29
29
|
#
|
30
30
|
class FileStorage
|
31
31
|
|
32
|
-
attr_accessor :storage
|
33
|
-
:path
|
32
|
+
attr_accessor :storage
|
34
33
|
|
35
34
|
def initialize(path)
|
36
|
-
|
37
|
-
store = Google::APIClient::FileStore.new(@path)
|
35
|
+
store = Google::APIClient::FileStore.new(path)
|
38
36
|
@storage = Google::APIClient::Storage.new(store)
|
39
37
|
@storage.authorize
|
40
38
|
end
|
@@ -54,8 +52,7 @@ module Google
|
|
54
52
|
# Optional authorization instance. If not provided, the authorization
|
55
53
|
# already associated with this instance will be written.
|
56
54
|
def write_credentials(auth=nil)
|
57
|
-
|
58
|
-
storage.write_credentials(self.authorization)
|
55
|
+
storage.write_credentials(auth)
|
59
56
|
end
|
60
57
|
end
|
61
58
|
end
|
@@ -32,12 +32,12 @@ module Google
|
|
32
32
|
# client.authorization = flow.authorize
|
33
33
|
#
|
34
34
|
class InstalledAppFlow
|
35
|
-
|
35
|
+
|
36
36
|
RESPONSE_BODY = <<-HTML
|
37
37
|
<html>
|
38
38
|
<head>
|
39
39
|
<script>
|
40
|
-
function closeWindow() {
|
40
|
+
function closeWindow() {
|
41
41
|
window.open('', '_self', '');
|
42
42
|
window.close();
|
43
43
|
}
|
@@ -47,14 +47,14 @@ module Google
|
|
47
47
|
<body>You may close this window.</body>
|
48
48
|
</html>
|
49
49
|
HTML
|
50
|
-
|
50
|
+
|
51
51
|
##
|
52
52
|
# Configure the flow
|
53
53
|
#
|
54
54
|
# @param [Hash] options The configuration parameters for the client.
|
55
55
|
# @option options [Fixnum] :port
|
56
56
|
# Port to run the embedded server on. Defaults to 9292
|
57
|
-
# @option options [String] :client_id
|
57
|
+
# @option options [String] :client_id
|
58
58
|
# A unique identifier issued to the client to identify itself to the
|
59
59
|
# authorization server.
|
60
60
|
# @option options [String] :client_secret
|
@@ -73,11 +73,11 @@ module Google
|
|
73
73
|
:redirect_uri => "http://localhost:#{@port}/"}.update(options)
|
74
74
|
)
|
75
75
|
end
|
76
|
-
|
76
|
+
|
77
77
|
##
|
78
78
|
# Request authorization. Opens a browser and waits for response.
|
79
79
|
#
|
80
|
-
# @param [Google::APIClient::
|
80
|
+
# @param [Google::APIClient::Storage] storage
|
81
81
|
# Optional object that responds to :write_credentials, used to serialize
|
82
82
|
# the OAuth 2 credentials after completing the flow.
|
83
83
|
#
|
@@ -85,7 +85,7 @@ module Google
|
|
85
85
|
# Authorization instance, nil if user cancelled.
|
86
86
|
def authorize(storage=nil)
|
87
87
|
auth = @authorization
|
88
|
-
|
88
|
+
|
89
89
|
server = WEBrick::HTTPServer.new(
|
90
90
|
:Port => @port,
|
91
91
|
:BindAddress =>"localhost",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Aman
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
@@ -221,6 +221,7 @@ files:
|
|
221
221
|
- README.md
|
222
222
|
- Rakefile
|
223
223
|
- google-api-client.gemspec
|
224
|
+
- lib/cacerts.pem
|
224
225
|
- lib/compat/multi_json.rb
|
225
226
|
- lib/google/api_client.rb
|
226
227
|
- lib/google/api_client/auth/compute_service_account.rb
|