pact_broker 2.52.1 → 2.56.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (115) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +80 -0
  3. data/CODE_OF_CONDUCT.md +76 -0
  4. data/README.md +2 -4
  5. data/db/migrations/20180828_create_latest_versions.rb +1 -1
  6. data/lib/pact_broker/api.rb +8 -0
  7. data/lib/pact_broker/api/contracts/webhook_contract.rb +8 -6
  8. data/lib/pact_broker/api/decorators/decorator_context.rb +6 -11
  9. data/lib/pact_broker/api/decorators/reason_decorator.rb +17 -0
  10. data/lib/pact_broker/api/decorators/webhook_execution_result_decorator.rb +6 -1
  11. data/lib/pact_broker/api/pact_broker_urls.rb +6 -2
  12. data/lib/pact_broker/api/renderers/html_pact_renderer.rb +14 -14
  13. data/lib/pact_broker/api/resources/badge.rb +6 -2
  14. data/lib/pact_broker/api/resources/base_resource.rb +3 -3
  15. data/lib/pact_broker/api/resources/matrix_badge.rb +5 -0
  16. data/lib/pact_broker/api/resources/pact.rb +1 -17
  17. data/lib/pact_broker/api/resources/pacticipant.rb +0 -4
  18. data/lib/pact_broker/api/resources/pacticipants.rb +3 -2
  19. data/lib/pact_broker/api/resources/verifications.rb +0 -4
  20. data/lib/pact_broker/app.rb +13 -4
  21. data/lib/pact_broker/badges/service.rb +16 -13
  22. data/lib/pact_broker/db.rb +9 -1
  23. data/lib/pact_broker/doc/controllers/app.rb +11 -1
  24. data/lib/pact_broker/doc/views/layouts/main.haml +1 -1
  25. data/lib/pact_broker/domain/verification.rb +13 -0
  26. data/lib/pact_broker/hash_refinements.rb +4 -0
  27. data/lib/pact_broker/integrations/service.rb +2 -2
  28. data/lib/pact_broker/locale/en.yml +1 -1
  29. data/lib/pact_broker/logging.rb +3 -1
  30. data/lib/pact_broker/matrix/deployment_status_summary.rb +23 -1
  31. data/lib/pact_broker/matrix/reason.rb +9 -0
  32. data/lib/pact_broker/matrix/unresolved_selector.rb +4 -0
  33. data/lib/pact_broker/pacticipants/repository.rb +6 -0
  34. data/lib/pact_broker/pacticipants/service.rb +8 -0
  35. data/lib/pact_broker/pacts/content.rb +26 -2
  36. data/lib/pact_broker/pacts/repository.rb +5 -4
  37. data/lib/pact_broker/tasks/migration_task.rb +20 -1
  38. data/lib/pact_broker/test/test_data_builder.rb +8 -3
  39. data/lib/pact_broker/ui/app.rb +1 -0
  40. data/lib/pact_broker/ui/controllers/base_controller.rb +3 -0
  41. data/lib/pact_broker/ui/controllers/clusters.rb +2 -2
  42. data/lib/pact_broker/ui/controllers/groups.rb +3 -2
  43. data/lib/pact_broker/ui/controllers/index.rb +3 -2
  44. data/lib/pact_broker/ui/controllers/matrix.rb +19 -3
  45. data/lib/pact_broker/ui/helpers/url_helper.rb +4 -4
  46. data/lib/pact_broker/ui/view_models/index_item.rb +16 -11
  47. data/lib/pact_broker/ui/view_models/index_items.rb +2 -2
  48. data/lib/pact_broker/ui/view_models/matrix_line.rb +12 -7
  49. data/lib/pact_broker/ui/view_models/matrix_lines.rb +2 -2
  50. data/lib/pact_broker/ui/views/groups/show.html.erb +3 -3
  51. data/lib/pact_broker/ui/views/index/_css_and_js.haml +9 -9
  52. data/lib/pact_broker/ui/views/index/_navbar.haml +3 -3
  53. data/lib/pact_broker/ui/views/index/_pagination.haml +1 -1
  54. data/lib/pact_broker/ui/views/index/show-with-tags.haml +3 -3
  55. data/lib/pact_broker/ui/views/index/show.haml +3 -3
  56. data/lib/pact_broker/ui/views/layouts/main.haml +4 -4
  57. data/lib/pact_broker/ui/views/matrix/show.haml +14 -11
  58. data/lib/pact_broker/verifications/repository.rb +4 -5
  59. data/lib/pact_broker/version.rb +1 -1
  60. data/lib/pact_broker/webhooks/service.rb +4 -3
  61. data/lib/pact_broker/webhooks/webhook_event.rb +1 -1
  62. data/lib/pact_broker/webhooks/webhook_request_logger.rb +8 -8
  63. data/pact_broker.gemspec +2 -2
  64. data/public/javascripts/pact.js +7 -6
  65. data/public/stylesheets/matrix.css +13 -0
  66. data/script/foo-bar-verification.json +3 -1
  67. data/script/foo-bar.json +11 -0
  68. data/script/seed.rb +1 -1
  69. data/spec/features/create_webhook_spec.rb +1 -1
  70. data/spec/features/delete_integration_spec.rb +2 -2
  71. data/spec/features/get_matrix_badge_spec.rb +9 -0
  72. data/spec/fixtures/webhook_valid.json +1 -1
  73. data/spec/fixtures/webhook_valid_with_pacticipants.json +1 -1
  74. data/spec/integration/ui/index_spec.rb +16 -0
  75. data/spec/integration/ui/matrix_spec.rb +11 -4
  76. data/spec/lib/pact_broker/api/contracts/webhook_contract_spec.rb +12 -0
  77. data/spec/lib/pact_broker/api/decorators/pact_version_decorator_spec.rb +1 -1
  78. data/spec/lib/pact_broker/api/decorators/reason_decorator_spec.rb +18 -1
  79. data/spec/lib/pact_broker/api/decorators/webhooks_decorator_spec.rb +1 -1
  80. data/spec/lib/pact_broker/api/pact_broker_urls_spec.rb +8 -0
  81. data/spec/lib/pact_broker/api/renderers/html_pact_renderer_spec.rb +1 -1
  82. data/spec/lib/pact_broker/api/resources/badge_spec.rb +42 -22
  83. data/spec/lib/pact_broker/api/resources/webhook_execution_spec.rb +1 -1
  84. data/spec/lib/pact_broker/badges/service_spec.rb +15 -3
  85. data/spec/lib/pact_broker/doc/controllers/app_spec.rb +16 -0
  86. data/spec/lib/pact_broker/domain/version_spec.rb +7 -7
  87. data/spec/lib/pact_broker/integrations/service_spec.rb +6 -0
  88. data/spec/lib/pact_broker/matrix/deployment_status_summary_spec.rb +6 -2
  89. data/spec/lib/pact_broker/matrix/integration_spec.rb +43 -0
  90. data/spec/lib/pact_broker/pacts/content_spec.rb +125 -0
  91. data/spec/lib/pact_broker/pacts/repository_find_for_verification_spec.rb +18 -1
  92. data/spec/lib/pact_broker/verifications/repository_spec.rb +20 -0
  93. data/spec/lib/pact_broker/webhooks/webhook_request_logger_spec.rb +4 -1
  94. data/spec/migrations/rollback_spec.rb +6 -0
  95. data/spec/service_consumers/provider_states_for_pact_broker_client.rb +11 -0
  96. data/vendor/hal-browser/README.adoc +169 -0
  97. data/vendor/hal-browser/browser.html +36 -22
  98. data/vendor/hal-browser/js/hal.js +30 -7
  99. data/vendor/hal-browser/js/hal/http/client.js +14 -6
  100. data/vendor/hal-browser/js/hal/resource.js +4 -2
  101. data/vendor/hal-browser/js/hal/views/documentation.js +1 -1
  102. data/vendor/hal-browser/js/hal/views/embedded_resource.js +10 -4
  103. data/vendor/hal-browser/js/hal/views/links.js +3 -2
  104. data/vendor/hal-browser/js/hal/views/non_safe_request_dialog.js +1 -1
  105. data/vendor/hal-browser/js/hal/views/properties.js +101 -2
  106. data/vendor/hal-browser/js/hal/views/query_uri_dialog.js +1 -1
  107. data/vendor/hal-browser/js/hal/views/request_headers.js +1 -1
  108. data/vendor/hal-browser/js/hal/views/resource.js +4 -3
  109. data/vendor/hal-browser/js/hal/views/response_headers.js +12 -1
  110. data/vendor/hal-browser/login.html +76 -0
  111. data/vendor/hal-browser/styles.css +3 -1
  112. data/vendor/hal-browser/vendor/js/URI.min.js +84 -0
  113. metadata +31 -28
  114. data/lib/pact_broker/verifications/all_verifications.rb +0 -41
  115. data/vendor/hal-browser/README.md +0 -41
