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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZmQ0ZWM4NjhhZDZmNTY4YzYzOWI0MzhkYjU1MTJhNmYwMGRkM2Q1OA==
4
+ NGQ0YTZiMDJlMjA2MTE3ZDQ5MzE5MTk0MDUyMTI0NTg4ZTRjMTQ2OQ==
5
5
  data.tar.gz: !binary |-
6
- ZjQ1MzY1NDIxNTU3NWQ3MDk4NWZmZWE1OGViOTdmMDM0YWQxMDkyOA==
6
+ ZWViZjkzZDZhYTkzZmUxZDUyMjVhZWU0NDg1Y2ZkYWMxY2Q4NWYzYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- Yjc1Y2RlYTMwY2Y3ZmE1MGJjM2NjY2Q2YmQ0MmE5OWJkMjlhODg1MmZlZTQ3
10
- OTIyYWIwMzY3OGZiNzlkMzNmYmM5NjMwM2UyZjQ3NmRhN2IwNmQ1YTUwZTZh
11
- NGMzOGJiZjhiOTQzMDJlNDk4ZmZlZjg2MTk3MDMxMWEzNTQwMGU=
9
+ MTY2YTZhYTdjZTdmOWViNDEzNmM1MWNmZDU0YTNlMGM0MmQzMDFkNzNlNDBh
10
+ YThiNjNhODJjYTc5ZTJmZjIzYzY4N2Y5NTMxMTliNDI3NjY1NDQwNWJlMDRh
11
+ MzVlZjEzNDMyZWM3ZTBmODlhMjI1ZTNjYThjYTk0OWEwOTNkMDM=
12
12
  data.tar.gz: !binary |-
13
- MzA5ODk2OGNlMjViZWZiNzRiYzg0Y2EwMWQ5MDE4ZmRlNDM4NjY4NGViNjEx
14
- Mjc3NjVmNDViNDZkOGJjOGQwZTk4MWUxMzU3YTllN2Y1ZjUzZGZkNDFlZDhj
15
- ZTVjMGNjMjgxOTRhYTMxNzJjOTQxOGIxYWRiY2RjZGZmMzZlNmY=
13
+ MTAwNjVmODY5ZDRmOTYxNjA0NDkxYzAzZDZiODc3Njg0NmNmMjEwYmM5MDk5
14
+ M2QxNzIxOWI1ZTA5ZTI2Y2I0MTE2MjE5ZTgwM2MzNjkxMDE0OWZlN2Y4ZmM4
15
+ NTgzMmMzMGExMTdjNTJmZmJlM2I5NjRjOTQ3Y2QwMWMwMzNlOGU=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.54
1
+ 0.1.55
@@ -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
  #
@@ -1,9 +1,9 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: mxhero-api 0.1.54 ruby lib
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.54"
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"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mxhero-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.54
4
+ version: 0.1.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximiliano Dello Russo