gitlab 4.16.0 → 4.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d417a687fa4ad735c02fa7225f71be9401735c5c0fcace3ba199c3c79850e53a
4
- data.tar.gz: 859603a7a30353d20ad041dcb0bb557931c576906fd495830f922bd1270431b2
3
+ metadata.gz: 797a89bf7bdc146d8381fcf6a6bada7909b70d694f5b9b5c4a7781c69396a6d7
4
+ data.tar.gz: d564a8c8d0840f7ed4517f39d17b8a9a8138079b1fbbc7b9576de4b7159626e0
5
5
  SHA512:
6
- metadata.gz: 34db8a032fa734b07582d0ce1a9be357137458ed6819dc50920af6cfad734629ece8b042890b0032f77cd259c3c63ae2b06c48e8d7ebb4af8baae49b17af9e45
7
- data.tar.gz: 2d396786aa1cf2f03a72eeea6662275caeaedf489d3da42c7a9528e82c1ce5464cc8a8b9c722e3dacdaa121c9fd547e2cd1c34136584b627aab6460ab0a99b73
6
+ metadata.gz: abb59a55e8a113155818e1531bb4c22578b27a520ac1bea7d9f932a49c8d7be8c0ee4d3e3f42cc5ee870a143553aae3192dc693c7ad8c74b2d7079c6c85cb94e
7
+ data.tar.gz: c48dc657cf576f747c8a1153114b72681a4c6a5285259a7ef0534a8afdd85c67907dca98c63c1d6450d7766c9692879365b0411985574a570ce209b533a90a91
@@ -239,10 +239,15 @@ class Gitlab::Client
239
239
  #
240
240
  # @param [String] email Email address
241
241
  # @param [Integer] user_id The ID of a user.
242
+ # @param [Boolean] skip_confirmation Skip confirmation and assume e-mail is verified
242
243
  # @return [Gitlab::ObjectifiedHash]
243
- def add_email(email, user_id = nil)
244
+ def add_email(email, user_id = nil, skip_confirmation = nil)
244
245
  url = user_id.to_i.zero? ? '/user/emails' : "/users/#{user_id}/emails"
245
- post(url, body: { email: email })
246
+ if skip_confirmation.nil?
247
+ post(url, body: { email: email })
248
+ else
249
+ post(url, body: { email: email, skip_confirmation: skip_confirmation })
250
+ end
246
251
  end
247
252
 
248
253
  # Delete email
@@ -34,7 +34,14 @@ module Gitlab
34
34
 
35
35
  # Respond to messages for which `self.data` has a key
36
36
  def method_missing(method_name, *args, &block)
37
- data.key?(method_name.to_s) ? data[method_name.to_s] : super
37
+ if data.key?(method_name.to_s)
38
+ data[method_name.to_s]
39
+ elsif data.respond_to?(method_name)
40
+ warn 'WARNING: Please convert ObjectifiedHash object to hash before calling Hash methods on it.'
41
+ data.send(method_name, *args, &block)
42
+ else
43
+ super
44
+ end
38
45
  end
39
46
 
40
47
  def respond_to_missing?(method_name, include_private = false)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Gitlab
4
- VERSION = '4.16.0'
4
+ VERSION = '4.16.1'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.16.0
4
+ version: 4.16.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nihad Abbasov
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-07-06 00:00:00.000000000 Z
12
+ date: 2020-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty