lumberg 2.0.0.pre4 → 2.0.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +49 -49
  3. data/lib/lumberg/cpanel.rb +2 -0
  4. data/lib/lumberg/cpanel/addon_domain.rb +3 -3
  5. data/lib/lumberg/cpanel/backups.rb +1 -1
  6. data/lib/lumberg/cpanel/base.rb +5 -5
  7. data/lib/lumberg/cpanel/box_trapper.rb +1 -1
  8. data/lib/lumberg/cpanel/branding.rb +5 -5
  9. data/lib/lumberg/cpanel/contact.rb +2 -2
  10. data/lib/lumberg/cpanel/cron.rb +6 -6
  11. data/lib/lumberg/cpanel/dns_lookup.rb +1 -1
  12. data/lib/lumberg/cpanel/domain_keys.rb +4 -4
  13. data/lib/lumberg/cpanel/domain_lookup.rb +4 -4
  14. data/lib/lumberg/cpanel/email.rb +40 -40
  15. data/lib/lumberg/cpanel/file_manager.rb +5 -5
  16. data/lib/lumberg/cpanel/ftp.rb +101 -0
  17. data/lib/lumberg/cpanel/gpg.rb +4 -4
  18. data/lib/lumberg/cpanel/locale.rb +1 -1
  19. data/lib/lumberg/cpanel/mime.rb +2 -2
  20. data/lib/lumberg/cpanel/mysql.rb +6 -6
  21. data/lib/lumberg/cpanel/net.rb +2 -2
  22. data/lib/lumberg/cpanel/park.rb +4 -4
  23. data/lib/lumberg/cpanel/password.rb +2 -2
  24. data/lib/lumberg/cpanel/password_strength.rb +63 -0
  25. data/lib/lumberg/cpanel/random_data.rb +1 -1
  26. data/lib/lumberg/cpanel/redirect.rb +2 -2
  27. data/lib/lumberg/cpanel/ssl.rb +23 -23
  28. data/lib/lumberg/cpanel/sub_domain.rb +4 -4
  29. data/lib/lumberg/cpanel/support.rb +2 -2
  30. data/lib/lumberg/cpanel/zone_edit.rb +8 -8
  31. data/lib/lumberg/format_whm.rb +7 -7
  32. data/lib/lumberg/version.rb +1 -1
  33. data/lib/lumberg/whm/account.rb +5 -5
  34. data/lib/lumberg/whm/cert.rb +1 -1
  35. data/lib/lumberg/whm/dns.rb +6 -6
  36. data/lib/lumberg/whm/reseller.rb +5 -5
  37. data/lib/lumberg/whm/server.rb +26 -26
  38. data/spec/cpanel/addon_domain_spec.rb +13 -13
  39. data/spec/cpanel/backups_spec.rb +3 -3
  40. data/spec/cpanel/base_spec.rb +19 -19
  41. data/spec/cpanel/box_trapper_spec.rb +3 -3
  42. data/spec/cpanel/branding_spec.rb +3 -3
  43. data/spec/cpanel/contact_spec.rb +6 -6
  44. data/spec/cpanel/cron_spec.rb +51 -51
  45. data/spec/cpanel/dns_lookup_spec.rb +4 -4
  46. data/spec/cpanel/domain_keys_spec.rb +3 -3
  47. data/spec/cpanel/domain_lookup_spec.rb +5 -5
  48. data/spec/cpanel/email_spec.rb +116 -116
  49. data/spec/cpanel/file_manager_spec.rb +11 -11
  50. data/spec/cpanel/ftp_spec.rb +71 -0
  51. data/spec/cpanel/gpg_spec.rb +3 -3
  52. data/spec/cpanel/locale_spec.rb +3 -3
  53. data/spec/cpanel/net_spec.rb +4 -4
  54. data/spec/cpanel/park_spec.rb +7 -7
  55. data/spec/cpanel/password_spec.rb +5 -5
  56. data/spec/cpanel/password_strength_spec.rb +50 -0
  57. data/spec/cpanel/random_data_spec.rb +4 -4
  58. data/spec/cpanel/ssl_spec.rb +27 -27
  59. data/spec/cpanel/sub_domain_spec.rb +8 -8
  60. data/spec/cpanel/support_spec.rb +4 -4
  61. data/spec/spec_helper.rb +1 -1
  62. data/spec/vcr_cassettes/cpanel/ftp/addftp.yml +43 -0
  63. data/spec/vcr_cassettes/cpanel/ftp/delftp.yml +43 -0
  64. data/spec/vcr_cassettes/cpanel/ftp/listftp.yml +43 -0
  65. data/spec/vcr_cassettes/cpanel/ftp/listftpsessions.yml +43 -0
  66. data/spec/vcr_cassettes/cpanel/ftp/listftpwithdisk.yml +95 -0
  67. data/spec/vcr_cassettes/cpanel/ftp/passwd.yml +43 -0
  68. data/spec/vcr_cassettes/cpanel/ftp/setquota.yml +43 -0
  69. data/spec/vcr_cassettes/cpanel/password_strength/all_required_strengths.yml +43 -0
  70. data/spec/vcr_cassettes/cpanel/password_strength/required_strength.yml +43 -0
  71. data/spec/vcr_cassettes/cpanel/password_strength/strength.yml +83 -0
  72. data/spec/whm/account_spec.rb +69 -69
  73. data/spec/whm/base_spec.rb +3 -3
  74. data/spec/whm/cert_spec.rb +24 -24
  75. data/spec/whm/dns_spec.rb +36 -36
  76. data/spec/whm/reseller_spec.rb +36 -36
  77. data/spec/whm/server_spec.rb +22 -22
  78. data/spec/whm/whm_spec.rb +8 -8
  79. metadata +29 -2
