Produced by Araxis Merge on 7/6/2017 8:23:28 PM 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 | OSCIF_CTT_v4_build 1.zip\rails_prisme\lib | nexus.rb | Wed May 31 03:59:08 2017 UTC |
| 2 | OSCIF_CTT_v4_build 1.zip\rails_prisme\lib | nexus.rb | Mon Jul 3 23:36:24 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 2 | 76 |
| 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 'f araday' | |
| 2 | require 'j son' | |
| 3 | require '. /lib/rails _common/ut il/helpers ' | |
| 4 | include KO METUtiliti es | |
| 5 | ||
| 6 | NEXUS_CONN = Faraday .new(url: 'http:// DNS : PORT ') do |far aday| | |
| 7 | faraday. request :u rl_encoded # form-en code POST params | |
| 8 | faraday. use Farada y::Respons e::Logger, $log | |
| 9 | faraday. headers['A ccept'] = 'applicati on/json' | |
| 10 | faraday. adapter :n et_http # make reque sts with N et::HTTP | |
| 11 | end | |
| 12 | ||
| 13 | NEXUS_CONN .basic_aut h('devtest ', 'devtes t') | |
| 14 | ||
| 15 | def search _nexus | |
| 16 | url_stri ng = '/nex us/service /local/luc ene/search ' | |
| 17 | params = {g: 'gov. vha.isaac. gui.rails' } | |
| 18 | params = {p: 'war' } | |
| 19 | ||
| 20 | url_stri ng = '/nex us/service /local/rep ositories/ snapshots/ index_cont ent/gov/vh a/isaac/re st/isaac-r est/1.0-SN APSHOT/' | |
| 21 | # url_st ring = '/n exus/servi ce/local/r epositorie s/snapshot s/index_co ntent/gov/ vha/isaac/ gui/rails/ ets_toolin g/1.3-SNAP SHOT' | |
| 22 | # gov/vh a/isaac/re st/isaac-r est/1.0-SN APSHOT/ | |
| 23 | ||
| 24 | response = NEXUS_C ONN.get(ur l_string, params) | |
| 25 | json = J SON.parse( response.b ody) | |
| 26 | json_to_ yaml_file( json, url_ to_path_st ring(url_s tring)) | |
| 27 | ||
| 28 | =begin | |
| 29 | begin | |
| 30 | json = JSON.pars e response .body | |
| 31 | rescue J SON::Parse rError => ex | |
| 32 | if (re sponse.sta tus.eql?(2 00)) | |
| 33 | retu rn respons e.body | |
| 34 | end | |
| 35 | end | |
| 36 | =end | |
| 37 | ||
| 38 | end | |
| 39 | # load './ lib/nexus. rb' |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.