mxhero-api 0.1.17 → 0.1.18
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 +8 -0
- data/mxhero-api.gemspec +3 -3
- data/test/test_directories.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
YTZkZmZhYWI5ODJmMGQyNzIwMjE1YmJiNmU3YWNmZDNjYmMwM2QzZg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MjJmYWYxZDg4NWQyMjlhNWM5ZGU3YjE1ODBhMmIxZGRmNjAwZWMxZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
NDhkZmI3MjRiN2U4MjMyMzZhZWNmOTY0ZjA4MzExYmQ2ODJjYzlmM2U3Njdh
|
10
|
+
OTk1MzY2ZGQwNDU3N2NlMGFiMTIwM2M5Y2FlZjA1MjU1M2QyOGMwMmUyMWVi
|
11
|
+
NTg0NjI1NTZkYWViNGEyMDgxZGJmMTMzM2ZkYWNjMGExNTNmMGQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZTRkN2JhZmEyYjAxZjFmNTdiZDNhNWM1NWViMmIwYjE5NWYwMjlhM2JiOGIy
|
14
|
+
MzI2ZGZkOWYwMzk1ZDM2MmY1ZDk4OTc4MzBhZmM5MWIzN2IwYjBmMmJjZjQ0
|
15
|
+
MTgwYThkMWM0ZDBiOTM4MDExM2IzNjdiN2IzODA2MzBmM2I5Y2E=
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.18
|
data/lib/mxhero-api.rb
CHANGED
@@ -87,6 +87,14 @@ module MxHero::API
|
|
87
87
|
@verbose = config[:verbose] || false
|
88
88
|
end
|
89
89
|
|
90
|
+
# Expose directories api
|
91
|
+
#
|
92
|
+
# @return MxHero::API::Directories
|
93
|
+
def directories(domain)
|
94
|
+
@directories ||= Directories.new(domain, api_url: @service_url,
|
95
|
+
username: @username, password: @password, verbose: @verbose)
|
96
|
+
end
|
97
|
+
|
90
98
|
# Find a rule by domain and ID
|
91
99
|
#
|
92
100
|
# @param domain [String]
|
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.18 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.18"
|
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 = "2013-11-
|
10
|
+
s.date = "2013-11-20"
|
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/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/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/ldap_info.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/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/helper.rb", "test/test_directories.rb", "test/test_dto.rb", "test/test_groups.rb", "test/test_mxhero_api.rb", "test/test_mxhero_api_response.rb"]
|
data/test/test_directories.rb
CHANGED
@@ -12,6 +12,17 @@ class DirectoriesTest < MiniTest::Unit::TestCase
|
|
12
12
|
'test.com'
|
13
13
|
end
|
14
14
|
|
15
|
+
def test_directories_from_api
|
16
|
+
directories = MxHero::API::Client.new(api_url: TEST_API_URL, username: TEST_API_USER,
|
17
|
+
password: TEST_API_PASSWORD).directories(domain)
|
18
|
+
assert directories.is_a? MxHero::API::Directories
|
19
|
+
assert_equal domain, directories.instance_variable_get(:@domain)
|
20
|
+
assert_equal TEST_API_URL, directories.instance_variable_get(:@service_url)
|
21
|
+
assert_equal TEST_API_USER, directories.instance_variable_get(:@username)
|
22
|
+
assert_equal TEST_API_PASSWORD, directories.instance_variable_get(:@password)
|
23
|
+
assert ! directories.instance_variable_get(:@verbose)
|
24
|
+
end
|
25
|
+
|
15
26
|
def test_fetch
|
16
27
|
VCR.use_cassette('fetch_directory') do
|
17
28
|
directory = @dirs.fetch
|
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.18
|
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: 2013-11-
|
13
|
+
date: 2013-11-20 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: vcr
|