@@ -6,7 +6,7 @@ module Lumberg
6
6
  #
7
7
  # Returns Hash API Response
8
8
  def list
9
- perform_request({ :api_function => 'fetchzones' })
9
+ perform_request({ api_function: 'fetchzones' })
10
10
  end
11
11
 
12
12
  # Public: Add an A, CNAME, or TXT record to a zone file, specified by
@@ -30,7 +30,7 @@ module Lumberg
30
30
  # Returns Hash API response.
31
31
  def create(options = {})
32
32
  options[:txtdata] = options.delete(:txt)
33
- perform_request({ :api_function => 'add_zone_record' }.merge(options))
33
+ perform_request({ api_function: 'add_zone_record' }.merge(options))
34
34
  end
35
35
 
36
36
  # Public: Show dns zone for a domain
@@ -51,7 +51,7 @@ module Lumberg
51
51
  # Returns Hash API response.
52
52
  def show(options = {})
53
53
  options[:customonly] = options.delete(:get_custom_entries)
54
- perform_request({ :api_function => 'fetchzone' }.merge(options))
54
+ perform_request({ api_function: 'fetchzone' }.merge(options))
55
55
  end
56
56
 
57
57
  # Public: Revert a zone file to its original state.
@@ -62,7 +62,7 @@ module Lumberg
62
62
  #
63
63
  # Returns Hash API response
64
64
  def reset(options = {})
65
- perform_request({ :api_function => 'resetzone' })
65
+ perform_request({ api_function: 'resetzone' })
66
66
  end
67
67
 
68
68
  # Public: Edit an A, CNAME, or TXT record in a zone file, specified by
@@ -89,7 +89,7 @@ module Lumberg
89
89
  def edit(options = {})
90
90
  options[:Line] = options.delete(:line)
91
91
  options[:txtdata] = options.delete(:txt)
92
- perform_request({ :api_function => 'edit_zone_record' }.merge(options))
92
+ perform_request({ api_function: 'edit_zone_record' }.merge(options))
93
93
  end
94
94
 
95
95
  # Public: Remove lines from a DNS zone file. You may only remove A, TXT,
@@ -103,7 +103,7 @@ module Lumberg
103
103
  #
104
104
  # Returns Hash API response.
105
105
  def remove(options = {})
106
- perform_request({ :api_function => 'remove_zone_record' }.merge(options))
106
+ perform_request({ api_function: 'remove_zone_record' }.merge(options))
107
107
  end
108
108
 
109
109
  # Public: Retrieve a list of domains, created within cPanel, associated
@@ -116,7 +116,7 @@ module Lumberg
116
116
  #
117
117
  # Returns Hash API response.
118
118
  def show_domains(options = {})
119
- perform_request({ :api_function => 'fetch_cpanel_generated_domains' })
119
+ perform_request({ api_function: 'fetch_cpanel_generated_domains' })
120
120
  end
121
121
 
122
122
  # Public: Retrieve a list of zone modifications for a specific domain.
@@ -126,7 +126,7 @@ module Lumberg
126
126
  #
