Produced by Araxis Merge on 10/3/2017 11:16:06 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 | ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps\helper | HTTPartyWithAuthorization.rb | Tue Dec 15 14:05:18 2015 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\tests\acceptance-tests\features-arch\old_ehmp_features_ruby\steps\helper | HTTPartyWithAuthorization.rb | Tue Oct 3 13:50:41 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 102 |
| Changed | 1 | 2 |
| 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 efaultHmpL ogin.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 | @@header = { 'Auth orization' => 'Basic OUU3QTs1M DA6cHUxMjM 0O3B1MTIzN CEh' } | |
| 16 | @@time_s tart = Tim e.new | |
| 17 | @@time_d one = Time .new | |
| 18 | @@defaul t_timeout = 300 | |
| 19 | ||
| 20 | def self .time_elap sed_last_c all | |
| 21 | return @@time_do ne - @@tim e_start | |
| 22 | end | |
| 23 | ||
| 24 | def self .post_with _authoriza tion(path) | |
| 25 | @@time _start = T ime.new | |
| 26 | direct ory = post (path, { : verify => false, :he aders => @ @header, : timeout => @@default _timeout } ) | |
| 27 | @@time _done = Ti me.new | |
| 28 | return directory | |
| 29 | end | |
| 30 | ||
| 31 | def self .get_with_ authorizat ion(path) | |
| 32 | @@time _start = T ime.new | |
| 33 | direct ory = get( path, { :v erify => f alse, :hea ders => @@ header, :t imeout => @@default_ timeout }) | |
| 34 | @@time _done = Ti me.new | |
| 35 | return directory | |
| 36 | end | |
| 37 | end | |
| 38 | ||
| 39 | if __FILE_ _ == $PROG RAM_NAME | |
| 40 | p '----- --- WAS HE RE ------- ----' | |
| 41 | ||
| 42 | base_url = Default Login.hmp_ url | |
| 43 | path = " #{base_url }/sync/loa dOperation alData?dom ain=Allerg y" | |
| 44 | ||
| 45 | p "Posti ng-------- ---------- -" | |
| 46 | p HTTPar tyWithAuth orization. post_with_ authorizat ion(path) | |
| 47 | ||
| 48 | p "Getti ng-------- ---------- -" | |
| 49 | path = " #{base_url }/sync/ope rationalSy ncStatus" | |
| 50 | p HTTPar tyWithAuth orization. get_with_a uthorizati on(path) | |
| 51 | ||
| 52 | end |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.