authy 2.6.0 → 2.6.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
  SHA1:
3
- metadata.gz: 50f02ebdae5f8d72a5f3199ae44feae6ff4a5c83
4
- data.tar.gz: abb373f80d53746ac1c0d500823dbc4986ec53c8
3
+ metadata.gz: 40c5049a7be43bc9c1b6a771406f27db7907e3af
4
+ data.tar.gz: a44fad2cb8c5908d0f2018cf07575a23350d8f0b
5
5
  SHA512:
6
- metadata.gz: 268299200179efd6c7ba165202dcffe54b3376f3e105de6ddf84e75140367dea212ca3f06394c447898f44904682d6b1367e38f0336b65f2514b03fb0d9ddf73
7
- data.tar.gz: cee6a3a6df933fa48b16ff3b9f58b035257a633ae6ac9b4fbcc8265305a1ca5b650231cdbd02d9e15238ce23491a469b28a4e2f9e9fcc2e6b792665f66e305c6
6
+ metadata.gz: ff660394515062632f21d268b88071305a6c2914fe716162dae1fb32499ef59b0a468ef69ea16962bf4b03e2801329674618342f887d73a495cf5e5a43664cfe
7
+ data.tar.gz: 1d46006e06cdaccc1d42b043e4f9b8693aa7a8d4971246f974327e5c736501b1aef4776dd4a235dc4124dc2905891ebdbf5d80eedee9737840d5fa97a21c5991
@@ -117,6 +117,3 @@ DEPENDENCIES
117
117
  rspec
118
118
  simplecov
119
119
  yard
120
-
121
- BUNDLED WITH
122
- 1.10.6
@@ -17,7 +17,7 @@ module Authy
17
17
  logos = params.delete(:logos) || params.delete('logos')
18
18
  seconds_to_expire = params.delete(:seconds_to_expire) || params.delete('seconds_to_expire')
19
19
 
20
- return invalid_response("message cannot be blank") if message.empty?
20
+ return invalid_response("message cannot be blank") if message.nil? || message.empty?
21
21
  return invalid_response('user id is invalid') unless is_digit?(user_id)
22
22
 
23
23
  begin
@@ -28,13 +28,13 @@ module Authy
28
28
  return invalid_response("Invalid parameters: #{e.message}")
29
29
  end
30
30
 
31
- post_request("onetouch/json/users/#{user_id}/approval_requests", {
32
- message: message[0, MAX_STRING_SIZE],
33
- details: details,
34
- hidden_details: hidden_details,
35
- logos: logos,
36
- seconds_to_expire: seconds_to_expire
37
- })
31
+ params = { message: message[0, MAX_STRING_SIZE] }
32
+ params[:details] = details unless details.nil?
33
+ params[:hidden_details] = hidden_details unless hidden_details.nil?
34
+ params[:logos] = logos unless logos.nil?
35
+ params[:seconds_to_expire] = seconds_to_expire unless seconds_to_expire.nil?
36
+
37
+ post_request("onetouch/json/users/#{user_id}/approval_requests", params)
38
38
  end
39
39
 
40
40
  def self.approval_request_status(params)
@@ -1,3 +1,3 @@
1
1
  module Authy
2
- VERSION = "2.6.0"
2
+ VERSION = "2.6.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authy
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Authy Inc
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-19 00:00:00.000000000 Z
11
+ date: 2015-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient