lumberg 2.0.0.pre4 → 2.0.0.pre5

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 (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
@@ -3,13 +3,13 @@ require "spec_helper"
3
3
  module Lumberg
4
4
  describe Cpanel::SubDomain 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
  @subd = Cpanel::SubDomain.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
 
@@ -47,9 +47,9 @@ module Lumberg
47
47
 
48
48
  it "removes a subdomain" do
49
49
  # Add the subdomain first
50
- @subd.add(:domain => "foo", :rootdomain => "lumberg-test.com")
50
+ @subd.add(domain: "foo", rootdomain: "lumberg-test.com")
51
51
 
52
- result = @subd.remove(:domain => "foo.lumberg-test.com")
52
+ result = @subd.remove(domain: "foo.lumberg-test.com")
53
53
  result[:params][:data][0][:result].should == 1
54
54
  end
55
55
  end
@@ -59,11 +59,11 @@ module Lumberg
59
59
 
60
60
  it "adds a subdomain" do
61
61
  # Delete the subdomain first
62
- @subd.remove(:domain => "sub.lumberg-test.com")
62
+ @subd.remove(domain: "sub.lumberg-test.com")
63
63
 
64
64
  result = @subd.add(
65
- :domain => "sub",
66
- :rootdomain => "lumberg-test.com"
65
+ domain: "sub",
66
+ rootdomain: "lumberg-test.com"
67
67
  )
68
68
  result[:params][:data][0][:result].should == 1
69
69
  end
@@ -2,12 +2,12 @@ require "spec_helper"
2
2
 
3
3
  module Lumberg
4
4
  describe Cpanel::Support do
5
- let(:server) { Whm::Server.new(:host => @whm_host, :hash => @whm_hash) }
5
+ let(:server) { Whm::Server.new(host: @whm_host, hash: @whm_hash) }
6
6
  let(:api_username) { "lumberg" }
7
7
  let(:support) do
8
8
  described_class.new(
9
- :server => server,
10
- :api_username => api_username
9
+ server: server,
10
+ api_username: api_username
11
11
  )
12
12
  end
13
13
 
@@ -27,7 +27,7 @@ module Lumberg
27
27
 
28
28
  describe "#contactable" do
29
29
  context "support option enabled" do
30
- use_vcr_cassette("cpanel/support/contactable", :record => :new_episodes)
30
+ use_vcr_cassette("cpanel/support/contactable", record: :new_episodes)
31
31
 
32
32
  subject { support.contactable[:params][:data][0][:enabled] }
33
33
 
data/spec/spec_helper.rb CHANGED
@@ -13,7 +13,7 @@ end
13
13
  VCR.configure do |c|
14
14
  c.cassette_library_dir = 'spec/vcr_cassettes'
15
15
  c.hook_into :webmock
16
- c.default_cassette_options = {:record => :none, :serialize_with => :syck}
16
+ c.default_cassette_options = { record: :none }
17
17
  end
18
18
 
19
19
  def live_test?
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=addftp&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg&pass=boo&user=bob
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:49 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '116'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"data":[{"reason":"OK","result":1}],"func":"addftp","module":"Ftp","apiversion":2,"event":{"result":1}}}
41
+ http_version:
42
+ recorded_at: Fri, 25 Oct 2013 13:23:49 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=delftp&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg&destroy=1&user=bob
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:53 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '116'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"func":"delftp","module":"Ftp","apiversion":2,"data":[{"reason":"OK","result":1}],"event":{"result":1}}}
41
+ http_version:
42
+ recorded_at: Fri, 25 Oct 2013 13:23:53 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=listftp&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:45 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '242'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"module":"Ftp","func":"listftp","apiversion":2,"data":[{"homedir":"/home/lumberg/public_html/somethingnew.com","user":"hello","type":"sub"},{"homedir":"/home/lumberg/blah","user":"blah","type":"sub"},{"homedir":"/home/lumberg/moo","user":"moo","type":"sub"},{"homedir":"/home/lumberg","user":"lumberg","type":"main"},{"homedir":"/home/lumberg/public_ftp","user":"ftp","type":"anonymous"},{"homedir":"/home/lumberg/public_ftp","user":"anonymous","type":"anonymous"},{"homedir":"/usr/local/apache/domlogs/lumberg","user":"lumberg_logs","type":"logaccess"}],"event":{"result":1}}}
41
+ http_version:
42
+ recorded_at: Fri, 25 Oct 2013 13:23:45 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=listftpsessions&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:46 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '226'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"data":[{"status":"IDLE","login":"Fri Oct 25 08:23:24 2013","cmdline":"pure-ftpd (IDLE) ","pid":"7667","file":"","user":"moo@blah.com","host":"124.195.196.55"}],"func":"listftpsessions","module":"Ftp","event":{"result":1},"apiversion":2}}
41
+ http_version:
42
+ recorded_at: Fri, 25 Oct 2013 13:23:46 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,95 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=listftpwithdisk&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:47 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '455'
37
+ body:
38
+ encoding: ASCII-8BIT
39
+ string: !binary |-
40
+ eyJjcGFuZWxyZXN1bHQiOnsiZXZlbnQiOnsicmVzdWx0IjoxfSwibW9kdWxl
41
+ IjoiRnRwIiwiYXBpdmVyc2lvbiI6MiwiZGF0YSI6W3sic2VydmVybG9naW4i
42
+ OiJhbm9ueW1vdXNAYmxhaC5jb20iLCJkZWxldGVhYmxlIjowLCJfZGlza3Vz
43
+ ZWQiOiIwIiwiYWNjdHR5cGUiOiJhbm9ueW1vdXMiLCJkaXNrcXVvdGEiOiJ1
44
+ bmxpbWl0ZWQiLCJkaXNrdXNlZHBlcmNlbnQyMCI6MCwiaHVtYW5kaXNrcXVv
45
+ dGEiOiJOb25lIiwicmVsZGlyIjoicHVibGljX2Z0cCIsImxvZ2luIjoiYW5v
46
+ bnltb3VzIiwiaHRtbGRpciI6bnVsbCwiX2Rpc2txdW90YSI6IjAiLCJodW1h
47
+ bmRpc2t1c2VkIjoiTm9uZSIsImRpciI6Ii9ob21lL211c2FubmlmL3B1Ymxp
48
+ Y19mdHAiLCJkaXNrdXNlZHBlcmNlbnQiOjAsImRpc2t1c2VkIjoiMCJ9LHsi
49
+ c2VydmVybG9naW4iOiJibGFoQGJsYWguY29tIiwiZGVsZXRlYWJsZSI6MSwi
50
+ X2Rpc2t1c2VkIjoiMCIsImFjY3R0eXBlIjoic3ViIiwiZGlza3F1b3RhIjoi
51
+ dW5saW1pdGVkIiwiZGlza3VzZWRwZXJjZW50MjAiOjAsImh1bWFuZGlza3F1
52
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CJh
85
+ Y2N0dHlwZSI6ImxvZ2FjY2VzcyIsImRpc2txdW90YSI6InVubGltaXRlZCIs
86
+ ImRpc2t1c2VkcGVyY2VudDIwIjowLCJodW1hbmRpc2txdW90YSI6Ik5vbmUi
87
+ LCJyZWxkaXIiOiJ1c3IvbG9jYWwvYXBhY2hlL2RvbWxvZ3MvbXVzYW5uaWYi
88
+ LCJsb2dpbiI6Im11c2FubmlmX2xvZ3MiLCJodG1sZGlyIjpudWxsLCJfZGlz
89
+ a3F1b3RhIjoiMCIsImh1bWFuZGlza3VzZWQiOiJOb25lIiwiZGlyIjoiL3Vz
90
+ ci9sb2NhbC9hcGFjaGUvZG9tbG9ncy9tdXNhbm5pZiIsImRpc2t1c2VkcGVy
91
+ Y2VudCI6MCwiZGlza3VzZWQiOiIwIn1dLCJmdW5jIjoibGlzdGZ0cHdpdGhk
92
+ aXNrIn19Cg==
93
+ http_version:
94
+ recorded_at: Fri, 25 Oct 2013 13:23:47 GMT
95
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=passwd&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg&pass=boo&user=bob
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:50 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '117'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"data":[{"result":1,"reason":"OK"}],"func":"passwd","module":"Ftp","event":{"result":1},"apiversion":2}}
41
+ http_version:
42
+ recorded_at: Fri, 25 Oct 2013 13:23:50 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=setquota&cpanel_jsonapi_module=Ftp&cpanel_jsonapi_user=lumberg&quota=100&user=bob
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.0
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Fri, 25 Oct 2013 13:23:51 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '118'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"data":[{"result":1,"reason":"OK"}],"apiversion":2,"func":"setquota","module":"Ftp","event":{"result":1}}}
41
+ http_version:
42
+ recorded_at: Fri, 25 Oct 2013 13:23:51 GMT
43
+ recorded_with: VCR 2.4.0
@@ -0,0 +1,43 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: https://myhost.com:2087/json-api/cpanel?cpanel_jsonapi_apiversion=2&cpanel_jsonapi_func=appstrengths&cpanel_jsonapi_module=PasswdStrength&cpanel_jsonapi_user=lumberg
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ Authorization:
11
+ - WHM root:iscool
12
+ User-Agent:
13
+ - Faraday v0.8.8
14
+ Accept-Encoding:
15
+ - gzip;q=1.0,deflate;q=0.6,identity;q=0.3
16
+ Accept:
17
+ - '*/*'
18
+ response:
19
+ status:
20
+ code: 200
21
+ message: OK
22
+ headers:
23
+ Server:
24
+ - cpsrvd/11.36.2.3
25
+ X-Keep-Alive-Count:
26
+ - '1'
27
+ Connection:
28
+ - Keep-Alive
29
+ Keep-Alive:
30
+ - timeout=70, max=200
31
+ Date:
32
+ - Wed, 09 Oct 2013 15:07:10 GMT
33
+ Content-Type:
34
+ - text/plain; charset="utf-8"
35
+ Content-Length:
36
+ - '205'
37
+ body:
38
+ encoding: UTF-8
39
+ string: |
40
+ {"cpanelresult":{"preevent":{"result":1},"module":"PasswdStrength","event":{"result":1},"func":"appstrengths","data":[{"strength":0,"app":"htaccess"},{"strength":70,"app":"createacct"},{"strength":70,"app":"ftp"},{"strength":70,"app":"cpaddons"},{"strength":70,"app":"sshkey"},{"strength":70,"app":"mysql"},{"strength":70,"app":"list"},{"strength":70,"app":"bandmin"},{"strength":70,"app":"webdisk"},{"strength":70,"app":"passwd"},{"strength":70,"app":"postgres"},{"strength":70,"app":"pop"}],"postevent":{"result":1},"apiversion":2}}
41
+ http_version:
42
+ recorded_at: Wed, 09 Oct 2013 15:07:10 GMT
43
+ recorded_with: VCR 2.4.0