@@ -1,3 +1,5 @@
1
+ html, body, #browser, .hal-browser { height: 100%; }
2
+
1
3
  #browser #location-bar { margin: 10px 0; }
2
4
 
3
5
  #browser #location-bar .address {
@@ -28,7 +30,7 @@
28
30
 
29
31
  .documentation { height: 100%; }
30
32
  .documentation iframe { width: 100%; height: 100%; }
31
- .documentation iframe { min-height: 600px } /* Beth: don't know why we need this, it used to display full height without setting a min-height. No idea what changed. */
33
+ .documentation iframe { min-height: 600px } /* pact_broker Beth: don't know why we need this, it used to display full height without setting a min-height. No idea what changed. */
32
34
 
33
35
  .modal input, .modal textarea {
34
36
  width: 90%;
@@ -0,0 +1,84 @@
1
+ /*! URI.js v1.14.1 http://medialize.github.io/URI.js/ */
2
+ /* build contains: IPv6.js, punycode.js, SecondLevelDomains.js, URI.js, URITemplate.js */
3
+ (function(f,l){"object"===typeof exports?module.exports=l():"function"===typeof define&&define.amd?define(l):f.IPv6=l(f)})(this,function(f){var l=f&&f.IPv6;return{best:function(g){g=g.toLowerCase().split(":");var m=g.length,b=8;""===g[0]&&""===g[1]&&""===g[2]?(g.shift(),g.shift()):""===g[0]&&""===g[1]?g.shift():""===g[m-1]&&""===g[m-2]&&g.pop();m=g.length;-1!==g[m-1].indexOf(".")&&(b=7);var k;for(k=0;k<m&&""!==g[k];k++);if(k<b)for(g.splice(k,1,"0000");g.length<b;)g.splice(k,0,"0000");for(k=0;k<b;k++){for(var m=
4
+ g[k].split(""),f=0;3>f;f++)if("0"===m[0]&&1<m.length)m.splice(0,1);else break;g[k]=m.join("")}var m=-1,l=f=0,h=-1,r=!1;for(k=0;k<b;k++)r?"0"===g[k]?l+=1:(r=!1,l>f&&(m=h,f=l)):"0"===g[k]&&(r=!0,h=k,l=1);l>f&&(m=h,f=l);1<f&&g.splice(m,f,"");m=g.length;b="";""===g[0]&&(b=":");for(k=0;k<m;k++){b+=g[k];if(k===m-1)break;b+=":"}""===g[m-1]&&(b+=":");return b},noConflict:function(){f.IPv6===this&&(f.IPv6=l);return this}}});
5
+ (function(f){function l(b){throw RangeError(v[b]);}function g(b,e){for(var h=b.length;h--;)b[h]=e(b[h]);return b}function m(b,e){return g(b.split(u),e).join(".")}function b(b){for(var e=[],h=0,a=b.length,c,d;h<a;)c=b.charCodeAt(h++),55296<=c&&56319>=c&&h<a?(d=b.charCodeAt(h++),56320==(d&64512)?e.push(((c&1023)<<10)+(d&1023)+65536):(e.push(c),h--)):e.push(c);return e}function k(b){return g(b,function(b){var e="";65535<b&&(b-=65536,e+=A(b>>>10&1023|55296),b=56320|b&1023);return e+=A(b)}).join("")}function y(b,
6
+ e){return b+22+75*(26>b)-((0!=e)<<5)}function p(b,e,h){var a=0;b=h?q(b/700):b>>1;for(b+=q(b/e);455<b;a+=36)b=q(b/35);return q(a+36*b/(b+38))}function h(b){var e=[],h=b.length,a,c=0,d=128,t=72,w,x,g,f,m;w=b.lastIndexOf("-");0>w&&(w=0);for(x=0;x<w;++x)128<=b.charCodeAt(x)&&l("not-basic"),e.push(b.charCodeAt(x));for(w=0<w?w+1:0;w<h;){x=c;a=1;for(g=36;;g+=36){w>=h&&l("invalid-input");f=b.charCodeAt(w++);f=10>f-48?f-22:26>f-65?f-65:26>f-97?f-97:36;(36<=f||f>q((2147483647-c)/a))&&l("overflow");c+=f*a;m=
7
+ g<=t?1:g>=t+26?26:g-t;if(f<m)break;f=36-m;a>q(2147483647/f)&&l("overflow");a*=f}a=e.length+1;t=p(c-x,a,0==x);q(c/a)>2147483647-d&&l("overflow");d+=q(c/a);c%=a;e.splice(c++,0,d)}return k(e)}function r(e){var h,g,a,c,d,t,w,x,f,m=[],r,k,n;e=b(e);r=e.length;h=128;g=0;d=72;for(t=0;t<r;++t)f=e[t],128>f&&m.push(A(f));for((a=c=m.length)&&m.push("-");a<r;){w=2147483647;for(t=0;t<r;++t)f=e[t],f>=h&&f<w&&(w=f);k=a+1;w-h>q((2147483647-g)/k)&&l("overflow");g+=(w-h)*k;h=w;for(t=0;t<r;++t)if(f=e[t],f<h&&2147483647<
8
+ ++g&&l("overflow"),f==h){x=g;for(w=36;;w+=36){f=w<=d?1:w>=d+26?26:w-d;if(x<f)break;n=x-f;x=36-f;m.push(A(y(f+n%x,0)));x=q(n/x)}m.push(A(y(x,0)));d=p(g,k,a==c);g=0;++a}++g;++h}return m.join("")}var B="object"==typeof exports&&exports,C="object"==typeof module&&module&&module.exports==B&&module,z="object"==typeof global&&global;if(z.global===z||z.window===z)f=z;var s,n=/^xn--/,e=/[^ -~]/,u=/\x2E|\u3002|\uFF0E|\uFF61/g,v={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)",
9
+ "invalid-input":"Invalid input"},q=Math.floor,A=String.fromCharCode,D;s={version:"1.2.3",ucs2:{decode:b,encode:k},decode:h,encode:r,toASCII:function(b){return m(b,function(b){return e.test(b)?"xn--"+r(b):b})},toUnicode:function(b){return m(b,function(b){return n.test(b)?h(b.slice(4).toLowerCase()):b})}};if("function"==typeof define&&"object"==typeof define.amd&&define.amd)define(function(){return s});else if(B&&!B.nodeType)if(C)C.exports=s;else for(D in s)s.hasOwnProperty(D)&&(B[D]=s[D]);else f.punycode=
10
+ s})(this);
11
+ (function(f,l){"object"===typeof exports?module.exports=l():"function"===typeof define&&define.amd?define(l):f.SecondLevelDomains=l(f)})(this,function(f){var l=f&&f.SecondLevelDomains,g={list:{ac:" com gov mil net org ",ae:" ac co gov mil name net org pro sch ",af:" com edu gov net org ",al:" com edu gov mil net org ",ao:" co ed gv it og pb ",ar:" com edu gob gov int mil net org tur ",at:" ac co gv or ",au:" asn com csiro edu gov id net org ",ba:" co com edu gov mil net org rs unbi unmo unsa untz unze ",bb:" biz co com edu gov info net org store tv ",
12
+ bh:" biz cc com edu gov info net org ",bn:" com edu gov net org ",bo:" com edu gob gov int mil net org tv ",br:" adm adv agr am arq art ato b bio blog bmd cim cng cnt com coop ecn edu eng esp etc eti far flog fm fnd fot fst g12 ggf gov imb ind inf jor jus lel mat med mil mus net nom not ntr odo org ppg pro psc psi qsl rec slg srv tmp trd tur tv vet vlog wiki zlg ",bs:" com edu gov net org ",bz:" du et om ov rg ",ca:" ab bc mb nb nf nl ns nt nu on pe qc sk yk ",ck:" biz co edu gen gov info net org ",
13
+ cn:" ac ah bj com cq edu fj gd gov gs gx gz ha hb he hi hl hn jl js jx ln mil net nm nx org qh sc sd sh sn sx tj tw xj xz yn zj ",co:" com edu gov mil net nom org ",cr:" ac c co ed fi go or sa ",cy:" ac biz com ekloges gov ltd name net org parliament press pro tm ","do":" art com edu gob gov mil net org sld web ",dz:" art asso com edu gov net org pol ",ec:" com edu fin gov info med mil net org pro ",eg:" com edu eun gov mil name net org sci ",er:" com edu gov ind mil net org rochest w ",es:" com edu gob nom org ",
14
+ et:" biz com edu gov info name net org ",fj:" ac biz com info mil name net org pro ",fk:" ac co gov net nom org ",fr:" asso com f gouv nom prd presse tm ",gg:" co net org ",gh:" com edu gov mil org ",gn:" ac com gov net org ",gr:" com edu gov mil net org ",gt:" com edu gob ind mil net org ",gu:" com edu gov net org ",hk:" com edu gov idv net org ",hu:" 2000 agrar bolt casino city co erotica erotika film forum games hotel info ingatlan jogasz konyvelo lakas media news org priv reklam sex shop sport suli szex tm tozsde utazas video ",
15
+ id:" ac co go mil net or sch web ",il:" ac co gov idf k12 muni net org ","in":" ac co edu ernet firm gen gov i ind mil net nic org res ",iq:" com edu gov i mil net org ",ir:" ac co dnssec gov i id net org sch ",it:" edu gov ",je:" co net org ",jo:" com edu gov mil name net org sch ",jp:" ac ad co ed go gr lg ne or ",ke:" ac co go info me mobi ne or sc ",kh:" com edu gov mil net org per ",ki:" biz com de edu gov info mob net org tel ",km:" asso com coop edu gouv k medecin mil nom notaires pharmaciens presse tm veterinaire ",
16
+ kn:" edu gov net org ",kr:" ac busan chungbuk chungnam co daegu daejeon es gangwon go gwangju gyeongbuk gyeonggi gyeongnam hs incheon jeju jeonbuk jeonnam k kg mil ms ne or pe re sc seoul ulsan ",kw:" com edu gov net org ",ky:" com edu gov net org ",kz:" com edu gov mil net org ",lb:" com edu gov net org ",lk:" assn com edu gov grp hotel int ltd net ngo org sch soc web ",lr:" com edu gov net org ",lv:" asn com conf edu gov id mil net org ",ly:" com edu gov id med net org plc sch ",ma:" ac co gov m net org press ",
17
+ mc:" asso tm ",me:" ac co edu gov its net org priv ",mg:" com edu gov mil nom org prd tm ",mk:" com edu gov inf name net org pro ",ml:" com edu gov net org presse ",mn:" edu gov org ",mo:" com edu gov net org ",mt:" com edu gov net org ",mv:" aero biz com coop edu gov info int mil museum name net org pro ",mw:" ac co com coop edu gov int museum net org ",mx:" com edu gob net org ",my:" com edu gov mil name net org sch ",nf:" arts com firm info net other per rec store web ",ng:" biz com edu gov mil mobi name net org sch ",
18
+ ni:" ac co com edu gob mil net nom org ",np:" com edu gov mil net org ",nr:" biz com edu gov info net org ",om:" ac biz co com edu gov med mil museum net org pro sch ",pe:" com edu gob mil net nom org sld ",ph:" com edu gov i mil net ngo org ",pk:" biz com edu fam gob gok gon gop gos gov net org web ",pl:" art bialystok biz com edu gda gdansk gorzow gov info katowice krakow lodz lublin mil net ngo olsztyn org poznan pwr radom slupsk szczecin torun warszawa waw wroc wroclaw zgora ",pr:" ac biz com edu est gov info isla name net org pro prof ",
19
+ ps:" com edu gov net org plo sec ",pw:" belau co ed go ne or ",ro:" arts com firm info nom nt org rec store tm www ",rs:" ac co edu gov in org ",sb:" com edu gov net org ",sc:" com edu gov net org ",sh:" co com edu gov net nom org ",sl:" com edu gov net org ",st:" co com consulado edu embaixada gov mil net org principe saotome store ",sv:" com edu gob org red ",sz:" ac co org ",tr:" av bbs bel biz com dr edu gen gov info k12 name net org pol tel tsk tv web ",tt:" aero biz cat co com coop edu gov info int jobs mil mobi museum name net org pro tel travel ",
20
+ tw:" club com ebiz edu game gov idv mil net org ",mu:" ac co com gov net or org ",mz:" ac co edu gov org ",na:" co com ",nz:" ac co cri geek gen govt health iwi maori mil net org parliament school ",pa:" abo ac com edu gob ing med net nom org sld ",pt:" com edu gov int net nome org publ ",py:" com edu gov mil net org ",qa:" com edu gov mil net org ",re:" asso com nom ",ru:" ac adygeya altai amur arkhangelsk astrakhan bashkiria belgorod bir bryansk buryatia cbg chel chelyabinsk chita chukotka chuvashia com dagestan e-burg edu gov grozny int irkutsk ivanovo izhevsk jar joshkar-ola kalmykia kaluga kamchatka karelia kazan kchr kemerovo khabarovsk khakassia khv kirov koenig komi kostroma kranoyarsk kuban kurgan kursk lipetsk magadan mari mari-el marine mil mordovia mosreg msk murmansk nalchik net nnov nov novosibirsk nsk omsk orenburg org oryol penza perm pp pskov ptz rnd ryazan sakhalin samara saratov simbirsk smolensk spb stavropol stv surgut tambov tatarstan tom tomsk tsaritsyn tsk tula tuva tver tyumen udm udmurtia ulan-ude vladikavkaz vladimir vladivostok volgograd vologda voronezh vrn vyatka yakutia yamal yekaterinburg yuzhno-sakhalinsk ",
21
+ rw:" ac co com edu gouv gov int mil net ",sa:" com edu gov med net org pub sch ",sd:" com edu gov info med net org tv ",se:" a ac b bd c d e f g h i k l m n o org p parti pp press r s t tm u w x y z ",sg:" com edu gov idn net org per ",sn:" art com edu gouv org perso univ ",sy:" com edu gov mil net news org ",th:" ac co go in mi net or ",tj:" ac biz co com edu go gov info int mil name net nic org test web ",tn:" agrinet com defense edunet ens fin gov ind info intl mincom nat net org perso rnrt rns rnu tourism ",
22
+ tz:" ac co go ne or ",ua:" biz cherkassy chernigov chernovtsy ck cn co com crimea cv dn dnepropetrovsk donetsk dp edu gov if in ivano-frankivsk kh kharkov kherson khmelnitskiy kiev kirovograd km kr ks kv lg lugansk lutsk lviv me mk net nikolaev od odessa org pl poltava pp rovno rv sebastopol sumy te ternopil uzhgorod vinnica vn zaporizhzhe zhitomir zp zt ",ug:" ac co go ne or org sc ",uk:" ac bl british-library co cym gov govt icnet jet lea ltd me mil mod national-library-scotland nel net nhs nic nls org orgn parliament plc police sch scot soc ",
23
+ us:" dni fed isa kids nsn ",uy:" com edu gub mil net org ",ve:" co com edu gob info mil net org web ",vi:" co com k12 net org ",vn:" ac biz com edu gov health info int name net org pro ",ye:" co com gov ltd me net org plc ",yu:" ac co edu gov org ",za:" ac agric alt bourse city co cybernet db edu gov grondar iaccess imt inca landesign law mil net ngo nis nom olivetti org pix school tm web ",zm:" ac co com edu gov net org sch "},has:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return!1;
24
+ var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return!1;var l=g.list[f.slice(b+1)];return l?0<=l.indexOf(" "+f.slice(k+1,b)+" "):!1},is:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1||0<=f.lastIndexOf(".",b-1))return!1;var k=g.list[f.slice(b+1)];return k?0<=k.indexOf(" "+f.slice(0,b)+" "):!1},get:function(f){var b=f.lastIndexOf(".");if(0>=b||b>=f.length-1)return null;var k=f.lastIndexOf(".",b-1);if(0>=k||k>=b-1)return null;var l=g.list[f.slice(b+1)];return!l||0>l.indexOf(" "+f.slice(k+
25
+ 1,b)+" ")?null:f.slice(k+1)},noConflict:function(){f.SecondLevelDomains===this&&(f.SecondLevelDomains=l);return this}};return g});
26
+ (function(f,l){"object"===typeof exports?module.exports=l(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains")):"function"===typeof define&&define.amd?define(["./punycode","./IPv6","./SecondLevelDomains"],l):f.URI=l(f.punycode,f.IPv6,f.SecondLevelDomains,f)})(this,function(f,l,g,m){function b(a,c){if(!(this instanceof b))return new b(a,c);void 0===a&&(a="undefined"!==typeof location?location.href+"":"");this.href(a);return void 0!==c?this.absoluteTo(c):this}function k(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,
27
+ "\\$1")}function y(a){return void 0===a?"Undefined":String(Object.prototype.toString.call(a)).slice(8,-1)}function p(a){return"Array"===y(a)}function h(a,c){var d,b;if(p(c)){d=0;for(b=c.length;d<b;d++)if(!h(a,c[d]))return!1;return!0}var e=y(c);d=0;for(b=a.length;d<b;d++)if("RegExp"===e){if("string"===typeof a[d]&&a[d].match(c))return!0}else if(a[d]===c)return!0;return!1}function r(a,c){if(!p(a)||!p(c)||a.length!==c.length)return!1;a.sort();c.sort();for(var d=0,b=a.length;d<b;d++)if(a[d]!==c[d])return!1;
28
+ return!0}function B(a){return escape(a)}function C(a){return encodeURIComponent(a).replace(/[!'()*]/g,B).replace(/\*/g,"%2A")}function z(a){return function(c,d){if(void 0===c)return this._parts[a]||"";this._parts[a]=c||null;this.build(!d);return this}}function s(a,c){return function(d,b){if(void 0===d)return this._parts[a]||"";null!==d&&(d+="",d.charAt(0)===c&&(d=d.substring(1)));this._parts[a]=d;this.build(!b);return this}}var n=m&&m.URI;b.version="1.14.1";var e=b.prototype,u=Object.prototype.hasOwnProperty;
29
+ b._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:b.duplicateQueryParameters,escapeQuerySpace:b.escapeQuerySpace}};b.duplicateQueryParameters=!1;b.escapeQuerySpace=!0;b.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;b.idn_expression=/[^a-z0-9\.-]/i;b.punycode_expression=/(xn--)/i;b.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;b.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;
30
+ b.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u2018\u2019]))/ig;b.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?\u00ab\u00bb\u201c\u201d\u201e\u2018\u2019]+$/};b.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};b.invalid_hostname_characters=
31
+ /[^a-zA-Z0-9\.-]/;b.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src",audio:"src",video:"src"};b.getDomAttribute=function(a){if(a&&a.nodeName){var c=a.nodeName.toLowerCase();return"input"===c&&"image"!==a.type?void 0:b.domAttributes[c]}};b.encode=C;b.decode=decodeURIComponent;b.iso8859=function(){b.encode=escape;b.decode=unescape};b.unicode=function(){b.encode=C;b.decode=
32
+ decodeURIComponent};b.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/ig,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/ig,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",",
33
+ "%3B":";","%3D":"="}}}};b.encodeQuery=function(a,c){var d=b.encode(a+"");void 0===c&&(c=b.escapeQuerySpace);return c?d.replace(/%20/g,"+"):d};b.decodeQuery=function(a,c){a+="";void 0===c&&(c=b.escapeQuerySpace);try{return b.decode(c?a.replace(/\+/g,"%20"):a)}catch(d){return a}};b.recodePath=function(a){a=(a+"").split("/");for(var c=0,d=a.length;c<d;c++)a[c]=b.encodePathSegment(b.decode(a[c]));return a.join("/")};b.decodePath=function(a){a=(a+"").split("/");for(var c=0,d=a.length;c<d;c++)a[c]=b.decodePathSegment(a[c]);
34
+ return a.join("/")};var v={encode:"encode",decode:"decode"},q,A=function(a,c){return function(d){try{return b[c](d+"").replace(b.characters[a][c].expression,function(d){return b.characters[a][c].map[d]})}catch(t){return d}}};for(q in v)b[q+"PathSegment"]=A("pathname",v[q]);b.encodeReserved=A("reserved","encode");b.parse=function(a,c){var d;c||(c={});d=a.indexOf("#");-1<d&&(c.fragment=a.substring(d+1)||null,a=a.substring(0,d));d=a.indexOf("?");-1<d&&(c.query=a.substring(d+1)||null,a=a.substring(0,
35
+ d));"//"===a.substring(0,2)?(c.protocol=null,a=a.substring(2),a=b.parseAuthority(a,c)):(d=a.indexOf(":"),-1<d&&(c.protocol=a.substring(0,d)||null,c.protocol&&!c.protocol.match(b.protocol_expression)?c.protocol=void 0:"//"===a.substring(d+1,d+3)?(a=a.substring(d+3),a=b.parseAuthority(a,c)):(a=a.substring(d+1),c.urn=!0)));c.path=a;return c};b.parseHost=function(a,c){var d=a.indexOf("/"),b;-1===d&&(d=a.length);"["===a.charAt(0)?(b=a.indexOf("]"),c.hostname=a.substring(1,b)||null,c.port=a.substring(b+
36
+ 2,d)||null,"/"===c.port&&(c.port=null)):a.indexOf(":")!==a.lastIndexOf(":")?(c.hostname=a.substring(0,d)||null,c.port=null):(b=a.substring(0,d).split(":"),c.hostname=b[0]||null,c.port=b[1]||null);c.hostname&&"/"!==a.substring(d).charAt(0)&&(d++,a="/"+a);return a.substring(d)||"/"};b.parseAuthority=function(a,c){a=b.parseUserinfo(a,c);return b.parseHost(a,c)};b.parseUserinfo=function(a,c){var d=a.indexOf("/"),t=a.lastIndexOf("@",-1<d?d:a.length-1);-1<t&&(-1===d||t<d)?(d=a.substring(0,t).split(":"),
37
+ c.username=d[0]?b.decode(d[0]):null,d.shift(),c.password=d[0]?b.decode(d.join(":")):null,a=a.substring(t+1)):(c.username=null,c.password=null);return a};b.parseQuery=function(a,c){if(!a)return{};a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a)return{};for(var d={},t=a.split("&"),e=t.length,f,h,g=0;g<e;g++)f=t[g].split("="),h=b.decodeQuery(f.shift(),c),f=f.length?b.decodeQuery(f.join("="),c):null,u.call(d,h)?("string"===typeof d[h]&&(d[h]=[d[h]]),d[h].push(f)):d[h]=f;return d};b.build=function(a){var c=
38
+ "";a.protocol&&(c+=a.protocol+":");a.urn||!c&&!a.hostname||(c+="//");c+=b.buildAuthority(a)||"";"string"===typeof a.path&&("/"!==a.path.charAt(0)&&"string"===typeof a.hostname&&(c+="/"),c+=a.path);"string"===typeof a.query&&a.query&&(c+="?"+a.query);"string"===typeof a.fragment&&a.fragment&&(c+="#"+a.fragment);return c};b.buildHost=function(a){var c="";if(a.hostname)c=b.ip6_expression.test(a.hostname)?c+("["+a.hostname+"]"):c+a.hostname;else return"";a.port&&(c+=":"+a.port);return c};b.buildAuthority=
39
+ function(a){return b.buildUserinfo(a)+b.buildHost(a)};b.buildUserinfo=function(a){var c="";a.username&&(c+=b.encode(a.username),a.password&&(c+=":"+b.encode(a.password)),c+="@");return c};b.buildQuery=function(a,c,d){var t="",e,f,h,g;for(f in a)if(u.call(a,f)&&f)if(p(a[f]))for(e={},h=0,g=a[f].length;h<g;h++)void 0!==a[f][h]&&void 0===e[a[f][h]+""]&&(t+="&"+b.buildQueryParameter(f,a[f][h],d),!0!==c&&(e[a[f][h]+""]=!0));else void 0!==a[f]&&(t+="&"+b.buildQueryParameter(f,a[f],d));return t.substring(1)};
40
+ b.buildQueryParameter=function(a,c,d){return b.encodeQuery(a,d)+(null!==c?"="+b.encodeQuery(c,d):"")};b.addQuery=function(a,c,d){if("object"===typeof c)for(var e in c)u.call(c,e)&&b.addQuery(a,e,c[e]);else if("string"===typeof c)void 0===a[c]?a[c]=d:("string"===typeof a[c]&&(a[c]=[a[c]]),p(d)||(d=[d]),a[c]=(a[c]||[]).concat(d));else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");};b.removeQuery=function(a,c,d){var e;if(p(c))for(d=0,e=c.length;d<e;d++)a[c[d]]=
41
+ void 0;else if("object"===typeof c)for(e in c)u.call(c,e)&&b.removeQuery(a,e,c[e]);else if("string"===typeof c)if(void 0!==d)if(a[c]===d)a[c]=void 0;else{if(p(a[c])){e=a[c];var f={},h,g;if(p(d))for(h=0,g=d.length;h<g;h++)f[d[h]]=!0;else f[d]=!0;h=0;for(g=e.length;h<g;h++)void 0!==f[e[h]]&&(e.splice(h,1),g--,h--);a[c]=e}}else a[c]=void 0;else throw new TypeError("URI.addQuery() accepts an object, string as the first parameter");};b.hasQuery=function(a,c,d,e){if("object"===typeof c){for(var f in c)if(u.call(c,
42
+ f)&&!b.hasQuery(a,f,c[f]))return!1;return!0}if("string"!==typeof c)throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter");switch(y(d)){case "Undefined":return c in a;case "Boolean":return a=Boolean(p(a[c])?a[c].length:a[c]),d===a;case "Function":return!!d(a[c],c,a);case "Array":return p(a[c])?(e?h:r)(a[c],d):!1;case "RegExp":return p(a[c])?e?h(a[c],d):!1:Boolean(a[c]&&a[c].match(d));case "Number":d=String(d);case "String":return p(a[c])?e?h(a[c],d):!1:a[c]===d;default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter");
43
+ }};b.commonPath=function(a,c){var d=Math.min(a.length,c.length),b;for(b=0;b<d;b++)if(a.charAt(b)!==c.charAt(b)){b--;break}if(1>b)return a.charAt(0)===c.charAt(0)&&"/"===a.charAt(0)?"/":"";if("/"!==a.charAt(b)||"/"!==c.charAt(b))b=a.substring(0,b).lastIndexOf("/");return a.substring(0,b+1)};b.withinString=function(a,c,d){d||(d={});var e=d.start||b.findUri.start,f=d.end||b.findUri.end,h=d.trim||b.findUri.trim,g=/[a-z0-9-]=["']?$/i;for(e.lastIndex=0;;){var r=e.exec(a);if(!r)break;r=r.index;if(d.ignoreHtml){var k=
44
+ a.slice(Math.max(r-3,0),r);if(k&&g.test(k))continue}var k=r+a.slice(r).search(f),m=a.slice(r,k).replace(h,"");d.ignore&&d.ignore.test(m)||(k=r+m.length,m=c(m,r,k,a),a=a.slice(0,r)+m+a.slice(k),e.lastIndex=r+m.length)}e.lastIndex=0;return a};b.ensureValidHostname=function(a){if(a.match(b.invalid_hostname_characters)){if(!f)throw new TypeError('Hostname "'+a+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available');if(f.toASCII(a).match(b.invalid_hostname_characters))throw new TypeError('Hostname "'+
45
+ a+'" contains characters other than [A-Z0-9.-]');}};b.noConflict=function(a){if(a)return a={URI:this.noConflict()},m.URITemplate&&"function"===typeof m.URITemplate.noConflict&&(a.URITemplate=m.URITemplate.noConflict()),m.IPv6&&"function"===typeof m.IPv6.noConflict&&(a.IPv6=m.IPv6.noConflict()),m.SecondLevelDomains&&"function"===typeof m.SecondLevelDomains.noConflict&&(a.SecondLevelDomains=m.SecondLevelDomains.noConflict()),a;m.URI===this&&(m.URI=n);return this};e.build=function(a){if(!0===a)this._deferred_build=
46
+ !0;else if(void 0===a||this._deferred_build)this._string=b.build(this._parts),this._deferred_build=!1;return this};e.clone=function(){return new b(this)};e.valueOf=e.toString=function(){return this.build(!1)._string};e.protocol=z("protocol");e.username=z("username");e.password=z("password");e.hostname=z("hostname");e.port=z("port");e.query=s("query","?");e.fragment=s("fragment","#");e.search=function(a,c){var d=this.query(a,c);return"string"===typeof d&&d.length?"?"+d:d};e.hash=function(a,c){var d=
47
+ this.fragment(a,c);return"string"===typeof d&&d.length?"#"+d:d};e.pathname=function(a,c){if(void 0===a||!0===a){var d=this._parts.path||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}this._parts.path=a?b.recodePath(a):"/";this.build(!c);return this};e.path=e.pathname;e.href=function(a,c){var d;if(void 0===a)return this.toString();this._string="";this._parts=b._parts();var e=a instanceof b,f="object"===typeof a&&(a.hostname||a.path||a.pathname);a.nodeName&&(f=b.getDomAttribute(a),a=a[f]||
48
+ "",f=!1);!e&&f&&void 0!==a.pathname&&(a=a.toString());if("string"===typeof a||a instanceof String)this._parts=b.parse(String(a),this._parts);else if(e||f)for(d in e=e?a._parts:a,e)u.call(this._parts,d)&&(this._parts[d]=e[d]);else throw new TypeError("invalid input");this.build(!c);return this};e.is=function(a){var c=!1,d=!1,e=!1,f=!1,h=!1,r=!1,k=!1,m=!this._parts.urn;this._parts.hostname&&(m=!1,d=b.ip4_expression.test(this._parts.hostname),e=b.ip6_expression.test(this._parts.hostname),c=d||e,h=(f=
49
+ !c)&&g&&g.has(this._parts.hostname),r=f&&b.idn_expression.test(this._parts.hostname),k=f&&b.punycode_expression.test(this._parts.hostname));switch(a.toLowerCase()){case "relative":return m;case "absolute":return!m;case "domain":case "name":return f;case "sld":return h;case "ip":return c;case "ip4":case "ipv4":case "inet4":return d;case "ip6":case "ipv6":case "inet6":return e;case "idn":return r;case "url":return!this._parts.urn;case "urn":return!!this._parts.urn;case "punycode":return k}return null};
50
+ var D=e.protocol,E=e.port,F=e.hostname;e.protocol=function(a,c){if(void 0!==a&&a&&(a=a.replace(/:(\/\/)?$/,""),!a.match(b.protocol_expression)))throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]");return D.call(this,a,c)};e.scheme=e.protocol;e.port=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a&&(0===a&&(a=null),a&&(a+="",":"===a.charAt(0)&&(a=a.substring(1)),a.match(/[^0-9]/))))throw new TypeError('Port "'+a+'" contains characters other than [0-9]');
51
+ return E.call(this,a,c)};e.hostname=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0!==a){var d={};b.parseHost(a,d);a=d.hostname}return F.call(this,a,c)};e.host=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildHost(this._parts):"";b.parseHost(a,this._parts);this.build(!c);return this};e.authority=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a)return this._parts.hostname?b.buildAuthority(this._parts):
52
+ "";b.parseAuthority(a,this._parts);this.build(!c);return this};e.userinfo=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.username)return"";var d=b.buildUserinfo(this._parts);return d.substring(0,d.length-1)}"@"!==a[a.length-1]&&(a+="@");b.parseUserinfo(a,this._parts);this.build(!c);return this};e.resource=function(a,c){var d;if(void 0===a)return this.path()+this.search()+this.hash();d=b.parse(a);this._parts.path=d.path;this._parts.query=d.query;this._parts.fragment=
53
+ d.fragment;this.build(!c);return this};e.subdomain=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,d)||""}d=this._parts.hostname.length-this.domain().length;d=this._parts.hostname.substring(0,d);d=new RegExp("^"+k(d));a&&"."!==a.charAt(a.length-1)&&(a+=".");a&&b.ensureValidHostname(a);this._parts.hostname=this._parts.hostname.replace(d,
54
+ a);this.build(!c);return this};e.domain=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.match(/\./g);if(d&&2>d.length)return this._parts.hostname;d=this._parts.hostname.length-this.tld(c).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}if(!a)throw new TypeError("cannot set domain empty");b.ensureValidHostname(a);
55
+ !this._parts.hostname||this.is("IP")?this._parts.hostname=a:(d=new RegExp(k(this.domain())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a));this.build(!c);return this};e.tld=function(a,c){if(this._parts.urn)return void 0===a?"":this;"boolean"===typeof a&&(c=a,a=void 0);if(void 0===a){if(!this._parts.hostname||this.is("IP"))return"";var d=this._parts.hostname.lastIndexOf("."),d=this._parts.hostname.substring(d+1);return!0!==c&&g&&g.list[d.toLowerCase()]?g.get(this._parts.hostname)||d:d}if(a)if(a.match(/[^a-zA-Z0-9-]/))if(g&&
56
+ g.is(a))d=new RegExp(k(this.tld())+"$"),this._parts.hostname=this._parts.hostname.replace(d,a);else throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]');else{if(!this._parts.hostname||this.is("IP"))throw new ReferenceError("cannot set TLD on non-domain host");d=new RegExp(k(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(d,a)}else throw new TypeError("cannot set TLD empty");this.build(!c);return this};e.directory=function(a,c){if(this._parts.urn)return void 0===
57
+ a?"":this;if(void 0===a||!0===a){if(!this._parts.path&&!this._parts.hostname)return"";if("/"===this._parts.path)return"/";var d=this._parts.path.length-this.filename().length-1,d=this._parts.path.substring(0,d)||(this._parts.hostname?"/":"");return a?b.decodePath(d):d}d=this._parts.path.length-this.filename().length;d=this._parts.path.substring(0,d);d=new RegExp("^"+k(d));this.is("relative")||(a||(a="/"),"/"!==a.charAt(0)&&(a="/"+a));a&&"/"!==a.charAt(a.length-1)&&(a+="/");a=b.recodePath(a);this._parts.path=
58
+ this._parts.path.replace(d,a);this.build(!c);return this};e.filename=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this._parts.path.lastIndexOf("/"),d=this._parts.path.substring(d+1);return a?b.decodePathSegment(d):d}d=!1;"/"===a.charAt(0)&&(a=a.substring(1));a.match(/\.?\//)&&(d=!0);var e=new RegExp(k(this.filename())+"$");a=b.recodePath(a);this._parts.path=this._parts.path.replace(e,a);d?this.normalizePath(c):
59
+ this.build(!c);return this};e.suffix=function(a,c){if(this._parts.urn)return void 0===a?"":this;if(void 0===a||!0===a){if(!this._parts.path||"/"===this._parts.path)return"";var d=this.filename(),e=d.lastIndexOf(".");if(-1===e)return"";d=d.substring(e+1);d=/^[a-z0-9%]+$/i.test(d)?d:"";return a?b.decodePathSegment(d):d}"."===a.charAt(0)&&(a=a.substring(1));if(d=this.suffix())e=a?new RegExp(k(d)+"$"):new RegExp(k("."+d)+"$");else{if(!a)return this;this._parts.path+="."+b.recodePath(a)}e&&(a=b.recodePath(a),
60
+ this._parts.path=this._parts.path.replace(e,a));this.build(!c);return this};e.segment=function(a,c,d){var b=this._parts.urn?":":"/",e=this.path(),f="/"===e.substring(0,1),e=e.split(b);void 0!==a&&"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0!==a&&"number"!==typeof a)throw Error('Bad segment "'+a+'", must be 0-based integer');f&&e.shift();0>a&&(a=Math.max(e.length+a,0));if(void 0===c)return void 0===a?e:e[a];if(null===a||void 0===e[a])if(p(c)){e=[];a=0;for(var h=c.length;a<h;a++)if(c[a].length||
61
+ e.length&&e[e.length-1].length)e.length&&!e[e.length-1].length&&e.pop(),e.push(c[a])}else{if(c||"string"===typeof c)""===e[e.length-1]?e[e.length-1]=c:e.push(c)}else c?e[a]=c:e.splice(a,1);f&&e.unshift("");return this.path(e.join(b),d)};e.segmentCoded=function(a,c,d){var e,f;"number"!==typeof a&&(d=c,c=a,a=void 0);if(void 0===c){a=this.segment(a,c,d);if(p(a))for(e=0,f=a.length;e<f;e++)a[e]=b.decode(a[e]);else a=void 0!==a?b.decode(a):void 0;return a}if(p(c))for(e=0,f=c.length;e<f;e++)c[e]=b.decode(c[e]);
62
+ else c="string"===typeof c||c instanceof String?b.encode(c):c;return this.segment(a,c,d)};var G=e.query;e.query=function(a,c){if(!0===a)return b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("function"===typeof a){var d=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace),e=a.call(this,d);this._parts.query=b.buildQuery(e||d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!c);return this}return void 0!==a&&"string"!==typeof a?(this._parts.query=
63
+ b.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace),this.build(!c),this):G.call(this,a,c)};e.setQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if("string"===typeof a||a instanceof String)e[a]=void 0!==c?c:null;else if("object"===typeof a)for(var f in a)u.call(a,f)&&(e[f]=a[f]);else throw new TypeError("URI.addQuery() accepts an object, string as the name parameter");this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,
64
+ this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.addQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.addQuery(e,a,void 0===c?null:c);this._parts.query=b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.removeQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);b.removeQuery(e,a,c);this._parts.query=
65
+ b.buildQuery(e,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);"string"!==typeof a&&(d=c);this.build(!d);return this};e.hasQuery=function(a,c,d){var e=b.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return b.hasQuery(e,a,c,d)};e.setSearch=e.setQuery;e.addSearch=e.addQuery;e.removeSearch=e.removeQuery;e.hasSearch=e.hasQuery;e.normalize=function(){return this._parts.urn?this.normalizeProtocol(!1).normalizeQuery(!1).normalizeFragment(!1).build():this.normalizeProtocol(!1).normalizeHostname(!1).normalizePort(!1).normalizePath(!1).normalizeQuery(!1).normalizeFragment(!1).build()};
66
+ e.normalizeProtocol=function(a){"string"===typeof this._parts.protocol&&(this._parts.protocol=this._parts.protocol.toLowerCase(),this.build(!a));return this};e.normalizeHostname=function(a){this._parts.hostname&&(this.is("IDN")&&f?this._parts.hostname=f.toASCII(this._parts.hostname):this.is("IPv6")&&l&&(this._parts.hostname=l.best(this._parts.hostname)),this._parts.hostname=this._parts.hostname.toLowerCase(),this.build(!a));return this};e.normalizePort=function(a){"string"===typeof this._parts.protocol&&
67
+ this._parts.port===b.defaultPorts[this._parts.protocol]&&(this._parts.port=null,this.build(!a));return this};e.normalizePath=function(a){if(this._parts.urn||!this._parts.path||"/"===this._parts.path)return this;var c,d=this._parts.path,e="",f,h;"/"!==d.charAt(0)&&(c=!0,d="/"+d);d=d.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");c&&(e=d.substring(1).match(/^(\.\.\/)+/)||"")&&(e=e[0]);for(;;){f=d.indexOf("/..");if(-1===f)break;else if(0===f){d=d.substring(3);continue}h=d.substring(0,f).lastIndexOf("/");
68
+ -1===h&&(h=f);d=d.substring(0,h)+d.substring(f+3)}c&&this.is("relative")&&(d=e+d.substring(1));d=b.recodePath(d);this._parts.path=d;this.build(!a);return this};e.normalizePathname=e.normalizePath;e.normalizeQuery=function(a){"string"===typeof this._parts.query&&(this._parts.query.length?this.query(b.parseQuery(this._parts.query,this._parts.escapeQuerySpace)):this._parts.query=null,this.build(!a));return this};e.normalizeFragment=function(a){this._parts.fragment||(this._parts.fragment=null,this.build(!a));
69
+ return this};e.normalizeSearch=e.normalizeQuery;e.normalizeHash=e.normalizeFragment;e.iso8859=function(){var a=b.encode,c=b.decode;b.encode=escape;b.decode=decodeURIComponent;this.normalize();b.encode=a;b.decode=c;return this};e.unicode=function(){var a=b.encode,c=b.decode;b.encode=C;b.decode=unescape;this.normalize();b.encode=a;b.decode=c;return this};e.readable=function(){var a=this.clone();a.username("").password("").normalize();var c="";a._parts.protocol&&(c+=a._parts.protocol+"://");a._parts.hostname&&
70
+ (a.is("punycode")&&f?(c+=f.toUnicode(a._parts.hostname),a._parts.port&&(c+=":"+a._parts.port)):c+=a.host());a._parts.hostname&&a._parts.path&&"/"!==a._parts.path.charAt(0)&&(c+="/");c+=a.path(!0);if(a._parts.query){for(var d="",e=0,h=a._parts.query.split("&"),g=h.length;e<g;e++){var r=(h[e]||"").split("="),d=d+("&"+b.decodeQuery(r[0],this._parts.escapeQuerySpace).replace(/&/g,"%26"));void 0!==r[1]&&(d+="="+b.decodeQuery(r[1],this._parts.escapeQuerySpace).replace(/&/g,"%26"))}c+="?"+d.substring(1)}return c+=
71
+ b.decodeQuery(a.hash(),!0)};e.absoluteTo=function(a){var c=this.clone(),d=["protocol","username","password","hostname","port"],e,f;if(this._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a instanceof b||(a=new b(a));c._parts.protocol||(c._parts.protocol=a._parts.protocol);if(this._parts.hostname)return c;for(e=0;f=d[e];e++)c._parts[f]=a._parts[f];c._parts.path?".."===c._parts.path.substring(-2)&&(c._parts.path+="/"):(c._parts.path=a._parts.path,c._parts.query||
72
+ (c._parts.query=a._parts.query));"/"!==c.path().charAt(0)&&(a=a.directory(),c._parts.path=(a?a+"/":"")+c._parts.path,c.normalizePath());c.build();return c};e.relativeTo=function(a){var c=this.clone().normalize(),d,e,f,h;if(c._parts.urn)throw Error("URNs do not have any generally defined hierarchical components");a=(new b(a)).normalize();d=c._parts;e=a._parts;f=c.path();h=a.path();if("/"!==f.charAt(0))throw Error("URI is already relative");if("/"!==h.charAt(0))throw Error("Cannot calculate a URI relative to another relative URI");
73
+ d.protocol===e.protocol&&(d.protocol=null);if(d.username===e.username&&d.password===e.password&&null===d.protocol&&null===d.username&&null===d.password&&d.hostname===e.hostname&&d.port===e.port)d.hostname=null,d.port=null;else return c.build();if(f===h)return d.path="",c.build();a=b.commonPath(c.path(),a.path());if(!a)return c.build();e=e.path.substring(a.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");d.path=e+d.path.substring(a.length);return c.build()};e.equals=function(a){var c=this.clone();
74
+ a=new b(a);var d={},e={},f={},h;c.normalize();a.normalize();if(c.toString()===a.toString())return!0;d=c.query();e=a.query();c.query("");a.query("");if(c.toString()!==a.toString()||d.length!==e.length)return!1;d=b.parseQuery(d,this._parts.escapeQuerySpace);e=b.parseQuery(e,this._parts.escapeQuerySpace);for(h in d)if(u.call(d,h)){if(!p(d[h])){if(d[h]!==e[h])return!1}else if(!r(d[h],e[h]))return!1;f[h]=!0}for(h in e)if(u.call(e,h)&&!f[h])return!1;return!0};e.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=
75
+ !!a;return this};e.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return b});
76
+ (function(f,l){"object"===typeof exports?module.exports=l(require("./URI")):"function"===typeof define&&define.amd?define(["./URI"],l):f.URITemplate=l(f.URI,f)})(this,function(f,l){function g(b){if(g._cache[b])return g._cache[b];if(!(this instanceof g))return new g(b);this.expression=b;g._cache[b]=this;return this}function m(b){this.data=b;this.cache={}}var b=l&&l.URITemplate,k=Object.prototype.hasOwnProperty,y=g.prototype,p={"":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encode"},
77
+ "+":{prefix:"",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},"#":{prefix:"#",separator:",",named:!1,empty_name_separator:!1,encode:"encodeReserved"},".":{prefix:".",separator:".",named:!1,empty_name_separator:!1,encode:"encode"},"/":{prefix:"/",separator:"/",named:!1,empty_name_separator:!1,encode:"encode"},";":{prefix:";",separator:";",named:!0,empty_name_separator:!1,encode:"encode"},"?":{prefix:"?",separator:"&",named:!0,empty_name_separator:!0,encode:"encode"},"&":{prefix:"&",
78
+ separator:"&",named:!0,empty_name_separator:!0,encode:"encode"}};g._cache={};g.EXPRESSION_PATTERN=/\{([^a-zA-Z0-9%_]?)([^\}]+)(\}|$)/g;g.VARIABLE_PATTERN=/^([^*:]+)((\*)|:(\d+))?$/;g.VARIABLE_NAME_PATTERN=/[^a-zA-Z0-9%_]/;g.expand=function(b,f){var k=p[b.operator],m=k.named?"Named":"Unnamed",l=b.variables,s=[],n,e,u;for(u=0;e=l[u];u++)n=f.get(e.name),n.val.length?s.push(g["expand"+m](n,k,e.explode,e.explode&&k.separator||",",e.maxlength,e.name)):n.type&&s.push("");return s.length?k.prefix+s.join(k.separator):
79
+ ""};g.expandNamed=function(b,g,k,m,l,s){var n="",e=g.encode;g=g.empty_name_separator;var u=!b[e].length,v=2===b.type?"":f[e](s),q,p,y;p=0;for(y=b.val.length;p<y;p++)l?(q=f[e](b.val[p][1].substring(0,l)),2===b.type&&(v=f[e](b.val[p][0].substring(0,l)))):u?(q=f[e](b.val[p][1]),2===b.type?(v=f[e](b.val[p][0]),b[e].push([v,q])):b[e].push([void 0,q])):(q=b[e][p][1],2===b.type&&(v=b[e][p][0])),n&&(n+=m),k?n+=v+(g||q?"=":"")+q:(p||(n+=f[e](s)+(g||q?"=":"")),2===b.type&&(n+=v+","),n+=q);return n};g.expandUnnamed=
80
+ function(b,g,k,m,l){var s="",n=g.encode;g=g.empty_name_separator;var e=!b[n].length,p,v,q,y;q=0;for(y=b.val.length;q<y;q++)l?v=f[n](b.val[q][1].substring(0,l)):e?(v=f[n](b.val[q][1]),b[n].push([2===b.type?f[n](b.val[q][0]):void 0,v])):v=b[n][q][1],s&&(s+=m),2===b.type&&(p=l?f[n](b.val[q][0].substring(0,l)):b[n][q][0],s+=p,s=k?s+(g||v?"=":""):s+","),s+=v;return s};g.noConflict=function(){l.URITemplate===g&&(l.URITemplate=b);return g};y.expand=function(b){var f="";this.parts&&this.parts.length||this.parse();
81
+ b instanceof m||(b=new m(b));for(var k=0,l=this.parts.length;k<l;k++)f+="string"===typeof this.parts[k]?this.parts[k]:g.expand(this.parts[k],b);return f};y.parse=function(){var b=this.expression,f=g.EXPRESSION_PATTERN,k=g.VARIABLE_PATTERN,m=g.VARIABLE_NAME_PATTERN,l=[],s=0,n,e,u;for(f.lastIndex=0;;){e=f.exec(b);if(null===e){l.push(b.substring(s));break}else l.push(b.substring(s,e.index)),s=e.index+e[0].length;if(!p[e[1]])throw Error('Unknown Operator "'+e[1]+'" in "'+e[0]+'"');if(!e[3])throw Error('Unclosed Expression "'+
82
+ e[0]+'"');n=e[2].split(",");for(var v=0,q=n.length;v<q;v++){u=n[v].match(k);if(null===u)throw Error('Invalid Variable "'+n[v]+'" in "'+e[0]+'"');if(u[1].match(m))throw Error('Invalid Variable Name "'+u[1]+'" in "'+e[0]+'"');n[v]={name:u[1],explode:!!u[3],maxlength:u[4]&&parseInt(u[4],10)}}if(!n.length)throw Error('Expression Missing Variable(s) "'+e[0]+'"');l.push({expression:e[0],operator:e[1],variables:n})}l.length||l.push(b);this.parts=l;return this};m.prototype.get=function(b){var f=this.data,
83
+ g={type:0,val:[],encode:[],encodeReserved:[]},l;if(void 0!==this.cache[b])return this.cache[b];this.cache[b]=g;f="[object Function]"===String(Object.prototype.toString.call(f))?f(b):"[object Function]"===String(Object.prototype.toString.call(f[b]))?f[b](b):f[b];if(void 0!==f&&null!==f)if("[object Array]"===String(Object.prototype.toString.call(f))){l=0;for(b=f.length;l<b;l++)void 0!==f[l]&&null!==f[l]&&g.val.push([void 0,String(f[l])]);g.val.length&&(g.type=3)}else if("[object Object]"===String(Object.prototype.toString.call(f))){for(l in f)k.call(f,
84
+ l)&&void 0!==f[l]&&null!==f[l]&&g.val.push([l,String(f[l])]);g.val.length&&(g.type=2)}else g.type=1,g.val.push([void 0,String(f)]);return g};f.expand=function(b,k){var l=(new g(b)).expand(k);return new f(l)};return g});
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pact_broker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.52.1
4
+ version: 2.56.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bethany Skurrie
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-03-29 00:00:00.000000000 Z
13
+ date: 2020-06-01 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: httparty
@@ -60,14 +60,20 @@ dependencies:
60
60
  requirements:
61
61
  - - "~>"
62
62
  - !ruby/object:Gem::Version
63
- version: '2.2'
63
+ version: '2.3'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 2.3.1
64
67
  type: :runtime
65
68
  prerelease: false
66
69
  version_requirements: !ruby/object:Gem::Requirement
67
70
  requirements:
68
71
  - - "~>"
69
72
  - !ruby/object:Gem::Version
70
- version: '2.2'
73
+ version: '2.3'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 2.3.1
71
77
  - !ruby/object:Gem::Dependency
72
78
  name: dry-validation
73
79
  requirement: !ruby/object:Gem::Requirement
@@ -128,42 +134,36 @@ dependencies:
128
134
  name: rack
129
135
  requirement: !ruby/object:Gem::Requirement
130
136
  requirements:
131
- - - ">="
132
- - !ruby/object:Gem::Version
133
- version: 2.0.8
134
137
  - - "~>"
135
138
  - !ruby/object:Gem::Version
136
- version: '2.0'
139
+ version: '2.2'
137
140
  type: :runtime
138
141
  prerelease: false
139
142
  version_requirements: !ruby/object:Gem::Requirement
140
143
  requirements:
141
- - - ">="
142
- - !ruby/object:Gem::Version
143
- version: 2.0.8
144
144
  - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: '2.0'
