mxhero-api 0.1.30 → 0.1.31
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/communication.rb +1 -0
- data/lib/resources/domain.rb +8 -1
- data/mxhero-api.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDkzNTUwNzUxNDUzN2Y0MjE5NjZhNTUzNTNlMDEwYzBlZTMwZjBlOQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NTVlZTQ2NDA4ZGU1ZWE1ZjEyNTA5YTMwOTFjMmJhYmRkOTRkYmZiMg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZjZhY2E1N2RlNDA3ZjkyNjJiMGRlYmRhZDRjNzQ3OGI5YzgyZmM0OTdiZjIy
|
10
|
+
NDJkYWRiZmUwZjFlYjAyMTBmYzVhMzg3ODIwNTI3MTJiMDdmODEyMzMyZjA5
|
11
|
+
NTMxYjY5OTg4YWI4MzEzZmJiMmQ1NzBiODQ0MjUyMTk3OGUyZTM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZmNiNzk4M2JmOGRmMGNjNTEzZTNmYWVkMTE5MWUzM2JmNDVkY2YxNmYwMjJl
|
14
|
+
MDMwM2Q5ZmU5MTg4MDE5MmQyNGFmMjYzNjM3MTdkN2ViYTE3MmEzNTJjNzIz
|
15
|
+
ZDBmYzMxNmJjNGRkODc1ZWI3ZDgzNTg1MGIwOWI2Y2VjZTQ5NmE=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.31
|
data/lib/communication.rb
CHANGED
@@ -14,6 +14,7 @@ module MxHero
|
|
14
14
|
end
|
15
15
|
@client.set_auth(url, @username, @password)
|
16
16
|
response = @client.request(method, url, nil, body, headers)
|
17
|
+
raise "Unauthorized" if response.status == 401
|
17
18
|
unless more_options[:throw_exception] == false
|
18
19
|
raise "An error ocurred when try to communicate with the API\nError: #{response.inspect}" if (500..600).include?(response.status)
|
19
20
|
end
|
data/lib/resources/domain.rb
CHANGED
@@ -3,16 +3,18 @@ module MxHero::API
|
|
3
3
|
class Domain < Resource
|
4
4
|
|
5
5
|
attributes :domain, :server, :creation_date, :update_date,
|
6
|
-
:aliases, :features, :cos, :cos_last_change
|
6
|
+
:aliases, :features, :cos, :cos_last_change, :metadata
|
7
7
|
|
8
8
|
attribute :creation_date, map: 'creationDate', date: true
|
9
9
|
attribute :update_date, map: 'updateDate', date: true
|
10
10
|
attribute :cos_last_change, map: 'cosLastChange', date: true
|
11
|
+
attribute :metadata
|
11
12
|
|
12
13
|
def initialize(data = {})
|
13
14
|
super(data)
|
14
15
|
load_features(features)
|
15
16
|
load_cos(cos)
|
17
|
+
load_metadata
|
16
18
|
end
|
17
19
|
|
18
20
|
def change_to_trial
|
@@ -30,6 +32,11 @@ module MxHero::API
|
|
30
32
|
def load_features(features)
|
31
33
|
@features = features.map { |feature| Feature.new feature }
|
32
34
|
end
|
35
|
+
|
36
|
+
def load_metadata
|
37
|
+
@metadata = JSON.parse(metadata) if metadata
|
38
|
+
end
|
39
|
+
|
33
40
|
end
|
34
41
|
|
35
42
|
|
data/mxhero-api.gemspec
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
# stub: mxhero-api 0.1.
|
2
|
+
# stub: mxhero-api 0.1.31 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.31"
|
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"]
|
10
|
-
s.date = "2014-
|
10
|
+
s.date = "2014-04-11"
|
11
11
|
s.description = "A gem to provide easy access to the API of MxHero platform (http://www.mxhero.com/)"
|
12
12
|
s.email = ["maxidr@mxhero.com", "juanpablo.royo@gmail.com", "mxhero@mxhero.com"]
|
13
13
|
s.files = [".gitignore", ".rvmrc", "Gemfile", "LICENSE.txt", "README.md", "Rakefile", "VERSION", "lib/communication.rb", "lib/directories.rb", "lib/dto.rb", "lib/groups.rb", "lib/mxhero-api.rb", "lib/resource.rb", "lib/resources/account.rb", "lib/resources/domain.rb", "lib/resources/group.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/all_groups.yml", "test/fixtures/api/create_directory.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/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/refresh_directory.yml", "test/fixtures/api/remove_account_from_group_twice.yml", "test/fixtures/api/remove_inexistente_account_from_group.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/user_domains.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_feature.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb", "test/test_resource.rb"]
|
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.
|
4
|
+
version: 0.1.31
|
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: 2014-
|
13
|
+
date: 2014-04-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: vcr
|