google-wrapper 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: b29a88b79d2d10d3c88d6107d286774ea3c7d6a0
4
- data.tar.gz: e5ae2197369571067cadf2aea41047003ebef9ed
3
+ metadata.gz: c12f283c78195065d6aafb86b984a872d030a539
4
+ data.tar.gz: 1c35b4809df163658c6120aa9afe06310bba6562
5
5
  SHA512:
6
- metadata.gz: 08c21a23649790fb4b59ca962df205d3b4e2e83d0f878d65c7f1546cae9b83e02171f577687b32ba476f367095be6a9a5c8c07877a5bb65624fd3c9a594eef79
7
- data.tar.gz: 6dac2e5fcdbf7be896c278957a4ab562dc1fad3dcf594c9006d219390cdcb50f29910afbc8ae25723c2220d63336995badb5d872ba7035934b5c898a624b95ff
6
+ metadata.gz: 1f50fd11aa9e3720624e0ff820a8ee6f1387875ce51319fa7c40bd68235bc675e43414f9cbe6b37e6d83625af14c39e30920a5493c3e1901151b4d7741c1d372
7
+ data.tar.gz: ae16d4efb1415ea59f8b52405c0cfe58b17e82d6255090413e6177574a9ba39300958cd52c15191531b2b78efdca18c8c0944e14c3ee7f13f02c099bc0e1ba70
@@ -5,10 +5,10 @@ module Google
5
5
  # Update a users badges
6
6
  #
7
7
  # @param user_key [String] Can be the user's primary email address, alias email address, or unique user ID.
8
- # @param badges [Array] An array of the badges (as Symbols or Strings)
8
+ # @param badges [Hash] Hash of badges with boolean values
9
9
  def update(user_key, badges)
10
10
  body = directory_api.users.patch.request_schema.new
11
- body.custom_schemas = { badges: badges.map { |badge| [badge, true] }.to_h }
11
+ body.custom_schemas = { badges: badges }
12
12
 
13
13
  client.execute!(api_method: directory_api.users.patch,
14
14
  body_object: body,
@@ -1,5 +1,5 @@
1
1
  module Google
2
2
  module Wrapper
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -10,7 +10,10 @@ module Google::Directory::User
10
10
  end
11
11
 
12
12
  it "proxies patch to a google api client" do
13
- result = badges_api.update("john.bohn@alphasights.com", [:client_portal, :reporting_world])
13
+ result = badges_api.update("john.bohn@alphasights.com", {
14
+ client_portal: true,
15
+ reporting_world: true,
16
+ })
14
17
 
15
18
  api_method = result.data.api_method
16
19
  body_object = result.data.body_object
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google-wrapper
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
  - John Bohn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-10 00:00:00.000000000 Z
11
+ date: 2015-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client