146
+ version: '2.2'
147
147
  - !ruby/object:Gem::Dependency
148
148
  name: redcarpet
149
149
  requirement: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ">="
152
- - !ruby/object:Gem::Version
153
- version: 3.3.2
154
151
  - - "~>"
155
152
  - !ruby/object:Gem::Version
156
153
  version: '3.3'
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: 3.3.2
157
157
  type: :runtime
158
158
  prerelease: false
159
159
  version_requirements: !ruby/object:Gem::Requirement
160
160
  requirements:
161
- - - ">="
162
- - !ruby/object:Gem::Version
163
- version: 3.3.2
164
161
  - - "~>"
165
162
  - !ruby/object:Gem::Version
166
163
  version: '3.3'
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: 3.3.2
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: pact-support
169
169
  requirement: !ruby/object:Gem::Requirement
@@ -188,22 +188,22 @@ dependencies:
188
188
  name: padrino-core
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
- - - ">="
192
- - !ruby/object:Gem::Version
193
- version: 0.14.3
194
191
  - - "~>"
195
192
  - !ruby/object:Gem::Version
196
193
  version: '0.14'
194
+ - - ">="
195
+ - !ruby/object:Gem::Version
196
+ version: 0.14.3
197
197
  type: :runtime
198
198
  prerelease: false
