mxhero-api 1.1.4 → 1.2.0

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.
Files changed (5) hide show
  1. checksums.yaml +13 -5
  2. data/VERSION +1 -1
  3. data/lib/mxhero-api.rb +10 -0
  4. data/mxhero-api.gemspec +5 -5
  5. metadata +8 -8
checksums.yaml CHANGED
@@ -1,7 +1,15 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 535eca4642e82189a54e53e6c6cf5fd33d9f5a95
4
- data.tar.gz: 98e5d823eac1440b0770e14f098dc4837de59c7d
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ MzAxNjg5YWVhNTFhNGIyNjFmZDI5YzMzMzM5ZjhlNjFjNzRmOWNiNA==
5
+ data.tar.gz: !binary |-
6
+ Y2NjNjQ5YWM0ZjMwYmI1NzEzZjUyOWI1NzdmNWUxZWM5YmUxMTJmYQ==
5
7
  SHA512:
6
- metadata.gz: 969b79fbd3b9f95d86646be9b97f7d85d248cb9b1ee97237a6480458e3a98e1b6c3783a92d45d9da9d0344924b5dfdc2c12a0d31accbb08386acd60a819ab3b7
7
- data.tar.gz: c3042de5c0ba0e3ccb34ae2edf360198dc86e47d86842a4dfda182c67aaea9ae0b16c703ac956373f244e0787a337a5226fa0169aa5ee5c421e1483f009ce54c
8
+ metadata.gz: !binary |-
9
+ MzIwYjY3OGRmM2E4NTRkOGJjNDkzNTY2ZThiYzAwOTNiZTBmZWRjYmNkZmRi
10
+ ODdmODJiY2Q3NGE1OWJiMTZiNWMyYzdmOTExNjY4Njg1NzgwMTg0MWY1MTY1
11
+ ZjEzZmU4MGZhOWEwOGZhYTA5YzljZjFlOTg0YWY2Njg2YWQyMjQ=
12
+ data.tar.gz: !binary |-
13
+ NDZlODE2YjEwMTVlZTkwNjI4NTI0MjlhOTJhZDZjNTllMTAyMjk2YTdiN2U1
14
+ ODc3ZGY3Yjk5MzMwMGEyODMzNzFkOWNlYmE5NjI4ODYyZTM5OGRlMWE2YTEx
15
+ MDg4Y2QxOWRmMDA3OTNmZDk1OWFmM2Y3NjE1ODk1ZTE5NzgxYzc=
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.4
1
+ 1.2.0
@@ -507,6 +507,11 @@ module MxHero::API
507
507
  response.status == 200
508
508
  end
509
509
 
510
+ def reset_password(user_name)
511
+ response = call(:get, user_url_reset_password(user_name), throw_exception: false)
512
+ response.status == 200
513
+ end
514
+
510
515
  # test_msg example:
511
516
  # {
512
517
  # "matching":{
@@ -570,6 +575,11 @@ module MxHero::API
570
575
  users_url + "/#{user}/setPassword?newPassword=#{pass_esc}"
571
576
  end
572
577
 
578
+ def user_url_reset_password(user)
579
+ pass_esc = CGI::escape(user)
580
+ users_url + "/resetPassword?email=#{pass_esc}"
581
+ end
582
+
573
583
  # Fetch an element from an URL. That element maybe not found
574
584
  # @return a Hash when the element exist. Or return nil when not found.
575
585
  #
@@ -1,21 +1,21 @@
1
1
  # -*- encoding: utf-8 -*-
2
- # stub: mxhero-api 1.1.4 ruby lib
2
+ # stub: mxhero-api 1.2.0 ruby lib
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "mxhero-api"
6
- s.version = "1.1.4"
6
+ s.version = "1.2.0"
7
7
 
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
- s.require_paths = ["lib"]
10
9
  s.authors = ["Maximiliano Dello Russo", "Juan Pablo Royo", "mxHero"]
11
- s.date = "2016-07-07"
10
+ s.date = "2017-01-23"
12
11
  s.description = "A gem to provide easy access to the API of MxHero platform (http://www.mxhero.com/)"
13
12
  s.email = ["maxidr@mxhero.com", "juanpablo.royo@gmail.com", "mxhero@mxhero.com"]