127
127
  # Returns Hash API response.
128
128
  def modifications_for(options = {})
129
- perform_request({ :api_function => 'fetchzone_records' }.merge(options))
129
+ perform_request({ api_function: 'fetchzone_records' }.merge(options))
130
130
  end
131
131
  end
132
132
  end
@@ -1,6 +1,6 @@
1
1
  module Lumberg
2
2
  class FormatWhm < Faraday::Response::Middleware
3
-
3
+
4
4
  def initialize(env, *args, &block)
5
5
  @type = args[0]
6
6
  @key = args[1]
@@ -13,11 +13,11 @@ module Lumberg
13
13
  end
14
14
 
15
15
  def response_values(env)
16
- {:status => env[:status], :headers => env[:response_headers], :body => env[:body]}
16
+ {status: env[:status], headers: env[:response_headers], body: env[:body]}
17
17
  end
18
-
18
+
19
19
  private
20
-
20
+
21
21
  def format_response(response)
22
22
  success, message, params = false, nil, {}
23
23
 
@@ -33,13 +33,13 @@ module Lumberg
33
33
  when :unknown
34
34
  message = "Unknown error occurred #{response.inspect}"
35
35
  end
36
-
36
+
37
37
  params = Whm::symbolize_keys(params)
38
38
  params = Whm::to_bool(params, @boolean_params)
39
39
 
40
- {:success => success, :message => message, :params => params}
40
+ {success: success, message: message, params: params}
41
41
  end
42
-
42
+
43
43
  def response_type(response)
44
44
  if !response.respond_to?(:has_key?)
45
45
  :unknown
@@ -1,3 +1,3 @@
1
1
  module Lumberg
2
- VERSION = '2.0.0.pre4'
2
+ VERSION = '2.0.0.pre5'
3
3
  end
@@ -42,7 +42,7 @@ module Lumberg
42
42
  def change_password(options = {})
43
43
  options[:user] = options.delete(:username)
44
44
  options[:pass] = options.delete(:password)
45
- server.perform_request('passwd', options.merge(:response_key => 'passwd'))
45
+ server.perform_request('passwd', options.merge(response_key: 'passwd'))
46
46
  end
47
47
 
48
48
  # Displays pertinent information about a specific account
@@ -159,7 +159,7 @@ module Lumberg
159
159
  # ==== Required
160
160
  # * <tt>:domain</tt> - PENDING
161
161
  def domain_user_data(options = {})
162
- server.perform_request('domainuserdata', options.merge(:response_key => 'userdata')) do |s|
162
+ server.perform_request('domainuserdata', options.merge(response_key: 'userdata')) do |s|
163
163
  s.boolean_params = :hascgi
164
164
  end
165
165
  end
@@ -196,7 +196,7 @@ module Lumberg
196
196
  # * <tt>:username</tt> - PENDING
197
197
  def privs(options ={})
198
198
  verify_user(options[:username]) do
199
- resp = server.perform_request('myprivs', options.merge(:response_key => 'privs')) do |s|
199
+ resp = server.perform_request('myprivs', options.merge(response_key: 'privs')) do |s|
200
200
  s.boolean_params = :all
201
201
  end
202
202
  # if you get this far, it's successful
@@ -226,7 +226,7 @@ module Lumberg
226
226
  # * <tt>:subs</tt> - PENDING
227
227
  def restore_account(options = {})
228
228
  options[:user] = options.delete(:username) if options[:username]
229
- server.perform_request('restoreaccount', options.merge(:response_key => 'metadata'))
229
+ server.perform_request('restoreaccount', options.merge(response_key: 'metadata'))
230
230
  end
231
231
 
232
232
  protected
@@ -239,7 +239,7 @@ module Lumberg
239
239
  # change_password()
240
240
  # end
241
241
  def verify_user(username, &block)
242
- exists = summary(:username => username)
242
+ exists = summary(username: username)
243
243
  if exists[:success]
244
244
  yield
245
245
  else
@@ -69,7 +69,7 @@ module Lumberg
69
69
  # * <tt>none</tt> - PENDING
70
70
  def listcrts(options = {})
71
71
  server.force_response_type = :ssl
72
- result = server.perform_request('listcrts', options.merge(:response_key => 'crt'))
72
+ result = server.perform_request('listcrts', options.merge(response_key: 'crt'))
73
73
  end
74
74
  end
75
75
  end