199
199
  version_requirements: !ruby/object:Gem::Requirement
200
200
  requirements:
201
- - - ">="
202
- - !ruby/object:Gem::Version
203
- version: 0.14.3
204
201
  - - "~>"
205
202
  - !ruby/object:Gem::Version
206
203
  version: '0.14'
204
+ - - ">="
205
+ - !ruby/object:Gem::Version
206
+ version: 0.14.3
207
207
  - !ruby/object:Gem::Dependency
208
208
  name: sinatra
209
209
  requirement: !ruby/object:Gem::Requirement
@@ -624,6 +624,7 @@ files:
624
624
  - ".ruby-version"
625
625
  - ".travis.yml"
626
626
  - CHANGELOG.md
627
+ - CODE_OF_CONDUCT.md
627
628
  - CONTRIBUTING.md
628
629
  - DEVELOPER_DOCUMENTATION.md
629
630
  - DEVELOPER_SETUP.md
@@ -1125,7 +1126,6 @@ files:
1125
1126
  - lib/pact_broker/ui/views/index/show.haml
1126
1127
  - lib/pact_broker/ui/views/layouts/main.haml
1127
1128
  - lib/pact_broker/ui/views/matrix/show.haml
1128
- - lib/pact_broker/verifications/all_verifications.rb
1129
1129
  - lib/pact_broker/verifications/latest_verification_for_consumer_and_provider.rb
