Produced by Araxis Merge on 10/4/2017 8:04:43 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | rdk.zip\rdk\product\tests\rspec-tests\lib\helper | HTTPartyWithAuthorization.rb | Mon Aug 21 12:51:01 2017 UTC |
| 2 | rdk.zip\rdk\product\tests\rspec-tests\lib\helper | HTTPartyWithAuthorization.rb | Wed Oct 4 12:29:55 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 110 |
| Changed | 2 | 4 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | require "h ttparty" | |
| 2 | ||
| 3 | path = Fil e.expand_p ath '..', __FILE__ | |
| 4 | $LOAD_PATH .unshift p ath unless $LOAD_PAT H.include? (path) | |
| 5 | require "D efaultLogi n.rb" | |
| 6 | require "T estSupport .rb" | |
| 7 | require "D omAccess.r b" | |
| 8 | require "P atientPick erDomEleme nts.rb" | |
| 9 | ||
| 10 | # Call HTT Party with hardcoded Authoriza tion | |
| 11 | class HTTP artyWithAu thorizatio n | |
| 12 | include HTTParty | |
| 13 | ||
| 14 | # Authoriz ation head er is Base 64 encodin g of " R E D A CTED ;500: REDACT ; REDACTED " | |
| 15 | #@@heade r = { 'Aut horization ' => 'Basi c OUU3QTs1 MDA6cHUxMj M0O3B1MTIz NCEh' } | |
| 16 | @@time_s tart = Tim e.new | |
| 17 | @@time_d one = Time .new | |
| 18 | @@defaul t_timeout = 420 | |
| 19 | @@authPara m = { :acc essCode => " REDACT ", :verify Code => " REDACTED ", :site = > " R E D A CTED " } | |
| 20 | ||
| 21 | def self .time_elap sed_last_c all | |
| 22 | return @@time_do ne - @@tim e_start | |
| 23 | end | |
| 24 | ||
| 25 | def self .post_with _authoriza tion(path) | |
| 26 | @@time _start = T ime.new | |
| 27 | direct ory = post (path, { : verify => false, :qu ery => @@a uthParam, :timeout = > @@defaul t_timeout }) | |
| 28 | @@time _done = Ti me.new | |
| 29 | log_id = directo ry.headers ['logid'] | |
| 30 | p "log Id: #{log_ id}" if lo g_id | |
| 31 | return directory | |
| 32 | end | |
| 33 | ||
| 34 | def self .get_with_ authorizat ion(path) | |
| 35 | @@time _start = T ime.new | |
| 36 | direct ory = get( path, { :v erify => f alse, :que ry => @@au thParam, : timeout => @@default _timeout } ) | |
| 37 | @@time _done = Ti me.new | |
| 38 | log_id = directo ry.headers ['logid'] | |
| 39 | p "log Id: #{log_ id}" if lo g_id | |
| 40 | return directory | |
| 41 | end | |
| 42 | end | |
| 43 | ||
| 44 | if __FILE_ _ == $PROG RAM_NAME | |
| 45 | p '----- --- WAS HE RE ------- ----' | |
| 46 | ||
| 47 | base_url = Default Login.hmp_ url | |
| 48 | path = " #{base_url }/sync/loa dOperation alData?dom ain=Allerg y" | |
| 49 | ||
| 50 | p "Posti ng-------- ---------- -" | |
| 51 | p HTTPar tyWithAuth orization. post_with_ authorizat ion(path) | |
| 52 | ||
| 53 | p "Getti ng-------- ---------- -" | |
| 54 | path = " #{base_url }/sync/ope rationalSy ncStatus" | |
| 55 | p HTTPar tyWithAuth orization. get_with_a uthorizati on(path) | |
| 56 | ||
| 57 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.