14
13
  s.files = [".gitignore", ".ruby-gemset", ".ruby-version", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/communication.rb", "lib/directories.rb", "lib/dto.rb", "lib/email-sync.rb", "lib/groups.rb", "lib/mxhero-api.rb", "lib/pst-converter.rb", "lib/resource.rb", "lib/resources/account.rb", "lib/resources/domain.rb", "lib/resources/group.rb", "lib/response.rb", "lib/urls.rb", "mxhero-api.gemspec", "test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/accounts_without_group.yml", "test/fixtures/api/add_an_inexistent_account_to_group.yml", "test/fixtures/api/add_and_remove_account.yml", "test/fixtures/api/add_feature.yml", "test/fixtures/api/all_groups.yml", "test/fixtures/api/associate_user_domain.yml", "test/fixtures/api/create_directory.yml", "test/fixtures/api/create_domain.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_user.yml", "test/fixtures/api/delete_directory.yml", "test/fixtures/api/delete_group.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/emailsync_delete.yml", "test/fixtures/api/emailsync_fetch_all.yml", "test/fixtures/api/emailsync_task_by_id.yml", "test/fixtures/api/fetch_directory.yml", "test/fixtures/api/fetch_user.yml", "test/fixtures/api/ldap_info.yml", "test/fixtures/api/move_to_trial.yml", "test/fixtures/api/pst_inactive_tasks.yml", "test/fixtures/api/refresh_directory.yml", "test/fixtures/api/remove_account_from_group_twice.yml", "test/fixtures/api/remove_inexistente_account_from_group.yml", "test/fixtures/api/rule_status.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/save_group.yml", "test/fixtures/api/system_properties.yml", "test/fixtures/api/system_properties_create.yml", "test/fixtures/api/system_properties_element.yml", "test/fixtures/api/test_domain.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_accounts_group_scope.yml", "test/fixtures/api/update_accounts_properties_scope.yml", "test/fixtures/api/update_directory.yml", "test/fixtures/api/update_rule.yml", "test/fixtures/api/update_user.yml", "test/fixtures/api/user_domains.yml", "test/fixtures/api/users_for_domain.yml", "test/fixtures/api/validate_user_credential.yml", "test/fixtures/domain.rb", "test/helper.rb", "test/test_directories.rb", "test/test_domain.rb", "test/test_dto.rb", "test/test_emailsync.rb", "test/test_feature.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb", "test/test_pst-converter.rb", "test/test_resource.rb"]
15
14
  s.homepage = "http://github.com/mxhero/mxhero-api"
16
15
  s.licenses = ["GPL-3"]
16
+ s.require_paths = ["lib"]
17
17
  s.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
18
- s.rubygems_version = "2.5.1"
18
+ s.rubygems_version = "2.1.9"
19
19
  s.summary = "A MxHero API client for ruby"
20
20
  s.test_files = ["test/fixtures/api/account_properties.yml", "test/fixtures/api/account_properties_not_found.yml", "test/fixtures/api/accounts.yml", "test/fixtures/api/accounts_filtered.yml", "test/fixtures/api/accounts_from_domain.yml", "test/fixtures/api/accounts_from_domain_paginated.yml", "test/fixtures/api/accounts_without_group.yml", "test/fixtures/api/add_an_inexistent_account_to_group.yml", "test/fixtures/api/add_and_remove_account.yml", "test/fixtures/api/add_feature.yml", "test/fixtures/api/all_groups.yml", "test/fixtures/api/associate_user_domain.yml", "test/fixtures/api/create_directory.yml", "test/fixtures/api/create_domain.yml", "test/fixtures/api/create_rule_for_domain.yml", "test/fixtures/api/create_user.yml", "test/fixtures/api/delete_directory.yml", "test/fixtures/api/delete_group.yml", "test/fixtures/api/delete_rule.yml", "test/fixtures/api/domain_by_id.yml", "test/fixtures/api/domain_by_id_not_found.yml", "test/fixtures/api/domain_rule.yml", "test/fixtures/api/domains.yml", "test/fixtures/api/emailsync_delete.yml", "test/fixtures/api/emailsync_fetch_all.yml", "test/fixtures/api/emailsync_task_by_id.yml", "test/fixtures/api/fetch_directory.yml", "test/fixtures/api/fetch_user.yml", "test/fixtures/api/ldap_info.yml", "test/fixtures/api/move_to_trial.yml", "test/fixtures/api/pst_inactive_tasks.yml", "test/fixtures/api/refresh_directory.yml", "test/fixtures/api/remove_account_from_group_twice.yml", "test/fixtures/api/remove_inexistente_account_from_group.yml", "test/fixtures/api/rule_status.yml", "test/fixtures/api/rules_for_domain.yml", "test/fixtures/api/rules_for_domain_by_component.yml", "test/fixtures/api/save_group.yml", "test/fixtures/api/system_properties.yml", "test/fixtures/api/system_properties_create.yml", "test/fixtures/api/system_properties_element.yml", "test/fixtures/api/test_domain.yml", "test/fixtures/api/update_account_properties.yml", "test/fixtures/api/update_accounts_group_scope.yml", "test/fixtures/api/update_accounts_properties_scope.yml", "test/fixtures/api/update_directory.yml", "test/fixtures/api/update_rule.yml", "test/fixtures/api/update_user.yml", "test/fixtures/api/user_domains.yml", "test/fixtures/api/users_for_domain.yml", "test/fixtures/api/validate_user_credential.yml", "test/fixtures/domain.rb", "test/helper.rb", "test/test_directories.rb", "test/test_domain.rb", "test/test_dto.rb", "test/test_emailsync.rb", "test/test_feature.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb", "test/test_pst-converter.rb", "test/test_resource.rb"]
21
21
 
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: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maximiliano Dello Russo
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-07-07 00:00:00.000000000 Z
13
+ date: 2017-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: vcr
@@ -63,9 +63,9 @@ executables: []
63
63
  extensions: []
64
64
  extra_rdoc_files: []
65
65
  files:
66
- - ".gitignore"
67
- - ".ruby-gemset"
68
- - ".ruby-version"
66
+ - .gitignore
67
+ - .ruby-gemset
68
+ - .ruby-version
69
69
  - Gemfile
70
70
  - LICENSE.txt
71
71
  - README.md
@@ -158,17 +158,17 @@ require_paths:
158
158
  - lib
159
159
  required_ruby_version: !ruby/object:Gem::Requirement
160
160
  requirements:
161
- - - ">="
161
+ - - ! '>='
162
162
  - !ruby/object:Gem::Version
163
163
  version: 2.3.0
164
164
  required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  requirements:
166
- - - ">="
166
+ - - ! '>='
167
167
  - !ruby/object:Gem::Version
168
168
  version: '0'
169
169
  requirements: []
170
170
  rubyforge_project:
171
- rubygems_version: 2.5.1
171
+ rubygems_version: 2.1.9
172
172
  signing_key:
173
173
  specification_version: 4
174
174
  summary: A MxHero API client for ruby