mu 5.7.2.3 → 5.7.2.4
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.
- data/lib/mu.rb +1 -1
- data/lib/mu/api/netconfig.rb +5 -3
- data/lib/mu/api/scale.rb +16 -1
- data/lib/mu/command/cmd_netconfig.rb +1 -1
- data/lib/mu/command/cmd_runscale.rb +2 -2
- data/rdoc/classes/Mu.html +24 -142
- data/rdoc/classes/Mu.src/M000001.html +39 -0
- data/rdoc/classes/Mu.src/M000002.html +29 -0
- data/rdoc/classes/Mu.src/M000053.html +39 -0
- data/rdoc/classes/Mu.src/M000054.html +29 -0
- data/rdoc/classes/Mu/Client.html +26 -77
- data/rdoc/classes/Mu/Client.src/M000212.html +24 -0
- data/rdoc/classes/Mu/Client.src/M000213.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000214.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000215.html +18 -0
- data/rdoc/classes/Mu/Client.src/M000216.html +18 -0
- data/rdoc/classes/Mu/Command.html +1 -92
- data/rdoc/classes/Mu/Command/API.html +75 -237
- data/rdoc/classes/Mu/Command/API.src/M000130.html +22 -0
- data/rdoc/classes/Mu/Command/API.src/M000131.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000132.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000133.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000134.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000135.html +17 -0
- data/rdoc/classes/Mu/Command/API.src/M000136.html +23 -0
- data/rdoc/classes/Mu/Command/API.src/M000137.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000138.html +29 -0
- data/rdoc/classes/Mu/Command/API.src/M000139.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000140.html +22 -0
- data/rdoc/classes/Mu/Command/API.src/M000141.html +19 -0
- data/rdoc/classes/Mu/Command/API.src/M000142.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000143.html +18 -0
- data/rdoc/classes/Mu/Command/API.src/M000144.html +17 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.html +22 -718
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000145.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000146.html +30 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000147.html +39 -0
- data/rdoc/classes/Mu/Command/Cmd_appid.src/M000148.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.html +32 -274
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000200.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000201.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000202.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000203.html +19 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000204.html +20 -0
- data/rdoc/classes/Mu/Command/Cmd_cli.src/M000205.html +20 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.html +126 -656
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000101.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000102.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000103.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000104.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000105.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000106.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000107.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000108.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000109.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000110.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000111.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000112.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000113.html +43 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000114.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000115.html +38 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000116.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000117.html +38 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000118.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000119.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000120.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000121.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_ddt.src/M000122.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.html +31 -244
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000206.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000207.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000208.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000209.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000210.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_homepage.src/M000211.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.html +86 -527
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000164.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000165.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000166.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000167.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000168.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000169.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000170.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000171.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000172.html +28 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000173.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000174.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000175.html +28 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000176.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000177.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000178.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000179.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_muapi.src/M000180.html +24 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.html +61 -405
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000152.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000153.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000154.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000155.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000156.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000157.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000158.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000159.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000160.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000161.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000162.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_netconfig.src/M000163.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.html +17 -766
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000003.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000004.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000005.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000149.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000150.html +51 -0
- data/rdoc/classes/Mu/Command/Cmd_runscale.src/M000151.html +50 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.html +11 -344
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000128.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runscenario.src/M000129.html +144 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.html +11 -436
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000198.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_runverify.src/M000199.html +200 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.html +86 -514
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000181.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000182.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000183.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000184.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000185.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000186.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000187.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000188.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000189.html +23 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000190.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000191.html +29 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000192.html +27 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000193.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000194.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000195.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000196.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_scale.src/M000197.html +22 -0
- data/rdoc/classes/Mu/Command/Cmd_system.html +21 -211
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000097.html +18 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000098.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000099.html +21 -0
- data/rdoc/classes/Mu/Command/Cmd_system.src/M000100.html +21 -0
- data/rdoc/classes/Mu/Command/Curl.html +19 -361
- data/rdoc/classes/Mu/Command/Curl.src/M000124.html +18 -0
- data/rdoc/classes/Mu/Command/Curl.src/M000125.html +21 -0
- data/rdoc/classes/Mu/Command/Curl.src/M000126.html +26 -0
- data/rdoc/classes/Mu/Command/Help.html +5 -34
- data/rdoc/classes/Mu/Command/Help.src/M000123.html +38 -0
- data/rdoc/classes/Mu/Curl/Error.html +5 -14
- data/rdoc/classes/Mu/Curl/Error.src/M000063.html +18 -0
- data/rdoc/classes/Mu/Curl/Error/Authorize.html +5 -18
- data/rdoc/classes/Mu/Curl/Error/Authorize.src/M000065.html +22 -0
- data/rdoc/classes/Mu/Curl/Error/Connect.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Connect.src/M000068.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Region.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Region.src/M000066.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Status.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Status.src/M000064.html +19 -0
- data/rdoc/classes/Mu/Curl/Error/Timeout.html +5 -15
- data/rdoc/classes/Mu/Curl/Error/Timeout.src/M000067.html +19 -0
- data/rdoc/classes/Mu/Curl/Verify.html +20 -95
- data/rdoc/classes/Mu/Curl/Verify.src/M000055.html +29 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000056.html +18 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000057.html +46 -0
- data/rdoc/classes/Mu/Curl/Verify.src/M000058.html +18 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.html +10 -50
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000061.html +35 -0
- data/rdoc/classes/Mu/Curl/Verify/Request.src/M000062.html +23 -0
- data/rdoc/classes/Mu/Curl/Verify/Response.html +5 -20
- data/rdoc/classes/Mu/Curl/Verify/Response.src/M000059.html +24 -0
- data/rdoc/classes/Mu/Curl/Verify/Result.html +5 -21
- data/rdoc/classes/Mu/Curl/Verify/Result.src/M000060.html +25 -0
- data/rdoc/classes/Mu/Ddt.html +132 -436
- data/rdoc/classes/Mu/Ddt.src/M000242.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000243.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000244.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000245.html +23 -0
- data/rdoc/classes/Mu/Ddt.src/M000246.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000247.html +32 -0
- data/rdoc/classes/Mu/Ddt.src/M000248.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000249.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000250.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000251.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000252.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000253.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000254.html +25 -0
- data/rdoc/classes/Mu/Ddt.src/M000255.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000256.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000257.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000258.html +24 -0
- data/rdoc/classes/Mu/Ddt.src/M000259.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000260.html +35 -0
- data/rdoc/classes/Mu/Ddt.src/M000261.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000262.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000263.html +20 -0
- data/rdoc/classes/Mu/Ddt.src/M000264.html +22 -0
- data/rdoc/classes/Mu/Homepage.html +34 -105
- data/rdoc/classes/Mu/Homepage.src/M000236.html +25 -0
- data/rdoc/classes/Mu/Homepage.src/M000237.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000238.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000239.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000240.html +20 -0
- data/rdoc/classes/Mu/Homepage.src/M000241.html +20 -0
- data/rdoc/classes/Mu/HttpHelper.html +68 -314
- data/rdoc/classes/Mu/HttpHelper.src/M000069.html +22 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000070.html +25 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000071.html +34 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000072.html +39 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000073.html +36 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000074.html +34 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000075.html +46 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000076.html +24 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000077.html +19 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000078.html +33 -0
- data/rdoc/classes/Mu/HttpHelper.src/M000079.html +29 -0
- data/rdoc/classes/Mu/Muapi.html +92 -359
- data/rdoc/classes/Mu/Muapi.src/M000080.html +25 -0
- data/rdoc/classes/Mu/Muapi.src/M000081.html +27 -0
- data/rdoc/classes/Mu/Muapi.src/M000082.html +24 -0
- data/rdoc/classes/Mu/Muapi.src/M000083.html +27 -0
- data/rdoc/classes/Mu/Muapi.src/M000084.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000085.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000086.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000087.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000088.html +23 -0
- data/rdoc/classes/Mu/Muapi.src/M000089.html +22 -0
- data/rdoc/classes/Mu/Muapi.src/M000090.html +21 -0
- data/rdoc/classes/Mu/Muapi.src/M000091.html +19 -0
- data/rdoc/classes/Mu/Muapi.src/M000092.html +18 -0
- data/rdoc/classes/Mu/Muapi.src/M000093.html +18 -0
- data/rdoc/classes/Mu/Muapi.src/M000094.html +36 -0
- data/rdoc/classes/Mu/Muapi.src/M000095.html +34 -0
- data/rdoc/classes/Mu/Muapi.src/M000096.html +34 -0
- data/rdoc/classes/Mu/Netconfig.html +79 -382
- data/rdoc/classes/Mu/Netconfig.src/M000217.html +25 -0
- data/rdoc/classes/Mu/Netconfig.src/M000218.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000219.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000220.html +24 -0
- data/rdoc/classes/Mu/Netconfig.src/M000221.html +20 -0
- data/rdoc/classes/Mu/Netconfig.src/M000222.html +36 -0
- data/rdoc/classes/Mu/Netconfig.src/M000223.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000224.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000225.html +37 -0
- data/rdoc/classes/Mu/Netconfig.src/M000226.html +21 -0
- data/rdoc/classes/Mu/Netconfig.src/M000227.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000228.html +26 -0
- data/rdoc/classes/Mu/Netconfig.src/M000229.html +23 -0
- data/rdoc/classes/Mu/Netconfig.src/M000230.html +22 -0
- data/rdoc/classes/Mu/Netconfig.src/M000231.html +19 -0
- data/rdoc/classes/Mu/Scale.html +133 -385
- data/rdoc/classes/Mu/Scale.src/M000006.html +47 -0
- data/rdoc/classes/Mu/Scale.src/M000007.html +27 -0
- data/rdoc/classes/Mu/Scale.src/M000008.html +22 -0
- data/rdoc/classes/Mu/Scale.src/M000009.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000010.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000011.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000012.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000013.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000014.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000015.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000016.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000017.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000018.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000019.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000020.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000021.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000022.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000023.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000024.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000025.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000265.html +46 -0
- data/rdoc/classes/Mu/Scale.src/M000266.html +27 -0
- data/rdoc/classes/Mu/Scale.src/M000267.html +22 -0
- data/rdoc/classes/Mu/Scale.src/M000268.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000269.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000270.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000271.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000272.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000273.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000274.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000275.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000276.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000277.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000278.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000279.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000280.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000281.html +20 -0
- data/rdoc/classes/Mu/Scale.src/M000282.html +20 -0
- data/rdoc/classes/Mu/System.html +23 -72
- data/rdoc/classes/Mu/System.src/M000232.html +25 -0
- data/rdoc/classes/Mu/System.src/M000233.html +20 -0
- data/rdoc/classes/Mu/System.src/M000234.html +20 -0
- data/rdoc/classes/Mu/System.src/M000235.html +20 -0
- data/rdoc/classes/Object.html +5 -14
- data/rdoc/classes/Object.src/M000052.html +18 -0
- data/rdoc/classes/TCTestMu.html +254 -1099
- data/rdoc/classes/TCTestMu.src/M000001.html +24 -0
- data/rdoc/classes/TCTestMu.src/M000002.html +18 -0
- data/rdoc/classes/TCTestMu.src/M000003.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000004.html +33 -0
- data/rdoc/classes/TCTestMu.src/M000005.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000006.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000007.html +26 -0
- data/rdoc/classes/TCTestMu.src/M000008.html +29 -0
- data/rdoc/classes/TCTestMu.src/M000009.html +39 -0
- data/rdoc/classes/TCTestMu.src/M000010.html +38 -0
- data/rdoc/classes/TCTestMu.src/M000011.html +38 -0
- data/rdoc/classes/TCTestMu.src/M000012.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000013.html +25 -0
- data/rdoc/classes/TCTestMu.src/M000014.html +25 -0
- data/rdoc/classes/TCTestMu.src/M000015.html +33 -0
- data/rdoc/classes/TCTestMu.src/M000016.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000017.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000018.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000019.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000020.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000021.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000022.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000023.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000024.html +44 -0
- data/rdoc/classes/TCTestMu.src/M000025.html +53 -0
- data/rdoc/classes/TCTestMu.src/M000026.html +22 -0
- data/rdoc/classes/TCTestMu.src/M000027.html +49 -0
- data/rdoc/classes/TCTestMu.src/M000028.html +40 -0
- data/rdoc/classes/TCTestMu.src/M000029.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000030.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000031.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000032.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000033.html +27 -0
- data/rdoc/classes/TCTestMu.src/M000034.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000035.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000036.html +41 -0
- data/rdoc/classes/TCTestMu.src/M000037.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000038.html +24 -0
- data/rdoc/classes/TCTestMu.src/M000039.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000040.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000041.html +32 -0
- data/rdoc/classes/TCTestMu.src/M000042.html +26 -0
- data/rdoc/classes/TCTestMu.src/M000043.html +28 -0
- data/rdoc/classes/TCTestMu.src/M000044.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000045.html +23 -0
- data/rdoc/classes/TCTestMu.src/M000046.html +21 -0
- data/rdoc/classes/TCTestMu.src/M000047.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000048.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000049.html +22 -0
- data/rdoc/classes/TCTestMu.src/M000050.html +20 -0
- data/rdoc/classes/TCTestMu.src/M000051.html +35 -0
- data/rdoc/created.rid +1 -1
- data/rdoc/files/lib/mu/api/ddt_rb.html +1 -1
- data/rdoc/files/lib/mu/api/homepage_rb.html +1 -1
- data/rdoc/files/lib/mu/api/muapi_rb.html +1 -1
- data/rdoc/files/lib/mu/api/netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/api/scale_rb.html +1 -1
- data/rdoc/files/lib/mu/api/system_rb.html +1 -1
- data/rdoc/files/lib/mu/client_rb.html +1 -1
- data/rdoc/files/lib/mu/command/api_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_appid_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_cli_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_ddt_rb.html +4 -5
- data/rdoc/files/lib/mu/command/cmd_homepage_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_muapi_rb.html +3 -4
- data/rdoc/files/lib/mu/command/cmd_netconfig_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscale_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runscenario_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_runverify_rb.html +5 -4
- data/rdoc/files/lib/mu/command/cmd_scale_rb.html +1 -1
- data/rdoc/files/lib/mu/command/cmd_system_rb.html +1 -1
- data/rdoc/files/lib/mu/command/curl_rb.html +1 -1
- data/rdoc/files/lib/mu/command/help_rb.html +1 -1
- data/rdoc/files/lib/mu/command_rb.html +1 -1
- data/rdoc/files/lib/mu/curl/error_rb.html +1 -1
- data/rdoc/files/lib/mu/curl/verify_rb.html +1 -1
- data/rdoc/files/lib/mu/http_helper_rb.html +1 -1
- data/rdoc/files/lib/mu_rb.html +1 -1
- data/rdoc/files/test/tc_test_mu_rb.html +1 -1
- data/rdoc/fr_class_index.html +0 -38
- data/rdoc/fr_file_index.html +0 -26
- data/rdoc/fr_method_index.html +25 -348
- data/rdoc/index.html +3 -3
- data/test/data/app_id_stats.csv +1 -1
- data/test/data/app_id_status.json +156 -0
- data/test/tc_test_mu.rb +1 -1
- metadata +314 -8
- data/Mu_Gem.html +0 -1591
|
@@ -88,17 +88,17 @@
|
|
|
88
88
|
<h3 class="section-bar">Methods</h3>
|
|
89
89
|
|
|
90
90
|
<div class="name-list">
|
|
91
|
-
<a href="#
|
|
92
|
-
<a href="#
|
|
93
|
-
<a href="#
|
|
94
|
-
<a href="#
|
|
95
|
-
<a href="#
|
|
96
|
-
<a href="#
|
|
97
|
-
<a href="#
|
|
98
|
-
<a href="#
|
|
99
|
-
<a href="#
|
|
100
|
-
<a href="#
|
|
101
|
-
<a href="#
|
|
91
|
+
<a href="#M000077">delete</a>
|
|
92
|
+
<a href="#M000079">download_file</a>
|
|
93
|
+
<a href="#M000070">get</a>
|
|
94
|
+
<a href="#M000071">get_json</a>
|
|
95
|
+
<a href="#M000072">get_xml</a>
|
|
96
|
+
<a href="#M000069">new</a>
|
|
97
|
+
<a href="#M000073">post</a>
|
|
98
|
+
<a href="#M000076">post_form</a>
|
|
99
|
+
<a href="#M000074">post_json</a>
|
|
100
|
+
<a href="#M000075">post_xml</a>
|
|
101
|
+
<a href="#M000078">put_json</a>
|
|
102
102
|
</div>
|
|
103
103
|
</div>
|
|
104
104
|
|
|
@@ -110,7 +110,7 @@
|
|
|
110
110
|
<h3 class="section-bar">Included Modules</h3>
|
|
111
111
|
|
|
112
112
|
<div id="includes-list">
|
|
113
|
-
<span class="include-name"
|
|
113
|
+
<span class="include-name">Helper</span>
|
|
114
114
|
</div>
|
|
115
115
|
</div>
|
|
116
116
|
|
|
@@ -127,70 +127,48 @@
|
|
|
127
127
|
<div id="methods">
|
|
128
128
|
<h3 class="section-bar">Public Class methods</h3>
|
|
129
129
|
|
|
130
|
-
<div id="method-
|
|
131
|
-
<a name="
|
|
130
|
+
<div id="method-M000069" class="method-detail">
|
|
131
|
+
<a name="M000069"></a>
|
|
132
132
|
|
|
133
133
|
<div class="method-heading">
|
|
134
|
-
<a href="
|
|
134
|
+
<a href="HttpHelper.src/M000069.html" target="Code" class="method-signature"
|
|
135
|
+
onclick="popupCode('HttpHelper.src/M000069.html');return false;">
|
|
135
136
|
<span class="method-name">new</span><span class="method-args">(host, username, password, docroot)</span>
|
|
136
137
|
</a>
|
|
137
138
|
</div>
|
|
138
139
|
|
|
139
140
|
<div class="method-description">
|
|
140
|
-
<p><a class="source-toggle" href="#"
|
|
141
|
-
onclick="toggleCode('M000073-source');return false;">[Source]</a></p>
|
|
142
|
-
<div class="method-source-code" id="M000073-source">
|
|
143
|
-
<pre>
|
|
144
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 5</span>
|
|
145
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">host</span>, <span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>, <span class="ruby-identifier">docroot</span>)
|
|
146
|
-
<span class="ruby-ivar">@host</span> = <span class="ruby-identifier">host</span>
|
|
147
|
-
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
148
|
-
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
149
|
-
<span class="ruby-ivar">@docroot</span> = <span class="ruby-identifier">docroot</span>
|
|
150
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-value str">""</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">nil?</span>
|
|
151
|
-
<span class="ruby-keyword kw">end</span>
|
|
152
|
-
</pre>
|
|
153
|
-
</div>
|
|
154
141
|
</div>
|
|
155
142
|
</div>
|
|
156
143
|
|
|
157
144
|
<h3 class="section-bar">Public Instance methods</h3>
|
|
158
145
|
|
|
159
|
-
<div id="method-
|
|
160
|
-
<a name="
|
|
146
|
+
<div id="method-M000077" class="method-detail">
|
|
147
|
+
<a name="M000077"></a>
|
|
161
148
|
|
|
162
149
|
<div class="method-heading">
|
|
163
|
-
<a href="
|
|
150
|
+
<a href="HttpHelper.src/M000077.html" target="Code" class="method-signature"
|
|
151
|
+
onclick="popupCode('HttpHelper.src/M000077.html');return false;">
|
|
164
152
|
<span class="method-name">delete</span><span class="method-args">(e)</span>
|
|
165
153
|
</a>
|
|
166
154
|
</div>
|
|
167
155
|
|
|
168
156
|
<div class="method-description">
|
|
169
157
|
<p>
|
|
170
|
-
basic <a href="HttpHelper.html#
|
|
158
|
+
basic <a href="HttpHelper.html#M000077">delete</a> call
|
|
171
159
|
</p>
|
|
172
160
|
<pre>
|
|
173
161
|
* e = the url suffix
|
|
174
162
|
</pre>
|
|
175
|
-
<p><a class="source-toggle" href="#"
|
|
176
|
-
onclick="toggleCode('M000081-source');return false;">[Source]</a></p>
|
|
177
|
-
<div class="method-source-code" id="M000081-source">
|
|
178
|
-
<pre>
|
|
179
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 185</span>
|
|
180
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">e</span>)
|
|
181
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
182
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">url</span>)
|
|
183
|
-
<span class="ruby-keyword kw">end</span>
|
|
184
|
-
</pre>
|
|
185
|
-
</div>
|
|
186
163
|
</div>
|
|
187
164
|
</div>
|
|
188
165
|
|
|
189
|
-
<div id="method-
|
|
190
|
-
<a name="
|
|
166
|
+
<div id="method-M000079" class="method-detail">
|
|
167
|
+
<a name="M000079"></a>
|
|
191
168
|
|
|
192
169
|
<div class="method-heading">
|
|
193
|
-
<a href="
|
|
170
|
+
<a href="HttpHelper.src/M000079.html" target="Code" class="method-signature"
|
|
171
|
+
onclick="popupCode('HttpHelper.src/M000079.html');return false;">
|
|
194
172
|
<span class="method-name">download_file</span><span class="method-args">(e, filename, p={})</span>
|
|
195
173
|
</a>
|
|
196
174
|
</div>
|
|
@@ -204,385 +182,186 @@ fetches a file and stores it locally
|
|
|
204
182
|
* filename = the name to store the file locally
|
|
205
183
|
* p = hash of parameters, such as headers
|
|
206
184
|
</pre>
|
|
207
|
-
<p><a class="source-toggle" href="#"
|
|
208
|
-
onclick="toggleCode('M000083-source');return false;">[Source]</a></p>
|
|
209
|
-
<div class="method-source-code" id="M000083-source">
|
|
210
|
-
<pre>
|
|
211
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 217</span>
|
|
212
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">download_file</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">p</span>={})
|
|
213
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
214
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
215
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
216
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>)
|
|
217
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
218
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
219
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">body</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">"Could not download"</span>)
|
|
220
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"==> Could not download the file"</span>
|
|
221
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-value">-1</span>
|
|
222
|
-
<span class="ruby-keyword kw">end</span>
|
|
223
|
-
<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value str">"wb"</span>) { <span class="ruby-operator">|</span><span class="ruby-identifier">f</span><span class="ruby-operator">|</span> <span class="ruby-identifier">f</span>.<span class="ruby-identifier">write</span>(<span class="ruby-identifier">resp</span>.<span class="ruby-identifier">body</span>) }
|
|
224
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">size</span>(<span class="ruby-identifier">filename</span>)
|
|
225
|
-
<span class="ruby-keyword kw">end</span>
|
|
226
|
-
</pre>
|
|
227
|
-
</div>
|
|
228
185
|
</div>
|
|
229
186
|
</div>
|
|
230
187
|
|
|
231
|
-
<div id="method-
|
|
232
|
-
<a name="
|
|
188
|
+
<div id="method-M000070" class="method-detail">
|
|
189
|
+
<a name="M000070"></a>
|
|
233
190
|
|
|
234
191
|
<div class="method-heading">
|
|
235
|
-
<a href="
|
|
192
|
+
<a href="HttpHelper.src/M000070.html" target="Code" class="method-signature"
|
|
193
|
+
onclick="popupCode('HttpHelper.src/M000070.html');return false;">
|
|
236
194
|
<span class="method-name">get</span><span class="method-args">(e, p={})</span>
|
|
237
195
|
</a>
|
|
238
196
|
</div>
|
|
239
197
|
|
|
240
198
|
<div class="method-description">
|
|
241
199
|
<p>
|
|
242
|
-
basic <a href="HttpHelper.html#
|
|
200
|
+
basic <a href="HttpHelper.html#M000070">get</a> call
|
|
243
201
|
</p>
|
|
244
202
|
<pre>
|
|
245
203
|
* e = the url suffix
|
|
246
204
|
* p = hash of parameters, such as headers
|
|
247
205
|
</pre>
|
|
248
|
-
<p><a class="source-toggle" href="#"
|
|
249
|
-
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
|
250
|
-
<div class="method-source-code" id="M000074-source">
|
|
251
|
-
<pre>
|
|
252
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 18</span>
|
|
253
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
254
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
255
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
256
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
257
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
258
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
259
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
260
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
261
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
262
|
-
<span class="ruby-keyword kw">end</span>
|
|
263
|
-
</pre>
|
|
264
|
-
</div>
|
|
265
206
|
</div>
|
|
266
207
|
</div>
|
|
267
208
|
|
|
268
|
-
<div id="method-
|
|
269
|
-
<a name="
|
|
209
|
+
<div id="method-M000071" class="method-detail">
|
|
210
|
+
<a name="M000071"></a>
|
|
270
211
|
|
|
271
212
|
<div class="method-heading">
|
|
272
|
-
<a href="
|
|
213
|
+
<a href="HttpHelper.src/M000071.html" target="Code" class="method-signature"
|
|
214
|
+
onclick="popupCode('HttpHelper.src/M000071.html');return false;">
|
|
273
215
|
<span class="method-name">get_json</span><span class="method-args">(e, p={})</span>
|
|
274
216
|
</a>
|
|
275
217
|
</div>
|
|
276
218
|
|
|
277
219
|
<div class="method-description">
|
|
278
220
|
<p>
|
|
279
|
-
<a href="HttpHelper.html#
|
|
221
|
+
<a href="HttpHelper.html#M000070">get</a> call for json, converts the
|
|
280
222
|
response to json if applicable
|
|
281
223
|
</p>
|
|
282
224
|
<pre>
|
|
283
225
|
* e = the url suffix
|
|
284
226
|
* p = hash of parameters, such as headers
|
|
285
227
|
</pre>
|
|
286
|
-
<p><a class="source-toggle" href="#"
|
|
287
|
-
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
|
288
|
-
<div class="method-source-code" id="M000075-source">
|
|
289
|
-
<pre>
|
|
290
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 32</span>
|
|
291
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
292
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
293
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
294
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
295
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
296
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
297
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
298
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
299
|
-
<span class="ruby-keyword kw">begin</span>
|
|
300
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
301
|
-
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
302
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
303
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
304
|
-
<span class="ruby-keyword kw">end</span>
|
|
305
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
306
|
-
<span class="ruby-comment cmt"># nothing to do</span>
|
|
307
|
-
<span class="ruby-keyword kw">end</span>
|
|
308
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
309
|
-
<span class="ruby-keyword kw">end</span>
|
|
310
|
-
</pre>
|
|
311
|
-
</div>
|
|
312
228
|
</div>
|
|
313
229
|
</div>
|
|
314
230
|
|
|
315
|
-
<div id="method-
|
|
316
|
-
<a name="
|
|
231
|
+
<div id="method-M000072" class="method-detail">
|
|
232
|
+
<a name="M000072"></a>
|
|
317
233
|
|
|
318
234
|
<div class="method-heading">
|
|
319
|
-
<a href="
|
|
235
|
+
<a href="HttpHelper.src/M000072.html" target="Code" class="method-signature"
|
|
236
|
+
onclick="popupCode('HttpHelper.src/M000072.html');return false;">
|
|
320
237
|
<span class="method-name">get_xml</span><span class="method-args">(e, p={})</span>
|
|
321
238
|
</a>
|
|
322
239
|
</div>
|
|
323
240
|
|
|
324
241
|
<div class="method-description">
|
|
325
242
|
<p>
|
|
326
|
-
<a href="HttpHelper.html#
|
|
243
|
+
<a href="HttpHelper.html#M000070">get</a> call for xml, converts the
|
|
327
244
|
response to xml if applicable
|
|
328
245
|
</p>
|
|
329
246
|
<pre>
|
|
330
247
|
* e = the url suffix
|
|
331
248
|
* p = hash of parameters, such as headers
|
|
332
249
|
</pre>
|
|
333
|
-
<p><a class="source-toggle" href="#"
|
|
334
|
-
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
|
335
|
-
<div class="method-source-code" id="M000076-source">
|
|
336
|
-
<pre>
|
|
337
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 55</span>
|
|
338
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get_xml</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">p</span>={})
|
|
339
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
340
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">url</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
341
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
342
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
343
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
344
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
345
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
346
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
347
|
-
<span class="ruby-keyword kw">begin</span>
|
|
348
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/<.+>/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">resp</span>)
|
|
349
|
-
<span class="ruby-identifier">xmldoc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">resp</span>)
|
|
350
|
-
<span class="ruby-keyword kw">else</span>
|
|
351
|
-
<span class="ruby-identifier">err_node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'err_node'</span>, <span class="ruby-identifier">xmldoc</span>)
|
|
352
|
-
<span class="ruby-identifier">err_node</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">resp</span>
|
|
353
|
-
<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">err_node</span>
|
|
354
|
-
<span class="ruby-keyword kw">end</span>
|
|
355
|
-
<span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
356
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"Error parsing XML "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
357
|
-
<span class="ruby-keyword kw">ensure</span>
|
|
358
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">xmldoc</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
359
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">xmldoc</span>
|
|
360
|
-
<span class="ruby-keyword kw">end</span>
|
|
361
|
-
<span class="ruby-keyword kw">end</span>
|
|
362
|
-
</pre>
|
|
363
|
-
</div>
|
|
364
250
|
</div>
|
|
365
251
|
</div>
|
|
366
252
|
|
|
367
|
-
<div id="method-
|
|
368
|
-
<a name="
|
|
253
|
+
<div id="method-M000073" class="method-detail">
|
|
254
|
+
<a name="M000073"></a>
|
|
369
255
|
|
|
370
256
|
<div class="method-heading">
|
|
371
|
-
<a href="
|
|
257
|
+
<a href="HttpHelper.src/M000073.html" target="Code" class="method-signature"
|
|
258
|
+
onclick="popupCode('HttpHelper.src/M000073.html');return false;">
|
|
372
259
|
<span class="method-name">post</span><span class="method-args">(e, body="", p = {})</span>
|
|
373
260
|
</a>
|
|
374
261
|
</div>
|
|
375
262
|
|
|
376
263
|
<div class="method-description">
|
|
377
264
|
<p>
|
|
378
|
-
basic <a href="HttpHelper.html#
|
|
265
|
+
basic <a href="HttpHelper.html#M000073">post</a> call
|
|
379
266
|
</p>
|
|
380
267
|
<pre>
|
|
381
268
|
* e = the url suffix
|
|
382
269
|
* body = the data to post
|
|
383
270
|
* p = hash of parameters, such as headers
|
|
384
271
|
</pre>
|
|
385
|
-
<p><a class="source-toggle" href="#"
|
|
386
|
-
onclick="toggleCode('M000077-source');return false;">[Source]</a></p>
|
|
387
|
-
<div class="method-source-code" id="M000077-source">
|
|
388
|
-
<pre>
|
|
389
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 84</span>
|
|
390
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">body</span>=<span class="ruby-value str">""</span>, <span class="ruby-identifier">p</span> = {})
|
|
391
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
392
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"#{url} #{body}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
393
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
394
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
395
|
-
<span class="ruby-identifier">msg</span>(<span class="ruby-node">"using cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
396
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">body</span>, <span class="ruby-identifier">params</span>)
|
|
397
|
-
<span class="ruby-comment cmt"># msg resp.headers</span>
|
|
398
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
399
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
400
|
-
<span class="ruby-keyword kw">begin</span>
|
|
401
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
402
|
-
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
403
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
404
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
405
|
-
<span class="ruby-keyword kw">end</span>
|
|
406
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
407
|
-
<span class="ruby-comment cmt"># do nothing</span>
|
|
408
|
-
<span class="ruby-keyword kw">end</span>
|
|
409
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
410
|
-
<span class="ruby-keyword kw">end</span>
|
|
411
|
-
</pre>
|
|
412
|
-
</div>
|
|
413
272
|
</div>
|
|
414
273
|
</div>
|
|
415
274
|
|
|
416
|
-
<div id="method-
|
|
417
|
-
<a name="
|
|
275
|
+
<div id="method-M000076" class="method-detail">
|
|
276
|
+
<a name="M000076"></a>
|
|
418
277
|
|
|
419
278
|
<div class="method-heading">
|
|
420
|
-
<a href="
|
|
421
|
-
|
|
279
|
+
<a href="HttpHelper.src/M000076.html" target="Code" class="method-signature"
|
|
280
|
+
onclick="popupCode('HttpHelper.src/M000076.html');return false;">
|
|
281
|
+
<span class="method-name">post_form</span><span class="method-args">(e, filepath, p = {})</span>
|
|
422
282
|
</a>
|
|
423
283
|
</div>
|
|
424
284
|
|
|
425
285
|
<div class="method-description">
|
|
426
286
|
<p>
|
|
427
|
-
<a href="HttpHelper.html#
|
|
287
|
+
<a href="HttpHelper.html#M000073">post</a> call for uploading form data
|
|
428
288
|
</p>
|
|
429
289
|
<ul>
|
|
430
290
|
<li>e = the url suffix
|
|
431
291
|
|
|
432
292
|
</li>
|
|
433
|
-
<li>filepath = the file to <a href="HttpHelper.html#
|
|
434
|
-
|
|
435
|
-
</li>
|
|
436
|
-
<li>filename - the name to use for saving the file on the <a
|
|
437
|
-
href="../Mu.html">Mu</a>
|
|
293
|
+
<li>filepath = the file to <a href="HttpHelper.html#M000073">post</a>
|
|
438
294
|
|
|
439
295
|
</li>
|
|
440
296
|
<li>p = hash of parameters, such as headers
|
|
441
297
|
|
|
442
298
|
</li>
|
|
443
299
|
</ul>
|
|
444
|
-
<p><a class="source-toggle" href="#"
|
|
445
|
-
onclick="toggleCode('M000080-source');return false;">[Source]</a></p>
|
|
446
|
-
<div class="method-source-code" id="M000080-source">
|
|
447
|
-
<pre>
|
|
448
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 171</span>
|
|
449
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_form</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">filepath</span>, <span class="ruby-identifier">filename</span>, <span class="ruby-identifier">p</span> = {})
|
|
450
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
451
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
452
|
-
<span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"multipart/form-data"</span>, <span class="ruby-identifier">:file</span> =<span class="ruby-operator">></span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">filepath</span>), <span class="ruby-identifier">:name</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">filename</span> }
|
|
453
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">params</span>)
|
|
454
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
455
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
456
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
457
|
-
<span class="ruby-keyword kw">end</span>
|
|
458
|
-
</pre>
|
|
459
|
-
</div>
|
|
460
300
|
</div>
|
|
461
301
|
</div>
|
|
462
302
|
|
|
463
|
-
<div id="method-
|
|
464
|
-
<a name="
|
|
303
|
+
<div id="method-M000074" class="method-detail">
|
|
304
|
+
<a name="M000074"></a>
|
|
465
305
|
|
|
466
306
|
<div class="method-heading">
|
|
467
|
-
<a href="
|
|
307
|
+
<a href="HttpHelper.src/M000074.html" target="Code" class="method-signature"
|
|
308
|
+
onclick="popupCode('HttpHelper.src/M000074.html');return false;">
|
|
468
309
|
<span class="method-name">post_json</span><span class="method-args">(e, json, p = {})</span>
|
|
469
310
|
</a>
|
|
470
311
|
</div>
|
|
471
312
|
|
|
472
313
|
<div class="method-description">
|
|
473
314
|
<p>
|
|
474
|
-
<a href="HttpHelper.html#
|
|
315
|
+
<a href="HttpHelper.html#M000073">post</a> call for uploading json
|
|
475
316
|
</p>
|
|
476
317
|
<ul>
|
|
477
318
|
<li>e = the url suffix
|
|
478
319
|
|
|
479
320
|
</li>
|
|
480
|
-
<li>body = the json object to <a href="HttpHelper.html#
|
|
321
|
+
<li>body = the json object to <a href="HttpHelper.html#M000073">post</a>
|
|
481
322
|
|
|
482
323
|
</li>
|
|
483
324
|
<li>p = hash of parameters, such as headers
|
|
484
325
|
|
|
485
326
|
</li>
|
|
486
327
|
</ul>
|
|
487
|
-
<p><a class="source-toggle" href="#"
|
|
488
|
-
onclick="toggleCode('M000078-source');return false;">[Source]</a></p>
|
|
489
|
-
<div class="method-source-code" id="M000078-source">
|
|
490
|
-
<pre>
|
|
491
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 110</span>
|
|
492
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">p</span> = {})
|
|
493
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
494
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"#{url} #{json}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
495
|
-
<span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/json"</span> }.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
496
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
497
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">params</span> )
|
|
498
|
-
<span class="ruby-keyword kw">begin</span>
|
|
499
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
500
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
501
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
502
|
-
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
503
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
504
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
505
|
-
<span class="ruby-keyword kw">end</span>
|
|
506
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
507
|
-
<span class="ruby-comment cmt"># msg e, Logger::DEBUG</span>
|
|
508
|
-
<span class="ruby-keyword kw">end</span>
|
|
509
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
510
|
-
<span class="ruby-keyword kw">end</span>
|
|
511
|
-
</pre>
|
|
512
|
-
</div>
|
|
513
328
|
</div>
|
|
514
329
|
</div>
|
|
515
330
|
|
|
516
|
-
<div id="method-
|
|
517
|
-
<a name="
|
|
331
|
+
<div id="method-M000075" class="method-detail">
|
|
332
|
+
<a name="M000075"></a>
|
|
518
333
|
|
|
519
334
|
<div class="method-heading">
|
|
520
|
-
<a href="
|
|
335
|
+
<a href="HttpHelper.src/M000075.html" target="Code" class="method-signature"
|
|
336
|
+
onclick="popupCode('HttpHelper.src/M000075.html');return false;">
|
|
521
337
|
<span class="method-name">post_xml</span><span class="method-args">(e, doc, p = {})</span>
|
|
522
338
|
</a>
|
|
523
339
|
</div>
|
|
524
340
|
|
|
525
341
|
<div class="method-description">
|
|
526
342
|
<p>
|
|
527
|
-
<a href="HttpHelper.html#
|
|
343
|
+
<a href="HttpHelper.html#M000073">post</a> call for uploading xml
|
|
528
344
|
</p>
|
|
529
345
|
<ul>
|
|
530
346
|
<li>e = the url suffix
|
|
531
347
|
|
|
532
348
|
</li>
|
|
533
|
-
<li>body = the xml object to <a href="HttpHelper.html#
|
|
349
|
+
<li>body = the xml object to <a href="HttpHelper.html#M000073">post</a>
|
|
534
350
|
|
|
535
351
|
</li>
|
|
536
352
|
<li>p = hash of parameters, such as headers
|
|
537
353
|
|
|
538
354
|
</li>
|
|
539
355
|
</ul>
|
|
540
|
-
<p><a class="source-toggle" href="#"
|
|
541
|
-
onclick="toggleCode('M000079-source');return false;">[Source]</a></p>
|
|
542
|
-
<div class="method-source-code" id="M000079-source">
|
|
543
|
-
<pre>
|
|
544
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 134</span>
|
|
545
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">post_xml</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">doc</span>, <span class="ruby-identifier">p</span> = {})
|
|
546
|
-
<span class="ruby-keyword kw">begin</span>
|
|
547
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
548
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"post to #{url}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
549
|
-
<span class="ruby-identifier">params</span> = { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/xml"</span> }.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
550
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
551
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">post</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">doc</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">params</span> )
|
|
552
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
553
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
554
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
555
|
-
<span class="ruby-comment cmt"># XML Document</span>
|
|
556
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-regexp re">/<.+>/</span>).<span class="ruby-identifier">match</span>(<span class="ruby-identifier">resp</span>)
|
|
557
|
-
<span class="ruby-identifier">xmldoc</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span>(<span class="ruby-identifier">resp</span>)
|
|
558
|
-
<span class="ruby-keyword kw">else</span>
|
|
559
|
-
<span class="ruby-identifier">err_node</span> = <span class="ruby-constant">Nokogiri</span><span class="ruby-operator">::</span><span class="ruby-constant">XML</span><span class="ruby-operator">::</span><span class="ruby-constant">Node</span>.<span class="ruby-identifier">new</span>(<span class="ruby-value str">'err_node'</span>, <span class="ruby-identifier">xmldoc</span>)
|
|
560
|
-
<span class="ruby-identifier">err_node</span>.<span class="ruby-identifier">content</span> = <span class="ruby-identifier">resp</span>
|
|
561
|
-
<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">root</span> <span class="ruby-operator"><<</span> <span class="ruby-identifier">err_node</span>
|
|
562
|
-
<span class="ruby-keyword kw">end</span>
|
|
563
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">SocketError</span>
|
|
564
|
-
<span class="ruby-identifier">raise</span> <span class="ruby-value str">"Host "</span> <span class="ruby-operator">+</span> <span class="ruby-ivar">@host</span> <span class="ruby-operator">+</span> <span class="ruby-value str">" nicht erreichbar"</span>
|
|
565
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">Exception</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
566
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-value str">"error parsing XML "</span> <span class="ruby-operator">+</span> <span class="ruby-identifier">e</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
567
|
-
<span class="ruby-keyword kw">end</span>
|
|
568
|
-
<span class="ruby-keyword kw">if</span> (<span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">nil?</span> <span class="ruby-operator">||</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//err_node"</span>).<span class="ruby-identifier">empty?</span>)
|
|
569
|
-
<span class="ruby-ivar">@posted_uuid</span> = <span class="ruby-keyword kw">nil</span>
|
|
570
|
-
<span class="ruby-keyword kw">end</span>
|
|
571
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">nil?</span>
|
|
572
|
-
<span class="ruby-ivar">@posted_uuid</span> = <span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//uuid"</span>)[<span class="ruby-value">0</span>].<span class="ruby-identifier">text</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">xmldoc</span>.<span class="ruby-identifier">xpath</span>(<span class="ruby-value str">"//uuid"</span>).<span class="ruby-identifier">empty?</span>
|
|
573
|
-
<span class="ruby-keyword kw">end</span>
|
|
574
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">xmldoc</span>
|
|
575
|
-
<span class="ruby-keyword kw">end</span>
|
|
576
|
-
</pre>
|
|
577
|
-
</div>
|
|
578
356
|
</div>
|
|
579
357
|
</div>
|
|
580
358
|
|
|
581
|
-
<div id="method-
|
|
582
|
-
<a name="
|
|
359
|
+
<div id="method-M000078" class="method-detail">
|
|
360
|
+
<a name="M000078"></a>
|
|
583
361
|
|
|
584
362
|
<div class="method-heading">
|
|
585
|
-
<a href="
|
|
363
|
+
<a href="HttpHelper.src/M000078.html" target="Code" class="method-signature"
|
|
364
|
+
onclick="popupCode('HttpHelper.src/M000078.html');return false;">
|
|
586
365
|
<span class="method-name">put_json</span><span class="method-args">(e, json, p={})</span>
|
|
587
366
|
</a>
|
|
588
367
|
</div>
|
|
@@ -596,31 +375,6 @@ put call for json
|
|
|
596
375
|
* body = the json object to put
|
|
597
376
|
* p = hash of parameters, such as headers
|
|
598
377
|
</pre>
|
|
599
|
-
<p><a class="source-toggle" href="#"
|
|
600
|
-
onclick="toggleCode('M000082-source');return false;">[Source]</a></p>
|
|
601
|
-
<div class="method-source-code" id="M000082-source">
|
|
602
|
-
<pre>
|
|
603
|
-
<span class="ruby-comment cmt"># File lib/mu/http_helper.rb, line 194</span>
|
|
604
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">put_json</span>(<span class="ruby-identifier">e</span>, <span class="ruby-identifier">json</span>, <span class="ruby-identifier">p</span>={})
|
|
605
|
-
<span class="ruby-identifier">url</span> = <span class="ruby-node">"https://#{@username}:#{@password}@#{@host}#{@docroot}#{e}"</span>
|
|
606
|
-
<span class="ruby-identifier">params</span> = {}.<span class="ruby-identifier">merge!</span> <span class="ruby-identifier">p</span>
|
|
607
|
-
<span class="ruby-identifier">params</span>[<span class="ruby-identifier">:cookies</span>] = <span class="ruby-identifier">$cookie</span> <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">$cookie</span>.<span class="ruby-identifier">empty?</span>
|
|
608
|
-
<span class="ruby-identifier">resp</span> = <span class="ruby-constant">RestClient</span>.<span class="ruby-identifier">put</span>(<span class="ruby-identifier">url</span>, <span class="ruby-identifier">json</span>, { <span class="ruby-identifier">:content_type</span> =<span class="ruby-operator">></span> <span class="ruby-value str">"application/json"</span> } )
|
|
609
|
-
<span class="ruby-keyword kw">begin</span>
|
|
610
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-identifier">resp</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span>
|
|
611
|
-
<span class="ruby-identifier">$cookie</span> = <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
612
|
-
<span class="ruby-identifier">msg</span> <span class="ruby-node">"got cookie #{$cookie}"</span>, <span class="ruby-constant">Logger</span><span class="ruby-operator">::</span><span class="ruby-constant">DEBUG</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">resp</span>.<span class="ruby-identifier">cookies</span>.<span class="ruby-identifier">empty?</span>
|
|
613
|
-
<span class="ruby-identifier">jresp</span> = <span class="ruby-constant">JSON</span> <span class="ruby-identifier">resp</span>
|
|
614
|
-
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">jresp</span>
|
|
615
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">jresp</span>
|
|
616
|
-
<span class="ruby-keyword kw">end</span>
|
|
617
|
-
<span class="ruby-keyword kw">rescue</span> <span class="ruby-constant">JSON</span><span class="ruby-operator">::</span><span class="ruby-constant">ParserError</span> =<span class="ruby-operator">></span> <span class="ruby-identifier">e</span>
|
|
618
|
-
<span class="ruby-comment cmt"># msg e, Logger::DEBUG</span>
|
|
619
|
-
<span class="ruby-keyword kw">end</span>
|
|
620
|
-
<span class="ruby-keyword kw">return</span> <span class="ruby-identifier">resp</span>
|
|
621
|
-
<span class="ruby-keyword kw">end</span>
|
|
622
|
-
</pre>
|
|
623
|
-
</div>
|
|
624
378
|
</div>
|
|
625
379
|
</div>
|
|
626
380
|
|