ivapi 1.0.4 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +5 -5
- data/.travis.yml +13 -3
- data/Gemfile +5 -5
- data/README.md +41 -14
- data/ivapi.gemspec +10 -10
- data/lib/ivapi.rb +26 -6
- data/lib/ivapi/authentication.rb +2 -2
- data/lib/ivapi/client.rb +20 -11
- data/lib/ivapi/client/account.rb +6 -6
- data/lib/ivapi/client/base.rb +34 -0
- data/lib/ivapi/client/server.rb +20 -12
- data/lib/ivapi/configuration.rb +32 -26
- data/lib/ivapi/default.rb +86 -0
- data/lib/ivapi/error.rb +19 -22
- data/lib/ivapi/response/raise_error.rb +21 -0
- data/lib/ivapi/response/rename_keys.rb +38 -0
- data/lib/ivapi/version.rb +1 -1
- data/spec/ivapi/client/account_spec.rb +60 -26
- data/spec/ivapi/client/server_spec.rb +136 -63
- data/spec/ivapi/client_spec.rb +47 -2
- data/spec/ivapi_spec.rb +10 -10
- data/spec/spec_helper.rb +2 -3
- metadata +39 -33
- data/lib/faraday/response/raise_ivapi_error.rb +0 -24
- data/lib/ivapi/connection.rb +0 -29
- data/lib/ivapi/request.rb +0 -22
data/lib/ivapi/configuration.rb
CHANGED
@@ -3,42 +3,48 @@ require 'ivapi/version'
|
|
3
3
|
|
4
4
|
module Ivapi
|
5
5
|
module Configuration
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
base.reset
|
6
|
+
|
7
|
+
attr_accessor :server_id, :user_agent, :connection_options,
|
8
|
+
:web_endpoint, :api_endpoint
|
9
|
+
attr_writer :username, :password
|
10
|
+
|
11
|
+
def self.keys
|
12
|
+
@keys ||= [
|
13
|
+
:api_endpoint,
|
14
|
+
:server_id,
|
15
|
+
:username,
|
16
|
+
:middleware,
|
17
|
+
:password,
|
18
|
+
:user_agent,
|
19
|
+
:connection_options
|
20
|
+
]
|
22
21
|
end
|
23
22
|
|
24
23
|
def configure
|
25
24
|
yield self
|
26
25
|
end
|
27
26
|
|
28
|
-
|
29
|
-
|
27
|
+
# Reset configuration options to default values
|
28
|
+
def reset!
|
29
|
+
Ivapi::Configuration.keys.each do |key|
|
30
|
+
instance_variable_set(:"@#{key}", Ivapi::Default.options[key])
|
31
|
+
end
|
32
|
+
self
|
30
33
|
end
|
34
|
+
alias setup reset!
|
31
35
|
|
32
|
-
def
|
33
|
-
|
36
|
+
def configure
|
37
|
+
yield self
|
34
38
|
end
|
35
39
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
private
|
41
|
+
|
42
|
+
def options
|
43
|
+
Hash[
|
44
|
+
Ivapi::Configuration.keys.map do |key|
|
45
|
+
[key, instance_variable_get(:"@#{key}")]
|
46
|
+
end
|
47
|
+
]
|
42
48
|
end
|
43
49
|
end
|
44
50
|
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require 'faraday_middleware'
|
2
|
+
require 'ivapi/response/raise_error'
|
3
|
+
require 'ivapi/response/rename_keys'
|
4
|
+
require 'ivapi/version'
|
5
|
+
|
6
|
+
module Ivapi
|
7
|
+
|
8
|
+
# Default configuration options for {Client}
|
9
|
+
module Default
|
10
|
+
# Default API endpoint
|
11
|
+
API_ENDPOINT = 'https://api.iv.lt'.freeze
|
12
|
+
|
13
|
+
# Default User Agent header string
|
14
|
+
USER_AGENT = "Ivapi ruby gem v#{Ivapi::VERSION}".freeze
|
15
|
+
|
16
|
+
# In Faraday 0.9, Faraday::Builder was renamed to Faraday::RackBuilder
|
17
|
+
RACK_BUILDER_CLASS = if defined?(Faraday::RackBuilder)
|
18
|
+
Faraday::RackBuilder
|
19
|
+
else
|
20
|
+
Faraday::Builder
|
21
|
+
end
|
22
|
+
|
23
|
+
# Default Faraday middleware stack
|
24
|
+
MIDDLEWARE = RACK_BUILDER_CLASS.new do |builder|
|
25
|
+
builder.request :json
|
26
|
+
builder.use Ivapi::Response::RaiseError
|
27
|
+
builder.use FaradayMiddleware::FollowRedirects
|
28
|
+
builder.use FaradayMiddleware::Mashify
|
29
|
+
builder.use Ivapi::Response::RenameKeys
|
30
|
+
builder.use FaradayMiddleware::ParseJson
|
31
|
+
builder.adapter Faraday.default_adapter
|
32
|
+
end
|
33
|
+
|
34
|
+
class << self
|
35
|
+
|
36
|
+
# Configuration options
|
37
|
+
# @return [Hash]
|
38
|
+
def options
|
39
|
+
Hash[Ivapi::Configuration.keys.map { |key| [key, send(key)] }]
|
40
|
+
end
|
41
|
+
|
42
|
+
# Default GitHub username for Basic Auth from ENV
|
43
|
+
# @return [String]
|
44
|
+
def username
|
45
|
+
ENV['IVAPI_USERNAME']
|
46
|
+
end
|
47
|
+
|
48
|
+
def server_id
|
49
|
+
nil
|
50
|
+
end
|
51
|
+
|
52
|
+
# Default middleware stack for Faraday::Connection
|
53
|
+
# from {MIDDLEWARE}
|
54
|
+
# @return [String]
|
55
|
+
def middleware
|
56
|
+
MIDDLEWARE
|
57
|
+
end
|
58
|
+
|
59
|
+
# Default GitHub password for Basic Auth from ENV
|
60
|
+
# @return [String]
|
61
|
+
def password
|
62
|
+
ENV['IVAPI_PASSWORD']
|
63
|
+
end
|
64
|
+
|
65
|
+
def connection_options
|
66
|
+
{
|
67
|
+
headers: {
|
68
|
+
user_agent: user_agent
|
69
|
+
}
|
70
|
+
}
|
71
|
+
end
|
72
|
+
|
73
|
+
# Default User-Agent header string from ENV or {USER_AGENT}
|
74
|
+
# @return [String]
|
75
|
+
def user_agent
|
76
|
+
ENV['IVAPI_USER_AGENT'] || USER_AGENT
|
77
|
+
end
|
78
|
+
|
79
|
+
# Default API endpoint from ENV or {API_ENDPOINT}
|
80
|
+
# @return [String]
|
81
|
+
def api_endpoint
|
82
|
+
ENV['IVAPI_API_ENDPOINT'] || API_ENDPOINT
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
data/lib/ivapi/error.rb
CHANGED
@@ -1,6 +1,24 @@
|
|
1
1
|
module Ivapi
|
2
|
-
|
3
2
|
class Error < StandardError
|
3
|
+
# Returns the appropriate Ivapi::Error sublcass based
|
4
|
+
# on status and response message.
|
5
|
+
#
|
6
|
+
# response - The Hash of HTTP response.
|
7
|
+
#
|
8
|
+
# Returns the Ivapi::Error.
|
9
|
+
def self.from_response(response)
|
10
|
+
status = response[:status].to_i
|
11
|
+
body = response[:body].to_s
|
12
|
+
headers = response[:response_headers]
|
13
|
+
|
14
|
+
if klass = case status
|
15
|
+
when 400 then Ivapi::BadRequest
|
16
|
+
when 401 then Ivapi::Unauthorized
|
17
|
+
when 403 then Ivapi::Forbidden
|
18
|
+
end
|
19
|
+
klass.new(response)
|
20
|
+
end
|
21
|
+
end
|
4
22
|
end
|
5
23
|
|
6
24
|
# Raised when iv.lt returns a 400 HTTP status code
|
@@ -11,25 +29,4 @@ module Ivapi
|
|
11
29
|
|
12
30
|
# Raised when iv.lt returns a 403 HTTP status code
|
13
31
|
class Forbidden < Error; end
|
14
|
-
|
15
|
-
# Raised when iv.lt returns a 404 HTTP status code
|
16
|
-
class NotFound < Error; end
|
17
|
-
|
18
|
-
# Raised when iv.lt returns a 406 HTTP status code
|
19
|
-
class NotAcceptable < Error; end
|
20
|
-
|
21
|
-
# Raised when iv.lt returns a 422 HTTP status code
|
22
|
-
class UnprocessableEntity < Error; end
|
23
|
-
|
24
|
-
# Raised when iv.lt returns a 500 HTTP status code
|
25
|
-
class InternalServerError < Error; end
|
26
|
-
|
27
|
-
# Raised when iv.lt returns a 501 HTTP status code
|
28
|
-
class NotImplemented < Error; end
|
29
|
-
|
30
|
-
# Raised when iv.lt returns a 502 HTTP status code
|
31
|
-
class BadGateway < Error; end
|
32
|
-
|
33
|
-
# Raised when iv.lt returns a 503 HTTP status code
|
34
|
-
class ServiceUnavailable < Error; end
|
35
32
|
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'ivapi/error'
|
3
|
+
|
4
|
+
module Ivapi
|
5
|
+
# Faraday response middleware
|
6
|
+
module Response
|
7
|
+
|
8
|
+
# This class raises an exception based HTTP status codes returned
|
9
|
+
# by the API.
|
10
|
+
class RaiseError < Faraday::Response::Middleware
|
11
|
+
|
12
|
+
private
|
13
|
+
|
14
|
+
def on_complete(response)
|
15
|
+
if error = Ivapi::Error.from_response(response)
|
16
|
+
raise error
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
|
3
|
+
module Ivapi
|
4
|
+
# Faraday response middleware
|
5
|
+
module Response
|
6
|
+
class RenameKeys < Faraday::Response::Middleware
|
7
|
+
UNUSED_KEYS = [
|
8
|
+
'ac_', 'us_', 'bo_', 'or_', 'se_', 'ta_', 'in_'
|
9
|
+
].freeze
|
10
|
+
|
11
|
+
private
|
12
|
+
|
13
|
+
def on_complete(response)
|
14
|
+
response[:body] = rename_keys(response[:body])
|
15
|
+
end
|
16
|
+
|
17
|
+
def rename_keys(input)
|
18
|
+
if input.is_a?(Hash)
|
19
|
+
new = {}
|
20
|
+
input.map do |key, value|
|
21
|
+
if value.is_a?(Hash)
|
22
|
+
value = rename_keys(value)
|
23
|
+
elsif value.is_a?(Array)
|
24
|
+
value = value.map { |v| rename_keys(v) }
|
25
|
+
end
|
26
|
+
|
27
|
+
new[key.gsub(Regexp.union(UNUSED_KEYS), '')] = value
|
28
|
+
end
|
29
|
+
new
|
30
|
+
elsif input.is_a?(Array)
|
31
|
+
input.map { |value| rename_keys(value) }
|
32
|
+
else
|
33
|
+
input
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/ivapi/version.rb
CHANGED
@@ -1,47 +1,81 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Ivapi::Client::Account do
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
before(:each) do
|
5
|
+
Ivapi.configure do |config|
|
6
|
+
config.username = 'foo'
|
7
|
+
config.password = 'bar'
|
8
|
+
end
|
7
9
|
end
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
+
after(:each) do
|
12
|
+
Ivapi.reset!
|
13
|
+
end
|
11
14
|
|
12
|
-
|
15
|
+
describe 'account information' do
|
16
|
+
before(:each) do
|
17
|
+
stub_command('account_info')
|
18
|
+
.to_return(json_response('account_info.json'))
|
19
|
+
@info = Ivapi.account.information
|
20
|
+
end
|
13
21
|
|
14
|
-
|
22
|
+
it 'should return account name' do
|
23
|
+
expect(@info.name).to eq('Name Surname')
|
24
|
+
end
|
15
25
|
end
|
16
26
|
|
17
|
-
|
18
|
-
|
19
|
-
|
27
|
+
describe 'account orders' do
|
28
|
+
before(:each) do
|
29
|
+
stub_command('account_orders')
|
30
|
+
.to_return(json_response('account_orders.json'))
|
31
|
+
@account_orders = Ivapi.account.orders
|
32
|
+
@order = @account_orders.first
|
33
|
+
end
|
20
34
|
|
21
|
-
|
35
|
+
it 'should return correct orders count' do
|
36
|
+
expect(@account_orders.count).to eq(3)
|
37
|
+
end
|
22
38
|
|
23
|
-
|
24
|
-
|
39
|
+
it 'should return order cost' do
|
40
|
+
expect(@order.cost).to eq('11.11')
|
41
|
+
end
|
25
42
|
end
|
26
43
|
|
27
|
-
|
28
|
-
|
29
|
-
|
44
|
+
describe 'account services' do
|
45
|
+
before(:each) do
|
46
|
+
stub_command('account_services')
|
47
|
+
.to_return(json_response('account_services.json'))
|
48
|
+
@account_services = Ivapi.account.services
|
49
|
+
@service = @account_services.first
|
50
|
+
end
|
30
51
|
|
31
|
-
|
52
|
+
it 'should return correct services count' do
|
53
|
+
expect(@account_services.count).to eq(3)
|
54
|
+
end
|
32
55
|
|
33
|
-
|
34
|
-
|
35
|
-
|
56
|
+
it 'should return service description' do
|
57
|
+
expect(@service.description)
|
58
|
+
.to eq('Adreso metinis mokestis (example.com)')
|
59
|
+
end
|
36
60
|
end
|
37
61
|
|
38
|
-
it 'returns account
|
39
|
-
|
40
|
-
|
62
|
+
it 'returns account credits'
|
63
|
+
|
64
|
+
describe 'account bonuses' do
|
65
|
+
before(:each) do
|
66
|
+
stub_command('account_bonuses', count: 10)
|
67
|
+
.to_return(json_response('account_bonuses.json'))
|
68
|
+
@account_bonuses = Ivapi.account.bonuses
|
69
|
+
@bonus = @account_bonuses[2]
|
70
|
+
end
|
41
71
|
|
42
|
-
|
72
|
+
it 'should return correct bonuses count' do
|
73
|
+
expect(@account_bonuses.count).to eq(3)
|
74
|
+
end
|
43
75
|
|
44
|
-
|
45
|
-
|
76
|
+
it 'should return bonus description' do
|
77
|
+
expect(@bonus.description)
|
78
|
+
.to eq('SMS +370.61234569 (example)')
|
79
|
+
end
|
46
80
|
end
|
47
81
|
end
|
@@ -1,94 +1,167 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Ivapi::Client::Server do
|
4
|
+
before(:each) do
|
5
|
+
Ivapi.configure do |config|
|
6
|
+
config.username = 'foo'
|
7
|
+
config.password = 'bar'
|
8
|
+
config.server_id = 3
|
9
|
+
end
|
10
|
+
end
|
4
11
|
|
5
|
-
|
6
|
-
|
12
|
+
after(:each) do
|
13
|
+
Ivapi.reset!
|
7
14
|
end
|
8
15
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
16
|
+
describe 'server information' do
|
17
|
+
before(:each) do
|
18
|
+
stub_command('server_info', id: 3)
|
19
|
+
.to_return(json_response('server_info.json'))
|
20
|
+
@info = Ivapi.server.information
|
21
|
+
end
|
22
|
+
|
23
|
+
it 'should response with alias method' do
|
24
|
+
expect(Ivapi.server.info.domain).to eq('server.example.com')
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should return domain name' do
|
28
|
+
expect(@info.domain).to eq('server.example.com')
|
29
|
+
end
|
30
|
+
|
31
|
+
it 'should return node name' do
|
32
|
+
expect(@info.info.node).to eq('Robinija')
|
33
|
+
end
|
15
34
|
end
|
16
35
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
36
|
+
describe 'server tasks' do
|
37
|
+
before(:each) do
|
38
|
+
stub_command('server_tasks', id: 3, count: 1)
|
39
|
+
.to_return(json_response('server_tasks.json'))
|
40
|
+
@tasks = Ivapi.server.tasks(1)
|
41
|
+
@task = @tasks.first
|
42
|
+
end
|
43
|
+
|
44
|
+
it 'should return params domain name' do
|
45
|
+
expect(@task.params.domain).to eq('server.example.com')
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
describe 'server graphs' do
|
50
|
+
before(:each) do
|
51
|
+
stub_command('server_graphs', id: 3, width: 1000, ip: '12.23.34.45')
|
52
|
+
.to_return(json_response('server_graphs.json'))
|
53
|
+
@graphs = Ivapi.server.graphs(1000, '12.23.34.45')
|
54
|
+
end
|
55
|
+
|
56
|
+
it 'should return cpu weekly' do
|
57
|
+
expect(@graphs.cpu_weekly).to eq('//stats.serveriai.lt/graph.php?Ds252x+6Lek1o0SV2+u99fqhNaiflbCcb6QuGzlRJ9yy2R1VycHOc6baz3zRB6Am1RJcniVrpCjj+A47DMwkyfQ==')
|
58
|
+
end
|
22
59
|
end
|
23
60
|
|
24
61
|
it 'should return server tasks with specified options' do
|
25
|
-
stub_command('server_tasks',
|
62
|
+
stub_command('server_tasks', id: 3, count: 1, task_id: 1)
|
26
63
|
.to_return(json_response('server_tasks.json'))
|
27
|
-
server_tasks =
|
28
|
-
expect(server_tasks.first.
|
64
|
+
server_tasks = Ivapi.client.server(3).tasks(1, { task_id: 1 })
|
65
|
+
expect(server_tasks.first.params.domain).to eq('server.example.com')
|
29
66
|
end
|
30
67
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
68
|
+
describe 'server os' do
|
69
|
+
before(:each) do
|
70
|
+
stub_command('server_os', id: 3)
|
71
|
+
.to_return(json_response('server_os.json'))
|
72
|
+
@os = Ivapi.server.os['debian-6.0-x86_64']
|
73
|
+
end
|
37
74
|
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
server_os = @client.server_os
|
42
|
-
expect(server_os['debian-6.0-x86_64'].title).to eq('Debian 6')
|
75
|
+
it 'should return cpu weekly' do
|
76
|
+
expect(@os.title).to eq('Debian 6')
|
77
|
+
end
|
43
78
|
end
|
44
79
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
80
|
+
describe 'server reboot' do
|
81
|
+
before(:each) do
|
82
|
+
stub_command('server_reboot', id: 3)
|
83
|
+
.to_return(json_response('server_reboot.json'))
|
84
|
+
@reboot_response = Ivapi.server.reboot
|
85
|
+
end
|
51
86
|
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
server_recreate = @client.server_recreate('debian-6.0-x86_64')
|
56
|
-
expect(server_recreate.task_id).to eq('12')
|
87
|
+
it 'should return task id' do
|
88
|
+
expect(@reboot_response.task_id).to eq('11')
|
89
|
+
end
|
57
90
|
end
|
58
91
|
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
92
|
+
describe 'server recreate server' do
|
93
|
+
before(:each) do
|
94
|
+
stub_command('server_recreate', id: 3, os: 'debian-6.0-x86_64')
|
95
|
+
.to_return(json_response('server_recreate.json'))
|
96
|
+
@recreate_response = Ivapi.server.recreate('debian-6.0-x86_64')
|
97
|
+
end
|
98
|
+
|
99
|
+
it 'should return task id' do
|
100
|
+
expect(@recreate_response.task_id).to eq('12')
|
101
|
+
end
|
64
102
|
end
|
65
103
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
104
|
+
describe 'reset server password' do
|
105
|
+
before(:each) do
|
106
|
+
stub_command('server_reset_password', id: 3)
|
107
|
+
.to_return(json_response('server_reset_password.json'))
|
108
|
+
@reset_pwd_response = Ivapi.server.reset_password
|
109
|
+
end
|
110
|
+
|
111
|
+
it 'should return task id' do
|
112
|
+
expect(@reset_pwd_response.task_id).to eq('13')
|
113
|
+
end
|
71
114
|
end
|
72
115
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
116
|
+
describe 'flush server iptables' do
|
117
|
+
before(:each) do
|
118
|
+
stub_command('server_flush_iptables', id: 3)
|
119
|
+
.to_return(json_response('server_flush_iptables.json'))
|
120
|
+
@flush_response = Ivapi.server.flush_iptables
|
121
|
+
end
|
122
|
+
|
123
|
+
it 'should return task id' do
|
124
|
+
expect(@flush_response.task_id).to eq('16')
|
125
|
+
end
|
78
126
|
end
|
79
127
|
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
128
|
+
describe 'change server firewall settings' do
|
129
|
+
before(:each) do
|
130
|
+
stub_command('server_firewall', id: 3)
|
131
|
+
.to_return(json_response('server_firewall.json'))
|
132
|
+
@firewall = Ivapi.server.firewall
|
133
|
+
end
|
134
|
+
|
135
|
+
it 'should return correct pps' do
|
136
|
+
expect(@firewall.pps).to eq('1000')
|
137
|
+
end
|
85
138
|
end
|
86
139
|
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
140
|
+
describe 'change server plan' do
|
141
|
+
before(:each) do
|
142
|
+
stub_command('server_change', id: 3)
|
143
|
+
.to_return(json_response('server_change.json'))
|
144
|
+
@plan_response = Ivapi.server.change
|
145
|
+
end
|
146
|
+
|
147
|
+
it 'should return correct pps' do
|
148
|
+
expect(@plan_response.task_id).to eq('14')
|
149
|
+
end
|
92
150
|
end
|
93
151
|
|
152
|
+
describe 'change server hostname' do
|
153
|
+
before(:each) do
|
154
|
+
stub_command('server_domain', id: 3, domain: 'example.com')
|
155
|
+
.to_return(json_response('server_domain.json'))
|
156
|
+
@hostname_response = Ivapi.server.domain('example.com')
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'should return task id' do
|
160
|
+
expect(@hostname_response.task_id).to eq('15')
|
161
|
+
end
|
162
|
+
|
163
|
+
it 'should response with alias method' do
|
164
|
+
expect(Ivapi.server.hostname('example.com').task_id).to eq('15')
|
165
|
+
end
|
166
|
+
end
|
94
167
|
end
|