1130
1130
  - lib/pact_broker/verifications/latest_verification_for_consumer_version_tag.rb
1131
1131
  - lib/pact_broker/verifications/latest_verification_for_pact_version.rb
@@ -1540,6 +1540,7 @@ files:
1540
1540
  - spec/migrations/44_add_provider_version_to_verification_spec.rb
1541
1541
  - spec/migrations/50_create_latest_matrix_spec.rb
1542
1542
  - spec/migrations/change_migration_strategy_spec.rb
1543
+ - spec/migrations/rollback_spec.rb
1543
1544
  - spec/service_consumers/hal_relation_proxy_app.rb
1544
1545
  - spec/service_consumers/pact_helper.rb
1545
1546
  - spec/service_consumers/provider_states_for_pact_broker_client.rb
@@ -1584,7 +1585,7 @@ files:
1584
1585
  - tasks/test_db.rake
1585
1586
  - vendor/hal-browser/.gitignore
1586
1587
  - vendor/hal-browser/MIT-LICENSE.txt
1587
- - vendor/hal-browser/README.md
1588
+ - vendor/hal-browser/README.adoc
1588
1589
  - vendor/hal-browser/browser.html
1589
1590
  - vendor/hal-browser/js/hal.js
1590
1591
  - vendor/hal-browser/js/hal/browser.js
