mxhero-api 0.1.54 → 0.1.55
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/VERSION +1 -1
- data/lib/mxhero-api.rb +11 -0
- data/mxhero-api.gemspec +2 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NGQ0YTZiMDJlMjA2MTE3ZDQ5MzE5MTk0MDUyMTI0NTg4ZTRjMTQ2OQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ZWViZjkzZDZhYTkzZmUxZDUyMjVhZWU0NDg1Y2ZkYWMxY2Q4NWYzYg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MTY2YTZhYTdjZTdmOWViNDEzNmM1MWNmZDU0YTNlMGM0MmQzMDFkNzNlNDBh
|
10
|
+
YThiNjNhODJjYTc5ZTJmZjIzYzY4N2Y5NTMxMTliNDI3NjY1NDQwNWJlMDRh
|
11
|
+
MzVlZjEzNDMyZWM3ZTBmODlhMjI1ZTNjYThjYTk0OWEwOTNkMDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MTAwNjVmODY5ZDRmOTYxNjA0NDkxYzAzZDZiODc3Njg0NmNmMjEwYmM5MDk5
|
14
|
+
M2QxNzIxOWI1ZTA5ZTI2Y2I0MTE2MjE5ZTgwM2MzNjkxMDE0OWZlN2Y4ZmM4
|
15
|
+
NTgzMmMzMGExMTdjNTJmZmJlM2I5NjRjOTQ3Y2QwMWMwMzNlOGU=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.55
|
data/lib/mxhero-api.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
require 'httpclient'
|
3
3
|
require 'json'
|
4
4
|
require 'date'
|
5
|
+
require 'cgi'
|
5
6
|
|
6
7
|
require 'communication'
|
7
8
|
require 'urls'
|
@@ -519,6 +520,11 @@ module MxHero::API
|
|
519
520
|
response.status == 204
|
520
521
|
end
|
521
522
|
|
523
|
+
def set_new_password(user_name, new_password)
|
524
|
+
response = call(:put, user_url_set_password(user_name, new_password), throw_exception: false)
|
525
|
+
response.status == 200
|
526
|
+
end
|
527
|
+
|
522
528
|
# --------------------------------------------------------------------------------------------------------------------------------
|
523
529
|
private
|
524
530
|
|
@@ -542,6 +548,11 @@ module MxHero::API
|
|
542
548
|
user_url(user) + "domains/#{domain}/"
|
543
549
|
end
|
544
550
|
|
551
|
+
def user_url_set_password(user,new_password)
|
552
|
+
pass_esc = CGI::escape(new_password)
|
553
|
+
users_url + "/#{user}/setPassword?newPassword=#{pass_esc}"
|
554
|
+
end
|
555
|
+
|
545
556
|
# Fetch an element from an URL. That element maybe not found
|
546
557
|
# @return a Hash when the element exist. Or return nil when not found.
|
547
558
|
#
|
data/mxhero-api.gemspec
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: mxhero-api 0.1.
|
2
|
+
# stub: mxhero-api 0.1.55 ruby lib
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "mxhero-api"
|
6
|
-
s.version = "0.1.
|
6
|
+
s.version = "0.1.55"
|
7
7
|
|
8
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
9
9
|
s.authors = ["Maximiliano Dello Russo", "Juan Pablo Royo", "mxHero"]
|