auto_response 0.1.6 → 0.1.8
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/Gemfile +4 -3
- data/Gemfile.lock +9 -12
- data/bin/ar +14 -3
- data/lib/ar/har.rb +133 -0
- data/lib/ar/proxy_server.rb +171 -0
- data/lib/ar/rule_dsl.rb +4 -0
- data/lib/ar/rule_manager.rb +2 -1
- data/lib/ar/session_viewer.rb +18 -13
- data/lib/ar/version.rb +3 -0
- data/lib/ar/viewer/Images/applicationCache.png +0 -0
- data/lib/ar/viewer/Images/back.png +0 -0
- data/lib/ar/viewer/Images/checker.png +0 -0
- data/lib/ar/viewer/Images/closeButtons.png +0 -0
- data/lib/ar/viewer/Images/cookie.png +0 -0
- data/lib/ar/viewer/Images/database.png +0 -0
- data/lib/ar/viewer/Images/databaseTable.png +0 -0
- data/lib/ar/viewer/Images/deleteIcon.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallDown.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallDownBlack.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallDownWhite.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallRight.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallRightBlack.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallRightDown.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallRightDownBlack.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallRightDownWhite.png +0 -0
- data/lib/ar/viewer/Images/disclosureTriangleSmallRightWhite.png +0 -0
- data/lib/ar/viewer/Images/domain.png +0 -0
- data/lib/ar/viewer/Images/errorIcon.png +0 -0
- data/lib/ar/viewer/Images/errorMediumIcon.png +0 -0
- data/lib/ar/viewer/Images/errorRedDot.png +0 -0
- data/lib/ar/viewer/Images/fileSystem.png +0 -0
- data/lib/ar/viewer/Images/forward.png +0 -0
- data/lib/ar/viewer/Images/frame.png +0 -0
- data/lib/ar/viewer/Images/glossyHeader.png +0 -0
- data/lib/ar/viewer/Images/glossyHeaderPressed.png +0 -0
- data/lib/ar/viewer/Images/glossyHeaderSelected.png +0 -0
- data/lib/ar/viewer/Images/glossyHeaderSelectedPressed.png +0 -0
- data/lib/ar/viewer/Images/goArrow.png +0 -0
- data/lib/ar/viewer/Images/graphLabelCalloutLeft.png +0 -0
- data/lib/ar/viewer/Images/graphLabelCalloutRight.png +0 -0
- data/lib/ar/viewer/Images/indexedDB.png +0 -0
- data/lib/ar/viewer/Images/indexedDBIndex.png +0 -0
- data/lib/ar/viewer/Images/indexedDBObjectStore.png +0 -0
- data/lib/ar/viewer/Images/localStorage.png +0 -0
- data/lib/ar/viewer/Images/navigatorShowHideButton.png +0 -0
- data/lib/ar/viewer/Images/paneAddButtons.png +0 -0
- data/lib/ar/viewer/Images/paneBottomGrow.png +0 -0
- data/lib/ar/viewer/Images/paneBottomGrowActive.png +0 -0
- data/lib/ar/viewer/Images/paneElementStateButtons.png +0 -0
- data/lib/ar/viewer/Images/paneFilterButtons.png +0 -0
- data/lib/ar/viewer/Images/paneGrowHandleLine.png +0 -0
- data/lib/ar/viewer/Images/paneRefreshButtons.png +0 -0
- data/lib/ar/viewer/Images/paneSettingsButtons.png +0 -0
- data/lib/ar/viewer/Images/popoverArrows.png +0 -0
- data/lib/ar/viewer/Images/popoverBackground.png +0 -0
- data/lib/ar/viewer/Images/profileGroupIcon.png +0 -0
- data/lib/ar/viewer/Images/profileIcon.png +0 -0
- data/lib/ar/viewer/Images/profileSmallIcon.png +0 -0
- data/lib/ar/viewer/Images/profilesSilhouette.png +0 -0
- data/lib/ar/viewer/Images/programCounterBorder.png +0 -0
- data/lib/ar/viewer/Images/radioDot.png +0 -0
- data/lib/ar/viewer/Images/resourceCSSIcon.png +0 -0
- data/lib/ar/viewer/Images/resourceDocumentIcon.png +0 -0
- data/lib/ar/viewer/Images/resourceDocumentIconSmall.png +0 -0
- data/lib/ar/viewer/Images/resourceJSIcon.png +0 -0
- data/lib/ar/viewer/Images/resourcePlainIcon.png +0 -0
- data/lib/ar/viewer/Images/resourcePlainIconSmall.png +0 -0
- data/lib/ar/viewer/Images/resourcesSizeGraphIcon.png +0 -0
- data/lib/ar/viewer/Images/resourcesTimeGraphIcon.png +0 -0
- data/lib/ar/viewer/Images/scriptsSilhouette.png +0 -0
- data/lib/ar/viewer/Images/searchNext.png +0 -0
- data/lib/ar/viewer/Images/searchPrev.png +0 -0
- data/lib/ar/viewer/Images/searchSmallBlue.png +0 -0
- data/lib/ar/viewer/Images/searchSmallBrightBlue.png +0 -0
- data/lib/ar/viewer/Images/searchSmallGray.png +0 -0
- data/lib/ar/viewer/Images/searchSmallWhite.png +0 -0
- data/lib/ar/viewer/Images/segment.png +0 -0
- data/lib/ar/viewer/Images/segmentChromium.png +0 -0
- data/lib/ar/viewer/Images/segmentEnd.png +0 -0
- data/lib/ar/viewer/Images/segmentHover.png +0 -0
- data/lib/ar/viewer/Images/segmentHoverChromium.png +0 -0
- data/lib/ar/viewer/Images/segmentHoverEnd.png +0 -0
- data/lib/ar/viewer/Images/segmentHoverEndChromium.png +0 -0
- data/lib/ar/viewer/Images/segmentSelected.png +0 -0
- data/lib/ar/viewer/Images/segmentSelectedChromium.png +0 -0
- data/lib/ar/viewer/Images/segmentSelectedEnd.png +0 -0
- data/lib/ar/viewer/Images/segmentSelectedEndChromium.png +0 -0
- data/lib/ar/viewer/Images/sessionStorage.png +0 -0
- data/lib/ar/viewer/Images/spinner.gif +0 -0
- data/lib/ar/viewer/Images/spinnerActive.gif +0 -0
- data/lib/ar/viewer/Images/spinnerActiveSelected.gif +0 -0
- data/lib/ar/viewer/Images/spinnerInactive.gif +0 -0
- data/lib/ar/viewer/Images/spinnerInactiveSelected.gif +0 -0
- data/lib/ar/viewer/Images/splitviewDimple.png +0 -0
- data/lib/ar/viewer/Images/splitviewDividerBackground.png +0 -0
- data/lib/ar/viewer/Images/statusbarButtonGlyphs.png +0 -0
- data/lib/ar/viewer/Images/statusbarResizerHorizontal.png +0 -0
- data/lib/ar/viewer/Images/statusbarResizerVertical.png +0 -0
- data/lib/ar/viewer/Images/successGreenDot.png +0 -0
- data/lib/ar/viewer/Images/thumbActiveHoriz.png +0 -0
- data/lib/ar/viewer/Images/thumbActiveVert.png +0 -0
- data/lib/ar/viewer/Images/thumbHoriz.png +0 -0
- data/lib/ar/viewer/Images/thumbHoverHoriz.png +0 -0
- data/lib/ar/viewer/Images/thumbHoverVert.png +0 -0
- data/lib/ar/viewer/Images/thumbVert.png +0 -0
- data/lib/ar/viewer/Images/tickMark.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillBlue.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillGray.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillGreen.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillOrange.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillPurple.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillRed.png +0 -0
- data/lib/ar/viewer/Images/timelineHollowPillYellow.png +0 -0
- data/lib/ar/viewer/Images/timelinePillBlue.png +0 -0
- data/lib/ar/viewer/Images/timelinePillGray.png +0 -0
- data/lib/ar/viewer/Images/timelinePillGreen.png +0 -0
- data/lib/ar/viewer/Images/timelinePillOrange.png +0 -0
- data/lib/ar/viewer/Images/timelinePillPurple.png +0 -0
- data/lib/ar/viewer/Images/timelinePillRed.png +0 -0
- data/lib/ar/viewer/Images/timelinePillYellow.png +0 -0
- data/lib/ar/viewer/Images/toolbarIcons.png +0 -0
- data/lib/ar/viewer/Images/toolbarIconsSmall.png +0 -0
- data/lib/ar/viewer/Images/toolbarItemSelected.png +0 -0
- data/lib/ar/viewer/Images/trackHoriz.png +0 -0
- data/lib/ar/viewer/Images/trackVert.png +0 -0
- data/lib/ar/viewer/Images/treeDownTriangleBlack.png +0 -0
- data/lib/ar/viewer/Images/treeDownTriangleWhite.png +0 -0
- data/lib/ar/viewer/Images/treeRightTriangleBlack.png +0 -0
- data/lib/ar/viewer/Images/treeRightTriangleWhite.png +0 -0
- data/lib/ar/viewer/Images/treeUpTriangleBlack.png +0 -0
- data/lib/ar/viewer/Images/treeUpTriangleWhite.png +0 -0
- data/lib/ar/viewer/Images/userInputIcon.png +0 -0
- data/lib/ar/viewer/Images/userInputPreviousIcon.png +0 -0
- data/lib/ar/viewer/Images/userInputResultIcon.png +0 -0
- data/lib/ar/viewer/Images/warningIcon.png +0 -0
- data/lib/ar/viewer/Images/warningMediumIcon.png +0 -0
- data/lib/ar/viewer/Images/warningOrangeDot.png +0 -0
- data/lib/ar/viewer/Images/warningsErrors.png +0 -0
- data/lib/ar/viewer/chrome/Images/applicationCache.png +0 -0
- data/lib/ar/viewer/chrome/Images/back.png +0 -0
- data/lib/ar/viewer/chrome/Images/breakpointBorder.png +0 -0
- data/lib/ar/viewer/chrome/Images/breakpointConditionalBorder.png +0 -0
- data/lib/ar/viewer/chrome/Images/breakpointConditionalCounterBorder.png +0 -0
- data/lib/ar/viewer/chrome/Images/breakpointCounterBorder.png +0 -0
- data/lib/ar/viewer/chrome/Images/checker.png +0 -0
- data/lib/ar/viewer/chrome/Images/closeButtons.png +0 -0
- data/lib/ar/viewer/chrome/Images/cookie.png +0 -0
- data/lib/ar/viewer/chrome/Images/database.png +0 -0
- data/lib/ar/viewer/chrome/Images/databaseTable.png +0 -0
- data/lib/ar/viewer/chrome/Images/debuggerContinue.png +0 -0
- data/lib/ar/viewer/chrome/Images/debuggerPause.png +0 -0
- data/lib/ar/viewer/chrome/Images/debuggerStepInto.png +0 -0
- data/lib/ar/viewer/chrome/Images/debuggerStepOut.png +0 -0
- data/lib/ar/viewer/chrome/Images/debuggerStepOver.png +0 -0
- data/lib/ar/viewer/chrome/Images/deleteIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallDown.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallDownBlack.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallDownWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallRight.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallRightBlack.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallRightDown.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallRightDownBlack.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallRightDownWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/disclosureTriangleSmallRightWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/domain.png +0 -0
- data/lib/ar/viewer/chrome/Images/errorIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/errorMediumIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/errorRedDot.png +0 -0
- data/lib/ar/viewer/chrome/Images/fileSystem.png +0 -0
- data/lib/ar/viewer/chrome/Images/forward.png +0 -0
- data/lib/ar/viewer/chrome/Images/frame.png +0 -0
- data/lib/ar/viewer/chrome/Images/glossyHeader.png +0 -0
- data/lib/ar/viewer/chrome/Images/glossyHeaderPressed.png +0 -0
- data/lib/ar/viewer/chrome/Images/glossyHeaderSelected.png +0 -0
- data/lib/ar/viewer/chrome/Images/glossyHeaderSelectedPressed.png +0 -0
- data/lib/ar/viewer/chrome/Images/goArrow.png +0 -0
- data/lib/ar/viewer/chrome/Images/graphLabelCalloutLeft.png +0 -0
- data/lib/ar/viewer/chrome/Images/graphLabelCalloutRight.png +0 -0
- data/lib/ar/viewer/chrome/Images/indexedDB.png +0 -0
- data/lib/ar/viewer/chrome/Images/indexedDBIndex.png +0 -0
- data/lib/ar/viewer/chrome/Images/indexedDBObjectStore.png +0 -0
- data/lib/ar/viewer/chrome/Images/localStorage.png +0 -0
- data/lib/ar/viewer/chrome/Images/navigatorShowHideButton.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneAddButtons.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneBottomGrow.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneBottomGrowActive.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneElementStateButtons.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneFilterButtons.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneGrowHandleLine.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneRefreshButtons.png +0 -0
- data/lib/ar/viewer/chrome/Images/paneSettingsButtons.png +0 -0
- data/lib/ar/viewer/chrome/Images/popoverArrows.png +0 -0
- data/lib/ar/viewer/chrome/Images/popoverBackground.png +0 -0
- data/lib/ar/viewer/chrome/Images/profileGroupIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/profileIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/profileSmallIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/profilesSilhouette.png +0 -0
- data/lib/ar/viewer/chrome/Images/programCounterBorder.png +0 -0
- data/lib/ar/viewer/chrome/Images/radioDot.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourceCSSIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourceDocumentIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourceDocumentIconSmall.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourceJSIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourcePlainIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourcePlainIconSmall.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourcesSizeGraphIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/resourcesTimeGraphIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/scriptsSilhouette.png +0 -0
- data/lib/ar/viewer/chrome/Images/searchNext.png +0 -0
- data/lib/ar/viewer/chrome/Images/searchPrev.png +0 -0
- data/lib/ar/viewer/chrome/Images/searchSmallBlue.png +0 -0
- data/lib/ar/viewer/chrome/Images/searchSmallBrightBlue.png +0 -0
- data/lib/ar/viewer/chrome/Images/searchSmallGray.png +0 -0
- data/lib/ar/viewer/chrome/Images/searchSmallWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/segment.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentChromium.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentEnd.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentHover.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentHoverChromium.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentHoverEnd.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentHoverEndChromium.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentSelected.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentSelectedChromium.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentSelectedEnd.png +0 -0
- data/lib/ar/viewer/chrome/Images/segmentSelectedEndChromium.png +0 -0
- data/lib/ar/viewer/chrome/Images/sessionStorage.png +0 -0
- data/lib/ar/viewer/chrome/Images/spinner.gif +0 -0
- data/lib/ar/viewer/chrome/Images/spinnerActive.gif +0 -0
- data/lib/ar/viewer/chrome/Images/spinnerActiveSelected.gif +0 -0
- data/lib/ar/viewer/chrome/Images/spinnerInactive.gif +0 -0
- data/lib/ar/viewer/chrome/Images/spinnerInactiveSelected.gif +0 -0
- data/lib/ar/viewer/chrome/Images/splitviewDimple.png +0 -0
- data/lib/ar/viewer/chrome/Images/splitviewDividerBackground.png +0 -0
- data/lib/ar/viewer/chrome/Images/statusbarButtonGlyphs.png +0 -0
- data/lib/ar/viewer/chrome/Images/statusbarResizerHorizontal.png +0 -0
- data/lib/ar/viewer/chrome/Images/statusbarResizerVertical.png +0 -0
- data/lib/ar/viewer/chrome/Images/successGreenDot.png +0 -0
- data/lib/ar/viewer/chrome/Images/thumbActiveHoriz.png +0 -0
- data/lib/ar/viewer/chrome/Images/thumbActiveVert.png +0 -0
- data/lib/ar/viewer/chrome/Images/thumbHoriz.png +0 -0
- data/lib/ar/viewer/chrome/Images/thumbHoverHoriz.png +0 -0
- data/lib/ar/viewer/chrome/Images/thumbHoverVert.png +0 -0
- data/lib/ar/viewer/chrome/Images/thumbVert.png +0 -0
- data/lib/ar/viewer/chrome/Images/tickMark.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillBlue.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillGray.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillGreen.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillOrange.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillPurple.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillRed.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelineHollowPillYellow.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillBlue.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillGray.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillGreen.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillOrange.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillPurple.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillRed.png +0 -0
- data/lib/ar/viewer/chrome/Images/timelinePillYellow.png +0 -0
- data/lib/ar/viewer/chrome/Images/toolbarIcons.png +0 -0
- data/lib/ar/viewer/chrome/Images/toolbarIconsSmall.png +0 -0
- data/lib/ar/viewer/chrome/Images/toolbarItemSelected.png +0 -0
- data/lib/ar/viewer/chrome/Images/trackHoriz.png +0 -0
- data/lib/ar/viewer/chrome/Images/trackVert.png +0 -0
- data/lib/ar/viewer/chrome/Images/treeDownTriangleBlack.png +0 -0
- data/lib/ar/viewer/chrome/Images/treeDownTriangleWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/treeRightTriangleBlack.png +0 -0
- data/lib/ar/viewer/chrome/Images/treeRightTriangleWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/treeUpTriangleBlack.png +0 -0
- data/lib/ar/viewer/chrome/Images/treeUpTriangleWhite.png +0 -0
- data/lib/ar/viewer/chrome/Images/userInputIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/userInputPreviousIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/userInputResultIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/warningIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/warningMediumIcon.png +0 -0
- data/lib/ar/viewer/chrome/Images/warningOrangeDot.png +0 -0
- data/lib/ar/viewer/chrome/Images/warningsErrors.png +0 -0
- data/lib/ar/viewer/chrome/dataGrid.css +218 -0
- data/lib/ar/viewer/chrome/devTools.css +97 -0
- data/lib/ar/viewer/chrome/dialog.css +55 -0
- data/lib/ar/viewer/chrome/elementsPanel.css +692 -0
- data/lib/ar/viewer/chrome/filteredItemSelectionDialog.css +41 -0
- data/lib/ar/viewer/chrome/heapProfiler.css +263 -0
- data/lib/ar/viewer/chrome/helpScreen.css +286 -0
- data/lib/ar/viewer/chrome/indexedDBViews.css +124 -0
- data/lib/ar/viewer/chrome/inspector.css +2878 -0
- data/lib/ar/viewer/chrome/inspectorCommon.css +177 -0
- data/lib/ar/viewer/chrome/inspectorSyntaxHighlight.css +111 -0
- data/lib/ar/viewer/chrome/nativeMemoryProfiler.css +86 -0
- data/lib/ar/viewer/chrome/navigatorView.css +142 -0
- data/lib/ar/viewer/chrome/networkLogView.css +559 -0
- data/lib/ar/viewer/chrome/networkPanel.css +340 -0
- data/lib/ar/viewer/chrome/panelEnablerView.css +168 -0
- data/lib/ar/viewer/chrome/popover.css +94 -0
- data/lib/ar/viewer/chrome/profilesPanel.css +201 -0
- data/lib/ar/viewer/chrome/resourceView.css +105 -0
- data/lib/ar/viewer/chrome/resourcesPanel.css +331 -0
- data/lib/ar/viewer/chrome/revisionHistory.css +90 -0
- data/lib/ar/viewer/chrome/scriptsPanel.css +286 -0
- data/lib/ar/viewer/chrome/splitView.css +91 -0
- data/lib/ar/viewer/chrome/tabbedPane.css +165 -0
- data/lib/ar/viewer/chrome/textEditor.css +181 -0
- data/lib/ar/viewer/chrome/textPrompt.css +69 -0
- data/lib/ar/viewer/chrome/timelinePanel.css +656 -0
- data/lib/ar/viewer/components/angular/angular.js +14760 -0
- data/lib/ar/viewer/components/angular/angular.min.js +162 -0
- data/lib/ar/viewer/components/angular/component.json +14 -0
- data/lib/ar/viewer/components/jquery/README.md +11 -0
- data/lib/ar/viewer/components/jquery/bower.json +14 -0
- data/lib/ar/viewer/components/jquery/component.json +22 -0
- data/lib/ar/viewer/components/jquery/composer.json +35 -0
- data/lib/ar/viewer/components/jquery/jquery-migrate.js +511 -0
- data/lib/ar/viewer/components/jquery/jquery-migrate.min.js +3 -0
- data/lib/ar/viewer/components/jquery/jquery.js +8755 -0
- data/lib/ar/viewer/components/jquery/jquery.min.js +6 -0
- data/lib/ar/viewer/components/jquery/package.json +7 -0
- data/lib/ar/viewer/css/style.css +186 -0
- data/lib/ar/viewer/index.html +422 -0
- data/lib/ar/viewer/js/controllers.js +124 -0
- data/lib/ar/viewer/js/libs/HAREntry.js +154 -0
- data/lib/ar/viewer/js/libs/devTools.js +371 -0
- data/lib/ar/viewer/js/libs/modernizr.custom.min.js +4 -0
- data/lib/ar/viewer/js/script.js +36 -0
- data/lib/ar/viewer/sample.har +6723 -0
- data/lib/ar/viewer/sass/style.scss +149 -0
- data/lib/{autoresponse.rb → auto_response.rb} +30 -31
- data/readme.md +4 -0
- data/rules.sample +9 -0
- data/test/helper.rb +1 -1
- metadata +365 -9
- data/bin/start_ar.rb +0 -5
- data/bin/start_ar.rb.pid +0 -1
- data/lib/ar/proxyserver.rb +0 -106
- data/lib/ar/viewer/tmpl/index.haml +0 -55
@@ -0,0 +1,154 @@
|
|
1
|
+
/**
|
2
|
+
* HAREntry
|
3
|
+
*
|
4
|
+
* Represents a single request in in the HAR file. Most HAR files will contain
|
5
|
+
* multiple requests.
|
6
|
+
*
|
7
|
+
* @author Eric J. Duran
|
8
|
+
* @see http://groups.google.com/group/http-archive-specification/web/har-1-2-spec
|
9
|
+
*/
|
10
|
+
var HAREntry = (function HAREntryClosure() {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
/**
|
14
|
+
* A single entry request.
|
15
|
+
* @constructor
|
16
|
+
*/
|
17
|
+
function HAREntry(entry, id, start_time, data) {
|
18
|
+
this._entry = entry;
|
19
|
+
this._id = id;
|
20
|
+
|
21
|
+
// Response
|
22
|
+
this.status = this._entry.response.status;
|
23
|
+
this.statusText = this._entry.response.statusText;
|
24
|
+
this.mimeType = this._entry.response.content.mimeType;
|
25
|
+
this.receive = this.getReceive();
|
26
|
+
this.receiveTime = this.receive + "ms";
|
27
|
+
|
28
|
+
// Request
|
29
|
+
this.url = this._entry.request.url;
|
30
|
+
this.method = this._entry.request.method;
|
31
|
+
|
32
|
+
// Custom
|
33
|
+
this.parsedURL = new WebInspector.ParsedURL(entry.request.url);
|
34
|
+
this.name = this.getRequestName();
|
35
|
+
this.folder = this.getFolder();
|
36
|
+
this.size = this.getSize();
|
37
|
+
this.contentSize = this.getContentSize();
|
38
|
+
this.time = this.getTime();
|
39
|
+
this.latency = this.getLatency();
|
40
|
+
|
41
|
+
// var timeCalculator = new WebInspector.NetworkTransferTimeCalculator();
|
42
|
+
// var durationCalculator = new WebInspector.NetworkTransferDurationCalculator();
|
43
|
+
|
44
|
+
this.request = this.prepRequest();
|
45
|
+
this.reqHeadersCount = this._entry.request.headers.length;
|
46
|
+
this.resHeadersCount = this._entry.response.headers.length;
|
47
|
+
|
48
|
+
// Extra from data.
|
49
|
+
this.startedTime = start_time;
|
50
|
+
this.graphs = this.graphs(data);
|
51
|
+
|
52
|
+
// Raw values for Sort and Filters.
|
53
|
+
this.nameSort = this.parsedURL.lastPathComponent;
|
54
|
+
this.timeSort = this._entry.time;
|
55
|
+
this.sizeSort = '';
|
56
|
+
}
|
57
|
+
|
58
|
+
HAREntry.prototype = {
|
59
|
+
|
60
|
+
getFolder: function () {
|
61
|
+
var path = this.parsedURL.path;
|
62
|
+
var indexOfQuery = path.indexOf("?");
|
63
|
+
if (indexOfQuery !== -1) {
|
64
|
+
path = path.substring(0, indexOfQuery);
|
65
|
+
}
|
66
|
+
|
67
|
+
var lastSlashIndex = path.lastIndexOf("/");
|
68
|
+
return lastSlashIndex !== -1 ? path.substring(0, lastSlashIndex) : "";
|
69
|
+
},
|
70
|
+
|
71
|
+
getRequestName: function () {
|
72
|
+
var types = [];
|
73
|
+
var mimeType = this._entry.response.content.mimeType;
|
74
|
+
types['text/html'] = 'document';
|
75
|
+
types['text/css'] = 'stylesheet';
|
76
|
+
types['text/javascript'] = 'script';
|
77
|
+
types['application/javascript'] = 'script';
|
78
|
+
types['image/png'] = 'image';
|
79
|
+
types['image/gif'] = 'image';
|
80
|
+
types['image/jpeg'] = 'image';
|
81
|
+
|
82
|
+
return types[mimeType];
|
83
|
+
},
|
84
|
+
|
85
|
+
getSize: function () {
|
86
|
+
// TODO: Fixme, this doesn't correctly pick up items from cache.
|
87
|
+
if (this._entry.cached) {
|
88
|
+
return 0;
|
89
|
+
}
|
90
|
+
if (this._entry.response.status === 304) {
|
91
|
+
// Not modified
|
92
|
+
return Number.bytesToString(this._entry.response.headersSize);
|
93
|
+
}
|
94
|
+
|
95
|
+
return Number.bytesToString(this._entry.request.headersSize + this._entry.request.bodySize);
|
96
|
+
},
|
97
|
+
|
98
|
+
getContentSize: function () {
|
99
|
+
return Number.bytesToString(this._entry.response.content.size);
|
100
|
+
},
|
101
|
+
|
102
|
+
getRawContentSize: function () {
|
103
|
+
return this._entry.response.content.size;
|
104
|
+
},
|
105
|
+
|
106
|
+
getTime: function () {
|
107
|
+
if (this._entry.time > 0) {
|
108
|
+
return this._entry.time + "ms";
|
109
|
+
}
|
110
|
+
return 0;
|
111
|
+
},
|
112
|
+
|
113
|
+
getLatency: function () {
|
114
|
+
if (this._entry.time > 0) {
|
115
|
+
return this._entry.time - this._entry.timings.receive + "ms";
|
116
|
+
}
|
117
|
+
return 0;
|
118
|
+
|
119
|
+
},
|
120
|
+
|
121
|
+
getReceive: function() {
|
122
|
+
if (this._entry.timings && this._entry.timings.receive != undefined) {
|
123
|
+
return this._entry.timings.receive;
|
124
|
+
}
|
125
|
+
return 0;
|
126
|
+
},
|
127
|
+
|
128
|
+
prepRequest: function () {
|
129
|
+
var request = {};
|
130
|
+
request.startTime = new Date(this._entry.startedDateTime).getTime();
|
131
|
+
request.responseReceivedTime = request.startTime;
|
132
|
+
request.endTime = request.startTime + this._entry.time;
|
133
|
+
this.minimumBoundary = 0;
|
134
|
+
this.boundarySpan = 100;
|
135
|
+
this.diff = request.endTime - request.responseReceivedTime;
|
136
|
+
return request;
|
137
|
+
},
|
138
|
+
|
139
|
+
graphs: function (data) {
|
140
|
+
var graph = {};
|
141
|
+
graph.pOL = data.lastOnLoad;
|
142
|
+
graph.lOR = this.request.startTime - this.startedTime;
|
143
|
+
graph.Lat = this._entry.time - this.receive;
|
144
|
+
graph.end = this._entry.time + this.receive;
|
145
|
+
graph.latency_left = (graph.lOR / graph.pOL) * 100;
|
146
|
+
graph.latency_right = 100 - (((graph.lOR + graph.Lat) / graph.pOL) * 100);
|
147
|
+
graph.receiving_left = ((graph.lOR + graph.Lat) / graph.pOL) * 100;
|
148
|
+
graph.receiving_right = 100.0 - ((graph.lOR + this._entry.time)/graph.pOL * 100);
|
149
|
+
return graph;
|
150
|
+
}
|
151
|
+
};
|
152
|
+
|
153
|
+
return HAREntry;
|
154
|
+
})();
|
@@ -0,0 +1,371 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C) 2007 Apple Inc. All rights reserved.
|
3
|
+
* Copyright (C) 2012 Google Inc. All rights reserved.
|
4
|
+
*
|
5
|
+
* Redistribution and use in source and binary forms, with or without
|
6
|
+
* modification, are permitted provided that the following conditions
|
7
|
+
* are met:
|
8
|
+
*
|
9
|
+
* 1. Redistributions of source code must retain the above copyright
|
10
|
+
* notice, this list of conditions and the following disclaimer.
|
11
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
12
|
+
* notice, this list of conditions and the following disclaimer in the
|
13
|
+
* documentation and/or other materials provided with the distribution.
|
14
|
+
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
15
|
+
* its contributors may be used to endorse or promote products derived
|
16
|
+
* from this software without specific prior written permission.
|
17
|
+
*
|
18
|
+
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
|
19
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
+
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
22
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
24
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
25
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
26
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
27
|
+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
|
+
*/
|
29
|
+
|
30
|
+
String.prototype.startsWith = function(substring)
|
31
|
+
{
|
32
|
+
return !this.lastIndexOf(substring, 0);
|
33
|
+
}
|
34
|
+
|
35
|
+
/**
|
36
|
+
* @param {string} format
|
37
|
+
* @param {...*} var_arg
|
38
|
+
*/
|
39
|
+
String.sprintf = function(format, var_arg)
|
40
|
+
{
|
41
|
+
return String.vsprintf(format, Array.prototype.slice.call(arguments, 1));
|
42
|
+
}
|
43
|
+
|
44
|
+
String.tokenizeFormatString = function(format, formatters)
|
45
|
+
{
|
46
|
+
var tokens = [];
|
47
|
+
var substitutionIndex = 0;
|
48
|
+
|
49
|
+
function addStringToken(str)
|
50
|
+
{
|
51
|
+
tokens.push({ type: "string", value: str });
|
52
|
+
}
|
53
|
+
|
54
|
+
function addSpecifierToken(specifier, precision, substitutionIndex)
|
55
|
+
{
|
56
|
+
tokens.push({ type: "specifier", specifier: specifier, precision: precision, substitutionIndex: substitutionIndex });
|
57
|
+
}
|
58
|
+
|
59
|
+
function isDigit(c)
|
60
|
+
{
|
61
|
+
return !!/[0-9]/.exec(c);
|
62
|
+
}
|
63
|
+
|
64
|
+
var index = 0;
|
65
|
+
for (var precentIndex = format.indexOf("%", index); precentIndex !== -1; precentIndex = format.indexOf("%", index)) {
|
66
|
+
addStringToken(format.substring(index, precentIndex));
|
67
|
+
index = precentIndex + 1;
|
68
|
+
|
69
|
+
if (isDigit(format[index])) {
|
70
|
+
// The first character is a number, it might be a substitution index.
|
71
|
+
var number = parseInt(format.substring(index), 10);
|
72
|
+
while (isDigit(format[index]))
|
73
|
+
++index;
|
74
|
+
|
75
|
+
// If the number is greater than zero and ends with a "$",
|
76
|
+
// then this is a substitution index.
|
77
|
+
if (number > 0 && format[index] === "$") {
|
78
|
+
substitutionIndex = (number - 1);
|
79
|
+
++index;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
|
83
|
+
var precision = -1;
|
84
|
+
if (format[index] === ".") {
|
85
|
+
// This is a precision specifier. If no digit follows the ".",
|
86
|
+
// then the precision should be zero.
|
87
|
+
++index;
|
88
|
+
precision = parseInt(format.substring(index), 10);
|
89
|
+
if (isNaN(precision))
|
90
|
+
precision = 0;
|
91
|
+
|
92
|
+
while (isDigit(format[index]))
|
93
|
+
++index;
|
94
|
+
}
|
95
|
+
|
96
|
+
if (!(format[index] in formatters)) {
|
97
|
+
addStringToken(format.substring(precentIndex, index + 1));
|
98
|
+
++index;
|
99
|
+
continue;
|
100
|
+
}
|
101
|
+
|
102
|
+
addSpecifierToken(format[index], precision, substitutionIndex);
|
103
|
+
|
104
|
+
++substitutionIndex;
|
105
|
+
++index;
|
106
|
+
}
|
107
|
+
|
108
|
+
addStringToken(format.substring(index));
|
109
|
+
|
110
|
+
return tokens;
|
111
|
+
}
|
112
|
+
|
113
|
+
String.standardFormatters = {
|
114
|
+
d: function(substitution)
|
115
|
+
{
|
116
|
+
return !isNaN(substitution) ? substitution : 0;
|
117
|
+
},
|
118
|
+
|
119
|
+
f: function(substitution, token)
|
120
|
+
{
|
121
|
+
if (substitution && token.precision > -1)
|
122
|
+
substitution = substitution.toFixed(token.precision);
|
123
|
+
return !isNaN(substitution) ? substitution : (token.precision > -1 ? Number(0).toFixed(token.precision) : 0);
|
124
|
+
},
|
125
|
+
|
126
|
+
s: function(substitution)
|
127
|
+
{
|
128
|
+
return substitution;
|
129
|
+
}
|
130
|
+
}
|
131
|
+
|
132
|
+
String.vsprintf = function(format, substitutions)
|
133
|
+
{
|
134
|
+
return String.format(format, substitutions, String.standardFormatters, "", function(a, b) { return a + b; }).formattedResult;
|
135
|
+
}
|
136
|
+
|
137
|
+
String.format = function(format, substitutions, formatters, initialValue, append)
|
138
|
+
{
|
139
|
+
if (!format || !substitutions || !substitutions.length)
|
140
|
+
return { formattedResult: append(initialValue, format), unusedSubstitutions: substitutions };
|
141
|
+
|
142
|
+
function prettyFunctionName()
|
143
|
+
{
|
144
|
+
return "String.format(\"" + format + "\", \"" + substitutions.join("\", \"") + "\")";
|
145
|
+
}
|
146
|
+
|
147
|
+
function warn(msg)
|
148
|
+
{
|
149
|
+
console.warn(prettyFunctionName() + ": " + msg);
|
150
|
+
}
|
151
|
+
|
152
|
+
function error(msg)
|
153
|
+
{
|
154
|
+
console.error(prettyFunctionName() + ": " + msg);
|
155
|
+
}
|
156
|
+
|
157
|
+
var result = initialValue;
|
158
|
+
var tokens = String.tokenizeFormatString(format, formatters);
|
159
|
+
var usedSubstitutionIndexes = {};
|
160
|
+
|
161
|
+
for (var i = 0; i < tokens.length; ++i) {
|
162
|
+
var token = tokens[i];
|
163
|
+
|
164
|
+
if (token.type === "string") {
|
165
|
+
result = append(result, token.value);
|
166
|
+
continue;
|
167
|
+
}
|
168
|
+
|
169
|
+
if (token.type !== "specifier") {
|
170
|
+
error("Unknown token type \"" + token.type + "\" found.");
|
171
|
+
continue;
|
172
|
+
}
|
173
|
+
|
174
|
+
if (token.substitutionIndex >= substitutions.length) {
|
175
|
+
// If there are not enough substitutions for the current substitutionIndex
|
176
|
+
// just output the format specifier literally and move on.
|
177
|
+
error("not enough substitution arguments. Had " + substitutions.length + " but needed " + (token.substitutionIndex + 1) + ", so substitution was skipped.");
|
178
|
+
result = append(result, "%" + (token.precision > -1 ? token.precision : "") + token.specifier);
|
179
|
+
continue;
|
180
|
+
}
|
181
|
+
|
182
|
+
usedSubstitutionIndexes[token.substitutionIndex] = true;
|
183
|
+
|
184
|
+
if (!(token.specifier in formatters)) {
|
185
|
+
// Encountered an unsupported format character, treat as a string.
|
186
|
+
warn("unsupported format character \u201C" + token.specifier + "\u201D. Treating as a string.");
|
187
|
+
result = append(result, substitutions[token.substitutionIndex]);
|
188
|
+
continue;
|
189
|
+
}
|
190
|
+
|
191
|
+
result = append(result, formatters[token.specifier](substitutions[token.substitutionIndex], token));
|
192
|
+
}
|
193
|
+
|
194
|
+
var unusedSubstitutions = [];
|
195
|
+
for (var i = 0; i < substitutions.length; ++i) {
|
196
|
+
if (i in usedSubstitutionIndexes)
|
197
|
+
continue;
|
198
|
+
unusedSubstitutions.push(substitutions[i]);
|
199
|
+
}
|
200
|
+
|
201
|
+
return { formattedResult: result, unusedSubstitutions: unusedSubstitutions };
|
202
|
+
}
|
203
|
+
|
204
|
+
/*
|
205
|
+
* Copyright (C) 2011 Google Inc. All rights reserved.
|
206
|
+
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
|
207
|
+
* Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
|
208
|
+
* Copyright (C) 2009 Joseph Pecoraro
|
209
|
+
*
|
210
|
+
* Redistribution and use in source and binary forms, with or without
|
211
|
+
* modification, are permitted provided that the following conditions
|
212
|
+
* are met:
|
213
|
+
*
|
214
|
+
* 1. Redistributions of source code must retain the above copyright
|
215
|
+
* notice, this list of conditions and the following disclaimer.
|
216
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
217
|
+
* notice, this list of conditions and the following disclaimer in the
|
218
|
+
* documentation and/or other materials provided with the distribution.
|
219
|
+
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
220
|
+
* its contributors may be used to endorse or promote products derived
|
221
|
+
* from this software without specific prior written permission.
|
222
|
+
*
|
223
|
+
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
|
224
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
225
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
226
|
+
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
227
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
228
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
229
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
230
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
231
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
232
|
+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
233
|
+
*/
|
234
|
+
|
235
|
+
/**
|
236
|
+
* @param {string} string
|
237
|
+
* @param {...*} vararg
|
238
|
+
*/
|
239
|
+
WebInspector.UIString = function(string, vararg)
|
240
|
+
{
|
241
|
+
if (Preferences.localizeUI) {
|
242
|
+
if (window.localizedStrings && string in window.localizedStrings)
|
243
|
+
string = window.localizedStrings[string];
|
244
|
+
else {
|
245
|
+
if (!(string in WebInspector._missingLocalizedStrings)) {
|
246
|
+
console.warn("Localized string \"" + string + "\" not found.");
|
247
|
+
WebInspector._missingLocalizedStrings[string] = true;
|
248
|
+
}
|
249
|
+
|
250
|
+
if (Preferences.showMissingLocalizedStrings)
|
251
|
+
string += " (not localized)";
|
252
|
+
}
|
253
|
+
}
|
254
|
+
return String.vsprintf(string, Array.prototype.slice.call(arguments, 1));
|
255
|
+
}
|
256
|
+
|
257
|
+
/**
|
258
|
+
* @param {boolean=} higherResolution
|
259
|
+
*/
|
260
|
+
Number.bytesToString = function(bytes, higherResolution)
|
261
|
+
{
|
262
|
+
if (typeof higherResolution === "undefined")
|
263
|
+
higherResolution = true;
|
264
|
+
|
265
|
+
if (bytes < 1024)
|
266
|
+
return WebInspector.UIString("%.0fB", bytes);
|
267
|
+
|
268
|
+
var kilobytes = bytes / 1024;
|
269
|
+
if (higherResolution && kilobytes < 1024)
|
270
|
+
return WebInspector.UIString("%.2fKB", kilobytes);
|
271
|
+
else if (kilobytes < 1024)
|
272
|
+
return WebInspector.UIString("%.0fKB", kilobytes);
|
273
|
+
|
274
|
+
var megabytes = kilobytes / 1024;
|
275
|
+
if (higherResolution)
|
276
|
+
return WebInspector.UIString("%.2fMB", megabytes);
|
277
|
+
else
|
278
|
+
return WebInspector.UIString("%.0fMB", megabytes);
|
279
|
+
}
|
280
|
+
|
281
|
+
/*
|
282
|
+
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
|
283
|
+
* Copyright (C) 2007 Matt Lilek (pewtermoose@gmail.com).
|
284
|
+
* Copyright (C) 2009 Joseph Pecoraro
|
285
|
+
*
|
286
|
+
* Redistribution and use in source and binary forms, with or without
|
287
|
+
* modification, are permitted provided that the following conditions
|
288
|
+
* are met:
|
289
|
+
*
|
290
|
+
* 1. Redistributions of source code must retain the above copyright
|
291
|
+
* notice, this list of conditions and the following disclaimer.
|
292
|
+
* 2. Redistributions in binary form must reproduce the above copyright
|
293
|
+
* notice, this list of conditions and the following disclaimer in the
|
294
|
+
* documentation and/or other materials provided with the distribution.
|
295
|
+
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
|
296
|
+
* its contributors may be used to endorse or promote products derived
|
297
|
+
* from this software without specific prior written permission.
|
298
|
+
*
|
299
|
+
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
|
300
|
+
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
301
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
302
|
+
* DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
|
303
|
+
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
304
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
305
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
306
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
307
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
308
|
+
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
309
|
+
*/
|
310
|
+
|
311
|
+
/**
|
312
|
+
* @constructor
|
313
|
+
* @param {string} url
|
314
|
+
*/
|
315
|
+
WebInspector.ParsedURL = function(url)
|
316
|
+
{
|
317
|
+
this.isValid = false;
|
318
|
+
this.url = url;
|
319
|
+
this.scheme = "";
|
320
|
+
this.host = "";
|
321
|
+
this.port = "";
|
322
|
+
this.path = "";
|
323
|
+
this.queryParams = "";
|
324
|
+
this.fragment = "";
|
325
|
+
this.folderPathComponents = "";
|
326
|
+
this.lastPathComponent = "";
|
327
|
+
|
328
|
+
// RegExp groups:
|
329
|
+
// 1 - scheme
|
330
|
+
// 2 - hostname
|
331
|
+
// 3 - ?port
|
332
|
+
// 4 - ?path
|
333
|
+
// 5 - ?fragment
|
334
|
+
var match = url.match(/^([^:]+):\/\/([^\/:]*)(?::([\d]+))?(?:(\/[^#]*)(?:#(.*))?)?$/i);
|
335
|
+
if (match) {
|
336
|
+
this.isValid = true;
|
337
|
+
this.scheme = match[1].toLowerCase();
|
338
|
+
this.host = match[2];
|
339
|
+
this.port = match[3];
|
340
|
+
this.path = match[4] || "/";
|
341
|
+
this.fragment = match[5];
|
342
|
+
} else {
|
343
|
+
if (this.url.startsWith("data:")) {
|
344
|
+
this.scheme = "data";
|
345
|
+
return;
|
346
|
+
}
|
347
|
+
if (this.url === "about:blank") {
|
348
|
+
this.scheme = "about";
|
349
|
+
return;
|
350
|
+
}
|
351
|
+
this.path = this.url;
|
352
|
+
}
|
353
|
+
|
354
|
+
if (this.path) {
|
355
|
+
// First cut the query params.
|
356
|
+
var path = this.path;
|
357
|
+
var indexOfQuery = path.indexOf("?");
|
358
|
+
if (indexOfQuery !== -1) {
|
359
|
+
this.queryParams = path.substring(indexOfQuery + 1)
|
360
|
+
path = path.substring(0, indexOfQuery);
|
361
|
+
}
|
362
|
+
|
363
|
+
// Then take last path component.
|
364
|
+
var lastSlashIndex = path.lastIndexOf("/");
|
365
|
+
if (lastSlashIndex !== -1) {
|
366
|
+
this.folderPathComponents = path.substring(0, lastSlashIndex);
|
367
|
+
this.lastPathComponent = path.substring(lastSlashIndex + 1);
|
368
|
+
} else
|
369
|
+
this.lastPathComponent = path;
|
370
|
+
}
|
371
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
/* Modernizr 2.6.1 (Custom Build) | MIT & BSD
|
2
|
+
* Build: http://modernizr.com/download/#-rgba-applicationcache-draganddrop-shiv-cssclasses-hasevent-prefixes
|
3
|
+
*/
|
4
|
+
;window.Modernizr=function(a,b,c){function w(a){j.cssText=a}function x(a,b){return w(m.join(a+";")+(b||""))}function y(a,b){return typeof a===b}function z(a,b){return!!~(""+a).indexOf(b)}function A(a,b,d){for(var e in a){var f=b[a[e]];if(f!==c)return d===!1?a[e]:y(f,"function")?f.bind(d||b):f}return!1}var d="2.6.1",e={},f=!0,g=b.documentElement,h="modernizr",i=b.createElement(h),j=i.style,k,l={}.toString,m=" -webkit- -moz- -o- -ms- ".split(" "),n={},o={},p={},q=[],r=q.slice,s,t=function(){function d(d,e){e=e||b.createElement(a[d]||"div"),d="on"+d;var f=d in e;return f||(e.setAttribute||(e=b.createElement("div")),e.setAttribute&&e.removeAttribute&&(e.setAttribute(d,""),f=y(e[d],"function"),y(e[d],"undefined")||(e[d]=c),e.removeAttribute(d))),e=null,f}var a={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return d}(),u={}.hasOwnProperty,v;!y(u,"undefined")&&!y(u.call,"undefined")?v=function(a,b){return u.call(a,b)}:v=function(a,b){return b in a&&y(a.constructor.prototype[b],"undefined")},Function.prototype.bind||(Function.prototype.bind=function(b){var c=this;if(typeof c!="function")throw new TypeError;var d=r.call(arguments,1),e=function(){if(this instanceof e){var a=function(){};a.prototype=c.prototype;var f=new a,g=c.apply(f,d.concat(r.call(arguments)));return Object(g)===g?g:f}return c.apply(b,d.concat(r.call(arguments)))};return e}),n.draganddrop=function(){var a=b.createElement("div");return"draggable"in a||"ondragstart"in a&&"ondrop"in a},n.rgba=function(){return w("background-color:rgba(150,255,150,.5)"),z(j.backgroundColor,"rgba")},n.applicationcache=function(){return!!a.applicationCache};for(var B in n)v(n,B)&&(s=B.toLowerCase(),e[s]=n[B](),q.push((e[s]?"":"no-")+s));return e.addTest=function(a,b){if(typeof a=="object")for(var d in a)v(a,d)&&e.addTest(d,a[d]);else{a=a.toLowerCase();if(e[a]!==c)return e;b=typeof b=="function"?b():b,f&&(g.className+=" "+(b?"":"no-")+a),e[a]=b}return e},w(""),i=k=null,function(a,b){function k(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function l(){var a=r.elements;return typeof a=="string"?a.split(" "):a}function m(a){var b=i[a[g]];return b||(b={},h++,a[g]=h,i[h]=b),b}function n(a,c,f){c||(c=b);if(j)return c.createElement(a);f||(f=m(c));var g;return f.cache[a]?g=f.cache[a].cloneNode():e.test(a)?g=(f.cache[a]=f.createElem(a)).cloneNode():g=f.createElem(a),g.canHaveChildren&&!d.test(a)?f.frag.appendChild(g):g}function o(a,c){a||(a=b);if(j)return a.createDocumentFragment();c=c||m(a);var d=c.frag.cloneNode(),e=0,f=l(),g=f.length;for(;e<g;e++)d.createElement(f[e]);return d}function p(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return r.shivMethods?n(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+l().join().replace(/\w+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(r,b.frag)}function q(a){a||(a=b);var c=m(a);return r.shivCSS&&!f&&!c.hasCSS&&(c.hasCSS=!!k(a,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),j||p(a,c),a}var c=a.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,e=/^<|^(?:a|b|button|code|div|fieldset|form|h1|h2|h3|h4|h5|h6|i|iframe|img|input|label|li|link|ol|option|p|param|q|script|select|span|strong|style|table|tbody|td|textarea|tfoot|th|thead|tr|ul)$/i,f,g="_html5shiv",h=0,i={},j;(function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",f="hidden"in a,j=a.childNodes.length==1||function(){b.createElement("a");var a=b.createDocumentFragment();return typeof a.cloneNode=="undefined"||typeof a.createDocumentFragment=="undefined"||typeof a.createElement=="undefined"}()}catch(c){f=!0,j=!0}})();var r={elements:c.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:c.shivCSS!==!1,supportsUnknownElements:j,shivMethods:c.shivMethods!==!1,type:"default",shivDocument:q,createElement:n,createDocumentFragment:o};a.html5=r,q(b)}(this,b),e._version=d,e._prefixes=m,e.hasEvent=t,g.className=g.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(f?" js "+q.join(" "):""),e}(this,this.document);
|
@@ -0,0 +1,36 @@
|
|
1
|
+
(function(window, undefined) {
|
2
|
+
'use strict';
|
3
|
+
|
4
|
+
$(function(){
|
5
|
+
var support = Modernizr.draganddrop && document.querySelector && window.JSON;
|
6
|
+
if (!support) {
|
7
|
+
// Add disabled class.
|
8
|
+
$("body").addClass("disabled");
|
9
|
+
}
|
10
|
+
else {
|
11
|
+
|
12
|
+
// TODO: Fixme, Do with angular.
|
13
|
+
$('.network-larger-resources-status-bar-item').click(function (e){
|
14
|
+
$(this).toggleClass('toggled-on');
|
15
|
+
$('.network-log-grid').toggleClass('small');
|
16
|
+
});
|
17
|
+
|
18
|
+
// Add a sample HAR that way anyone could easily test the app.
|
19
|
+
$('.sample').click(function (e){
|
20
|
+
e.preventDefault();
|
21
|
+
// Lets load the sample HAR.
|
22
|
+
var scope = angular.element("body").scope();
|
23
|
+
$('#dropArea').removeClass('visible');
|
24
|
+
$.getJSON('/sessions.har', function(d) {
|
25
|
+
scope.$apply(function() {
|
26
|
+
scope.updateHar(d);
|
27
|
+
});
|
28
|
+
});
|
29
|
+
}).click();
|
30
|
+
}
|
31
|
+
});
|
32
|
+
})(window);
|
33
|
+
|
34
|
+
// Hacks to workaround issues with chrome dev tools js.
|
35
|
+
var Preferences = Preferences || {};
|
36
|
+
var WebInspector = WebInspector || {};
|