@@ -1607,12 +1608,14 @@ files:
1607
1608
  - vendor/hal-browser/js/hal/views/response.js
1608
1609
  - vendor/hal-browser/js/hal/views/response_body.js
1609
1610
  - vendor/hal-browser/js/hal/views/response_headers.js
1611
+ - vendor/hal-browser/login.html
1610
1612
  - vendor/hal-browser/styles.css
1611
1613
  - vendor/hal-browser/vendor/css/bootstrap-responsive.css
1612
1614
  - vendor/hal-browser/vendor/css/bootstrap.css
1613
1615
  - vendor/hal-browser/vendor/img/ajax-loader.gif
1614
1616
  - vendor/hal-browser/vendor/img/glyphicons-halflings-white.png
1615
1617
  - vendor/hal-browser/vendor/img/glyphicons-halflings.png
1618
+ - vendor/hal-browser/vendor/js/URI.min.js
1616
1619
  - vendor/hal-browser/vendor/js/backbone.js
1617
1620
  - vendor/hal-browser/vendor/js/bootstrap.js
1618
1621
  - vendor/hal-browser/vendor/js/jquery-1.10.2.js
@@ -1639,8 +1642,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1639
1642
  - !ruby/object:Gem::Version
1640
1643
  version: '0'
1641
1644
  requirements: []