@@ -37,7 +37,7 @@ module Lumberg
37
37
 
38
38
  # Generates a list of all domains and corresponding DNS zones associated with your server
39
39
  def list_zones(options = {})
40
- server.perform_request('listzones', options.merge(:response_key => 'zone'))
40
+ server.perform_request('listzones', options.merge(response_key: 'zone'))
41
41
  end
42
42
 
43
43
  # Return zone records for a domain.
@@ -66,7 +66,7 @@ module Lumberg
66
66
  # * <tt>:domain</tt> - PENDING
67
67
  # * <tt>:"api.version".to_sym</tt> - PENDING
68
68
  def resolve_domain(options = {})
69
- server.perform_request('resolvedomainname', options.merge(:response_key => 'data'))
69
+ server.perform_request('resolvedomainname', options.merge(response_key: 'data'))
70
70
  end
71
71
 
72
72
  # Allows you to edit a DNS zone record on the server.
@@ -104,7 +104,7 @@ module Lumberg
104
104
  # ==== Required
105
105
  # * <tt>:nameserver</tt> - PENDING
106
106
  def lookup_nameserver_ip(options = {})
107
- server.perform_request('lookupnsip', options.merge(:response_key => 'ip'))
107
+ server.perform_request('lookupnsip', options.merge(response_key: 'ip'))
108
108
  end
109
109
 
110
110
  # Allows you to remove a DNS zone record from the server.
@@ -141,7 +141,7 @@ module Lumberg
141
141
  # * <tt>:preference</tt> - PENDING
142
142
  # * <tt>:alwaysaccept</tt> - PENDING
143
143
  def change_mx(options = {})
144
- server.perform_request('changemx', options.merge(:response_key => 'data'))
144
+ server.perform_request('changemx', options.merge(response_key: 'data'))
145
145
  end
146
146
 
147
147
  # This function will add an MX record to a specified domain
@@ -152,7 +152,7 @@ module Lumberg
152
152
  # * <tt>:preference</tt> - PENDING
153
153
  # * <tt>:alwaysaccept</tt> - PENDING
154
154
  def add_mx(options = {})
155
- server.perform_request('addmx', options.merge(:response_key => 'data'))
155
+ server.perform_request('addmx', options.merge(response_key: 'data'))
156
156
  end
157
157
 
158
158
  # This function will list a specified domain's MX records
@@ -163,7 +163,7 @@ module Lumberg
163
163
  # * <tt>:domain</tt> - PENDING
164
164
  # * <tt>:"api.version".to_sym</tt> - PENDING
165
165
  def list_mxs(options = {})
166
- server.perform_request('listmxs', options.merge(:response_key => 'data'))
166
+ server.perform_request('listmxs', options.merge(response_key: 'data'))
167
167
  end
168
168
 
169
169
  # This function will add an MX record
@@ -15,9 +15,9 @@ module Lumberg
15
15
  # Lists the usernames of all resellers on the server
16
16
  def list
17
17
  # This method is funky. That is all
18
- result = server.perform_request('listresellers', :response_key => 'reseller')
18
+ result = server.perform_request('listresellers', response_key: 'reseller')
19
19
  result[:success] = true
20
- result[:params] = {:resellers => result.delete(:params)}
20
+ result[:params] = {resellers: result.delete(:params)}
21
21
  result
22
22
  end
23
23
 
@@ -115,7 +115,7 @@ module Lumberg
115
115
  # * <tt>:username</tt> - PENDING
116
116
  def account_counts(options = {})
117
117
  options[:user] = options.delete(:username)
118
- server.perform_request('acctcounts', options.merge(:response_key => 'reseller'))
118
+ server.perform_request('acctcounts', options.merge(response_key: 'reseller'))
119
119
  end
120
120
 
121
121
  # Defines a reseller's nameservers. Additionally, you may use it to reset a reseller's nameservers to the default settings
@@ -140,7 +140,7 @@ module Lumberg
140
140
 
141
141
  # Lists the saved reseller ACL lists on the server
142
142
  def list_acls
143
- server.perform_request('listacls', {:response_key => 'acls'})
143
+ server.perform_request('listacls', {response_key: 'acls'})
144
144
  end
145
145
 
146
146
  # Creates a new reseller ACL list
@@ -148,7 +148,7 @@ module Lumberg
148
148
  # ==== Required
149
149
  # * <tt>:acllist</tt> - PENDING
150
150
  def save_acl_list(options = {})
