lumberg 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/.gitignore +9 -0
  2. data/.rspec +2 -0
  3. data/.rvmrc +1 -0
  4. data/Gemfile +4 -0
  5. data/Gemfile.lock +98 -0
  6. data/LICENSE +20 -0
  7. data/README.md +178 -0
  8. data/Rakefile +49 -0
  9. data/lib/cacert.pem +3910 -0
  10. data/lib/lumberg.rb +23 -0
  11. data/lib/lumberg/exceptions.rb +6 -0
  12. data/lib/lumberg/version.rb +3 -0
  13. data/lib/lumberg/whm.rb +70 -0
  14. data/lib/lumberg/whm/account.rb +329 -0
  15. data/lib/lumberg/whm/args.rb +113 -0
  16. data/lib/lumberg/whm/base.rb +28 -0
  17. data/lib/lumberg/whm/dns.rb +205 -0
  18. data/lib/lumberg/whm/reseller.rb +268 -0
  19. data/lib/lumberg/whm/server.rb +290 -0
  20. data/lib/net_http_hacked.rb +42 -0
  21. data/lumberg.gemspec +28 -0
  22. data/spec/lumberg_spec.rb +9 -0
  23. data/spec/spec_helper.rb +33 -0
  24. data/spec/vcr_cassettes/whm/account/accountsummary.yml +43 -0
  25. data/spec/vcr_cassettes/whm/account/changepackage.yml +64 -0
  26. data/spec/vcr_cassettes/whm/account/createacct.yml +43 -0
  27. data/spec/vcr_cassettes/whm/account/domainuserdata.yml +43 -0
  28. data/spec/vcr_cassettes/whm/account/editquota.yml +85 -0
  29. data/spec/vcr_cassettes/whm/account/limitbw.yml +85 -0
  30. data/spec/vcr_cassettes/whm/account/listaccts.yml +147 -0
  31. data/spec/vcr_cassettes/whm/account/listsuspended.yml +43 -0
  32. data/spec/vcr_cassettes/whm/account/modifyacct.yml +63 -0
  33. data/spec/vcr_cassettes/whm/account/myprivs.yml +43 -0
  34. data/spec/vcr_cassettes/whm/account/passwd.yml +43 -0
  35. data/spec/vcr_cassettes/whm/account/removeacct.yml +85 -0
  36. data/spec/vcr_cassettes/whm/account/restoreaccount.yml +198 -0
  37. data/spec/vcr_cassettes/whm/account/setsiteip.yml +190 -0
  38. data/spec/vcr_cassettes/whm/account/suspend.yml +64 -0
  39. data/spec/vcr_cassettes/whm/account/unsuspend.yml +43 -0
  40. data/spec/vcr_cassettes/whm/dns/adddns.yml +64 -0
  41. data/spec/vcr_cassettes/whm/dns/addzonerecord.yml +43 -0
  42. data/spec/vcr_cassettes/whm/dns/dumpzone.yml +43 -0
  43. data/spec/vcr_cassettes/whm/dns/editzonerecord.yml +64 -0
  44. data/spec/vcr_cassettes/whm/dns/getzonerecord.yml +64 -0
  45. data/spec/vcr_cassettes/whm/dns/killdns.yml +43 -0
  46. data/spec/vcr_cassettes/whm/dns/listmxs.yml +22 -0
  47. data/spec/vcr_cassettes/whm/dns/listzones.yml +22 -0
  48. data/spec/vcr_cassettes/whm/dns/lookupnsip.yml +43 -0
  49. data/spec/vcr_cassettes/whm/dns/removezonerecord.yml +64 -0
  50. data/spec/vcr_cassettes/whm/dns/resetzone.yml +43 -0
  51. data/spec/vcr_cassettes/whm/dns/resolvedomainname.yml +43 -0
  52. data/spec/vcr_cassettes/whm/dns/savemxs.yml +22 -0
  53. data/spec/vcr_cassettes/whm/reseller/acctcounts.yml +43 -0
  54. data/spec/vcr_cassettes/whm/reseller/listacls.yml +22 -0
  55. data/spec/vcr_cassettes/whm/reseller/listresellers.yml +22 -0
  56. data/spec/vcr_cassettes/whm/reseller/resellerstats.yml +43 -0
  57. data/spec/vcr_cassettes/whm/reseller/saveacllist.yml +85 -0
  58. data/spec/vcr_cassettes/whm/reseller/setacls.yml +43 -0
  59. data/spec/vcr_cassettes/whm/reseller/setresellerips.yml +42 -0
  60. data/spec/vcr_cassettes/whm/reseller/setresellerlimits.yml +43 -0
  61. data/spec/vcr_cassettes/whm/reseller/setresellermainip.yml +64 -0
  62. data/spec/vcr_cassettes/whm/reseller/setresellernameservers.yml +64 -0
  63. data/spec/vcr_cassettes/whm/reseller/setresellerpackagelimit.yml +64 -0
  64. data/spec/vcr_cassettes/whm/reseller/setupreseller.yml +43 -0
  65. data/spec/vcr_cassettes/whm/reseller/suspendreseller.yml +64 -0
  66. data/spec/vcr_cassettes/whm/reseller/terminatereseller.yml +64 -0
  67. data/spec/vcr_cassettes/whm/reseller/unsetupreseller.yml +43 -0
  68. data/spec/vcr_cassettes/whm/reseller/unsuspendreseller.yml +43 -0
  69. data/spec/vcr_cassettes/whm/server/applist.yml +22 -0
  70. data/spec/vcr_cassettes/whm/server/gethostname.yml +22 -0
  71. data/spec/vcr_cassettes/whm/server/getlanglist.yml +22 -0
  72. data/spec/vcr_cassettes/whm/server/loadavg.yml +28 -0
  73. data/spec/vcr_cassettes/whm/server/my_function.yml +64 -0
  74. data/spec/vcr_cassettes/whm/server/response_type.yml +85 -0
  75. data/spec/vcr_cassettes/whm/server/systemloadavg.yml +43 -0
  76. data/spec/vcr_cassettes/whm/server/version.yml +22 -0
  77. data/spec/whm/account_spec.rb +577 -0
  78. data/spec/whm/args_spec.rb +179 -0
  79. data/spec/whm/base_spec.rb +28 -0
  80. data/spec/whm/dns_spec.rb +352 -0
  81. data/spec/whm/reseller_spec.rb +359 -0
  82. data/spec/whm/server_spec.rb +288 -0
  83. data/spec/whm/whm_spec.rb +41 -0
  84. metadata +265 -0