1642
- rubyforge_project:
1643
- rubygems_version: 2.7.6
1645
+ rubygems_version: 3.0.6
1644
1646
  signing_key:
1645
1647
  specification_version: 4
1646
1648
  summary: See description
@@ -1920,6 +1922,7 @@ test_files:
1920
1922
  - spec/migrations/44_add_provider_version_to_verification_spec.rb
1921
1923
  - spec/migrations/50_create_latest_matrix_spec.rb
1922
1924
  - spec/migrations/change_migration_strategy_spec.rb
1925
+ - spec/migrations/rollback_spec.rb
1923
1926
  - spec/service_consumers/hal_relation_proxy_app.rb
1924
1927
  - spec/service_consumers/pact_helper.rb
1925
1928
  - spec/service_consumers/provider_states_for_pact_broker_client.rb
@@ -1,41 +0,0 @@
1
- require 'pact_broker/domain/verification'
2
-
3
- module PactBroker
4
- module Verifications
5
- include PactBroker::Repositories::Helpers
6
-
7
- class AllVerifications < PactBroker::Domain::Verification
8
- set_dataset(:all_verifications)
9
- end
10
-
11
- # this view doesn't have a consumer_id
12
- # TODO add it
13
- def consumer
14
- PactBroker::Domain::Pacticipant.find(id: PactBroker::Pacts::AllPactPublications
15
- .where(pact_version_id: pact_version_id)
16
- .limit(1).select(:consumer_id))
17
- end
18
-
19
- # this view doesn't have a provider_id
20
- # TODO add it
21
- def provider
22
- PactBroker::Domain::Pacticipant.find(id: PactBroker::Pacts::AllPactPublications
23
- .where(pact_version_id: pact_version_id)
24
- .limit(1).select(:provider_id))
25
- end
26
- end
27
- end
28
-
29
- # Table: all_verifications
30
- # Columns:
31
- # id | integer |
32
- # number | integer |
33
- # success | boolean |
34
- # provider_version_id | integer |
35
- # provider_version_number | text |
36
- # provider_version_order | integer |
37
- # build_url | text |
38
- # pact_version_id | integer |
39
- # execution_date | timestamp without time zone |
40
- # created_at | timestamp without time zone |
41
- # test_results | text |
@@ -1,41 +0,0 @@
1
- HAL-browser
2
- ===========
3
- An API browser for the hal+json media type
4
-
5
- Example Usage
6
- =============
7
- Here is an example of a hal+json API using the browser:
8
-
9
- [http://haltalk.herokuapp.com/explorer/browser.html](http://haltalk.herokuapp.com/explorer/browser.html)
10
-
11
- About HAL
12
- ========
13
- HAL is a format based on json that establishes conventions for
14
- representing links. For example:
15
-
16
- ```javascript
17
- {
18
- "_links": {
19
- "self": { "href": "/orders" },
20
- "next": { "href": "/orders?page=2" }
21
- }
22
- }
23
- ```
24
-
25
- More detail about HAL can be found at
26
- [http://stateless.co/hal_specification.html](http://stateless.co/hal_specification.html).
27
-
28
- Instructions
29
- ============
30
- All you should need to do is copy the files into your webroot.
31
- It is OK to put it in a subdirectory; it does not need to be in the root.
32
-
33
- All the JS and CSS dependencies come included in the vendor directory.
34
-
35
-
36
- TODO
37
- ===========
38
- * Make Location and Content-Location headers clickable links
39
- * Provide feedback to user when there are issues with response (missing
40
- self link, wrong media type identifier)
41
- * Give 'self' and 'curies' links special treatment