151
- server.perform_request('saveacllist', options.merge(:response_key => 'results'))
151
+ server.perform_request('saveacllist', options.merge(response_key: 'results'))
152
152
  end
153
153
 
154
154
  # Sets the ACL for a reseller, or modifies specific ACL items for a reseller
@@ -1,4 +1,4 @@
1
- Faraday.register_middleware :response, :format_whm => Lumberg::FormatWhm
1
+ Faraday.register_middleware :response, format_whm: Lumberg::FormatWhm
2
2
 
3
3
  module Lumberg
4
4
  module Whm
@@ -15,7 +15,7 @@ module Lumberg
15
15
  # Enable Basic Authentication with API - default false
16
16
  attr_accessor :basic_auth
17
17
 
18
- # API username - :default => root
18
+ # API username - default: root
19
19
  attr_accessor :user
20
20
 
21
21
  # WHM parsed response
@@ -77,11 +77,11 @@ module Lumberg
77
77
  end
78
78
 
79
79
  def get_hostname
80
- perform_request('gethostname', {:response_key => 'hostname'})
80
+ perform_request('gethostname', {response_key: 'hostname'})
81
81
  end
82
82
 
83
83
  def version
84
- perform_request('version', {:response_key => 'version'})
84
+ perform_request('version', {response_key: 'version'})
85
85
  end
86
86
 
87
87
  def load_average
@@ -92,25 +92,25 @@ module Lumberg
92
92
  end
93
93
 
94
94
  def system_load_average(options = {})
95
- perform_request('systemloadavg', options.merge(:response_key => 'data'))
95
+ perform_request('systemloadavg', options.merge(response_key: 'data'))
96
96
  end
97
97
 
98
98
  def languages
99
- perform_request('getlanglist', {:response_key => 'lang'})
99
+ perform_request('getlanglist', {response_key: 'lang'})
100
100
  end
101
101
 
102
102
  def themes
103
- perform_request('getlanglist', {:response_key => 'themes'})
103
+ perform_request('getlanglist', {response_key: 'themes'})
104
104
  end
105
105
 
106
106
  def list_ips
107
- perform_request('listips', {:response_key => 'result'})
107
+ perform_request('listips', {response_key: 'result'})
108
108
  end
109
109
 
110
110
  def get_tweaksetting(options = {})
111
111
  request = perform_request('get_tweaksetting',
112
112
  options.merge(
113
- :response_key => 'data',
113
+ response_key: 'data',
114
114
  :'api.version' => 1
115
115
  )
116
116
  )
@@ -122,7 +122,7 @@ module Lumberg
122
122
  def set_tweaksetting(options = {})
123
123
  request = perform_request('set_tweaksetting',
124
124
  options.merge(
125
- :response_key => 'metadata',
125
+ response_key: 'metadata',
126
126
  :'api.version' => 1
127
127
  )
128
128
  )
@@ -132,57 +132,57 @@ module Lumberg
132
132
  end
133
133
 
134
134
  def add_ip(options = {})
135
- perform_request('addip', options.merge(:response_key => 'addip'))
135
+ perform_request('addip', options.merge(response_key: 'addip'))
136
136
  end
137
137
 
138
138
  def delete_ip(options = {})
139
- perform_request('delip', options.merge(:response_key => 'delip'))
139
+ perform_request('delip', options.merge(response_key: 'delip'))
140
140
  end
141
141
 
142
142
  def set_hostname(options = {})
143
- perform_request('sethostname', options.merge(:response_key => 'sethostname'))
143
+ perform_request('sethostname', options.merge(response_key: 'sethostname'))
144
144
  end
145
145
 
146
146
  def set_resolvers(options = {})
147
- perform_request('setresolvers', options.merge(:response_key => 'setresolvers'))
147
+ perform_request('setresolvers', options.merge(response_key: 'setresolvers'))
148
148
  end
149
149
 
150
150
  def show_bandwidth(options = {})
151
- perform_request('showbw', options.merge(:response_key => 'bandwidth'))
151
+ perform_request('showbw', options.merge(response_key: 'bandwidth'))
152
152
  end
153
153
 
154
154
  def set_nv_var(options = {})
155
- perform_request('nvset', options.merge(:response_key => 'nvset'))
155
+ perform_request('nvset', options.merge(response_key: 'nvset'))
156
156
  end
157
157
 
158
158
  def get_nv_var(options = {})
