google_directory 0.2.0 → 0.2.1

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
  SHA256:
3
- metadata.gz: cf3b16f0223835642133e6f6f2e7cbdc2012c0459923543f218d762a8e03e89d
4
- data.tar.gz: 87258d6b5de32692cb0f5016619388ebf5257e0c8152f21569558ad67c797554
3
+ metadata.gz: af0f64951d31c627a0b44faadf1ceda3bde2308239aa2415fe9412797969de13
4
+ data.tar.gz: cced9b505a5c5c4e977eb5010e3acd2f64ceb3bdebbafdfc3be4ddbcbcec908c
5
5
  SHA512:
6
- metadata.gz: 7033882f9889578aba25ad3f41166258d8f682696c300ab1ad4fee899646d3a0d41672035a4e7518d5b32b7e273507900d64584b43d2faac7d7d25cb5b5ae6f0
7
- data.tar.gz: dd31543c65ae56e3caf8aa5d17aa86f1d7c659f025eb7c5ee78fc1ee51e7002ec417d465e02ccb2f17ecfa20a7b2eea0e4981ea764152eb088bcd3878c7bcdc9
6
+ metadata.gz: a54f6af95e42fa2fc08cef6fd87a4d9c6a4f10644163bacf3f67e92cd87ebc674963280050c57da6c5614a9e52f3b9c374d28ccd3161460657a5c3ce0404755a
7
+ data.tar.gz: '001096745cae6ec49dcee64c36b32ad06822fb70735076df3e27597203420351e606815691cb5ddfca7d521194b99ab7b6d5442345ce3476351ad87c319601ad'
@@ -27,7 +27,9 @@ module GoogleDirectory
27
27
  CLIENT_SECRETS_PATH = ENV['CLIENT_SECRETS_PATH'] || 'client_secret.json'
28
28
 
29
29
  # Scope options - https://www.googleapis.com/auth/admin.directory.user
30
+ # https://developers.google.com/admin-sdk/directory/v1/guides/authorizing
30
31
  SCOPE = Google::Apis::AdminDirectoryV1::AUTH_ADMIN_DIRECTORY_USER
32
+ # SCOPE = 'https://www.googleapis.com/auth/admin.directory.user'
31
33
 
32
34
  # Initialize the API
33
35
  # https://www.rubydoc.info/github/google/google-api-ruby-client/Google/Apis/AdminDirectoryV1/DirectoryService
@@ -48,12 +50,13 @@ module GoogleDirectory
48
50
  # @param attributes [Hash] attributes needed to perform command
49
51
  # @return [Hash] formatted as: `{success: {command: :command, attributes: {primary_email: "user@domain"}, response: GoogleAnswer} }`
50
52
  def run( command:, attributes: {} )
51
- response = { success: nil, error: nil }
53
+ response = {}
52
54
  begin
53
- response[:success] = send( command, attributes: attributes )
55
+ response = send( command, attributes: attributes )
56
+ response[:status] = 'success'
54
57
  rescue Google::Apis::ClientError => error
55
- response[:error] = {command: command, attributes: attributes,
56
- error: error}
58
+ response = {response: error, command: command,
59
+ attributes: attributes, status: 'error'}
57
60
  end
58
61
  response
59
62
  end
@@ -1,5 +1,5 @@
1
1
  module GoogleDirectory
2
2
  module Version
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_directory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bill Tihen
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2018-05-22 00:00:00.000000000 Z
12
+ date: 2018-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: google-api-client