inferno_core 0.6.16 → 0.6.17
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.
- checksums.yaml +4 -4
- data/lib/inferno/apps/web/router.rb +5 -9
- data/lib/inferno/apps/web/serializers/serializer.rb +0 -6
- data/lib/inferno/apps/web/serializers/test.rb +1 -1
- data/lib/inferno/apps/web/serializers/test_group.rb +1 -1
- data/lib/inferno/apps/web/serializers/test_suite.rb +2 -2
- data/lib/inferno/dsl/short_id_manager.rb +12 -3
- data/lib/inferno/feature.rb +0 -4
- data/lib/inferno/public/237.bundle.js +1 -1
- data/lib/inferno/public/bundle.js +34 -34
- data/lib/inferno/public/bundle.js.LICENSE.txt +2 -2
- data/lib/inferno/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f5e1cae1c23852f0f5cab017eb7b1fc361fce08f53c7ad1cc47859a0a3546ab
|
4
|
+
data.tar.gz: 34be067581780bca55ae925bfaae31bd56a6f6ed864774b915f0ac9147d426e1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8e082414599d3d7c9d84129cfa78a4cafb3fcf3a3df1f4aec586119cfc67c234d183374256545217a827c916ca16bcdbe2bd3955dc1149383871e31247260aed
|
7
|
+
data.tar.gz: 5ca8d4645f9667cba2e2ef92c9690a947d2e70027537f57bbedb4bb239742c01c95d6c3e853367b4840d58cdb728f3c89aa671e5bfaff75a3e85be284b3fde15
|
@@ -51,17 +51,13 @@ module Inferno
|
|
51
51
|
put '/:id/check_configuration',
|
52
52
|
to: Inferno::Web::Controllers::TestSuites::CheckConfiguration,
|
53
53
|
as: :check_configuration
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
as: :requirements
|
58
|
-
end
|
54
|
+
get ':id/requirements',
|
55
|
+
to: Inferno::Web::Controllers::TestSuites::Requirements::Index,
|
56
|
+
as: :requirements
|
59
57
|
end
|
60
58
|
|
61
|
-
|
62
|
-
|
63
|
-
get '/:id', to: Inferno::Web::Controllers::Requirements::Show, as: :show
|
64
|
-
end
|
59
|
+
scope 'requirements' do
|
60
|
+
get '/:id', to: Inferno::Web::Controllers::Requirements::Show, as: :show
|
65
61
|
end
|
66
62
|
|
67
63
|
get '/requests/:id', to: Inferno::Web::Controllers::Requests::Show, as: :requests_show
|
@@ -14,12 +14,6 @@ module Inferno
|
|
14
14
|
result.send(name).present?
|
15
15
|
end
|
16
16
|
end
|
17
|
-
|
18
|
-
# When removing the feature flag, replace all instances of this method
|
19
|
-
# with `.field_present?`
|
20
|
-
def self.field_present_and_requirements_enabled?(field_name, result, options)
|
21
|
-
field_present?(field_name, result, options) && Feature.requirements_enabled?
|
22
|
-
end
|
23
17
|
end
|
24
18
|
end
|
25
19
|
end
|
@@ -20,7 +20,7 @@ module Inferno
|
|
20
20
|
field :input_instructions
|
21
21
|
field :user_runnable?, name: :user_runnable
|
22
22
|
field :optional?, name: :optional
|
23
|
-
field :verifies_requirements, if: :
|
23
|
+
field :verifies_requirements, if: :field_present?
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -32,7 +32,7 @@ module Inferno
|
|
32
32
|
Input.render_as_hash(group.available_inputs(suite_options).values)
|
33
33
|
end
|
34
34
|
field :output_definitions, name: :outputs, extractor: HashValueExtractor
|
35
|
-
field :verifies_requirements, if: :
|
35
|
+
field :verifies_requirements, if: :field_present?
|
36
36
|
end
|
37
37
|
end
|
38
38
|
end
|
@@ -38,7 +38,7 @@ module Inferno
|
|
38
38
|
suite_options = options[:suite_options]
|
39
39
|
Input.render_as_hash(suite.available_inputs(suite_options).values)
|
40
40
|
end
|
41
|
-
field :requirement_sets, if: :
|
41
|
+
field :requirement_sets, if: :field_present? do |suite, options|
|
42
42
|
selected_options = options[:suite_options] || []
|
43
43
|
requirement_sets = suite.requirement_sets.select do |requirement_set|
|
44
44
|
requirement_set.suite_options.all? { |suite_option| selected_options.include? suite_option }
|
@@ -46,7 +46,7 @@ module Inferno
|
|
46
46
|
|
47
47
|
RequirementSet.render_as_hash(requirement_sets)
|
48
48
|
end
|
49
|
-
field :verifies_requirements, if: :
|
49
|
+
field :verifies_requirements, if: :field_present?
|
50
50
|
end
|
51
51
|
end
|
52
52
|
end
|
@@ -3,8 +3,16 @@ module Inferno
|
|
3
3
|
# This module manages and locks short IDs, ensuring that short IDs
|
4
4
|
# remain stable and do not change unexpectedly.
|
5
5
|
module ShortIDManager
|
6
|
-
def base_short_id_file_folder
|
7
|
-
File.
|
6
|
+
def base_short_id_file_folder(folder = nil)
|
7
|
+
folder ||= File.dirname(Object.const_source_location(name).first)
|
8
|
+
|
9
|
+
return folder if File.exist?(File.join(folder, short_id_file_name))
|
10
|
+
|
11
|
+
return folder if File.basename(File.dirname(folder)) == 'lib'
|
12
|
+
|
13
|
+
return folder if File.dirname(folder) == folder
|
14
|
+
|
15
|
+
base_short_id_file_folder(File.dirname(folder))
|
8
16
|
end
|
9
17
|
|
10
18
|
def short_id_file_name
|
@@ -12,7 +20,8 @@ module Inferno
|
|
12
20
|
end
|
13
21
|
|
14
22
|
def short_id_file_path
|
15
|
-
|
23
|
+
@short_id_file_path =
|
24
|
+
File.join(base_short_id_file_folder, short_id_file_name).freeze
|
16
25
|
end
|
17
26
|
|
18
27
|
# Loads and memoizes the short ID map from the YAML file.
|
data/lib/inferno/feature.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
"use strict";(self.webpackChunkinferno_web_app=self.webpackChunkinferno_web_app||[]).push([[237],{237:(e,n,t)=>{t.r(n),t.d(n,{CLSThresholds:()=>P,FCPThresholds:()=>w,FIDThresholds:()=>ne,INPThresholds:()=>j,LCPThresholds:()=>G,TTFBThresholds:()=>Q,onCLS:()=>A,onFCP:()=>I,onFID:()=>te,onINP:()=>z,onLCP:()=>K,onTTFB:()=>V});var r,i,o,a,c,u=-1,s=function(e){addEventListener("pageshow",
|
1
|
+
"use strict";(self.webpackChunkinferno_web_app=self.webpackChunkinferno_web_app||[]).push([[237],{237:(e,n,t)=>{t.r(n),t.d(n,{CLSThresholds:()=>P,FCPThresholds:()=>w,FIDThresholds:()=>ne,INPThresholds:()=>j,LCPThresholds:()=>G,TTFBThresholds:()=>Q,onCLS:()=>A,onFCP:()=>I,onFID:()=>te,onINP:()=>z,onLCP:()=>K,onTTFB:()=>V});var r,i,o,a,c,u=-1,s=function(e){addEventListener("pageshow",function(n){n.persisted&&(u=n.timeStamp,e(n))},!0)},f=function(){var e=self.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart<performance.now())return e},d=function(){var e=f();return e&&e.activationStart||0},l=function(e,n){var t=f(),r="navigate";return u>=0?r="back-forward-cache":t&&(document.prerendering||d()>0?r="prerender":document.wasDiscarded?r="restore":t.type&&(r=t.type.replace(/_/g,"-"))),{name:e,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v4-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:r}},p=function(e,n,t){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var r=new PerformanceObserver(function(e){Promise.resolve().then(function(){n(e.getEntries())})});return r.observe(Object.assign({type:e,buffered:!0},t||{})),r}}catch(e){}},v=function(e,n,t,r){var i,o;return function(a){n.value>=0&&(a||r)&&((o=n.value-(i||0))||void 0===i)&&(i=n.value,n.delta=o,n.rating=function(e,n){return e>n[1]?"poor":e>n[0]?"needs-improvement":"good"}(n.value,t),e(n))}},m=function(e){requestAnimationFrame(function(){return requestAnimationFrame(function(){return e()})})},h=function(e){document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&e()})},g=function(e){var n=!1;return function(){n||(e(),n=!0)}},T=-1,y=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},E=function(e){"hidden"===document.visibilityState&&T>-1&&(T="visibilitychange"===e.type?e.timeStamp:0,b())},C=function(){addEventListener("visibilitychange",E,!0),addEventListener("prerenderingchange",E,!0)},b=function(){removeEventListener("visibilitychange",E,!0),removeEventListener("prerenderingchange",E,!0)},L=function(){return T<0&&(T=y(),C(),s(function(){setTimeout(function(){T=y(),C()},0)})),{get firstHiddenTime(){return T}}},S=function(e){document.prerendering?addEventListener("prerenderingchange",function(){return e()},!0):e()},w=[1800,3e3],I=function(e,n){n=n||{},S(function(){var t,r=L(),i=l("FCP"),o=p("paint",function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(o.disconnect(),e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries.push(e),t(!0)))})});o&&(t=v(e,i,w,n.reportAllChanges),s(function(r){i=l("FCP"),t=v(e,i,w,n.reportAllChanges),m(function(){i.value=performance.now()-r.timeStamp,t(!0)})}))})},P=[.1,.25],A=function(e,n){n=n||{},I(g(function(){var t,r=l("CLS",0),i=0,o=[],a=function(e){e.forEach(function(e){if(!e.hadRecentInput){var n=o[0],t=o[o.length-1];i&&e.startTime-t.startTime<1e3&&e.startTime-n.startTime<5e3?(i+=e.value,o.push(e)):(i=e.value,o=[e])}}),i>r.value&&(r.value=i,r.entries=o,t())},c=p("layout-shift",a);c&&(t=v(e,r,P,n.reportAllChanges),h(function(){a(c.takeRecords()),t(!0)}),s(function(){i=0,r=l("CLS",0),t=v(e,r,P,n.reportAllChanges),m(function(){return t()})}),setTimeout(t,0))}))},F=0,k=1/0,M=0,D=function(e){e.forEach(function(e){e.interactionId&&(k=Math.min(k,e.interactionId),M=Math.max(M,e.interactionId),F=M?(M-k)/7+1:0)})},B=function(){return r?F:performance.interactionCount||0},R=function(){"interactionCount"in performance||r||(r=p("event",D,{type:"event",buffered:!0,durationThreshold:0}))},_=[],x=new Map,H=0,N=[],q=function(e){if(N.forEach(function(n){return n(e)}),e.interactionId||"first-input"===e.entryType){var n=_[_.length-1],t=x.get(e.interactionId);if(t||_.length<10||e.duration>n.latency){if(t)e.duration>t.latency?(t.entries=[e],t.latency=e.duration):e.duration===t.latency&&e.startTime===t.entries[0].startTime&&t.entries.push(e);else{var r={id:e.interactionId,latency:e.duration,entries:[e]};x.set(r.id,r),_.push(r)}_.sort(function(e,n){return n.latency-e.latency}),_.length>10&&_.splice(10).forEach(function(e){return x.delete(e.id)})}}},O=function(e){var n=self.requestIdleCallback||self.setTimeout,t=-1;return e=g(e),"hidden"===document.visibilityState?e():(t=n(e),h(e)),t},j=[200,500],z=function(e,n){"PerformanceEventTiming"in self&&"interactionId"in PerformanceEventTiming.prototype&&(n=n||{},S(function(){var t;R();var r,i=l("INP"),o=function(e){O(function(){e.forEach(q);var n=function(){var e=Math.min(_.length-1,Math.floor((B()-H)/50));return _[e]}();n&&n.latency!==i.value&&(i.value=n.latency,i.entries=n.entries,r())})},a=p("event",o,{durationThreshold:null!==(t=n.durationThreshold)&&void 0!==t?t:40});r=v(e,i,j,n.reportAllChanges),a&&(a.observe({type:"first-input",buffered:!0}),h(function(){o(a.takeRecords()),r(!0)}),s(function(){H=B(),_.length=0,x.clear(),i=l("INP"),r=v(e,i,j,n.reportAllChanges)}))}))},G=[2500,4e3],J={},K=function(e,n){n=n||{},S(function(){var t,r=L(),i=l("LCP"),o=function(e){n.reportAllChanges||(e=e.slice(-1)),e.forEach(function(e){e.startTime<r.firstHiddenTime&&(i.value=Math.max(e.startTime-d(),0),i.entries=[e],t())})},a=p("largest-contentful-paint",o);if(a){t=v(e,i,G,n.reportAllChanges);var c=g(function(){J[i.id]||(o(a.takeRecords()),a.disconnect(),J[i.id]=!0,t(!0))});["keydown","click"].forEach(function(e){addEventListener(e,function(){return O(c)},{once:!0,capture:!0})}),h(c),s(function(r){i=l("LCP"),t=v(e,i,G,n.reportAllChanges),m(function(){i.value=performance.now()-r.timeStamp,J[i.id]=!0,t(!0)})})}})},Q=[800,1800],U=function e(n){document.prerendering?S(function(){return e(n)}):"complete"!==document.readyState?addEventListener("load",function(){return e(n)},!0):setTimeout(n,0)},V=function(e,n){n=n||{};var t=l("TTFB"),r=v(e,t,Q,n.reportAllChanges);U(function(){var i=f();i&&(t.value=Math.max(i.responseStart-d(),0),t.entries=[i],r(!0),s(function(){t=l("TTFB",0),(r=v(e,t,Q,n.reportAllChanges))(!0)}))})},W={passive:!0,capture:!0},X=new Date,Y=function(e,n){i||(i=n,o=e,a=new Date,ee(removeEventListener),Z())},Z=function(){if(o>=0&&o<a-X){var e={entryType:"first-input",name:i.type,target:i.target,cancelable:i.cancelable,startTime:i.timeStamp,processingStart:i.timeStamp+o};c.forEach(function(n){n(e)}),c=[]}},$=function(e){if(e.cancelable){var n=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?function(e,n){var t=function(){Y(e,n),i()},r=function(){i()},i=function(){removeEventListener("pointerup",t,W),removeEventListener("pointercancel",r,W)};addEventListener("pointerup",t,W),addEventListener("pointercancel",r,W)}(n,e):Y(n,e)}},ee=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return e(n,$,W)})},ne=[100,300],te=function(e,n){n=n||{},S(function(){var t,r=L(),a=l("FID"),u=function(e){e.startTime<r.firstHiddenTime&&(a.value=e.processingStart-e.startTime,a.entries.push(e),t(!0))},f=function(e){e.forEach(u)},d=p("first-input",f);t=v(e,a,ne,n.reportAllChanges),d&&(h(g(function(){f(d.takeRecords()),d.disconnect()})),s(function(){var r;a=l("FID"),t=v(e,a,ne,n.reportAllChanges),c=[],o=-1,i=null,ee(addEventListener),r=u,c.push(r),Z()}))})}}}]);
|