159
- perform_request('nvget', options.merge(:response_key => 'nvget'))
159
+ perform_request('nvget', options.merge(response_key: 'nvget'))
160
160
  end
161
161
 
162
162
  def reboot
163
- perform_request('reboot', {:response_key => "reboot"})
163
+ perform_request('reboot', {response_key: "reboot"})
164
164
  end
165
165
 
166
166
  def account
167
- @account ||= Account.new(:server => self)
167
+ @account ||= Account.new(server: self)
168
168
  end
169
169
 
170
170
  def dns
171
- @dns ||= Dns.new(:server => self)
171
+ @dns ||= Dns.new(server: self)
172
172
  end
173
173
 
174
174
  def reseller
175
- @reseller ||= Reseller.new(:server => self)
175
+ @reseller ||= Reseller.new(server: self)
176
176
  end
177
177
 
178
178
  def cert
179
- @cert ||= Cert.new(:server => self)
179
+ @cert ||= Cert.new(server: self)
180
180
  end
181
181
 
182
182
  private
183
183
 
184
184
  def do_request(uri, function, params)
185
- @response = Faraday.new(:url => uri, :ssl => ssl_options) do |c|
185
+ @response = Faraday.new(url: uri, ssl: ssl_options) do |c|
186
186
  if basic_auth
187
187
  c.basic_auth @user, @hash
188
188
  else
@@ -217,12 +217,12 @@ module Lumberg
217
217
  def ssl_options
218
218
  if @ssl_verify
219
219
  {
220
- :verify_mode => OpenSSL::SSL::VERIFY_PEER,
221
- :ca_file => File.join(Lumberg::base_path, "cacert.pem")
220
+ verify_mode: OpenSSL::SSL::VERIFY_PEER,
221
+ ca_file: File.join(Lumberg::base_path, "cacert.pem")
222
222
  }
223
223
  else
224
224
  {
225
- :verify_mode => OpenSSL::SSL::VERIFY_NONE
225
+ verify_mode: OpenSSL::SSL::VERIFY_NONE
226
226
  }
227
227
  end
228
228
  end
@@ -3,13 +3,13 @@ require "spec_helper"
3
3
  module Lumberg
4
4
  describe Cpanel::AddonDomain do
5
5
  before(:each) do
6
- @login = { :host => @whm_host, :hash => @whm_hash }
6
+ @login = { host: @whm_host, hash: @whm_hash }
7
7
  @server = Whm::Server.new(@login.dup)
8
8
 
9
9
  @api_username = "lumberg"
10
10
  @addond = Cpanel::AddonDomain.new(
11
- :server => @server.dup,
12
- :api_username => @api_username
11
+ server: @server.dup,
12
+ api_username: @api_username
13
13
  )
14
14
  end
15
15
 
@@ -19,14 +19,14 @@ module Lumberg
19
19
  it "removes an addon domain" do
20
20
  # Create the addon domain to be removed
21
21
  @addond.add(
22
- :dir => "public_html/test-addon.com/",
23
- :newdomain => "test-addon.com",
24
- :subdomain => "testadd"
22
+ dir: "public_html/test-addon.com/",
23
+ newdomain: "test-addon.com",
24
+ subdomain: "testadd"
25
25
  )
26
26
 
27
27
  result = @addond.remove(
28
- :domain => "test-addon.com",
29
- :subdomain => "testadd_lumberg-test.com"
28
+ domain: "test-addon.com",
29
+ subdomain: "testadd_lumberg-test.com"
30
30
  )
31
31
 
32
32
  result[:params][:data][0][:result].should == 1
@@ -39,16 +39,16 @@ module Lumberg
39
39
 
40
40
  it "adds an addon domain" do
41
41
  result = @addond.add(
42
- :dir => "public_html/test-magic.com/",
43
- :newdomain => "test-magic.com",
44
- :subdomain => "tmagic"
42
+ dir: "public_html/test-magic.com/",
43
+ newdomain: "test-magic.com",
44
+ subdomain: "tmagic"
45
45
  )
46
46
  result[:params][:data][0][:result].should == 1
47
47
 
48
48
  # Remove the addon domain
49
49
  result = @addond.remove(
50
- :domain => "test-magic.com",
51
- :subdomain => "tmagic_lumberg-test.com"
50
+ domain: "test-magic.com",
51
+ subdomain: "tmagic_lumberg-test.com"
52
52
  )
53
53
  end
54
54
  end