@@ -0,0 +1,43 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/setupreseller?user=bob
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"result\":[{\"status\":1,\"statusmsg\":null}]}"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/setupreseller?user=invalid
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"_setupreseller called for a user that does not exist. (invalid)\"}]}"
43
+ http_version: "1.1"
@@ -0,0 +1,64 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/suspendreseller?user=bob
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Finished suspending reseller.\"}],\"output\":\"Changing Shell to /bin/false...Changing shell for bob.\\nWarning: \\\"/bin/false\\\" is not listed in /etc/shells\\nShell changed.\\nDone\\nLocking Password...Locking password for user bob.\\npasswd: Success\\nDone\\nSuspending mysql users\\nNotification => notify@example.com via EMAIL [level => 3]\\nUsing Universal Quota Support (quota=0)\\nSuspended document root /home/bob/public_html\\nUsing Universal Quota Support (quota=0)\\nSuspending FTP accounts...\\nUpdating ftp passwords for bob\\nFtp password files updated.\\nFtp vhost passwords synced\\nbob's account has been suspended\\n\"}"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/suspendreseller?reason=some+reason&user=bob
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Finished suspending reseller.\"}],\"output\":\"Changing Shell to /bin/false...Changing shell for bob.\\nWarning: \\\"/bin/false\\\" is not listed in /etc/shells\\nShell not changed.\\nDone\\nLocking Password...Locking password for user bob.\\npasswd: Success\\nDone\\nSuspending mysql users\\nNotification => notify@example.com via EMAIL [level => 3]\\nAccount previously suspended (password was locked).\\nUsing Universal Quota Support (quota=0)\\nSuspended document root /home/bob/public_html\\nUsing Universal Quota Support (quota=0)\\nUpdating ftp passwords for bob\\nFtp password files updated.\\nFtp vhost passwords synced\\nbob's account has been suspended\\n\"}"
43
+ http_version: "1.1"
44
+ - !ruby/struct:VCR::HTTPInteraction
45
+ request: !ruby/struct:VCR::Request
46
+ method: :get
47
+ uri: https://myhost.com:2087/json-api/suspendreseller?user=notexists
48
+ body:
49
+ headers:
50
+ authorization:
51
+ - WHM root:iscool
52
+ response: !ruby/struct:VCR::Response
53
+ status: !ruby/struct:VCR::ResponseStatus
54
+ code: 200
55
+ message: OK
56
+ headers:
57
+ server:
58
+ - cpsrvd/11.28.64
59
+ transfer-encoding:
60
+ - chunked
61
+ content-type:
62
+ - text/plain
63
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Specified user is not a reseller.\"}]}"
64
+ http_version: "1.1"
@@ -0,0 +1,64 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/terminatereseller?reseller=terminat&verify=I+understand+this+will+irrevocably+remove+all+the+accounts+owned+by+the+reseller+terminat
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"result\":[{\"status\":1,\"privdelete\":1,\"statusmsg\":\"Account Terminations Complete\",\"accts\":{}}]}"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/terminatereseller?reseller=terminat&terminatereseller=1&verify=I+understand+this+will+irrevocably+remove+all+the+accounts+owned+by+the+reseller+terminat
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "{\"result\":[{\"status\":1,\"privdelete\":1,\"statusmsg\":\"Account Terminations Complete\",\"accts\":{\"terminat\":{\"status\":1,\"statusmsg\":\"terminat account removed\",\"rawout\":\"Running pre removal script (/scripts/prekillacct)......DoneCollecting Domain Name and IP...User: terminat\\nDomain: terminateme.com\\n...DoneKilling all processes owned by user......DoneCleaning passwd,shadow,group......DoneRemoving User from Group..........DoneRemoving Web Logs......DoneRemoving Bandwidth Files......DoneRemoving Crontab......DoneRemoving Virtual Hosts...Removed terminateme.com Server at line: 355.\\nRemoved Entry from httpd.conf\\nRemoving user's web content directory symlinks......DoneRemoving MySQL databases and users......DoneRemoving PostgreSQL databases and users......DoneRemoving System User......DoneRemoving Group......DoneRemoving DNS Entries...\\nError: There is a problem communicating with the name server.\\nWe may be doing maintenance to this feature or the DNS server.\\nPlease try again and if this problem continues please report it to the server administrator.\\n\\n...DoneRemoving Email Setup...Removing /etc/valiases/terminateme.com\\n...DoneRemoving mailman lists......DoneUpdating Databases......DoneRemoving Counter Data......DoneAdding ip back to the ip address pool...System has 241 free ips.\\n...DoneRemoving user's cPanel Databases & Updating......DoneReloading Services......DoneRemoving mail and service configs...\\n...DoneSending Contacts......DoneUpdating internal databases...Updating ftp passwords for terminat\\nPurging ftp user terminat\\nFtp password files updated.\\nFtp vhost passwords synced\\n...DoneRunning post removal scripts (/scripts/legacypostkillacct, /scripts/postkillacct)......DoneAccount Removal Complete!!!...terminat account removed...Done\"}}}]}"
43
+ http_version: "1.1"
44
+ - !ruby/struct:VCR::HTTPInteraction
45
+ request: !ruby/struct:VCR::Request
46
+ method: :get
47
+ uri: https://myhost.com:2087/json-api/terminatereseller?reseller=what&verify=I+understand+this+will+irrevocably+remove+all+the+accounts+owned+by+the+reseller+what
48
+ body:
49
+ headers:
50
+ authorization:
51
+ - WHM root:iscool
52
+ response: !ruby/struct:VCR::Response
53
+ status: !ruby/struct:VCR::ResponseStatus
54
+ code: 200
55
+ message: OK
56
+ headers:
57
+ server:
58
+ - cpsrvd/11.28.64
59
+ transfer-encoding:
60
+ - chunked
61
+ content-type:
62
+ - text/plain
63
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Reseller what Does not exist\"}]}"
64
+ http_version: "1.1"
@@ -0,0 +1,43 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/unsetupreseller?user=bob
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"result\":[{\"status\":1,\"statusmsg\":null}]}"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/unsetupreseller?user=notexists
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"_unsetupreseller called for a user that does not exist. (notexists)\"}]}"
43
+ http_version: "1.1"
@@ -0,0 +1,43 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/unsuspendreseller?user=bob
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"result\":[{\"status\":1,\"statusmsg\":\"Finished unsuspending reseller.\"}],\"output\":\"Changing shell for bob.\\nShell changed.\\nUnlocking password for user bob.\\npasswd: Success.\\nFound /etc/proftpd/bob with contents. It will be archived as '/etc/proftpd/bob.unsuspend_failed' and replaced with the previously suspended version.\\nUnsuspending FTP accounts...\\nUpdating ftp passwords for bob\\nFtp password files updated.\\nFtp vhost passwords synced\\nbob's account is now active\\nUnsuspending mysql users\\nNotification => notify@example.com via EMAIL [level => 3]\\n\"}"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/unsuspendreseller?user=notexists
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"Specified user is not a reseller.\"}]}"
43
+ http_version: "1.1"
@@ -0,0 +1,22 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/applist
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"app\":[\"accountsummary\",\"acctcounts\",\"adddns\",\"addip\",\"addpkg\",\"addzonerecord\",\"applist\",\"changepackage\",\"configureservice\",\"cpanel\",\"createacct\",\"delip\",\"domainuserdata\",\"dumpzone\",\"editpkg\",\"editquota\",\"editzonerecord\",\"fetchsslinfo\",\"generatessl\",\"getfeaturelist\",\"gethostname\",\"getlanglist\",\"getresellerips\",\"getzonerecord\",\"installssl\",\"killdns\",\"killpkg\",\"limitbw\",\"listaccts\",\"listacls\",\"listcrts\",\"listips\",\"listpkgs\",\"listresellers\",\"listsuspended\",\"listzones\",\"loadavg\",\"lookupnsip\",\"modifyacct\",\"myprivs\",\"mysqltuner\",\"nvget\",\"nvset\",\"passwd\",\"reboot\",\"removeacct\",\"removezonerecord\",\"resellerstats\",\"resetzone\",\"restartservice\",\"saveacllist\",\"servicestatus\",\"setacls\",\"sethostname\",\"setresellerips\",\"setresellerlimits\",\"setresellermainip\",\"setresellernameservers\",\"setresellerpackagelimit\",\"setresolvers\",\"setsiteip\",\"setupreseller\",\"showbw\",\"suspendacct\",\"suspendreseller\",\"terminatereseller\",\"unsetupreseller\",\"unsuspendacct\",\"unsuspendreseller\",\"updateconfig\",\"version\"]}"
22
+ http_version: "1.1"
@@ -0,0 +1,22 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/gethostname
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"hostname\":\"myhost.com\"}"
22
+ http_version: "1.1"
@@ -0,0 +1,22 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/getlanglist
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"lang\":[\"arabic\",\"bengali\",\"brazilian-portuguese-utf8\",\"chinese\",\"dutch-utf8\",\"english\",\"english-utf8\",\"french\",\"french-utf8\",\"german\",\"german-utf8\",\"hindi\",\"iberian_spanish\",\"japanese\",\"portuguese\",\"portuguese-utf8\",\"russian\",\"spanish\",\"spanish-utf8\"],\"themes\":{\"x3\":{\"spanish\":1,\"japanese\":1,\"bengali\":1,\"english\":1,\"russian\":1,\"french-utf8\":1,\"brazilian-portuguese-utf8\":1,\"arabic\":1,\"spanish-utf8\":1,\"portuguese\":1,\"german\":1,\"portuguese-utf8\":1,\"hindi\":1,\"chinese\":1,\"german-utf8\":1,\"iberian_spanish\":1,\"french\":1,\"dutch-utf8\":1,\"english-utf8\":1},\"/\":{\"spanish\":1,\"japanese\":1,\"bengali\":1,\"english\":1,\"russian\":1,\"french-utf8\":1,\"brazilian-portuguese-utf8\":1,\"arabic\":1,\"spanish-utf8\":1,\"portuguese\":1,\"german\":1,\"portuguese-utf8\":1,\"hindi\":1,\"chinese\":1,\"german-utf8\":1,\"iberian_spanish\":1,\"french\":1,\"dutch-utf8\":1,\"english-utf8\":1},\"x\":{\"english\":1},\"x3mail\":{\"spanish\":1,\"japanese\":1,\"bengali\":1,\"english\":1,\"russian\":1,\"french-utf8\":1,\"arabic\":1,\"spanish-utf8\":1,\"portuguese\":1,\"german\":1,\"portuguese-utf8\":1,\"hindi\":1,\"chinese\":1,\"german-utf8\":1,\"french\":1,\"english-utf8\":1}}}"
22
+ http_version: "1.1"
@@ -0,0 +1,28 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/loadavg
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ date:
18
+ - Fri, 18 Mar 2011 14:39:03 GMT
19
+ content-length:
20
+ - "46"
21
+ cache-control:
22
+ - no-cache, no-store, private, must-revalidate
23
+ content-type:
24
+ - text/plain
25
+ body: |
26
+ {"one":"0.06","five":"0.03","fifteen":"0.01"}
27
+
28
+ http_version: "1.1"
@@ -0,0 +1,64 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/my_function
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "[]"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/my_function?arg1=1&arg2=test
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "[]"
43
+ http_version: "1.1"
44
+ - !ruby/struct:VCR::HTTPInteraction
45
+ request: !ruby/struct:VCR::Request
46
+ method: :get
47
+ uri: https://myhost.com:2087/json-api/my_function?block=1
48
+ body:
49
+ headers:
50
+ authorization:
51
+ - WHM root:iscool
52
+ response: !ruby/struct:VCR::Response
53
+ status: !ruby/struct:VCR::ResponseStatus
54
+ code: 200
55
+ message: OK
56
+ headers:
57
+ server:
58
+ - cpsrvd/11.28.64
59
+ transfer-encoding:
60
+ - chunked
61
+ content-type:
62
+ - text/plain
63
+ body: "{\"result\":[{\"status\":0,\"statusmsg\":\"_suspendacct called for a user that does not exist. ()\",\"true\":1,\"false\":0,\"other\":2}]}"
64
+ http_version: "1.1"
@@ -0,0 +1,85 @@
1
+ ---
2
+ - !ruby/struct:VCR::HTTPInteraction
3
+ request: !ruby/struct:VCR::Request
4
+ method: :get
5
+ uri: https://myhost.com:2087/json-api/testing
6
+ body:
7
+ headers:
8
+ authorization:
9
+ - WHM root:iscool
10
+ response: !ruby/struct:VCR::Response
11
+ status: !ruby/struct:VCR::ResponseStatus
12
+ code: 200
13
+ message: OK
14
+ headers:
15
+ server:
16
+ - cpsrvd/11.28.64
17
+ transfer-encoding:
18
+ - chunked
19
+ content-type:
20
+ - text/plain
21
+ body: "{\"result\":[ { \"status\": 1, \"statusmsg\": null } ] }"
22
+ http_version: "1.1"
23
+ - !ruby/struct:VCR::HTTPInteraction
24
+ request: !ruby/struct:VCR::Request
25
+ method: :get
26
+ uri: https://myhost.com:2087/json-api/testing_error
27
+ body:
28
+ headers:
29
+ authorization:
30
+ - WHM root:iscool
31
+ response: !ruby/struct:VCR::Response
32
+ status: !ruby/struct:VCR::ResponseStatus
33
+ code: 200
34
+ message: OK
35
+ headers:
36
+ server:
37
+ - cpsrvd/11.28.64
38
+ transfer-encoding:
39
+ - chunked
40
+ content-type:
41
+ - text/plain
42
+ body: "{\"error\":\"Unknown App Requested: testing_error\"}"
43
+ http_version: "1.1"
44
+ - !ruby/struct:VCR::HTTPInteraction
45
+ request: !ruby/struct:VCR::Request
46
+ method: :get
47
+ uri: https://myhost.com:2087/json-api/testing_query
48
+ body:
49
+ headers:
50
+ authorization:
51
+ - WHM root:iscool
52
+ response: !ruby/struct:VCR::Response
53
+ status: !ruby/struct:VCR::ResponseStatus
54
+ code: 200
55
+ message: OK
56
+ headers:
57
+ server:
58
+ - cpsrvd/11.28.64
59
+ transfer-encoding:
60
+ - chunked
61
+ content-type:
62
+ - text/plain
63
+ body: "{ \"status\":1, \"statusmsg\":\"Ok\", \"acct\":[ { \"Item\":\"Parameters/Results\", \"Next Item\":\"Parameters/Results\" }, { \"Item\":\"Parameters/Results\", \"Next Item\":\"Parameters/Results\" } ] }"
64
+ http_version: "1.1"
65
+ - !ruby/struct:VCR::HTTPInteraction
66
+ request: !ruby/struct:VCR::Request
67
+ method: :get
68
+ uri: https://myhost.com:2087/json-api/testing_unknown
69
+ body:
70
+ headers:
71
+ authorization:
72
+ - WHM root:iscool
73
+ response: !ruby/struct:VCR::Response
74
+ status: !ruby/struct:VCR::ResponseStatus
75
+ code: 200
76
+ message: OK
77
+ headers:
78
+ server:
79
+ - cpsrvd/11.28.64
80
+ transfer-encoding:
81
+ - chunked
82
+ content-type:
83
+ - text/plain
84
+ body: "{ \"wtf\":1 }"
85
+ http_version: "1.1"