├── .cfconfig.json ├── .cfformat.json ├── .cflintrc ├── .editorconfig ├── .env.template ├── .gitattributes ├── .github ├── CODE_OF_CONDUCT.MD ├── FUNDING.YML ├── ISSUE_TEMPLATE │ ├── BUG_REPORT.md │ └── FEATURE_REQUEST.md ├── PULL_REQUEST_TEMPLATE.md ├── SECURITY.md ├── SUPPORT.md └── workflows │ ├── cron.yml │ ├── lts.yml │ ├── pr.yml │ ├── release.yml │ ├── snapshot.yml │ └── tests.yml ├── .gitignore ├── .markdownlint.json ├── .vscode ├── settings.json └── tasks.json ├── CONTRIBUTING.md ├── apidocs ├── Application.cfc ├── box.json ├── cachebox.cfm ├── coldbox.cfm ├── logbox.cfm └── wirebox.cfm ├── box-cachebox.json ├── box-logbox.json ├── box-original.json ├── box-wirebox.json ├── box.json ├── build ├── Build.cfc └── release.boxr ├── changelog.md ├── license.txt ├── readme.md ├── server-adobe@2023.json ├── server-adobe@2025.json ├── server-boxlang-cfml@1.json ├── server-boxlang-cfml@be.json ├── server-boxlang@1.json ├── server-lucee@5.json ├── server-lucee@6.json ├── system ├── Application.cfm ├── Bootstrap.cfc ├── EventHandler.cfc ├── FrameworkSupertype.cfc ├── Interceptor.cfc ├── RestHandler.cfc ├── aop │ ├── Matcher.cfc │ ├── MethodInterceptor.cfc │ ├── MethodInvocation.cfc │ ├── Mixer.cfc │ ├── MixerUtil.cfc │ ├── aspects │ │ ├── CFTransaction.cfc │ │ └── MethodLogger.cfc │ └── tmp │ │ └── generationPath.txt ├── async │ ├── AsyncManager.cfc │ ├── executors │ │ ├── Executor.cfc │ │ ├── ExecutorBuilder.cfc │ │ └── ScheduledExecutor.cfc │ ├── tasks │ │ ├── Future.cfc │ │ ├── FutureTask.cfc │ │ ├── ScheduledFuture.cfc │ │ ├── ScheduledTask.cfc │ │ └── Scheduler.cfc │ └── time │ │ ├── DateTimeHelper.cfc │ │ ├── Duration.cfc │ │ ├── Period.cfc │ │ └── TimeUnit.cfc ├── cache │ ├── AbstractCacheBoxProvider.cfc │ ├── CacheFactory.cfc │ ├── ICacheProvider.cfc │ ├── IColdboxApplicationCache.cfc │ ├── config │ │ ├── CacheBoxConfig.cfc │ │ ├── DefaultConfiguration.cfc │ │ ├── LogBox.cfc │ │ └── samples │ │ │ └── SampleCacheBox.cfc │ ├── license.txt │ ├── policies │ │ ├── AbstractEvictionPolicy.cfc │ │ ├── FIFO.cfc │ │ ├── IEvictionPolicy.cfc │ │ ├── LFU.cfc │ │ ├── LIFO.cfc │ │ └── LRU.cfc │ ├── providers │ │ ├── BoxLangColdBoxProvider.cfc │ │ ├── BoxLangProvider.cfc │ │ ├── CFColdBoxProvider.cfc │ │ ├── CFProvider.cfc │ │ ├── CacheBoxColdBoxProvider.cfc │ │ ├── CacheBoxProvider.cfc │ │ ├── ICacheProvider.cfc │ │ ├── IColdBoxProvider.cfc │ │ ├── LuceeColdboxProvider.cfc │ │ ├── LuceeProvider.cfc │ │ ├── MockProvider.cfc │ │ └── stats │ │ │ ├── BoxLangStats.cfc │ │ │ ├── CFStats.cfc │ │ │ └── LuceeStats.cfc │ ├── readme.md │ ├── report │ │ ├── ReportHandler.cfc │ │ ├── monitor.cfm │ │ └── skins │ │ │ └── default │ │ │ ├── CacheCharting.cfm │ │ │ ├── CacheContentReport.cfm │ │ │ ├── CachePanel.cfm │ │ │ ├── CacheReport.cfm │ │ │ ├── cachebox.css │ │ │ ├── cachebox.js │ │ │ └── images │ │ │ ├── bg-glass.png │ │ │ └── bg-glass2.png │ ├── store │ │ ├── BlackHoleStore.cfc │ │ ├── ConcurrentSoftReferenceStore.cfc │ │ ├── ConcurrentStore.cfc │ │ ├── DiskStore.cfc │ │ ├── IObjectStore.cfc │ │ ├── JDBCStore.cfc │ │ ├── indexers │ │ │ └── JDBCMetadataIndexer.cfc │ │ └── sql │ │ │ ├── JDBCStore-MSSQL.sql │ │ │ ├── JDBCStore-MySQL.sql │ │ │ └── JDBCStore-Postgres.sql │ └── util │ │ ├── CacheStats.cfc │ │ ├── ElementCleaner.cfc │ │ ├── EventURLFacade.cfc │ │ ├── ICacheStats.cfc │ │ └── IStats.cfc ├── core │ ├── collections │ │ └── ScopeStorage.cfc │ ├── conversion │ │ ├── CFDocument.cfm │ │ ├── DataMarshaller.cfc │ │ ├── ObjectMarshaller.cfc │ │ └── XMLConverter.cfc │ ├── database │ │ └── SchemaInfo.cfc │ ├── delegates │ │ ├── Async.cfc │ │ ├── DateTime.cfc │ │ ├── Env.cfc │ │ ├── Flow.cfc │ │ ├── JsonUtil.cfc │ │ ├── Population.cfc │ │ └── StringUtil.cfc │ ├── dynamic │ │ ├── BeanPopulator.cfc │ │ ├── MixerUtil.cfc │ │ └── ObjectPopulator.cfc │ ├── events │ │ ├── EventPool.cfc │ │ └── EventPoolManager.cfc │ └── util │ │ ├── BoxLangMappingHelper.cfc │ │ ├── CFMLEngine.cfc │ │ ├── CFMappingHelper.cfc │ │ ├── LuceeMappingHelper.cfc │ │ ├── Util.cfc │ │ └── cffeed.cfm ├── exceptions │ ├── Application.cfm │ ├── BugReport-Public.cfm │ ├── BugReport.cfm │ ├── Whoops.cfm │ ├── css │ │ ├── cbox-debugger.css.cfm │ │ ├── syntaxhighlighter-theme.css │ │ └── whoops.css │ ├── images │ │ └── coldbox-logo.png │ ├── js │ │ ├── coldfusion-brush.js │ │ ├── eva.min.js │ │ ├── javascript-brush.js │ │ ├── sql-brush.js │ │ ├── syntaxhighlighter.js │ │ └── whoops.js │ ├── package-lock.json │ └── package.json ├── ioc │ ├── Builder.cfc │ ├── IInjector.cfc │ ├── IProvider.cfc │ ├── Injector.cfc │ ├── Provider.cfc │ ├── Scopes.cfc │ ├── Types.cfc │ ├── config │ │ ├── Binder.cfc │ │ ├── DefaultBinder.cfc │ │ ├── LogBox.cfc │ │ ├── Mapping.cfc │ │ └── Mixin.cfc │ ├── dsl │ │ ├── CacheBoxDSL.cfc │ │ ├── ColdBoxDSL.cfc │ │ ├── IDSLBuilder.cfc │ │ └── LogBoxDSL.cfc │ ├── license.txt │ ├── readme.md │ └── scopes │ │ ├── CFScopes.cfc │ │ ├── CacheBox.cfc │ │ ├── IScope.cfc │ │ ├── NoScope.cfc │ │ ├── RequestScope.cfc │ │ └── Singleton.cfc ├── logging │ ├── AbstractAppender.cfc │ ├── Layout.cfc │ ├── LogBox.cfc │ ├── LogEvent.cfc │ ├── LogLevels.cfc │ ├── Logger.cfc │ ├── appenders │ │ ├── CFAppender.cfc │ │ ├── ConsoleAppender.cfc │ │ ├── DBAppender.cfc │ │ ├── DummyAppender.cfc │ │ ├── EmailAppender.cfc │ │ ├── FileAppender.cfc │ │ ├── RollingFileAppender.cfc │ │ ├── ScopeAppender.cfc │ │ ├── SocketAppender.cfc │ │ └── TracerAppender.cfc │ ├── config │ │ ├── DefaultConfig.cfc │ │ ├── LogBoxConfig.cfc │ │ └── samples │ │ │ └── Sample.LogBox.cfc │ ├── license.txt │ ├── readme.md │ └── util │ │ └── FileRotator.cfc ├── modules │ └── HTMLHelper │ │ ├── ModuleConfig.cfc │ │ ├── helpers │ │ └── Mixins.cfm │ │ └── models │ │ └── HTMLHelper.cfc ├── remote │ ├── ColdboxProxy.cfc │ └── RemotingUtil.cfc ├── testing │ ├── BaseInterceptorTest.cfc │ ├── BaseModelTest.cfc │ ├── BaseTestCase.cfc │ ├── CustomMatchers.cfc │ ├── VirtualApp.cfc │ └── mock │ │ └── web │ │ ├── MockController.cfc │ │ └── context │ │ └── MockRequestContext.cfc └── web │ ├── Controller.cfc │ ├── ControllerDecorator.cfc │ ├── Renderer.cfc │ ├── RendererEncapsulator.cfm │ ├── config │ ├── ApplicationLoader.cfc │ ├── CacheBox.cfc │ ├── LogBox.cfc │ └── Settings.cfc │ ├── context │ ├── EventHandlerBean.cfc │ ├── ExceptionBean.cfc │ ├── InterceptorState.cfc │ ├── RequestContext.cfc │ ├── RequestContextDecorator.cfc │ └── Response.cfc │ ├── delegates │ ├── AppModes.cfc │ ├── Interceptor.cfc │ ├── Locators.cfc │ ├── Population.cfc │ ├── Rendering.cfc │ ├── Routable.cfc │ └── Settings.cfc │ ├── flash │ ├── AbstractFlashScope.cfc │ ├── ClientFlash.cfc │ ├── ColdboxCacheFlash.cfc │ ├── MockFlash.cfc │ └── SessionFlash.cfc │ ├── routing │ └── Router.cfc │ ├── services │ ├── BaseService.cfc │ ├── HandlerService.cfc │ ├── InterceptorService.cfc │ ├── LoaderService.cfc │ ├── ModuleService.cfc │ ├── RequestService.cfc │ ├── RoutingService.cfc │ └── SchedulerService.cfc │ └── tasks │ ├── ColdBoxScheduledTask.cfc │ └── ColdBoxScheduler.cfc ├── test-harness ├── .cfformat.json ├── .gitignore ├── Application.cfc ├── box.json ├── config │ ├── .htaccess │ ├── Application.cfm │ ├── ApplicationMixins.cfm │ ├── CacheBox.cfc │ ├── Coldbox.cfc │ ├── Router.cfc │ ├── Scheduler.cfc │ ├── WireBox.cfc │ └── modules │ │ ├── cbdebugger.cfc │ │ ├── parentLookup.cfc │ │ └── resourcesTest.bx ├── external │ ├── testHandlers │ │ ├── BaseTest.cfc │ │ ├── TestNoInheritance.cfc │ │ ├── ehTest.cfc │ │ └── forum │ │ │ └── message.cfc │ ├── testLayouts │ │ └── ext.cfm │ ├── testModules │ │ ├── mod1 │ │ │ ├── ModuleConfig.cfc │ │ │ ├── handlers │ │ │ │ └── Home.cfc │ │ │ └── views │ │ │ │ └── home │ │ │ │ └── index.cfm │ │ └── test1 │ │ │ ├── ModuleConfig.cfc │ │ │ ├── handlers │ │ │ └── Home.cfc │ │ │ └── views │ │ │ └── home │ │ │ └── index.cfm │ ├── testModules2 │ │ ├── mod2 │ │ │ ├── ModuleConfig.cfc │ │ │ ├── handlers │ │ │ │ └── Home.cfc │ │ │ └── views │ │ │ │ └── home │ │ │ │ └── index.cfm │ │ └── test1 │ │ │ ├── ModuleConfig.cfc │ │ │ ├── handlers │ │ │ └── Home.cfc │ │ │ └── views │ │ │ └── home │ │ │ └── index.cfm │ └── testViews │ │ └── externalview.cfm ├── favicon.ico ├── handlers │ ├── Subscribers.cfc │ ├── actionRendering.cfc │ ├── admin │ │ └── nested.cfc │ ├── bl.bx │ ├── eventcaching.cfc │ ├── iTest.cfc │ ├── main.cfc │ ├── nolayout.cfc │ ├── orminjection.cfc │ ├── photos.cfc │ ├── proxy.cfc │ ├── rendering.cfc │ ├── restfulHandler.cfc │ ├── restfulHandlerAnnotation.cfc │ ├── sendfiles.cfc │ └── testerror.cfc ├── includes │ ├── coldbox.pdf │ ├── css │ │ └── bootstrap.min.css │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ └── glyphicons-halflings-regular.woff │ ├── helpers │ │ ├── ApplicationHelper.cfm │ │ └── ViewsHelper.cfm │ ├── i18n │ │ ├── i18n_goes_here.txt │ │ ├── main_en_US.properties │ │ ├── main_es_SV.properties │ │ ├── support_en_US.properties │ │ └── support_es_SV.properties │ ├── images │ │ └── ColdBoxLogoSquare_125.png │ ├── js │ │ ├── bootstrap.min.js │ │ └── jquery.1.js │ ├── rev-manifest.json │ └── tags │ │ └── hello.cfm ├── index.cfm ├── interceptors │ ├── Test1.cfc │ └── Test2.cfc ├── layouts │ ├── Main.cfm │ └── Simple.cfm ├── lib │ └── helloworld.jar ├── models │ ├── ControllerDecorator.cfc │ ├── EventHandler.cfc │ ├── LazyModel.cfc │ ├── MyService.cfc │ ├── ObserverModel.cfc │ ├── Photos.cfc │ ├── PhotosService.cfc │ ├── PutStuffHere.txt │ ├── RenderConvention.cfc │ ├── Sample.pdf │ ├── TimeSlotService.cfc │ ├── delegates │ │ ├── Computer.cfc │ │ ├── ComputerShorthand.cfc │ │ ├── Disk.cfc │ │ ├── FlowHelpers.cfc │ │ ├── Memory.cfc │ │ ├── Routable.cfc │ │ ├── Versionable.cfc │ │ └── Worker.cfc │ ├── entities │ │ ├── Abstract.cfc │ │ ├── Category.cfc │ │ ├── EventHandler.cfc │ │ ├── Role.cfc │ │ └── User.cfc │ ├── formBean.cfc │ ├── formImplicitBean.cfc │ ├── ioc │ │ ├── FactorySimple.cfc │ │ ├── ImplicitTest.cfc │ │ ├── ProviderTest.cfc │ │ ├── ScriptNotation.cfc │ │ ├── Simple.cfc │ │ ├── SimpleConstructors.cfc │ │ ├── category │ │ │ ├── CategoryBean.cfc │ │ │ ├── CategoryDAO.cfc │ │ │ └── CategoryService.cfc │ │ ├── inheritance │ │ │ ├── Abstract.cfc │ │ │ └── Concrete.cfc │ │ ├── mixins │ │ │ ├── mixin1.cfm │ │ │ └── mixin2.cfm │ │ └── product │ │ │ ├── ProductBean.cfc │ │ │ ├── ProductDAO.cfc │ │ │ └── ProductService.cfc │ ├── lib │ │ ├── Config.cfc │ │ ├── ConfigSetter.cfc │ │ └── TestLib.cfc │ ├── myRequestContextDecorator.cfc │ ├── parent │ │ ├── AbstractService.cfc │ │ ├── ConcreteService.cfc │ │ ├── SomeAlphaDAO.cfc │ │ ├── SomeBravoDAO.cfc │ │ ├── SomeCharlieDAO.cfc │ │ └── SomeDeltaDAO.cfc │ ├── testGateway.cfc │ ├── testModel.cfc │ ├── testService.cfc │ └── transientCache │ │ ├── Base.cfc │ │ ├── Derived.cfc │ │ └── SomeSingleton.cfc ├── modules_app │ ├── Inception │ │ ├── ModuleConfig.cfc │ │ ├── handlers │ │ │ └── Home.cfc │ │ ├── modules │ │ │ ├── a-inception │ │ │ │ ├── ModuleConfig.cfc │ │ │ │ ├── handlers │ │ │ │ │ └── Home.cfc │ │ │ │ └── views │ │ │ │ │ └── home │ │ │ │ │ └── index.cfm │ │ │ └── inception-mod1 │ │ │ │ ├── ModuleConfig.cfc │ │ │ │ ├── handlers │ │ │ │ └── Home.cfc │ │ │ │ └── views │ │ │ │ └── home │ │ │ │ └── index.cfm │ │ ├── modules_app │ │ │ ├── api │ │ │ │ ├── ModuleConfig.cfc │ │ │ │ ├── handlers │ │ │ │ │ └── Home.cfc │ │ │ │ └── modules_app │ │ │ │ │ └── v1 │ │ │ │ │ ├── ModuleConfig.cfc │ │ │ │ │ └── handlers │ │ │ │ │ └── Home.cfc │ │ │ └── inception-app1 │ │ │ │ ├── ModuleConfig.cfc │ │ │ │ ├── handlers │ │ │ │ └── Home.cfc │ │ │ │ └── views │ │ │ │ └── home │ │ │ │ └── index.cfm │ │ └── views │ │ │ └── home │ │ │ └── index.cfm │ ├── conventionsTest │ │ ├── ModuleConfig.cfc │ │ ├── helpers │ │ │ └── app.cfm │ │ └── system │ │ │ ├── handlers │ │ │ ├── search.cfc │ │ │ └── test.cfc │ │ │ ├── model │ │ │ ├── Simple.cfc │ │ │ └── conventionsTest.cfc │ │ │ └── views │ │ │ └── test │ │ │ └── index.cfm │ ├── disabledModule │ │ └── ModuleConfig.cfc │ ├── moduleLookup │ │ ├── ModuleConfig.cfc │ │ ├── handlers │ │ │ └── Main.cfc │ │ ├── layouts │ │ │ └── module-level.cfm │ │ └── views │ │ │ └── module-level.cfm │ ├── notActivatedModule │ │ └── ModuleConfig.cfc │ ├── parentLookup │ │ ├── ModuleConfig.cfc │ │ ├── handlers │ │ │ └── Main.cfc │ │ ├── layouts │ │ │ ├── common-level.cfm │ │ │ ├── host-level.cfm │ │ │ └── module-level.cfm │ │ └── views │ │ │ ├── common-level.cfm │ │ │ ├── host-level.cfm │ │ │ └── module-level.cfm │ ├── resourcesTest │ │ ├── ModuleConfig.cfc │ │ ├── config │ │ │ ├── Router.cfc │ │ │ └── Scheduler.cfc │ │ ├── handlers │ │ │ ├── Home.cfc │ │ │ ├── photos.cfc │ │ │ └── usercaching.cfc │ │ ├── models │ │ │ └── PhotosService.cfc │ │ └── views │ │ │ ├── home │ │ │ └── index.cfm │ │ │ └── photos │ │ │ ├── edit.cfm │ │ │ ├── index.cfm │ │ │ ├── new.cfm │ │ │ └── show.cfm │ └── test-bundle │ │ ├── excludedmod │ │ └── ModuleConfig.cfc │ │ ├── layouttest │ │ ├── ModuleConfig.cfc │ │ └── layouts │ │ │ └── simple.cfm │ │ └── test1 │ │ ├── ModuleConfig.cfc │ │ ├── handlers │ │ └── test.cfc │ │ ├── interceptors │ │ └── simple.cfc │ │ ├── layouts │ │ ├── Layout.Main2.cfm │ │ └── test1.cfm │ │ ├── models │ │ └── TestService.cfc │ │ └── views │ │ ├── hello.cfm │ │ ├── test │ │ └── index.cfm │ │ └── test1.cfm ├── remote │ ├── Application.cfc │ ├── Echo.cfc │ └── MyProxy.cfc ├── robots.txt ├── server.json ├── tests │ └── specs │ │ ├── integration │ │ └── photosTest.cfc │ │ └── unit │ │ ├── PhotosServiceTest.cfc │ │ └── PhotosTest.cfc └── views │ ├── _templates │ ├── 404.html │ └── generic_error.cfm │ ├── bl │ ├── index.bxm │ └── indexHelper.bxm │ ├── eventcaching │ └── index.cfm │ ├── iTest │ └── index.cfm │ ├── main │ ├── cachepanel.cfm │ ├── index.cfm │ ├── indexHelper.cfm │ ├── mailcontent.cfm │ ├── mainHelper.cfm │ ├── routeTable.cfm │ ├── routes.cfm │ └── testPrivateActions.cfm │ ├── nolayout │ └── login.cfm │ ├── photos │ ├── edit.cfm │ ├── index.cfm │ ├── new.cfm │ └── show.cfm │ ├── rendering │ ├── index.cfm │ ├── renderingRegions.cfm │ └── withargs.cfm │ ├── simpleview.cfm │ ├── tags │ ├── member.cfm │ └── user.cfm │ ├── testerror │ └── expression.cfm │ ├── transientCacheTests │ └── index.cfm │ └── viewWithArgs.cfm └── tests ├── .cflintrc ├── Application.cfc ├── automation ├── base-test.xml ├── test-cachebox.xml ├── test-coldbox.xml ├── test-logbox.xml ├── test-wirebox.xml └── test.properties ├── index.cfm ├── readme.md ├── resources ├── BaseIntegrationTest.cfc ├── CacheBoxConfigData.cfc ├── ChildClass.cfc ├── ChildInjectorSample.cfc ├── Class1.cfc ├── Class2.cfc ├── Class3.cfc ├── Event.cfc ├── HttpAntRunner.cfc ├── MockInterceptor.cfc ├── RemoteFacade.cfc ├── SampleCacheBox.cfc ├── StandaloneCacheBoxConfig.cfc ├── StandaloneLogBoxConfig.cfc ├── Test.cfc ├── VirtualParentClass.cfc ├── WireBox.cfc ├── base1.cfc ├── coolblog-mssql2012.sql ├── coolblog.sql ├── helloworld.jar ├── javalib │ └── hello.jar ├── logs │ └── logs_here.txt ├── mixins.cfm ├── mixins2.cfm ├── test-module │ ├── ModuleConfig.cfc │ └── models │ │ └── MyModel.cfc └── test1.cfc ├── runner-async.cfm ├── runner-cachebox.cfm ├── runner-core.cfm ├── runner-integration.cfm ├── runner-logbox.cfm ├── runner-wirebox.cfm ├── runner.cfm ├── specs ├── EventHandlerTest.cfc ├── FrameworkSuperTypeTest.cfc ├── InterceptorTest.cfc ├── RestHandlerTest.cfc ├── async │ ├── AsyncManagerSpec.cfc │ ├── BaseAsyncSpec.cfc │ ├── ExecutorServicesSpec.cfc │ ├── executors │ │ └── ExecutorsSpec.cfc │ ├── tasks │ │ ├── ColdBoxScheduledTaskSpec.cfc │ │ ├── ExecutorSpec.cfc │ │ ├── ScheduledExecutorSpec.cfc │ │ ├── ScheduledTaskSpec.cfc │ │ └── SchedulerSpec.cfc │ └── time │ │ ├── DateTimeHelperSpec.cfc │ │ ├── DurationSpec.cfc │ │ ├── PeriodSpec.cfc │ │ └── TimeUnitSpec.cfc ├── cache │ ├── AbstractCacheProviderTest.cfc │ ├── CacheBoxBuildTests.cfc │ ├── CacheBoxStandaloneSpec.cfc │ ├── CacheFactoryTest.cfc │ ├── config │ │ ├── CacheBoxConfigWithDataCFCTest.cfc │ │ └── DefaultConfigurationTest.cfc │ ├── listeners │ │ ├── CacheFactoryListenersTest.cfc │ │ ├── Config.cfc │ │ └── MyListener.cfc │ ├── lucee │ │ └── LuceeUniqueTest.cfc │ ├── policies │ │ ├── AbstractPolicyTest.cfc │ │ ├── FIFOTest.cfc │ │ ├── LFUTest.cfc │ │ ├── LIFOTest.cfc │ │ └── LRUTest.cfc │ ├── providers │ │ ├── BoxLangColdBoxProviderTest.cfc │ │ ├── BoxLangProviderTest.cfc │ │ ├── CFColdBoxProviderTest.cfc │ │ ├── CFProviderTest.cfc │ │ ├── CacheBoxProviderTest.cfc │ │ ├── CacheBoxWithConcurrentStoreTest.cfc │ │ ├── CacheBoxWithDiskSoreTest.cfc │ │ ├── CacheBoxWithJDBCSoreTest.cfc │ │ ├── LuceeColdBoxProviderTest.cfc │ │ ├── LuceeProviderTest.cfc │ │ └── MockProviderTest.cfc │ ├── report │ │ ├── CacheBox.cfc │ │ └── index.cfm │ ├── store │ │ ├── BlackHoleStoreTest.cfc │ │ ├── ConcurrentSoftReferenceStoreTest.cfc │ │ ├── ConcurrentStoreTest.cfc │ │ ├── DiskStoreTest.cfc │ │ ├── JDBCStoreTest.cfc │ │ └── indexers │ │ │ └── JDBCMetadataIndexerTest.cfc │ └── util │ │ ├── CacheStatsTest.cfc │ │ └── EventsURLFacadeTest.cfc ├── core │ ├── collections │ │ └── ScopeStorageTest.cfc │ ├── conversion │ │ └── XMLConverterTest.cfc │ ├── database │ │ └── SchemaInfoTest.cfc │ ├── delegates │ │ ├── EnvSpec.cfc │ │ ├── FlowSpec.cfc │ │ └── PopulationSpec.cfc │ ├── events │ │ ├── EventPoolManagerTest.cfc │ │ └── EventPoolTest.cfc │ └── util │ │ ├── CFMLEngineTest.cfc │ │ └── UtilTest.cfc ├── integration │ ├── CBDelegatesSpec.cfc │ ├── EventCachingSpec.cfc │ ├── EventExecutionsSpec.cfc │ ├── ExecutorRegistrationsSpec.cfc │ ├── MainSpec.cfc │ ├── ModuleSpec.cfc │ ├── RenderingsSpec.cfc │ ├── RestfulHandlersSpec.cfc │ ├── RestfulSpec.cfc │ ├── SubscribersSpec.cfc │ └── WireBoxSpec.cfc ├── ioc │ ├── BuilderTest.cfc │ ├── DelegatorsShorthandSpec.cfc │ ├── DelegatorsSpec.cfc │ ├── InjectorBinderTests.cfc │ ├── InjectorCreationTest.cfc │ ├── InjectorLiveTest.cfc │ ├── InjectorTest.cfc │ ├── ProviderTest.cfc │ ├── aop │ │ ├── MatcherTest.cfc │ │ ├── MethodInvocationTest.cfc │ │ ├── MixerTest.cfc │ │ └── aspects │ │ │ ├── CFTransactionSpec.cfc │ │ │ └── MethodLoggerSpec.cfc │ ├── config │ │ ├── BinderTest.cfc │ │ ├── DefaultBinderTest.cfc │ │ ├── MappingTest.cfc │ │ ├── listeners │ │ │ ├── Config.cfc │ │ │ ├── InjectorListenersTest.cfc │ │ │ └── MyListener.cfc │ │ └── samples │ │ │ ├── InjectorCreationTestsBinder.cfc │ │ │ ├── LogBox.cfc │ │ │ ├── NoScopeBinder.cfc │ │ │ ├── SampleWireBox.cfc │ │ │ ├── TestHarnessBinder.cfc │ │ │ └── WireBox.cfc │ ├── dsl │ │ ├── CacheBoxDSLTest.cfc │ │ ├── ColdBoxDSLTest.cfc │ │ ├── LogBoxDSLTest.cfc │ │ └── MyTestingDSL.cfc │ └── scopes │ │ ├── CFScopesTest.cfc │ │ ├── CacheBoxTest.cfc │ │ ├── RequestScopeTest.cfc │ │ └── SingletonTest.cfc ├── logging │ ├── AbstractAppenderTest.cfc │ ├── ExtraInfo.cfc │ ├── ExtraInfo2.cfc │ ├── LogBoxBuildTests.cfc │ ├── LogBoxEdgeCases.cfc │ ├── LogBoxTest.cfc │ ├── LogBoxVariousTest.cfc │ ├── LogBoxWithDataCFCTest.cfc │ ├── LogEventTest.cfc │ ├── LogLevelsTest.cfc │ ├── LoggerTest.cfc │ ├── MockLayout.cfc │ ├── appenders │ │ ├── CFAppenderTest.cfc │ │ ├── ConsoleAppenderTest.cfc │ │ ├── DBAppenderTest.cfc │ │ ├── EmailAppenderTest.cfc │ │ ├── FileAppenderTest.cfc │ │ ├── RollingFileAppenderTest.cfc │ │ ├── ScopeAppenderTest.cfc │ │ ├── SocketAppenderTest.cfc │ │ └── TracerAppenderTest.cfc │ ├── config │ │ ├── LogBoxConfig.cfc │ │ └── LogBoxConfigTest.cfc │ └── tmp │ │ └── MYFILEAPPENDER.0EFF97B5-1D52-4237-8E4DE53E0D3782F1.zip ├── orm-enabled │ ├── HTMLHelperSpec.cfc │ ├── ObjectPopulatorSpec.cfc │ └── readme.txt ├── remote │ └── coldboxproxytest.cfc ├── testing │ └── BaseInterceptorTest.cfc └── web │ ├── RendererTest.cfc │ ├── context │ ├── RequestContextTest.cfc │ ├── ResponseTest.cfc │ ├── eventhandlerBeanTest.cfc │ ├── exceptionBeanTest.cfc │ ├── interceptorStateTest.cfc │ └── requestContextDecoratorTest.cfc │ ├── controllerTest.cfc │ ├── flash │ ├── AbstractFlashScopeTest.cfc │ ├── ClientFlashTest.cfc │ ├── ColdboxCacheFlashTest.cfc │ ├── MockFlashTest.cfc │ └── SessionFlashTest.cfc │ ├── routing │ ├── RedirectsTest.cfc │ ├── ResourcesTest.cfc │ ├── RouterTest.cfc │ ├── RoutingServiceTest.cfc │ └── SubdomainRoutingTest.cfc │ └── services │ ├── HandlerServiceTest.cfc │ ├── ModuleServiceTest.cfc │ ├── interceptorserviceTest.cfc │ ├── loaderserviceTest.cfc │ └── requestserviceTest.cfc ├── suites ├── async │ └── performance-parallel-tests.cfm ├── eventCachingCollisions │ ├── Application.cfc │ ├── config │ │ ├── .htaccess │ │ ├── Application.cfm │ │ ├── Coldbox.cfc │ │ └── routes.cfm │ ├── handlers │ │ └── general.cfc │ ├── index.cfm │ ├── layouts │ │ ├── Layout.Main.cfm │ │ └── Layout.None.cfm │ ├── runTest.cfm │ └── views │ │ └── slowEvent.cfm ├── loadtests │ ├── 6load │ │ ├── .gitignore │ │ ├── Application.cfc │ │ ├── box.json │ │ ├── config │ │ │ ├── .htaccess │ │ │ ├── Application.cfc │ │ │ ├── CacheBox.cfc │ │ │ ├── Coldbox.cfc │ │ │ ├── Router.cfc │ │ │ ├── Scheduler.cfc │ │ │ └── WireBox.cfc │ │ ├── handlers │ │ │ ├── Main.cfc │ │ │ └── Simple.cfc │ │ ├── includes │ │ │ └── helpers │ │ │ │ └── ApplicationHelper.cfm │ │ ├── index.cfm │ │ ├── layouts │ │ │ └── Main.cfm │ │ ├── server-adobe@2021.json │ │ ├── server.json │ │ └── views │ │ │ ├── Application.cfc │ │ │ ├── main │ │ │ └── index.cfm │ │ │ └── partials │ │ │ ├── p1.cfm │ │ │ ├── p2.cfm │ │ │ └── p3.cfm │ ├── beload │ │ ├── .gitignore │ │ ├── Application.cfc │ │ ├── box.json │ │ ├── config │ │ │ ├── .htaccess │ │ │ ├── Application.cfc │ │ │ ├── CacheBox.cfc │ │ │ ├── Coldbox.cfc │ │ │ ├── Router.cfc │ │ │ ├── Scheduler.cfc │ │ │ └── WireBox.cfc │ │ ├── handlers │ │ │ ├── Main.cfc │ │ │ └── Simple.cfc │ │ ├── includes │ │ │ └── helpers │ │ │ │ └── ApplicationHelper.cfm │ │ ├── index.cfm │ │ ├── layouts │ │ │ └── Main.cfm │ │ ├── server-adobe@2023.json │ │ ├── server-boxlang@1.json │ │ ├── server.json │ │ └── views │ │ │ ├── Application.cfc │ │ │ ├── main │ │ │ └── index.cfm │ │ │ └── partials │ │ │ ├── p1.cfm │ │ │ ├── p2.cfm │ │ │ └── p3.cfm │ ├── box.json │ └── loadtests.jmx └── wirebox │ ├── WireBoxConfig.cfc │ ├── performance.cfm │ └── previous │ ├── .gitignore │ ├── Application.cfc │ ├── box.json │ └── performance.cfm ├── tmp ├── Person.cfc ├── Ref1.cfc ├── Ref2.cfc ├── Test.cfc ├── User.cfc ├── ormTest.cfm └── scribble.cfm └── tools ├── IDEDictionaries ├── Application.bx ├── ColdBox.sublime-completions └── Sublime.bx └── wikidocs └── coreGenerate.cfm /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | 3 | root = true 4 | 5 | [*] 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = false 10 | indent_style = tab 11 | indent_size = 4 12 | tab_width = 4 13 | 14 | [*.yml] 15 | indent_style = space 16 | indent_size = 2 17 | 18 | [*.{md,markdown}] 19 | trim_trailing_whitespace = false 20 | insert_final_newline = false -------------------------------------------------------------------------------- /.env.template: -------------------------------------------------------------------------------- 1 | DB_HOST=127.0.0.1 2 | DB_PORT=3306 3 | DB_USER=root 4 | DB_PASSWORD=mysql 5 | DB_CLASS=com.mysql.jdbc.Driver 6 | DB_BUNDLEVERSION=8.0.19 7 | DB_BUNDLENAME=com.mysql.cj -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.github/CODE_OF_CONDUCT.MD: -------------------------------------------------------------------------------- 1 | # Code of Conduct 2 | 3 | Please see it in our [Contributing Guidelines](../CONTRIBUTING.md#code-of-conduct). 4 | -------------------------------------------------------------------------------- /.github/FUNDING.YML: -------------------------------------------------------------------------------- 1 | patreon: ortussolutions 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/BUG_REPORT.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | --- 5 | 6 | 7 | 8 | ## What are the steps to reproduce this issue? 9 | 10 | 1. … 11 | 2. … 12 | 3. … 13 | 14 | ## What happens? 15 | 16 | … 17 | 18 | ## What were you expecting to happen? 19 | 20 | … 21 | 22 | ## Any logs, error output, etc? 23 | 24 | … 25 | 26 | ## Any other comments? 27 | 28 | … 29 | 30 | ## What versions are you using? 31 | 32 | **Operating System:** … 33 | **Package Version:** … 34 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature Request 3 | about: Request a new feature or enhancement 4 | --- 5 | 6 | 7 | 8 | ## Summary 9 | 10 | 11 | 12 | ## Detailed Description 13 | 14 | 15 | 16 | ## Possible Implementation Ideas 17 | 18 | 19 | -------------------------------------------------------------------------------- /.github/SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | Please see it in our [Contributing Guidelines](../CONTRIBUTING.md#security-vulnerabilities). 4 | -------------------------------------------------------------------------------- /.github/SUPPORT.md: -------------------------------------------------------------------------------- 1 | # Support & Help 2 | 3 | Please see it in our [Contributing Guidelines](../CONTRIBUTING.md#support-questions). 4 | -------------------------------------------------------------------------------- /.github/workflows/cron.yml: -------------------------------------------------------------------------------- 1 | name: Daily Test Run 2 | 3 | on: 4 | schedule: 5 | - cron: '0 0 * * *' # Runs at 00:00 UTC every day 6 | 7 | jobs: 8 | tests: 9 | uses: ./.github/workflows/tests.yml 10 | secrets: inherit 11 | -------------------------------------------------------------------------------- /.github/workflows/lts.yml: -------------------------------------------------------------------------------- 1 | name: ColdBox LTS Flow 2 | 3 | on: 4 | push: 5 | branches: 6 | - "releases/**" 7 | 8 | jobs: 9 | ############################################# 10 | # Tests First baby! We fail, no build :( 11 | ############################################# 12 | tests: 13 | uses: ./.github/workflows/tests.yml 14 | secrets: inherit 15 | 16 | ########################################################################################## 17 | # Format Source Code 18 | ########################################################################################## 19 | format: 20 | name: Code Auto-Formatting 21 | runs-on: ubuntu-24.04 22 | steps: 23 | - uses: actions/checkout@v4 24 | 25 | - name: Auto-format 26 | uses: Ortus-Solutions/commandbox-action@v1.0.3 27 | with: 28 | cmd: run-script format 29 | 30 | - name: Commit Format Changes 31 | uses: stefanzweifel/git-auto-commit-action@v5 32 | with: 33 | commit_message: Apply cfformat changes 34 | push_options: --force 35 | -------------------------------------------------------------------------------- /.github/workflows/pr.yml: -------------------------------------------------------------------------------- 1 | name: Pull Requests 2 | 3 | on: 4 | push: 5 | branches-ignore: 6 | - "main" 7 | - "master" 8 | - "development" 9 | - "releases/**" 10 | pull_request: 11 | branches: 12 | - development 13 | - "releases/**" 14 | 15 | jobs: 16 | tests: 17 | uses: ./.github/workflows/tests.yml 18 | secrets: inherit 19 | 20 | format_check: 21 | name: Checks Source Code Formatting 22 | runs-on: ubuntu-24.04 23 | steps: 24 | - name: Checkout Repository 25 | uses: actions/checkout@v4 26 | 27 | - uses: Ortus-Solutions/commandbox-action@v1.0.2 28 | with: 29 | cmd: run-script format:check 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # OS + IDE 2 | .DS_Store 3 | .project 4 | 5 | # Testing Logs 6 | test-harness/logs/*.log 7 | test-harness/logs 8 | test-harness/test/logs 9 | test-harness/test/specs/integration/logs 10 | testing/cases/logging/tmp 11 | testing/resources/logs/*.log 12 | tests/results/** 13 | tests/automation/results 14 | tests/automation/results-* 15 | tests/logs 16 | tests/suites/loadtests/settings.xml 17 | logs/* 18 | 19 | # Build artifacts 20 | artifacts/* 21 | .artifacts/* 22 | .tmp/* 23 | apidocs/*-APIDocs 24 | build/build.number 25 | build-coldbox 26 | 27 | # Dependencies 28 | .engine/** 29 | testbox/* 30 | apidocs/testbox 31 | apidocs/docbox 32 | system/async/cbproxies 33 | tests/suites/loadtests/logs 34 | test-harness/**/route-visualizer 35 | system/exceptions/node_modules/** 36 | 37 | # Custom Settings 38 | test-harness/config/runtime.properties.cfm 39 | .env 40 | /settings.xml 41 | /.settings/ 42 | grapher/data/** 43 | -------------------------------------------------------------------------------- /.markdownlint.json: -------------------------------------------------------------------------------- 1 | { 2 | "line-length": false, 3 | "single-h1": false, 4 | "no-hard-tabs" : false, 5 | "fenced-code-language" : false, 6 | "no-bare-urls" : false, 7 | "first-line-h1": false, 8 | "no-multiple-blanks": { 9 | "maximum": 2 10 | }, 11 | "no-duplicate-header" : false, 12 | "no-duplicate-heading" : false, 13 | "no-inline-html" : false 14 | } 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "cfml.mappings": [ 3 | { 4 | "logicalPath": "/coldbox", 5 | "directoryPath": ".", 6 | "isPhysicalDirectoryPath" :false 7 | }, 8 | { 9 | "logicalPath": "/testbox", 10 | "directoryPath": "./testbox", 11 | "isPhysicalDirectoryPath" :false 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /.vscode/tasks.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "2.0.0", 3 | "tasks": [ 4 | { 5 | "label": "Run CommandBox Task", 6 | "type": "shell", 7 | "command": "box task run ${relativeFile}", 8 | "group": { 9 | "kind": "build", 10 | "isDefault": true 11 | }, 12 | "presentation": { 13 | "reveal": "always", 14 | "panel": "new" 15 | }, 16 | "problemMatcher": [] 17 | }, 18 | { 19 | "label": "Run TestBox Bundle", 20 | "type": "shell", 21 | "command": "box testbox run bundles=${relativeFile}", 22 | "group": { 23 | "kind": "build", 24 | "isDefault": true 25 | }, 26 | "presentation": { 27 | "reveal": "always", 28 | "panel": "new" 29 | }, 30 | "problemMatcher": [] 31 | } 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /apidocs/Application.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * We use this approach, because if not, we get conflicts with WireBox in COmmandBox. 3 | * So we have to isolate the mapping. 4 | */ 5 | component{ 6 | 7 | this.name = "APIDOCS"; 8 | this.sessionManagement = true; 9 | this.sessionTimeout = createTimeSpan( 0, 0, 1, 0 ); 10 | this.setClientCookies = true; 11 | 12 | // API Root 13 | API_ROOT = getDirectoryFromPath( getCurrentTemplatePath() ); 14 | // App Root 15 | COLDBOX_ROOT = url.keyExists( "root" ) ? url.root : REReplaceNoCase( API_ROOT, "apidocs(\\|\/)$", "" ); 16 | 17 | // Core Mappings 18 | this.mappings[ "/docbox" ] = API_ROOT & "docbox"; 19 | this.mappings[ "/testbox" ] = API_ROOT & "testbox"; 20 | 21 | // Standlone mappings 22 | this.mappings[ "/coldbox" ] = url.keyExists( "root" ) ? url.root & "coldbox" : COLDBOX_ROOT; 23 | this.mappings[ "/cachebox" ] = url.keyExists( "root" ) ? url.root & "cachebox" : COLDBOX_ROOT; 24 | this.mappings[ "/logbox" ] = url.keyExists( "root" ) ? url.root & "logbox" : COLDBOX_ROOT; 25 | this.mappings[ "/wirebox" ] = url.keyExists( "root" ) ? url.root & "wirebox" : COLDBOX_ROOT; 26 | 27 | systemOutput( "**** Mappings #this.mappings.toString()# ", true ); 28 | } 29 | -------------------------------------------------------------------------------- /apidocs/box.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"API Docs", 3 | "version":"1.0.0", 4 | "slug":"module-apidocs", 5 | "dependencies":{ 6 | "docbox":"^3.0.0" 7 | }, 8 | "devDependencies":{ 9 | "testbox":"^4.5.0+5" 10 | }, 11 | "installPaths":{ 12 | "docbox":"docbox/", 13 | "testbox":"testbox/" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /apidocs/cachebox.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | docName = "CacheBox-APIDocs"; 5 | base = expandPath( "/cachebox/system" ); 6 | 7 | // Create the output directory if it doesn't exist 8 | if ( !directoryExists( url.path ) ) { 9 | directoryCreate( url.path ); 10 | } 11 | 12 | docbox = new docbox.DocBox( properties = { 13 | projectTitle = "CacheBox v#url.version#", 14 | outputDir = url.path 15 | } ); 16 | docbox.generate( source=base, mapping="cachebox.system" ); 17 | 18 | 19 | 23 | 24 | 25 |

Done!

26 | Go to Docs! 27 |
28 | -------------------------------------------------------------------------------- /apidocs/coldbox.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | docName = "ColdBox-APIDocs"; 5 | base = expandPath( "/coldbox/system" ); 6 | 7 | // Create the output directory if it doesn't exist 8 | if ( !directoryExists( url.path ) ) { 9 | directoryCreate( url.path ); 10 | } 11 | 12 | docbox = new docbox.DocBox( properties = { 13 | projectTitle = "ColdBox v#url.version#", 14 | outputDir = url.path 15 | } ); 16 | docbox.generate( source=base, mapping="coldbox.system" ); 17 | 18 | 19 | 23 | 24 | 25 |

Done!

26 | Go to Docs! 27 |
28 | -------------------------------------------------------------------------------- /apidocs/logbox.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | docName = "logbox-APIDocs"; 5 | base = expandPath( "/logbox/system" ); 6 | 7 | // Create the output directory if it doesn't exist 8 | if ( !directoryExists( url.path ) ) { 9 | directoryCreate( url.path ); 10 | } 11 | 12 | docbox = new docbox.DocBox( properties = { 13 | projectTitle = "logbox v#url.version#", 14 | outputDir = url.path 15 | } ); 16 | docbox.generate( source=base, mapping="logbox.system" ); 17 | 18 | 19 | 23 | 24 | 25 |

Done!

26 | Go to Docs! 27 |
28 | -------------------------------------------------------------------------------- /apidocs/wirebox.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | docName = "wirebox-APIDocs"; 5 | base = expandPath( "/wirebox/system" ); 6 | 7 | // Create the output directory if it doesn't exist 8 | if ( !directoryExists( url.path ) ) { 9 | directoryCreate( url.path ); 10 | } 11 | 12 | docbox = new docbox.DocBox( properties = { 13 | projectTitle = "wirebox v#url.version#", 14 | outputDir = url.path 15 | } ); 16 | docbox.generate( source=base, mapping="wirebox.system" ); 17 | 18 | 19 | 23 | 24 | 25 |

Done!

26 | Go to Docs! 27 |
28 | -------------------------------------------------------------------------------- /build/release.boxr: -------------------------------------------------------------------------------- 1 | # This recipe signifies a new release of the module by doing merges and bumps accordingly 2 | 3 | # Check out master and update it locally 4 | !git checkout -f master 5 | !git pull origin master 6 | 7 | # Merge development into it for release 8 | !git merge --no-ff development 9 | 10 | # Push all branches back out to github 11 | !git push origin --all 12 | 13 | # Check development again 14 | !git checkout -f development 15 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | All notable changes to this project will be documented here: and summarized in this file. 4 | 5 | The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), 6 | and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). 7 | 8 | * * * 9 | 10 | ## [Unreleased] 11 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | ******************************************************************************** 2 | Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | www.coldbox.org | www.ortussolutions.com 4 | ******************************************************************************** 5 | ColdBox is open source. However, if you use this product please know that it is bound to the following License. 6 | If you use ColdBox, please make mention of it in your code or web site or add a Powered By Coldbox icon. 7 | 8 | Apache License, Version 2.0 9 | 10 | Copyright Since [2005] [Luis Majano and Ortus Solutions,Corp] 11 | 12 | Licensed under the Apache License, Version 2.0 (the "License"); 13 | you may not use this file except in compliance with the License. 14 | You may obtain a copy of the License at 15 | 16 | http://www.apache.org/licenses/LICENSE-2.0 17 | 18 | Unless required by applicable law or agreed to in writing, software 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | -------------------------------------------------------------------------------- /server-adobe@2023.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"adobe@2023", 4 | "serverHomeDirectory":".engine/adobe2023" 5 | }, 6 | "name":"coldbox-adobe@2023", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"1024", 23 | "javaVersion":"openjdk21_jre" 24 | }, 25 | "cfconfig":{ 26 | "file":".cfconfig.json" 27 | }, 28 | "scripts":{ 29 | "onServerInstall":"cfpm install caching,zip,orm,mysql,postgresql,sqlserver,document,feed,mail,debugger" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /server-adobe@2025.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"adobe@2025", 4 | "serverHomeDirectory":".engine/adobe2025" 5 | }, 6 | "name":"coldbox-adobe@2025", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"1024", 23 | "javaVersion":"openjdk21_jre" 24 | }, 25 | "cfconfig":{ 26 | "file":".cfconfig.json" 27 | }, 28 | "scripts":{ 29 | "onServerInstall":"cfpm install caching,zip,orm,mysql,postgresql,sqlserver,document,feed,mail,debugger" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /server-boxlang-cfml@1.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"boxlang@1", 4 | "serverHomeDirectory":".engine/boxlang-cfml-1" 5 | }, 6 | "name":"coldbox-boxlang-cfml-1", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"1024", 23 | "javaVersion":"openjdk21_jre", 24 | "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999" 25 | }, 26 | "cfconfig":{ 27 | "file":".cfconfig.json" 28 | }, 29 | "env":{ 30 | "BOXLANG_DEBUG":true 31 | }, 32 | "scripts":{ 33 | "onServerInitialInstall":"install bx-mail,bx-pdf,bx-mysql,bx-compat-cfml,bx-esapi,bx-orm@be --noSave" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /server-boxlang-cfml@be.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"boxlang@be", 4 | "serverHomeDirectory":".engine/boxlang-cfml-be" 5 | }, 6 | "name":"coldbox-boxlang-cfml-be", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"1024", 23 | "javaVersion":"openjdk21_jre", 24 | "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999" 25 | }, 26 | "cfconfig":{ 27 | "file":".cfconfig.json" 28 | }, 29 | "env":{ 30 | "BOXLANG_DEBUG":true 31 | }, 32 | "scripts":{ 33 | "onServerInitialInstall":"install bx-mail,bx-pdf,bx-mysql,bx-compat-cfml,bx-esapi,bx-orm@be --noSave" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /server-boxlang@1.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"boxlang@be", 4 | "serverHomeDirectory":".engine/boxlang" 5 | }, 6 | "name":"coldbox-boxlang", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"768", 23 | "args":"-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=9999" 24 | }, 25 | "cfconfig":{ 26 | "file":".cfconfig.json" 27 | }, 28 | "env":{ 29 | "BOXLANG_DEBUG":true 30 | }, 31 | "scripts":{ 32 | "onServerInitialInstall":"install bx-mail,bx-pdf,bx-mysql,bx-esapi,bx-orm@be --noSave" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /server-lucee@5.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"lucee@5", 4 | "serverHomeDirectory":".engine/lucee5" 5 | }, 6 | "name":"coldbox-lucee@5", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"1024", 23 | "javaVersion":"openjdk11_jre" 24 | }, 25 | "cfconfig":{ 26 | "file":".cfconfig.json" 27 | }, 28 | "env":{ 29 | "lucee-extensions":"D062D72F-F8A2-46F0-8CBC91325B2F067B" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /server-lucee@6.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"lucee@6", 4 | "serverHomeDirectory":".engine/lucee6" 5 | }, 6 | "name":"coldbox-lucee@6", 7 | "force":true, 8 | "openBrowser":false, 9 | "web":{ 10 | "directoryBrowsing":true, 11 | "http":{ 12 | "port":"8599" 13 | }, 14 | "rewrites":{ 15 | "enable":true 16 | }, 17 | "aliases":{ 18 | "/coldbox":"./" 19 | } 20 | }, 21 | "JVM":{ 22 | "heapSize":"1024", 23 | "javaVersion":"openjdk21_jre" 24 | }, 25 | "cfconfig":{ 26 | "file":".cfconfig.json" 27 | }, 28 | "env":{ 29 | "lucee-extensions":"D062D72F-F8A2-46F0-8CBC91325B2F067B" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /system/Application.cfm: -------------------------------------------------------------------------------- 1 |  9 | Not Permitted. 10 | 11 | -------------------------------------------------------------------------------- /system/aop/MethodInterceptor.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Our AOP Method Interceptor Interface 6 | */ 7 | interface { 8 | 9 | /** 10 | * Invoke an AOP method invocation 11 | * 12 | * @invocation The invocation object 13 | * @invocation.doc_generic coldbox.system.aop.methodInvocation 14 | */ 15 | function invokeMethod( required invocation ) output="false"; 16 | 17 | } 18 | -------------------------------------------------------------------------------- /system/aop/tmp/generationPath.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/system/aop/tmp/generationPath.txt -------------------------------------------------------------------------------- /system/cache/config/LogBox.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * ---- 5 | * The logging configuration object for CacheBox Standalone version. 6 | * You can make changes here to determine how CacheBox logs information. 7 | */ 8 | component { 9 | 10 | /** 11 | * Configure logBox 12 | */ 13 | function configure(){ 14 | variables.logBox = { 15 | // Define Appenders 16 | appenders : { console : { class : "ConsoleAppender" } }, 17 | // Root Logger 18 | root : { levelmax : "INFO", appenders : "*" } 19 | }; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /system/cache/license.txt: -------------------------------------------------------------------------------- 1 | ******************************************************************************** 2 | Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | www.ortussolutions.com 4 | ******************************************************************************** 5 | ColdBox is open source. However, if you use this product please know that it is bound to the following License. 6 | If you use ColdBox, please make mention of it in your code or web site or add a Powered By Coldbox icon. 7 | 8 | Apache License, Version 2.0 9 | 10 | Copyright [2007] [Luis Majano and Ortus Solutions,Corp] 11 | 12 | Licensed under the Apache License, Version 2.0 (the "License"); 13 | you may not use this file except in compliance with the License. 14 | You may obtain a copy of the License at 15 | 16 | http://www.apache.org/licenses/LICENSE-2.0 17 | 18 | Unless required by applicable law or agreed to in writing, software 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | -------------------------------------------------------------------------------- /system/cache/policies/FIFO.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * ---- 5 | * This is a FIFO eviction Policy meaning that the first object placed on cache 6 | * will be the first one to come out. 7 | * 8 | * More information can be found here: 9 | * http://en.wikipedia.org/wiki/FIFO 10 | */ 11 | component extends="coldbox.system.cache.policies.AbstractEvictionPolicy" { 12 | 13 | /** 14 | * Constructor 15 | * 16 | * @cacheProvider The associated cache provider of type: coldbox.system.cache.providers.ICacheProvider" doc_generic="coldbox.system.cache.providers.ICacheProvider 17 | */ 18 | FIFO function init( required any cacheProvider ){ 19 | super.init( arguments.cacheProvider ); 20 | 21 | return this; 22 | } 23 | 24 | /** 25 | * Execute the policy 26 | */ 27 | void function execute(){ 28 | // Get searchable index 29 | try { 30 | var index = getAssociatedCache().getObjectStore().getSortedKeys( "created", "numeric", "asc" ); 31 | // process evictions 32 | processEvictions( index ); 33 | } catch ( Any e ) { 34 | getLogger().error( "Error sorting via store indexer #e.message# #e.detail# #e.stackTrace#." ); 35 | } 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /system/cache/policies/IEvictionPolicy.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * ---- 5 | * 6 | * CacheBox Eviction policy interface 7 | */ 8 | interface { 9 | 10 | /** 11 | * Execute the eviction policy on the associated cache 12 | */ 13 | void function execute(); 14 | 15 | /** 16 | * Get the Associated Cache Provider of type: coldbox.system.cache.providers.ICacheProvider 17 | * 18 | * @return coldbox.system.cache.providers.ICacheProvider 19 | */ 20 | any function getAssociatedCache(); 21 | 22 | } 23 | -------------------------------------------------------------------------------- /system/cache/report/skins/default/images/bg-glass.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/system/cache/report/skins/default/images/bg-glass.png -------------------------------------------------------------------------------- /system/cache/report/skins/default/images/bg-glass2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/system/cache/report/skins/default/images/bg-glass2.png -------------------------------------------------------------------------------- /system/cache/store/sql/JDBCStore-MySQL.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE `cacheBox` ( 2 | `id` varchar(100) NOT NULL, 3 | `objectKey` varchar(255) NOT NULL, 4 | `objectValue` longtext NOT NULL, 5 | `hits` int(11) NOT NULL DEFAULT '1', 6 | `timeout` int(11) NOT NULL, 7 | `lastAccessTimeout` int(11) NOT NULL, 8 | `created` datetime NOT NULL, 9 | `lastAccessed` datetime NOT NULL, 10 | `isExpired` tinyint(4) NOT NULL DEFAULT '0', 11 | `isSimple` tinyint(4) NOT NULL DEFAULT '1', 12 | PRIMARY KEY (`id`), 13 | KEY `hits` (`hits`), 14 | KEY `created` (`created`), 15 | KEY `lastAccessed` (`lastAccessed`), 16 | KEY `timeout` (`timeout`), 17 | KEY `isExpired` (`isExpired`) 18 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -------------------------------------------------------------------------------- /system/cache/store/sql/JDBCStore-Postgres.sql: -------------------------------------------------------------------------------- 1 | CREATE TABLE cachebox ( 2 | id VARCHAR(100) NOT NULL, 3 | objectKey VARCHAR(255) NOT NULL, 4 | objectValue text NOT NULL, 5 | hits integer NOT NULL DEFAULT '1', 6 | timeout integer NOT NULL, 7 | lastAccessTimeout integer NOT NULL, 8 | created timestamp NOT NULL, 9 | lastAccessed timestamp NOT NULL, 10 | isExpired boolean NOT NULL DEFAULT true, 11 | isSimple boolean NOT NULL DEFAULT false, 12 | PRIMARY KEY (id) 13 | ) 14 | CREATE INDEX created 15 | ON cachebox 16 | USING btree 17 | (created); 18 | CREATE INDEX hits 19 | ON cachebox 20 | USING btree 21 | (hits); 22 | CREATE INDEX "isExpired" 23 | ON cachebox 24 | USING btree 25 | (isexpired); 26 | CREATE INDEX "lastAccessed" 27 | ON cachebox 28 | USING btree 29 | (lastaccessed); 30 | CREATE INDEX timeout 31 | ON cachebox 32 | USING btree 33 | (timeout); -------------------------------------------------------------------------------- /system/cache/util/IStats.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * 6 | * The main interface for a CacheBox cache provider statistics object 7 | * 8 | * @author Luis Majano 9 | */ 10 | interface { 11 | 12 | /** 13 | * Get the cache's performance ratio 14 | */ 15 | numeric function getCachePerformanceRatio(); 16 | 17 | /** 18 | * Get the associated cache's live object count 19 | */ 20 | numeric function getObjectCount(); 21 | 22 | /** 23 | * Clear the stats 24 | * 25 | * @return IStats 26 | */ 27 | function clearStatistics(); 28 | 29 | /** 30 | * Get the total cache's garbage collections 31 | */ 32 | numeric function getGarbageCollections(); 33 | 34 | /** 35 | * Get the total cache's eviction count 36 | */ 37 | numeric function getEvictionCount(); 38 | 39 | /** 40 | * Get the total cache's hits 41 | */ 42 | numeric function getHits(); 43 | 44 | /** 45 | * Get the total cache's misses 46 | */ 47 | numeric function getMisses(); 48 | 49 | /** 50 | * Get the date/time of the last reap the cache did 51 | * 52 | * @return date/time or empty 53 | */ 54 | function getLastReapDatetime(); 55 | 56 | } 57 | -------------------------------------------------------------------------------- /system/core/conversion/CFDocument.cfm: -------------------------------------------------------------------------------- 1 | 2 | #arguments.data# 3 | -------------------------------------------------------------------------------- /system/core/delegates/Async.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This delegate is useful to interact with the AsyncManager and most used functionality 3 | */ 4 | component singleton { 5 | 6 | property 7 | name ="asyncManager" 8 | inject ="wirebox:asyncManager" 9 | delegate="newFuture,arrayRange"; 10 | 11 | /** 12 | * Return the ColdBox Async Manager instance so you can do some async or parallel programming 13 | * 14 | * @return coldbox.system.async.AsyncManager 15 | */ 16 | function async(){ 17 | return variables.asyncManager; 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /system/core/delegates/DateTime.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This delegate is useful to interact with the coldbox.system.async.time.DateTimeHelper as your date time helper 3 | */ 4 | component singleton { 5 | 6 | property 7 | name ="dateTimeHelper" 8 | inject="coldbox.system.async.time.DateTimeHelper" 9 | delegate; 10 | 11 | } 12 | -------------------------------------------------------------------------------- /system/core/delegates/JsonUtil.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This delegate is useful to deal with opinionated json conversion for integration with JS libraries and more. 3 | */ 4 | component singleton { 5 | 6 | property 7 | name ="util" 8 | inject ="coldbox.system.core.util.Util" 9 | delegate="toJson,prettyJson,toPrettyJson"; 10 | 11 | /** 12 | * This function allows you to serialize simple or complex data so it can be used within HTML Attributes. 13 | * 14 | * @data The simple or complex data to bind to an HTML Attribute 15 | */ 16 | function forAttribute( required data ) cbMethod{ 17 | arguments.data = ( isSimpleValue( arguments.data ) ? arguments.data : toJson( arguments.data ) ); 18 | return encodeForHTMLAttribute( arguments.data ); 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /system/core/dynamic/BeanPopulator.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * @deprecated DO NOT USE 3 | */ 4 | component extends="ObjectPopulator" { 5 | 6 | property name="log" inject="logBox:logger:{this}"; 7 | 8 | function onDIComplete(){ 9 | log.warn( "The BeanPopulator object has been deprecated. Please do not use!" ); 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /system/core/util/cffeed.cfm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /system/exceptions/Application.cfm: -------------------------------------------------------------------------------- 1 |  9 | Not Permitted. 10 | 11 | -------------------------------------------------------------------------------- /system/exceptions/images/coldbox-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/system/exceptions/images/coldbox-logo.png -------------------------------------------------------------------------------- /system/exceptions/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "requires": true, 3 | "lockfileVersion": 1, 4 | "dependencies": { 5 | "eva-icons": { 6 | "version": "1.1.3", 7 | "resolved": "https://registry.npmjs.org/eva-icons/-/eva-icons-1.1.3.tgz", 8 | "integrity": "sha512-QBSEWNbEx1H0numXP1qgxKVCZHonRaky5ft4pGzQBcO4cy7mEja6TuJ8rc7BqX2pmkvetVQWKDH+DK/8y7GTag==" 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /system/exceptions/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "coldbox-bug-reporting", 3 | "version": "1.0.0", 4 | "description": "ColdBox Bug Reporting", 5 | "main": "index.js", 6 | "dependencies": { 7 | "eva-icons": "^1.1.3" 8 | }, 9 | "devDependencies": {}, 10 | "scripts": { 11 | }, 12 | "author": "Ortus Solutions, Corp" 13 | } 14 | -------------------------------------------------------------------------------- /system/ioc/IProvider.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * A WireBox provider object that retrieves objects by using the provider pattern. 6 | **/ 7 | interface { 8 | 9 | /** 10 | * Get the provided object 11 | */ 12 | public any function $get(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /system/ioc/Scopes.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * A scope enum CFC that gives you the scopes that WireBox uses by default 6 | **/ 7 | component { 8 | 9 | // DECLARED SCOPES 10 | this.NOSCOPE = "NoScope"; 11 | this.PROTOTYPE = "NoScope"; 12 | this.SINGLETON = "singleton"; 13 | this.SESSION = "session"; 14 | this.APPLICATION = "application"; 15 | this.REQUEST = "request"; 16 | this.SERVER = "server"; 17 | this.CACHEBOX = "cachebox"; 18 | 19 | /** 20 | * Verify if an incoming scope is valid 21 | * 22 | * @scope The scope to check 23 | */ 24 | boolean function isValidScope( required scope ){ 25 | return structKeyArray( this ).findNoCase( arguments.scope ) ? true : false; 26 | } 27 | 28 | /** 29 | * Get all valid scopes as an array 30 | */ 31 | array function getValidScopes(){ 32 | return this 33 | .filter( function( key, value ){ 34 | return isSimpleValue( arguments.value ); 35 | } ) 36 | .keyArray(); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /system/ioc/Types.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * A lookup static CFC that gives you the instantiation types that WireBox can talk to. 6 | **/ 7 | component { 8 | 9 | // DECLARED WIREBOX INSTANTIATION TYPES 10 | this.CFC = "cfc"; 11 | this.JAVA = "java"; 12 | this.WEBSERVICE = "webservice"; 13 | this.RSS = "rss"; 14 | this.DSL = "dsl"; 15 | this.CONSTANT = "constant"; 16 | this.FACTORY = "factory"; 17 | this.PROVIDER = "provider"; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /system/ioc/config/LogBox.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * The logging configuration object for WireBox Standalone version. 6 | * You can make changes here to determine how WireBox logs information. For more 7 | * information about logBox visit: https://logbox.ortusbooks.com 8 | */ 9 | component { 10 | 11 | /** 12 | * Configure logBox 13 | */ 14 | function configure(){ 15 | logBox = { 16 | // Define Appenders 17 | appenders : { console : { class : "ConsoleAppender" } }, 18 | // Root Logger 19 | root : { levelmax : "INFO", appenders : "*" } 20 | }; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /system/ioc/config/Mixin.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function $init( required mixins ){ 4 | // Include the mixins 5 | for ( var thisMixin in arguments.mixins ) { 6 | thisMixin = trim( thisMixin ); 7 | if ( listLast( thisMixin, "." ) != "cfm" ) { 8 | include "#thisMixin#.cfm"; 9 | } else { 10 | include "#thisMixin#"; 11 | } 12 | } 13 | 14 | // Expose them 15 | for ( var key in variables ) { 16 | if ( isCustomFunction( variables[ key ] ) AND !structKeyExists( this, key ) ) { 17 | this[ key ] = variables[ key ]; 18 | } 19 | } 20 | 21 | return this; 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /system/ioc/dsl/IDSLBuilder.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * The main interface to produce WireBox namespace DSL Builders 6 | **/ 7 | interface { 8 | 9 | /** 10 | * Configure the DSL Builder for operation and returns itself 11 | * 12 | * @injector The linked WireBox Injector 13 | * @injector.doc_generic coldbox.system.ioc.Injector 14 | * 15 | * @return coldbox.system.ioc.dsl.IDSLBuilder 16 | */ 17 | function init( required injector ); 18 | 19 | /** 20 | * Process an incoming DSL definition and produce an object with it 21 | * 22 | * @definition The injection dsl definition structure to process. Keys: name, dsl 23 | * @targetObject The target object we are building the DSL dependency for. If empty, means we are just requesting building 24 | * @targetID The target ID we are building this dependency for 25 | * 26 | * @return coldbox.system.ioc.dsl.IDSLBuilder 27 | */ 28 | function process( required definition, targetObject, targetID ); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /system/ioc/license.txt: -------------------------------------------------------------------------------- 1 | ******************************************************************************** 2 | Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | www.ortussolutions.com 4 | ******************************************************************************** 5 | ColdBox is open source. However, if you use this product please know that it is bound to the following License. 6 | If you use ColdBox, please make mention of it in your code or web site or add a Powered By Coldbox icon. 7 | 8 | Apache License, Version 2.0 9 | 10 | Copyright [2007] [Luis Majano and Ortus Solutions,Corp] 11 | 12 | Licensed under the Apache License, Version 2.0 (the "License"); 13 | you may not use this file except in compliance with the License. 14 | You may obtain a copy of the License at 15 | 16 | http://www.apache.org/licenses/LICENSE-2.0 17 | 18 | Unless required by applicable law or agreed to in writing, software 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | -------------------------------------------------------------------------------- /system/logging/Layout.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * This is a base layout object that will help you create custom layout's for messages in appenders 6 | **/ 7 | component accessors="true" { 8 | 9 | /** 10 | * The LogBox appender this layout is linked to. 11 | */ 12 | property name="appender"; 13 | 14 | // The log levels enum as a public property 15 | this.logLevels = new coldbox.system.logging.LogLevels(); 16 | // A line Sep Constant, man, wish we had final in CF. 17 | this.LINE_SEP = chr( 13 ) & chr( 10 ); 18 | 19 | /** 20 | * Constructor 21 | * 22 | * @appender The appender this layout is linked to. 23 | */ 24 | function init( required appender ){ 25 | variables.appender = arguments.appender; 26 | return this; 27 | } 28 | 29 | /** 30 | * Format a logging event message into your own format 31 | * 32 | * @logEvent The LogBox logging event object 33 | */ 34 | function format( required logEvent ){ 35 | throw( 36 | message = "You must implement this layout's format() method", 37 | type = "FormatNotImplementedException" 38 | ) 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /system/logging/config/DefaultConfig.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * The default logging configuration for a vanilla LogBox instance 6 | **/ 7 | component { 8 | 9 | /** 10 | * Configure logBox 11 | */ 12 | function configure(){ 13 | logBox = { 14 | // Define Appenders 15 | appenders : { console : { class : "ConsoleAppender" } }, 16 | // Root Logger 17 | root : { levelmax : "INFO", appenders : "*" } 18 | }; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /system/logging/license.txt: -------------------------------------------------------------------------------- 1 | ******************************************************************************** 2 | Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | www.ortussolutions.com 4 | ******************************************************************************** 5 | ColdBox is open source. However, if you use this product please know that it is bound to the following License. 6 | If you use ColdBox, please make mention of it in your code or web site or add a Powered By Coldbox icon. 7 | 8 | Apache License, Version 2.0 9 | 10 | Copyright [2007] [Luis Majano and Ortus Solutions,Corp] 11 | 12 | Licensed under the Apache License, Version 2.0 (the "License"); 13 | you may not use this file except in compliance with the License. 14 | You may obtain a copy of the License at 15 | 16 | http://www.apache.org/licenses/LICENSE-2.0 17 | 18 | Unless required by applicable law or agreed to in writing, software 19 | distributed under the License is distributed on an "AS IS" BASIS, 20 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 21 | See the License for the specific language governing permissions and 22 | limitations under the License. 23 | -------------------------------------------------------------------------------- /system/modules/HTMLHelper/helpers/Mixins.cfm: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Add a js/css asset(s) to the html head section. You can also pass in a list of assets. This method 4 | * keeps track of the loaded assets so they are only loaded once 5 | * 6 | * @asset The asset(s) to load, only js or css files. This can also be a comma delimited list. 7 | */ 8 | string function addAsset( required asset ){ 9 | return getInstance( "@HTMLHelper" ).addAsset( argumentCollection = arguments ); 10 | } 11 | 12 | -------------------------------------------------------------------------------- /system/web/config/LogBox.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * The default ColdBox LogBox configuration object for ColdBox Applications 6 | */ 7 | component { 8 | 9 | /** 10 | * Configure LogBox, that's it! 11 | */ 12 | function configure(){ 13 | logBox = {}; 14 | 15 | // Define Appenders 16 | logBox.appenders = { console : { class : "ConsoleAppender" } }; 17 | 18 | // Root Logger 19 | logBox.root = { levelmax : "INFO", appenders : "*" }; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /system/web/context/RequestContextDecorator.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Base class used to decorate ColdBox MVC Application Controller 6 | */ 7 | component 8 | extends ="coldbox.system.web.context.RequestContext" 9 | accessors ="true" 10 | serializable="false" 11 | { 12 | 13 | // The original request context 14 | property name="requestContext"; 15 | 16 | /** 17 | * Constructor 18 | */ 19 | RequestContextDecorator function init( required oContext, required controller ){ 20 | // Set the memento state 21 | setMemento( arguments.oContext.getMemento() ); 22 | // Set Controller 23 | instance.controller = arguments.controller; 24 | // Composite the original context 25 | variables.requestContext = arguments.oContext; 26 | 27 | return this; 28 | } 29 | 30 | /** 31 | * Override to provide a pseudo-constructor for your decorator 32 | */ 33 | function configure(){ 34 | } 35 | 36 | /** 37 | * Get original controller 38 | */ 39 | function getController(){ 40 | return instance.controller; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /system/web/delegates/AppModes.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Provides the ability to know in which modes your application is via the delegated methods 6 | */ 7 | component singleton { 8 | 9 | // DI 10 | property 11 | name ="controller" 12 | inject ="coldbox" 13 | delegate="inDebugMode,isDevelopment,isProduction,isTesting"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /system/web/delegates/Interceptor.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Provides ability to listen, announce interception events 6 | */ 7 | component singleton { 8 | 9 | // DI 10 | property 11 | name ="interceptorService" 12 | inject ="coldbox:interceptorService" 13 | delegate="listen,announce"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /system/web/delegates/Locators.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Provides ability to locate files and/or directories within a ColdBox application 6 | */ 7 | component singleton { 8 | 9 | // DI 10 | property 11 | name ="controller" 12 | inject ="coldbox" 13 | delegate="locateFilePath,locateDirectoryPath"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /system/web/delegates/Rendering.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Provides rendering delegation capabilities. 6 | * Technically you can delegate to the Renderer, but this is a simplified interface 7 | */ 8 | component accessors="true" singleton { 9 | 10 | // DI 11 | property 12 | name ="renderer" 13 | inject ="Renderer@coldbox" 14 | delegate="view,layout,externalView"; 15 | 16 | } 17 | -------------------------------------------------------------------------------- /system/web/delegates/Routable.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Provides ColdBox routing capabilities 6 | */ 7 | component { 8 | 9 | // DI 10 | property 11 | name ="context" 12 | inject ="coldbox:requestContext" 13 | delegate="getHTMLBaseURL,getHTMLBasePath,getSESBasePath,getSESBaseURL,route,buildLink,getPath,getUrl"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /system/web/delegates/Settings.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Provides ColdBox/Module settings capabilities in delegated objects 6 | */ 7 | component accessors="true" singleton { 8 | 9 | // DI 10 | property 11 | name ="controller" 12 | inject ="coldbox" 13 | delegate="getSetting,getColdBoxSetting,settingExists,setSetting,getModuleSettings,getModuleConfig,getUserSessionIdentifier"; 14 | 15 | } 16 | -------------------------------------------------------------------------------- /system/web/services/BaseService.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 3 | * www.ortussolutions.com 4 | * --- 5 | * Base Helper class for all ColdBox services 6 | */ 7 | component accessors="true" { 8 | 9 | /** 10 | * ColdBox Controller 11 | */ 12 | property name="controller"; 13 | 14 | // ************************ INTERNAL EVENTS ************************// 15 | 16 | /** 17 | * Once configuration file loads 18 | */ 19 | function onConfigurationLoad(){ 20 | } 21 | 22 | /** 23 | * On framework shutdown 24 | */ 25 | function onShutdown(){ 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /test-harness/.gitignore: -------------------------------------------------------------------------------- 1 | # Dependencies 2 | modules/* 3 | logs/ 4 | -------------------------------------------------------------------------------- /test-harness/box.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies":{ 3 | "cborm":"^4.3.2+75", 4 | "cbvalidation":"^4.1.0+30", 5 | "route-visualizer":"^1.2.0+4" 6 | }, 7 | "devDependencies":{ 8 | "cbdebugger":"^3.5.0+64" 9 | }, 10 | "installPaths":{ 11 | "cbdebugger":"modules/cbdebugger/", 12 | "cborm":"modules/cborm/", 13 | "cbvalidation":"modules/cbvalidation/", 14 | "route-visualizer":"modules/route-visualizer/" 15 | }, 16 | "scripts":{ 17 | "format":"cfformat run config/,external/,handlers/,interceptors/,models/,remote/,tests/,models/", 18 | "format:watch":"cfformat watch **/*.cfc ./.cfformat.json" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test-harness/config/.htaccess: -------------------------------------------------------------------------------- 1 | #apache access file to protect the config.xml.cfm file. Delete this if you do not use apache. 2 | authtype Basic 3 | deny from all 4 | Options -Indexes -------------------------------------------------------------------------------- /test-harness/config/Application.cfm: -------------------------------------------------------------------------------- 1 |  9 | -------------------------------------------------------------------------------- /test-harness/config/ApplicationMixins.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | // Lucee 5 Cache Definition 4 | this.cache.connections[ "default" ] = { 5 | "class" = 'lucee.runtime.cache.ram.RamCache' 6 | , "storage" = false 7 | , "custom" = { 8 | "timeToIdleSeconds" = "0", 9 | "timeToLiveSeconds" = "0" 10 | } 11 | , "default" = 'object' 12 | }; 13 | 14 | // ORM Settings For Testing 15 | this.ormEnabled = true; 16 | this.datasource = "coolblog"; 17 | this.ormSettings = { 18 | cfclocation = "/cbtestharness/models/entities", 19 | logSQL = false, 20 | flushAtRequestEnd = false, 21 | autoManageSession = false, 22 | eventHandling = true, 23 | eventHandler = "cbtestharness.models.entities.EventHandler", 24 | dialect = 'MySQL' 25 | }; 26 | 27 | 28 | -------------------------------------------------------------------------------- /test-harness/config/modules/parentLookup.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | function configure(){ 4 | return {}; 5 | } 6 | } -------------------------------------------------------------------------------- /test-harness/config/modules/resourcesTest.bx: -------------------------------------------------------------------------------- 1 | class{ 2 | 3 | function configure(){ 4 | return {}; 5 | } 6 | 7 | } -------------------------------------------------------------------------------- /test-harness/external/testHandlers/BaseTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | var rc = Event.getCollection(); 5 | Event.setView( "vwExternalHandler" ); 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testHandlers/TestNoInheritance.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | var rc = Event.getCollection(); 5 | Event.setView( "vwExternalHandler" ); 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testHandlers/ehTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | var rc = Event.getCollection(); 5 | Event.setView( "vwExternalHandler" ); 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testHandlers/forum/message.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | var rc = Event.getCollection(); 5 | Event.setView( "vwExternalHandler" ); 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testModules/mod1/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testModules/mod1/views/home/index.cfm: -------------------------------------------------------------------------------- 1 | 

Welcome to my cool module page!

-------------------------------------------------------------------------------- /test-harness/external/testModules/test1/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testModules/test1/views/home/index.cfm: -------------------------------------------------------------------------------- 1 | 

Welcome to my cool module page!

-------------------------------------------------------------------------------- /test-harness/external/testModules2/mod2/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testModules2/mod2/views/home/index.cfm: -------------------------------------------------------------------------------- 1 | 

Welcome to my cool module page!

-------------------------------------------------------------------------------- /test-harness/external/testModules2/test1/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test-harness/external/testModules2/test1/views/home/index.cfm: -------------------------------------------------------------------------------- 1 | 

Welcome to my cool module page!

-------------------------------------------------------------------------------- /test-harness/external/testViews/externalview.cfm: -------------------------------------------------------------------------------- 1 |  2 |

I am an external view rendered at #now()# with #createUUID()#

3 |
-------------------------------------------------------------------------------- /test-harness/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/favicon.ico -------------------------------------------------------------------------------- /test-harness/handlers/Subscribers.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.RestHandler"{ 2 | 3 | function create( event, rc, prc ) { 4 | runEvent( 5 | event = "subscribers.save", 6 | prePostExempt = true, // required for private events 7 | private = true, 8 | eventArguments = { new: true } 9 | ); 10 | } 11 | 12 | private function save( event, rc, prc, required boolean new ) { 13 | throw( "Validation Failed", "ValidationException", "Details go here" ); 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test-harness/handlers/actionRendering.cfc: -------------------------------------------------------------------------------- 1 | component renderdata="json" { 2 | 3 | data = [ 4 | { 5 | when : now(), 6 | id : createUUID(), 7 | name : "luis" 8 | }, 9 | { 10 | when : now(), 11 | id : createUUID(), 12 | name : "lucas" 13 | }, 14 | { 15 | when : now(), 16 | id : createUUID(), 17 | name : "fernando" 18 | }, 19 | { 20 | when : now(), 21 | id : createUUID(), 22 | name : "majano" 23 | } 24 | ]; 25 | 26 | // Default Action return via JSON, ColdBox does native JSON when returning complex objects 27 | function index( event, rc, prc ){ 28 | return data; 29 | } 30 | 31 | function asXML( event, rc, prc ) renderdata="xml"{ 32 | return data; 33 | } 34 | 35 | function asJSON( event, rc, prc ) renderdata="json"{ 36 | return data; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /test-harness/handlers/admin/nested.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My Event Handler Hint 3 | */ 4 | component extends="coldbox.system.EventHandler" { 5 | 6 | /** 7 | * Index 8 | */ 9 | any function index( event, rc, prc ){ 10 | return "nested admin"; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test-harness/handlers/bl.bx: -------------------------------------------------------------------------------- 1 | class{ 2 | 3 | property name="asyncManager" inject="coldbox:asyncManager"; 4 | 5 | this.allowedMethods = { "index" : "GET" }; 6 | 7 | function index( event, rc, prc ){ 8 | prc.welcomeMessage = "Welcome to BoxLang!"; 9 | 10 | log.info( "Executing index action", { name : "Test", when : now(), arcs = [1,2,3,4], test : "Message goes here" } ); 11 | 12 | getInstance( "LazyModel" ).getUtil(); 13 | getInstance( "LazyModel" ).getUtil2(); 14 | getInstance( "LazyModel" ).getLazyData(); 15 | getInstance( "LazyModel" ).getLazyData2(); 16 | 17 | unless( false, function(){ 18 | prc.whenFalse = true; 19 | }) 20 | .when( true, function(){ 21 | prc.when = true; 22 | }); 23 | 24 | event.setView( "bl/index" ); 25 | } 26 | 27 | /** 28 | * actionAllowedMethod 29 | */ 30 | function actionAllowedMethod( event, rc, prc ) allowedMethods="GET"{ 31 | return "Executed!"; 32 | } 33 | 34 | // Do something 35 | function doSomething( event, rc, prc ){ 36 | relocate( "bl.index" ); 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /test-harness/handlers/nolayout.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | function preHandler( event, rc, prc ) { 4 | event.noLayout(); 5 | } 6 | 7 | function login( event, rc, prc ) { 8 | event.setView( "nolayout/login" ); 9 | } 10 | 11 | } -------------------------------------------------------------------------------- /test-harness/handlers/proxy.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function getIntroArraysCollection( event, rc, prc ){ 4 | rc.myarray = [ 1, 2, 3, 4, 5 ]; 5 | } 6 | 7 | function getIntroArrays( event, rc, prc ){ 8 | return [ 1, 2, 3 ]; 9 | } 10 | 11 | function getIntroStructure( event, rc, prc ){ 12 | return { name : "Luis", when : now() }; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /test-harness/handlers/restfulHandlerAnnotation.cfc: -------------------------------------------------------------------------------- 1 | component resthandler { 2 | 3 | function index( event, rc, prc ){ 4 | event.getResponse().setData( "hello" ); 5 | } 6 | 7 | function returnData( event, rc, prc ){ 8 | return "hola"; 9 | } 10 | 11 | function renderData( event, rc, prc ){ 12 | event.renderData( type = "json", data = [ "luis majano" ] ); 13 | } 14 | 15 | function setView( event, rc, prc ){ 16 | event.setView( "simpleview" ); 17 | } 18 | 19 | function invalidCredentials( event, rc, prc ){ 20 | throw( type = "InvalidCredentials" ); 21 | } 22 | 23 | function ValidationException( event, rc, prc ){ 24 | throw( type = "ValidationException" ); 25 | } 26 | 27 | function EntityNotFound( event, rc, prc ){ 28 | throw( type = "EntityNotFound" ); 29 | } 30 | 31 | function RecordNotFound( event, rc, prc ){ 32 | throw( type = "RecordNotFound" ); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /test-harness/handlers/sendfiles.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My Event Handler Hint 3 | */ 4 | component extends="coldbox.system.EventHandler" { 5 | 6 | /** 7 | * Index 8 | */ 9 | any function index( event, rc, prc ){ 10 | event.sendFile( file = expandPath( "/cbtestharness/robots.txt" ), name = "MyRobots" ); 11 | } 12 | 13 | /** 14 | * Index 15 | */ 16 | any function binary( event, rc, prc ){ 17 | event.sendFile( 18 | file = fileReadBinary( expandPath( "/cbtestharness/includes/coldbox.pdf" ) ), 19 | name = "coldbox", 20 | extension = "pdf" 21 | ); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /test-harness/handlers/testerror.cfc: -------------------------------------------------------------------------------- 1 | component output="false" { 2 | 3 | /** 4 | * Test error actions 🙃 5 | * Esto es para probar utf8 mañana ümlau 6 | */ 7 | function index( event, rc, prc ){ 8 | rc.nullTest = javacast( "null", "" ); 9 | prc.nullTest = javacast( "null", "" ); 10 | if( rc.core ?: false ){ 11 | setSetting( 12 | "customErrorTemplate", 13 | "/coldbox/system/exceptions/BugReport.cfm" 14 | ); 15 | } 16 | if( rc.new ?: true ){ 17 | setSetting( 18 | "customErrorTemplate", 19 | "/coldbox/system/exceptions/Whoops.cfm" 20 | ); 21 | } 22 | //queryExecute( "select test from users where id = :id", { id : 0} ); 23 | // testing coldbox exception bean, this line will throw error 24 | event.getValuesss( "random" ); 25 | return; 26 | } 27 | 28 | function expression( event, rc, prc ){ 29 | event.setView( "testerror/expression" ); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /test-harness/includes/coldbox.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/includes/coldbox.pdf -------------------------------------------------------------------------------- /test-harness/includes/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/includes/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /test-harness/includes/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/includes/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /test-harness/includes/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/includes/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /test-harness/includes/helpers/ApplicationHelper.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | function sayHello(){ 4 | return "Hello!!!"; 5 | } 6 | -------------------------------------------------------------------------------- /test-harness/includes/helpers/ViewsHelper.cfm: -------------------------------------------------------------------------------- 1 | 2 | function printDate(){ 3 | return dateformat( now(), "medium" ) & " " & timeFormat( now(), "medium" ); 4 | } 5 | -------------------------------------------------------------------------------- /test-harness/includes/i18n/i18n_goes_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/includes/i18n/i18n_goes_here.txt -------------------------------------------------------------------------------- /test-harness/includes/i18n/main_en_US.properties: -------------------------------------------------------------------------------- 1 | welcomemessage=Welcome to ColdBox 2 | homebutton=Home 3 | helloworld=Hello World 4 | intromessage=This is my introduction message. -------------------------------------------------------------------------------- /test-harness/includes/i18n/main_es_SV.properties: -------------------------------------------------------------------------------- 1 | welcomemessage=Bienvenidos a ColdBox 2 | homebutton=Casa 3 | helloworld=Hola Mundo 4 | intromessage=Este es mi mensaje de introduccion. -------------------------------------------------------------------------------- /test-harness/includes/i18n/support_en_US.properties: -------------------------------------------------------------------------------- 1 | 2 | helptext = Help Me from Support 3 | 4 | home = Home 5 | -------------------------------------------------------------------------------- /test-harness/includes/i18n/support_es_SV.properties: -------------------------------------------------------------------------------- 1 | 2 | helptext = Ayudame desde Soporte 3 | 4 | home = Casa 5 | -------------------------------------------------------------------------------- /test-harness/includes/images/ColdBoxLogoSquare_125.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/includes/images/ColdBoxLogoSquare_125.png -------------------------------------------------------------------------------- /test-harness/includes/rev-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "includes/js/jquery.js": "/includes/js/jquery.1.js", 3 | "includes/js/bootstrap.min.js": "/includes/js/bootstrap.min.js", 4 | "/test-harness/modules_app/contentbox-custom/_modules/cctManager/includes/js/cctManager.js": "/modules_app/contentbox-custom/_modules/cctManager/includes/js/cctManager.8613ac4947980152a2e0.js" 5 | } 6 | -------------------------------------------------------------------------------- /test-harness/includes/tags/hello.cfm: -------------------------------------------------------------------------------- 1 | #now()# From a tag 2 | -------------------------------------------------------------------------------- /test-harness/index.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-harness/interceptors/Test1.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * I am a new interceptor 3 | */ 4 | component{ 5 | 6 | void function configure(){ 7 | } 8 | 9 | function preProcess( event, data, rc, prc ){ 10 | // Test Delayed loading of interceptor helpers 11 | appHelper(); 12 | // Placed here for testing purposes 13 | flash.put( "name", "luis" ); 14 | } 15 | 16 | function onRequestCapture( event, data, rc, prc ){ 17 | log.info( "Executing request capture" ); 18 | } 19 | 20 | function afterRendererInit( event, data, rc, prc ){ 21 | log.info( "Executing render init" ); 22 | arguments.data.this.bdd = true; 23 | } 24 | 25 | void function onCustomState( event, struct data, rc ){ 26 | var threadName = createObject( "java", "java.lang.Thread" ) 27 | .currentThread() 28 | .getThreadGroup() 29 | .getName(); 30 | sleep( 1000 ); 31 | log.info( "Executing onCustomState on Test1 by #threadName#" ); 32 | } 33 | 34 | void function postProcess( event, data ) asyncPriority="high" async{ 35 | var threadName = createObject( "java", "java.lang.Thread" ) 36 | .currentThread() 37 | .getThreadGroup() 38 | .getName(); 39 | log.info( "---> I am executing in a different thread (#threadName#)! Booya!" ); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /test-harness/interceptors/Test2.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * I am a new interceptor 3 | */ 4 | component { 5 | 6 | void function configure(){ 7 | } 8 | 9 | void function onCustomState( event, struct data, rc ){ 10 | var threadName = createObject( "java", "java.lang.Thread" ) 11 | .currentThread() 12 | .getThreadGroup() 13 | .getName(); 14 | sleep( 2500 ); 15 | log.info( "Executing onCustomState on Test2 by #threadname#" ); 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /test-harness/layouts/Simple.cfm: -------------------------------------------------------------------------------- 1 | 2 | #html.doctype()# 3 | 4 | 5 |

Simple Layout

6 |
7 | #view()# 8 | 9 |
10 | -------------------------------------------------------------------------------- /test-harness/lib/helloworld.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/lib/helloworld.jar -------------------------------------------------------------------------------- /test-harness/models/EventHandler.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | ******************************************************************************** 3 | Copyright Since 2005 ColdBox Framework by Luis Majano and Ortus Solutions, Corp 4 | www.coldbox.org | www.luismajano.com | www.ortussolutions.com 5 | ******************************************************************************** 6 | 7 | Author : Luis Majano 8 | Date : 10/16/2007 9 | Description : 10 | A ColdBox Enabled Hibernate Event Handler that ties to the ColdBox proxy for ColdBox Operations. 11 | 12 | */ 13 | component { 14 | 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test-harness/models/LazyModel.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * I am a lazy object 3 | */ 4 | component accessors="true" singleton{ 5 | 6 | // Lazy Properties by Convention 7 | property name="util" lazy; 8 | property name="lazyData" lazyNoLock; 9 | 10 | // Lazy Properties by Explicit Name 11 | property name="util2" lazy="constructUtil"; 12 | property name="lazyData2" lazyNoLock="constructData"; 13 | 14 | function buildUtil(){ 15 | return "Utility Built at #now()#"; 16 | } 17 | function buildLazyData(){ 18 | return { 19 | name : "lazy", now : now() 20 | }; 21 | } 22 | function constructUtil(){ 23 | return buildUtil(); 24 | } 25 | function constructData(){ 26 | return buildLazyData(); 27 | } 28 | 29 | /** 30 | * Constructor 31 | */ 32 | function init(){ 33 | return this; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /test-harness/models/MyService.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | function isLogin(){ 8 | return false; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /test-harness/models/ObserverModel.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * I am a lazy object 3 | */ 4 | component accessors="true" singleton{ 5 | 6 | // Observed properties 7 | property name="data" observed; 8 | property name="data2" observed="myObserver"; 9 | 10 | property name="log"; 11 | 12 | /** 13 | * Constructor 14 | */ 15 | function init(){ 16 | variables.log = []; 17 | return this; 18 | } 19 | 20 | function myObserver( newValue, oldValue, property ){ 21 | variables.log.append( "my observer called: #arguments.toSTring()#" ); 22 | } 23 | 24 | function dataObserver( newValue, oldValue, property ){ 25 | variables.log.append( "data observer called: #arguments.toSTring()#" ); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /test-harness/models/Photos.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * I model a photos 3 | */ 4 | component accessors="true" { 5 | 6 | /** 7 | * Constructor 8 | */ 9 | Photos function init(){ 10 | return this; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test-harness/models/PhotosService.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * I manage photos 3 | */ 4 | component singleton accessors="true" { 5 | 6 | // Properties 7 | 8 | 9 | /** 10 | * Constructor 11 | */ 12 | PhotosService function init(){ 13 | return this; 14 | } 15 | 16 | /** 17 | * save 18 | */ 19 | function save(){ 20 | } 21 | 22 | /** 23 | * delete 24 | */ 25 | function delete(){ 26 | } 27 | 28 | /** 29 | * list 30 | */ 31 | function list(){ 32 | } 33 | 34 | /** 35 | * get 36 | */ 37 | function get(){ 38 | } 39 | 40 | function getRandom(){ 41 | return randRange( 1, 1000 ); 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /test-harness/models/PutStuffHere.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/models/PutStuffHere.txt -------------------------------------------------------------------------------- /test-harness/models/RenderConvention.cfc: -------------------------------------------------------------------------------- 1 | component accessors="true" { 2 | 3 | property name="name"; 4 | property name="age"; 5 | property name="cool"; 6 | 7 | function init(){ 8 | return this; 9 | } 10 | 11 | function config( name, age, cool ){ 12 | setName( arguments.name ); 13 | setAge( arguments.age ); 14 | setCool( arguments.cool ); 15 | return this; 16 | } 17 | 18 | function $renderdata(){ 19 | var d = { 20 | n : variables.name, 21 | a : variables.age, 22 | c : variables.cool, 23 | today : now() 24 | }; 25 | 26 | return d.toString(); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /test-harness/models/Sample.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/test-harness/models/Sample.pdf -------------------------------------------------------------------------------- /test-harness/models/TimeSlotService.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /test-harness/models/delegates/Computer.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | // By Convention, prefix is the same as the property name 4 | // memoryRead(), memoryWrite() 5 | property name="memory" inject delegate delegatePrefix; 6 | 7 | // By specific prefix 8 | // memory2Read(), memory2Write() 9 | property name="memory2" inject="Memory" delegate delegatePrefix="memory2"; 10 | 11 | // By specific suffix 12 | // readDisk(), writeDisk() 13 | property name="disk" inject delegate delegateSuffix="disk"; 14 | 15 | // By convention suffix 16 | // readDisk2(), writeDisk2() 17 | property name="disk2" inject="Disk" delegate delegateSuffix; 18 | 19 | // Default Delegate all methods no prefix/suffix 20 | // work(), vacation() 21 | property name="worker" inject delegate; 22 | 23 | // Default Delegate all methods no prefix/suffix 24 | // vacation() 25 | property name="manager" inject="Worker" delegate delegatePrefix delegateExcludes="work"; 26 | 27 | // Delegate only certain methods 28 | // workaholicWork() 29 | property name="workaholic" inject="Worker" delegate="work" delegatePrefix; 30 | 31 | function init(){ 32 | return this; 33 | } 34 | 35 | function getOutput(){ 36 | return "Hola Computadora!"; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /test-harness/models/delegates/ComputerShorthand.cfc: -------------------------------------------------------------------------------- 1 | component 2 | delegates="Memory, FlowHelpers, >Memory, ram2>memory, read(), write() 5 | // Simple: FlowHelpers -> unless(), when() 6 | // Empty Prefix: >Memory -> memoryRead(), memoryWrite() 7 | // Filled Prefix: ram2>Memory -> ram2Read(), ram2Write() 8 | // Empty Suffix: readMemory(), writeMemory() 9 | // Filled Suffix ram readRam(), writeRam() 10 | // Targeted Methods: Worker(vacation) -> vacation() NO work() 11 | 12 | function init(){ 13 | return this; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test-harness/models/delegates/Disk.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | property name="data"; 4 | 5 | function init(){ 6 | variables.data = [ 7 | { id : 1, name = "luis" }, 8 | { id : 2, name = "bob" }, 9 | { id : 3, name = "joe" } 10 | ]; 11 | return this; 12 | } 13 | 14 | function read( index ){ 15 | return variables.data[ arguments.index ]; 16 | } 17 | 18 | function write( data ){ 19 | variables.data.append( arguments.data ); 20 | return this; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /test-harness/models/delegates/Memory.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | property name="data"; 4 | 5 | function init(){ 6 | variables.data = [ 7 | { id : 1, name = "maria" }, 8 | { id : 2, name = "alexia" }, 9 | { id : 3, name = "veronica" } 10 | ]; 11 | return this; 12 | } 13 | 14 | function read( index ){ 15 | return variables.data[ arguments.index ]; 16 | } 17 | 18 | function write( data ){ 19 | variables.data.append( arguments.data ); 20 | return this; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /test-harness/models/delegates/Routable.cfc: -------------------------------------------------------------------------------- 1 | component delegates="Routable@cbDelegates"{ 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /test-harness/models/delegates/Versionable.cfc: -------------------------------------------------------------------------------- 1 | component singleton{ 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | function versionsEnable(){} 8 | function versionsDisable(){} 9 | function versionsisEnabled(){} 10 | function versionslist(){ 11 | return []; 12 | } 13 | function versionsRollback(){ 14 | return "version rollback"; 15 | } 16 | function versionsGet(){ 17 | return "version get"; 18 | } 19 | function versionsRotate(){} 20 | 21 | } 22 | -------------------------------------------------------------------------------- /test-harness/models/delegates/Worker.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | property name="isWorking"; 4 | 5 | function init(){ 6 | variables.isWorking = false; 7 | return this; 8 | } 9 | 10 | function work(){ 11 | variables.isWorking = true; 12 | return this; 13 | } 14 | 15 | function vacation(){ 16 | variables.isWorking = false; 17 | return this; 18 | } 19 | 20 | function sayHello(){ 21 | return $parent.getOutput(); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /test-harness/models/entities/Abstract.cfc: -------------------------------------------------------------------------------- 1 | component mappedSuperClass="true" { 2 | 3 | property 4 | name ="website" 5 | inject ="id:WireBoxURL" 6 | persistent="false"; 7 | property name="testValue" notnull="false"; 8 | 9 | function init(){ 10 | return this; 11 | } 12 | 13 | function getData(){ 14 | return website; 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /test-harness/models/entities/Category.cfc: -------------------------------------------------------------------------------- 1 | component persistent = "true" table = "categories" extends = "Abstract" cachename = "categories" cacheuse = "read-write" datasource = "coolblog"{ 2 | property 3 | name ="catid" 4 | column ="category_id" 5 | fieldType="id" 6 | generator="uuid"; 7 | property name="category" notnull="true"; 8 | property name="description" notnull="true"; 9 | property 10 | name ="modifydate" 11 | insert ="false" 12 | update ="false" 13 | ormtype="timestamp"; 14 | 15 | function init(){ 16 | this.created = now(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /test-harness/models/entities/Role.cfc: -------------------------------------------------------------------------------- 1 | component persistent = "true" table = "roles"{ 2 | 3 | property 4 | name ="roleID" 5 | column ="roleID" 6 | fieldType="id" 7 | generator="native"; 8 | 9 | property name="role"; 10 | 11 | // O2M -> Users 12 | property 13 | name ="users" 14 | singularName="user" 15 | fieldtype ="one-to-many" 16 | type ="array" 17 | lazy ="extra" 18 | cfc ="User" 19 | fkcolumn ="FKRoleID" 20 | inverse ="true" 21 | cascade ="all-delete-orphan"; 22 | 23 | this.population = { exclude : ["roleId"] }; 24 | 25 | } 26 | -------------------------------------------------------------------------------- /test-harness/models/ioc/FactorySimple.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | var o = createObject( "component", "Simple" ).init(); 13 | 14 | o.name = arguments.name; 15 | o.cool = arguments.cool; 16 | 17 | return o; 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test-harness/models/ioc/ImplicitTest.cfc: -------------------------------------------------------------------------------- 1 | component name="implicitTest" accessors=true { 2 | 3 | property name="testProperty"; 4 | 5 | } 6 | -------------------------------------------------------------------------------- /test-harness/models/ioc/ProviderTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test-harness/models/ioc/ScriptNotation.cfc: -------------------------------------------------------------------------------- 1 | component accessors="true" { 2 | 3 | property name="productService" inject=""; 4 | 5 | } 6 | -------------------------------------------------------------------------------- /test-harness/models/ioc/Simple.cfc: -------------------------------------------------------------------------------- 1 | component accessors = "true"{ 2 | function init(){ 3 | return this; 4 | } 5 | 6 | function getName(){ 7 | return "Simple"; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test-harness/models/ioc/SimpleConstructors.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | this.constant = arguments.constant; 19 | this.constant2 = arguments.constant2; 20 | this.dslVar = arguments.dslVar; 21 | this.modelVar = arguments.modelVar; 22 | 23 | if ( structKeyExists( Arguments, "modelVarNonRequired" ) ) { 24 | this.modelVarNonRequired = arguments.modelVarNonRequired; 25 | } 26 | 27 | return this; 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /test-harness/models/ioc/category/CategoryBean.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /test-harness/models/ioc/category/CategoryDAO.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /test-harness/models/ioc/inheritance/Abstract.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | property name="website" inject="id:WireBoxURL"; 4 | 5 | function init(){ 6 | return this; 7 | } 8 | 9 | function getData(){ 10 | return website; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /test-harness/models/ioc/inheritance/Concrete.cfc: -------------------------------------------------------------------------------- 1 | component extends="Abstract" { 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /test-harness/models/ioc/mixins/mixin1.cfm: -------------------------------------------------------------------------------- 1 | 2 | public function printDateTime(d,f="full"){ 3 | return dateFormat(d,f) & " " & timeFormat(d,f); 4 | } 5 | public function myEcho(e){ return e; } 6 | -------------------------------------------------------------------------------- /test-harness/models/ioc/mixins/mixin2.cfm: -------------------------------------------------------------------------------- 1 | 2 | public function printDateTime2(d,f="full"){ 3 | return dateFormat(d,f) & " " & timeFormat(d,f); 4 | } 5 | public function myEcho2(e){ return e; } 6 | -------------------------------------------------------------------------------- /test-harness/models/ioc/product/ProductBean.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | variables.ProductDAO = ProdDAO; 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /test-harness/models/ioc/product/ProductDAO.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /test-harness/models/ioc/product/ProductService.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | variables.productDAO = arguments.productDAO; 8 | 9 | return this; 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /test-harness/models/lib/Config.cfc: -------------------------------------------------------------------------------- 1 |  8 | 9 | 10 | 11 | 12 | 13 | 14 | instance = structNew(); 15 | structAppend( instance, arguments ); 16 | 17 | return this; 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /test-harness/models/parent/AbstractService.cfc: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | function init(){ 7 | return this; 8 | } 9 | 10 | 11 | -------------------------------------------------------------------------------- /test-harness/models/parent/ConcreteService.cfc: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | function init(){ 13 | return this; 14 | } 15 | 16 | 17 | -------------------------------------------------------------------------------- /test-harness/models/parent/SomeAlphaDAO.cfc: -------------------------------------------------------------------------------- 1 | 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-harness/models/parent/SomeBravoDAO.cfc: -------------------------------------------------------------------------------- 1 | 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-harness/models/parent/SomeCharlieDAO.cfc: -------------------------------------------------------------------------------- 1 | 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-harness/models/parent/SomeDeltaDAO.cfc: -------------------------------------------------------------------------------- 1 | 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /test-harness/models/testGateway.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /test-harness/models/testService.cfc: -------------------------------------------------------------------------------- 1 | component accessors = true{ 2 | 3 | property name="testGateway" inject="testGateway"; 4 | 5 | function init(){ 6 | variables.testGateway = 0; 7 | return this; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /test-harness/models/transientCache/Base.cfc: -------------------------------------------------------------------------------- 1 | component threadsafe{ 2 | 3 | property name="wirebox" inject="wirebox"; 4 | property name="someSingleton" inject="SomeSingleton"; 5 | 6 | /** 7 | * Init 8 | * @wirebox.inject wirebox 9 | */ 10 | public function init( required wirebox ) { 11 | return this; 12 | } 13 | 14 | public function basefoo() { 15 | return someSingleton.doSomeWork(); // ~1/20 chance that someSingleton is null 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /test-harness/models/transientCache/Derived.cfc: -------------------------------------------------------------------------------- 1 | component extends="Base" threadsafe{ 2 | 3 | /** 4 | * Init 5 | * @wirebox.inject wirebox 6 | */ 7 | public function init( 8 | required wirebox, 9 | ) { 10 | SUPER.init( argumentCollection = arguments ); 11 | return this; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /test-harness/models/transientCache/SomeSingleton.cfc: -------------------------------------------------------------------------------- 1 | component singleton { 2 | function doSomeWork() { return 42; } 3 | } 4 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | function index( event, rc, prc ){ 7 | event.setView( "home/index" ); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules/a-inception/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | function index( event, rc, prc ){ 7 | event.setView( "home/index" ); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules/a-inception/views/home/index.cfm: -------------------------------------------------------------------------------- 1 |

Welcome to my inception child module page!

-------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules/inception-mod1/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | function index( event, rc, prc ){ 7 | event.setView( "home/index" ); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules/inception-mod1/views/home/index.cfm: -------------------------------------------------------------------------------- 1 |

Welcome to my inception child module page!

-------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules_app/api/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | function index( event, rc, prc ){ 7 | return "API Module"; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules_app/api/modules_app/v1/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | function index( event, rc, prc ){ 7 | return "API V1 Module: #event.route( "home@v1" )#"; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules_app/inception-app1/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | function index( event, rc, prc ){ 7 | event.setView( "home/index" ); 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /test-harness/modules_app/Inception/modules_app/inception-app1/views/home/index.cfm: -------------------------------------------------------------------------------- 1 |

Welcome to my inception via modules_app child module page!

-------------------------------------------------------------------------------- /test-harness/modules_app/Inception/views/home/index.cfm: -------------------------------------------------------------------------------- 1 |

Welcome to my main inception module page!

-------------------------------------------------------------------------------- /test-harness/modules_app/conventionsTest/helpers/app.cfm: -------------------------------------------------------------------------------- 1 | 2 | function appHelper(){ 3 | return "hello from module app helper"; 4 | } 5 | -------------------------------------------------------------------------------- /test-harness/modules_app/conventionsTest/system/handlers/search.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My Event Handler Hint 3 | */ 4 | component extends="coldbox.system.EventHandler" { 5 | 6 | /** 7 | * Index 8 | */ 9 | any function index( event, rc, prc ){ 10 | event.setHTTPHeader( name = "response", value = "index" ); 11 | return "index"; 12 | } 13 | 14 | /** 15 | * options 16 | */ 17 | any function options( event, rc, prc ){ 18 | return "options"; 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /test-harness/modules_app/conventionsTest/system/handlers/test.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function index( event, rc, prc ){ 4 | var simple = getInstance( "Simple@MyConventionsTest" ); 5 | rc.data = simple.getData(); 6 | event.setView( "test/index" ); 7 | } 8 | 9 | } 10 | -------------------------------------------------------------------------------- /test-harness/modules_app/conventionsTest/system/model/Simple.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /test-harness/modules_app/conventionsTest/system/model/conventionsTest.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | function echo(){ 8 | return "Conventions test module export"; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /test-harness/modules_app/conventionsTest/system/views/test/index.cfm: -------------------------------------------------------------------------------- 1 |  2 |

Welcome to my test Module

3 | 4 | 5 |

Application Helpers

6 | #appHelper()# 7 |
-------------------------------------------------------------------------------- /test-harness/modules_app/moduleLookup/ModuleConfig.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | // Module Properties 3 | this.title = "Module Lookup"; 4 | this.author = "Luis Majano"; 5 | this.webURL = "http://www.coldbox.org"; 6 | this.description = "A module-first lookup"; 7 | this.version = "1.0"; 8 | this.viewParentLookup = false; 9 | this.layoutParentLookup = false; 10 | this.entryPoint = "moduleLookup"; 11 | 12 | /** 13 | * Configure the ForgeBox Module 14 | */ 15 | function configure(){ 16 | settings = { version : "0.1" }; 17 | 18 | // SES Routes ORDER MATTERS 19 | routes = [ 20 | { 21 | pattern : "/", 22 | handler : "main", 23 | action : "index" 24 | }, 25 | { 26 | pattern : ":handler/:action" 27 | } 28 | ]; 29 | } 30 | 31 | /** 32 | * Called when the module is activated and application has loaded 33 | */ 34 | function onLoad(){ 35 | if ( controller.settingExists( "sesBaseURL" ) ) { 36 | this.entryPoint = "moduleLookup:main"; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test-harness/modules_app/moduleLookup/handlers/Main.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My Event Handler Hint 3 | */ 4 | component extends="coldbox.system.EventHandler"{ 5 | 6 | /** 7 | * Index 8 | */ 9 | any function index( event, rc, prc ){ 10 | event.paramValue( "layout", "module-level" ); 11 | event.paramValue( "view", "module-level" ); 12 | event.setLayout( rc.layout ); 13 | event.setView( rc.view ); 14 | } 15 | 16 | function onInvalidEvent( event, rc, prc ){ 17 | event.renderData( data = "

Invalid Module Page

", statusCode = 404 ); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /test-harness/modules_app/moduleLookup/layouts/module-level.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ColdBox 7 | 8 | 9 | 10 |

This is a module level layout (module-level)

11 | #view()# 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /test-harness/modules_app/moduleLookup/views/module-level.cfm: -------------------------------------------------------------------------------- 1 |  2 |

This is a module level view (module-level)

-------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/ModuleConfig.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | // Module Properties 3 | this.title = "Parent Lookup"; 4 | this.author = "Luis Majano"; 5 | this.webURL = "http://www.coldbox.org"; 6 | this.description = "A parent-first lookup"; 7 | this.version = "1.0"; 8 | this.viewParentLookup = true; 9 | this.layoutParentLookup = true; 10 | this.entryPoint = "parentLookup"; 11 | 12 | /** 13 | * Configure the ForgeBox Module 14 | */ 15 | function configure(){ 16 | settings = { version : "0.1" }; 17 | 18 | // SES Routes ORDER MATTERS 19 | routes = [ 20 | { 21 | pattern : "/", 22 | handler : "main", 23 | action : "index" 24 | } 25 | ]; 26 | } 27 | 28 | /** 29 | * Called when the module is activated and application has loaded 30 | */ 31 | function onLoad(){ 32 | if ( controller.settingExists( "sesBaseURL" ) ) { 33 | this.entryPoint = "parentLookup:main"; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/handlers/Main.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | var rc = event.getCollection(); 5 | event.paramValue( "layout", "module-level" ); 6 | event.paramValue( "view", "module-level" ); 7 | event.setLayout( rc.layout ); 8 | event.setView( rc.view ); 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/layouts/common-level.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ColdBox 7 | 8 | 9 | 10 |

This is a common level layout (module-level)

11 | #view()# 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/layouts/host-level.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ColdBox 7 | 8 | 9 | 10 |

This is a host level layout (module-level)

11 | #view()# 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/layouts/module-level.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | ColdBox 7 | 8 | 9 | 10 |

This is a module level layout (module-level)

11 | #view()# 12 | 13 | 14 |
15 | -------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/views/common-level.cfm: -------------------------------------------------------------------------------- 1 |  2 |

This is a common level view (module-level)

-------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/views/host-level.cfm: -------------------------------------------------------------------------------- 1 |  2 |

This is a host level view (module-level)

-------------------------------------------------------------------------------- /test-harness/modules_app/parentLookup/views/module-level.cfm: -------------------------------------------------------------------------------- 1 |  2 |

This is a module level view (module-level)

-------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/config/Router.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function configure(){ 4 | // Module Entry Point 5 | route( "/", "home.index" ); 6 | 7 | // SES Resources 8 | resources( "photos" ); 9 | resources( "users" ); 10 | 11 | // Conventions based routing 12 | route( ":handler/:action?" ).end(); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/config/Scheduler.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | property name="photosService" inject="PhotosService"; 4 | 5 | function configure(){ 6 | 7 | task( "photoNumbers" ) 8 | .call( function(){ 9 | var random = variables.photosService.getRandom(); 10 | writeDump( var="xxxxxxx> Photo numbers: #random#", output="console" ); 11 | return random; 12 | } ) 13 | .every( 15, "seconds" ) 14 | .delay( 60, "seconds" ) 15 | .onEnvironment( "development" ); 16 | 17 | } 18 | 19 | } -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/handlers/Home.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * A normal ColdBox Event Handler 3 | */ 4 | component { 5 | 6 | property name="executor" inject="executor:resourcesPool"; 7 | property name="resourcesPool" inject="executor"; 8 | 9 | function index( event, rc, prc ){ 10 | log.info( "Executor injected: #executor.getName()#" ); 11 | log.info( "Executor injected: #resourcesPool.getName()#" ); 12 | event.setView( "home/index" ); 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/handlers/usercaching.cfc: -------------------------------------------------------------------------------- 1 | component output = "false" singleton{ 2 | /** 3 | * clear all event caching for tests. 4 | */ 5 | function clearAll( event, rc, prc ){ 6 | getCache( "template" ).clearEvent( "usercaching" ); 7 | return cacheKeys( argumentCollection = arguments ); 8 | } 9 | 10 | function clearWithQueryString( event, rc, prc ){ 11 | getCache( "template" ).clearEvent( "usercaching.index", rc.qs ?: "" ); 12 | return cacheKeys( argumentCollection = arguments ); 13 | } 14 | 15 | function clearPartial( event, rc, prc ){ 16 | getCache( "template" ).clearEvent( "user" ); 17 | return cacheKeys( argumentCollection = arguments ); 18 | } 19 | 20 | // Default Action 21 | function index( event, rc, prc ) cache="true" cacheTimeout="10"{ 22 | prc.data = [ 23 | { id : createUUID(), name : "luis" }, 24 | { id : createUUID(), name : "lucas" }, 25 | { id : createUUID(), name : "fernando" } 26 | ]; 27 | 28 | return prc.data 29 | } 30 | 31 | function cacheKeys( event, rc, prc ){ 32 | var keys = { 33 | "template" : getCache( "template" ).getKeys(), 34 | "default" : getCache( "default" ).getKeys() 35 | }; 36 | 37 | return keys; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/models/PhotosService.cfc: -------------------------------------------------------------------------------- 1 | component singleton{ 2 | 3 | function init(){ 4 | variables.data = [ 5 | { "id" : createUUID(), "title" : "hola.png" }, 6 | { "id" : createUUID(), "title" : "tests.png" }, 7 | { "id" : createUUID(), "title" : "asdfasd.png" } 8 | ]; 9 | return this; 10 | } 11 | 12 | function list(){ 13 | return variables.data; 14 | } 15 | 16 | } 17 | -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/views/home/index.cfm: -------------------------------------------------------------------------------- 1 |

Welcome to my cool module page!

2 | -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/views/photos/edit.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Edit a photos

3 | 4 | 5 |
-------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/views/photos/index.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Photos

3 |

Here is a resources of photos

4 | 5 | #html.table( data : prc.photos, class="table table-striped" )# 6 |
7 | -------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/views/photos/new.cfm: -------------------------------------------------------------------------------- 1 | 2 |

New photos

3 | 4 | 5 |
-------------------------------------------------------------------------------- /test-harness/modules_app/resourcesTest/views/photos/show.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Showing Photo #rc.id#

3 | 4 | 5 | 6 |
-------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/excludedmod/ModuleConfig.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | // Module Properties 4 | this.title = "Excluded Mod"; 5 | this.author = "Luis Majano"; 6 | this.webURL = "http://www.coldbox.org"; 7 | this.description = "An excluded module"; 8 | this.version = "1.0.0"; 9 | // If true, looks for views in the parent first, if not found, then in the module. Else vice-versa 10 | this.viewParentLookup = true; 11 | // If true, looks for layouts in the parent first, if not found, then in module. Else vice-versa 12 | this.layoutParentLookup = true; 13 | this.entryPoint = "excludedmod"; 14 | // CFML Mapping for this module, the path will be the module root. If empty, none is registered. 15 | 16 | function configure(){ 17 | // parent settings 18 | parentSettings = {}; 19 | 20 | // module settings - stored in modules.name.settings 21 | settings = {}; 22 | 23 | // SES Routes 24 | routes = [ { pattern : "/:handler/:action?" } ]; 25 | 26 | // Interceptor Config 27 | interceptorSettings = {}; 28 | // All declared interceptor 29 | interceptors = []; 30 | } 31 | 32 | function onLoad(){ 33 | } 34 | 35 | function onUnload(){ 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/layouttest/layouts/simple.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Test Layout 6 | 12 | 13 | 14 |

Module 'Layout Test' Layout

15 | #view(view=arguments.view)# 16 | 17 | 18 | -------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/handlers/test.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | any function index( event, rc, prc ){ 4 | event.setView( "test/index" ); 5 | } 6 | 7 | any function index2( event, rc, prc ){ 8 | event.setView( view = "test/index", layout = "test1" ); 9 | } 10 | 11 | any function index3( event, rc, prc ){ 12 | event.setLayout( name = "simple", module = "layouttest" ); 13 | event.setView( view = "hello" ); 14 | } 15 | 16 | any function namespaceModel( event, rc, prc ){ 17 | var oModel = getInstance( "TestService@test1" ); 18 | return oModel.sayHello(); 19 | } 20 | 21 | any function cfmlMapping( event, rc, prc ){ 22 | var service = new cbModuleTest1.models.TestService(); 23 | return service.sayHello(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/layouts/Layout.Main2.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | <cfoutput>#controller.getColdBoxSetting("Codename")# #controller.getColdBoxSetting("Version")#</cfoutput> 7 | 8 | 9 | 10 |

Module Layout

11 | #view()# 12 | 13 | 14 | -------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/layouts/test1.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Test Layout 6 | 7 | 8 | 9 |

An Awesome Test1 Module Layout

10 | #view(view=arguments.view,module="test1")# 11 | 12 | 13 | -------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/models/TestService.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function init(){ 4 | return this; 5 | } 6 | 7 | function sayHello(){ 8 | return "Hola Brother!"; 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/views/hello.cfm: -------------------------------------------------------------------------------- 1 | 

Hello

2 | 3 | Current Layout: #event.getCurrentLayout()#
4 | Module layout: #event.getCurrentLayoutModule()#
5 | 6 | 7 |
-------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/views/test/index.cfm: -------------------------------------------------------------------------------- 1 |  2 |

Welcome to my test Module

3 |
-------------------------------------------------------------------------------- /test-harness/modules_app/test-bundle/test1/views/test1.cfm: -------------------------------------------------------------------------------- 1 | A cool module view at #now()# -------------------------------------------------------------------------------- /test-harness/remote/Application.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | 4 | } 5 | -------------------------------------------------------------------------------- /test-harness/remote/Echo.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | string function echo() access="remote"{ 4 | return "hello"; 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /test-harness/remote/MyProxy.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.remote.ColdboxProxy"{ 2 | 3 | remote string function echo(){ 4 | return "hello"; 5 | } 6 | 7 | remote string function yourRemoteCall() { 8 | // Set the event to execute 9 | arguments.event = ""; 10 | 11 | // Call to process a coldbox event cycle, always check the results as they might not exist. 12 | var results = super.process( argumentCollection = arguments ); 13 | 14 | if( !isNull( results ) ){ 15 | return results; 16 | } 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /test-harness/robots.txt: -------------------------------------------------------------------------------- 1 |  2 | User-agent: Slurp 3 | Crawl-delay: 100 4 | Disallow: 5 | 6 | User-agent: gsa-crawler-www 7 | Crawl-delay: 100 8 | 9 | User-agent: Googlebot 10 | Crawl-delay: 100 11 | 12 | User-agent: Mediapartners-Google 13 | Disallow: 14 | 15 | User-agent: Yahoo-NewsCrawler 16 | Disallow: 17 | 18 | User-Agent: msnbot 19 | Crawl-delay: 100 20 | Disallow: 21 | 22 | User-Agent: * 23 | Disallow: /config/ 24 | Disallow: /handlers/ 25 | Disallow: /includes/ 26 | Disallow: /interceptors/ 27 | Disallow: /layouts/ 28 | Disallow: /logs/ 29 | Disallow: /models/ 30 | Disallow: /views/ 31 | Allow: / -------------------------------------------------------------------------------- /test-harness/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "web":{ 3 | "rewrites":{ 4 | "enable":"true" 5 | } 6 | } 7 | } -------------------------------------------------------------------------------- /test-harness/tests/specs/unit/PhotosTest.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * The base model test case will use the 'model' annotation as the instantiation path 3 | * and then create it, prepare it for mocking and then place it in the variables scope as 'model'. It is your 4 | * responsibility to update the model annotation instantiation path and init your model. 5 | */ 6 | component 7 | extends="coldbox.system.testing.BaseModelTest" 8 | model ="Users.lmajano.Sites.cboxdev.coldbox.test-harness.models.Photos" 9 | { 10 | 11 | /*********************************** LIFE CYCLE Methods ***********************************/ 12 | 13 | function beforeAll(){ 14 | super.beforeAll(); 15 | 16 | // setup the model 17 | super.setup(); 18 | 19 | // init the model object 20 | model.init(); 21 | } 22 | 23 | function afterAll(){ 24 | super.afterAll(); 25 | } 26 | 27 | /*********************************** BDD SUITES ***********************************/ 28 | 29 | function run(){ 30 | describe( "Photos Suite", function(){ 31 | } ); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /test-harness/views/_templates/404.html: -------------------------------------------------------------------------------- 1 |  3 | 4 | 5 | 6 | 7 | 8 | The page you requested does not exist 9 | 22 | 23 | 24 | 25 |
26 |

The page you requested does not exist.

27 |

You may have mistyped the address or the page may have moved. Please check your address again.

28 |
29 | 30 | -------------------------------------------------------------------------------- /test-harness/views/bl/indexHelper.bxm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | function sayViewHello(){ 5 | return "Hello!!!"; 6 | } 7 | -------------------------------------------------------------------------------- /test-harness/views/eventcaching/index.cfm: -------------------------------------------------------------------------------- 1 | 2 | #html.table( data=prc.data, class="table table-striped")# 3 | 4 | #dateFormat( now(), "full" )# #timeFormat( now(), "full" )# 5 | -------------------------------------------------------------------------------- /test-harness/views/iTest/index.cfm: -------------------------------------------------------------------------------- 1 |

iTest.index

-------------------------------------------------------------------------------- /test-harness/views/main/cachepanel.cfm: -------------------------------------------------------------------------------- 1 |  2 | 5 | -------------------------------------------------------------------------------- /test-harness/views/main/indexHelper.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | function sayViewHello(){ 5 | return "Hello!!!"; 6 | } 7 | -------------------------------------------------------------------------------- /test-harness/views/main/mailcontent.cfm: -------------------------------------------------------------------------------- 1 | Here is some view to go into a content variable. -------------------------------------------------------------------------------- /test-harness/views/main/mainHelper.cfm: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test-harness/views/main/routeTable.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 18 | 21 | 24 | 27 | 28 | 29 | 30 |
patternregexmoduleRoutingnamespaceRouting
16 | #thisRoute.pattern# 17 | 19 | #thisRoute.regexpattern# 20 | 22 | #thisRoute.moduleRouting# 23 | 25 | #thisRoute.namespaceRouting# 26 |
31 |
-------------------------------------------------------------------------------- /test-harness/views/main/routes.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Registered Routes

3 | 4 | #view( 5 | view = "main/routeTable", 6 | args = { routes = prc.aRoutes } 7 | )# 8 |
9 | -------------------------------------------------------------------------------- /test-harness/views/main/testPrivateActions.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 |

#prc.someinfo#

4 |
-------------------------------------------------------------------------------- /test-harness/views/nolayout/login.cfm: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 |

 

7 | 8 | 9 | 10 | 11 |

 

12 | 13 | 14 |
15 |
-------------------------------------------------------------------------------- /test-harness/views/photos/edit.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Edit a photos

3 | 4 | 5 |
-------------------------------------------------------------------------------- /test-harness/views/photos/index.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Photos

3 | 4 | 5 | 6 |
-------------------------------------------------------------------------------- /test-harness/views/photos/new.cfm: -------------------------------------------------------------------------------- 1 | 2 |

New photos

3 | 4 | 5 |
-------------------------------------------------------------------------------- /test-harness/views/photos/show.cfm: -------------------------------------------------------------------------------- 1 | 2 |

Showing Photo #rc.id#

3 | 4 | 5 | 6 |
-------------------------------------------------------------------------------- /test-harness/views/rendering/index.cfm: -------------------------------------------------------------------------------- 1 | 2 | #html.table( data=prc.data, class="table table-striped")# 3 | -------------------------------------------------------------------------------- /test-harness/views/rendering/renderingRegions.cfm: -------------------------------------------------------------------------------- 1 | 2 |

I am rendering 2 rendering regions:

3 |
4 | 5 |

Region 'Hola'

6 | #view( name="hola" )# 7 | 8 |

Region 'module'

9 | #view( name="module" )# 10 |
11 | -------------------------------------------------------------------------------- /test-harness/views/rendering/withargs.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | View with args: #args.isWidget# 4 | -------------------------------------------------------------------------------- /test-harness/views/simpleview.cfm: -------------------------------------------------------------------------------- 1 | 2 |

I am a simple view rendered at #now()# with #createUUID()#

3 |
-------------------------------------------------------------------------------- /test-harness/views/tags/member.cfm: -------------------------------------------------------------------------------- 1 | 2 |
3 |

#member.name#

4 |

This is a member

5 |
6 |
7 | -------------------------------------------------------------------------------- /test-harness/views/tags/user.cfm: -------------------------------------------------------------------------------- 1 | 2 |
3 |

#user.name#

4 |

This is a user

5 |
6 |
7 | -------------------------------------------------------------------------------- /test-harness/views/testerror/expression.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /test-harness/views/transientCacheTests/index.cfm: -------------------------------------------------------------------------------- 1 | 2 | for (i = 0; i < 10; i++) { 3 | thread name="a#i#" { 4 | sleep(10) 5 | getInstance( "Derived" ).basefoo() 6 | } 7 | thread name="b#i#" { 8 | sleep(10) 9 | getInstance( "Derived" ).basefoo() 10 | } 11 | thread name="c#i#" { 12 | sleep(10) 13 | getInstance( "Derived" ).basefoo() 14 | } 15 | 16 | thread name="a#i#" action="join"; 17 | thread name="b#i#" action="join"; 18 | thread name="c#i#" action="join"; 19 | 20 | if ( 21 | structKeyExists( cfthread[ "a#i#" ], "error" ) || 22 | structKeyExists( cfthread[ "b#i#" ], "error" ) || 23 | structKeyExists( cfthread[ "c#i#" ], "error" ) 24 | ) { 25 | writedump( cfthread[ "a#i#" ] ); 26 | writedump( cfthread[ "b#i#" ] ); 27 | writedump( cfthread[ "c#i#" ] ); 28 | abort; 29 | } else { 30 | //writedump( var = cfthread[ "a#i#" ], label="Thread a#i#", expand="false" ); 31 | //writedump( var = cfthread[ "b#i#" ], label="Thread b#i#", expand="false" ); 32 | //writedump( var = cfthread[ "c#i#" ], label="Thread c#i#", expand="false" ); 33 | } 34 | 35 | } 36 | 37 | writedump("OK...") 38 | 39 | -------------------------------------------------------------------------------- /test-harness/views/viewWithArgs.cfm: -------------------------------------------------------------------------------- 1 | 2 | I render an argument: #args.data# 3 | -------------------------------------------------------------------------------- /tests/.cflintrc: -------------------------------------------------------------------------------- 1 | {} -------------------------------------------------------------------------------- /tests/automation/test.properties: -------------------------------------------------------------------------------- 1 | url.runner=http://localhost:8599/tests/runner.cfm? -------------------------------------------------------------------------------- /tests/resources/ChildClass.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | variables.data = "Child Data"; 4 | 5 | function getData(){ 6 | // From virtually inherited parent 7 | return variables.data; 8 | } 9 | 10 | } 11 | -------------------------------------------------------------------------------- /tests/resources/ChildInjectorSample.cfc: -------------------------------------------------------------------------------- 1 | component accessors="true"{ 2 | 3 | // Level 1 child injector 4 | property name="childValue" inject="wirebox:child:myChild"; 5 | // Level 2 child injector 6 | property name="testValue" inject="wirebox:child:myChild:childValue"; 7 | // Root Injector 8 | property name="root" inject="wirebox:root"; 9 | 10 | function init(){ 11 | return this; 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /tests/resources/Class1.cfc: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/Class2.cfc: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /tests/resources/Class3.cfc: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/resources/Event.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | this.logs = arrayNew( 1 ); 4 | 5 | function onTest( data ){ 6 | var localData = { 7 | stat : "onTest", 8 | data : data 9 | }; 10 | arrayAppend( this.logs, localData ); 11 | } 12 | 13 | function onCreate( data ){ 14 | var localData = { 15 | stat : "onCreate", 16 | data : data 17 | }; 18 | arrayAppend( this.logs, localData ); 19 | } 20 | 21 | 22 | 23 | 24 | 25 | var localData = { 26 | stat : "onAnnotation", 27 | data : data 28 | }; 29 | arrayAppend( this.logs, localData ); 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /tests/resources/HttpAntRunner.cfc: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/resources/MockInterceptor.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My Interceptor Hint 3 | */ 4 | component extends="coldbox.system.Interceptor"{ 5 | 6 | /** 7 | * Configure the interceptor 8 | */ 9 | void function configure(){ 10 | 11 | } 12 | 13 | function unitTest( event, data ){ 14 | arguments.event.setValue( "unittest", true ); 15 | } 16 | 17 | } -------------------------------------------------------------------------------- /tests/resources/RemoteFacade.cfc: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /tests/resources/StandaloneLogBoxConfig.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Standalone LogBox Config 3 | */ 4 | component { 5 | 6 | /** 7 | * Configure LogBox, that's it! 8 | */ 9 | function configure(){ 10 | logBox = {}; 11 | 12 | // Define Appenders 13 | logBox.appenders = { scope : { class : "coldbox.system.logging.appenders.ScopeAppender" } }; 14 | 15 | // Root Logger 16 | logBox.root = { 17 | levelmax : "DEBUG", 18 | levelMin : "FATAL", 19 | appenders : "*" 20 | }; 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /tests/resources/Test.cfc: -------------------------------------------------------------------------------- 1 | component accessors="true" { 2 | 3 | property name="name"; 4 | property name="email"; 5 | 6 | 7 | function init( name = "luis", email = "lmajano@ortussolutions.com" ){ 8 | variables.name = arguments.name; 9 | variables.email = arguments.email; 10 | return this; 11 | } 12 | 13 | } 14 | -------------------------------------------------------------------------------- /tests/resources/VirtualParentClass.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function init( data ){ 4 | variables.data = arguments.data; 5 | } 6 | 7 | } 8 | -------------------------------------------------------------------------------- /tests/resources/WireBox.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.ioc.config.Binder"{ 2 | 3 | /** 4 | * Configure WireBox, that's it! 5 | */ 6 | function configure(){ 7 | // The WireBox configuration structure DSL 8 | wireBox = { 9 | // Scope registration, automatically register a wirebox injector instance on any CF scope 10 | // By default it registers itself on application scope 11 | scopeRegistration : { 12 | enabled : true, 13 | scope : "application", // server, session, application 14 | key : "wireBox" 15 | }, 16 | // DSL Namespace registrations 17 | customDSL : {}, 18 | // Custom Storage Scopes 19 | customScopes : {}, 20 | // Package scan locations 21 | scanLocations : [], 22 | // Stop Recursions 23 | stopRecursions : [], 24 | // Parent Injector to assign to the configured injector, this must be an object reference 25 | parentInjector : "", 26 | // Register all event listeners here, they are created in the specified order 27 | listeners : [] 28 | }; 29 | 30 | // Map Bindings below 31 | mapPath( "coldbox.test-harness.models.TestService" ); 32 | 33 | map( "WireBoxURL" ).toValue( "www.coldbox.org" ); 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /tests/resources/base1.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /tests/resources/coolblog-mssql2012.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/tests/resources/coolblog-mssql2012.sql -------------------------------------------------------------------------------- /tests/resources/helloworld.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/tests/resources/helloworld.jar -------------------------------------------------------------------------------- /tests/resources/javalib/hello.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/tests/resources/javalib/hello.jar -------------------------------------------------------------------------------- /tests/resources/logs/logs_here.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/tests/resources/logs/logs_here.txt -------------------------------------------------------------------------------- /tests/resources/mixins.cfm: -------------------------------------------------------------------------------- 1 |  2 | this.repeatThis = variables.repeatThis; 3 | this.add = variables.add; 4 | function repeatThis(str){ return arguments.str; } 5 | function add(val1,val2) { return val1+val2; } 6 | -------------------------------------------------------------------------------- /tests/resources/mixins2.cfm: -------------------------------------------------------------------------------- 1 |  2 | this.mixinTest = variables.mixinTest; 3 | function mixinTest(str){ return arguments.str; } 4 | -------------------------------------------------------------------------------- /tests/resources/test-module/ModuleConfig.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Module Config 3 | */ 4 | component { 5 | 6 | // Module Properties 7 | this.title = "Module Service Test Module"; 8 | // Model Namespace 9 | this.modelNamespace = "mserv"; 10 | // CF Mapping 11 | this.cfmapping = "mserv"; 12 | // Auto-map models 13 | this.autoMapModels = true; 14 | 15 | function configure(){ 16 | settings = { 17 | "foo" : "bar" 18 | } 19 | } 20 | 21 | /** 22 | * Fired when the module is registered and activated. 23 | */ 24 | function onLoad(){ 25 | } 26 | 27 | /** 28 | * Fired when the module is unregistered and unloaded 29 | */ 30 | function onUnload(){ 31 | } 32 | 33 | 34 | } 35 | -------------------------------------------------------------------------------- /tests/resources/test-module/models/MyModel.cfc: -------------------------------------------------------------------------------- 1 | component accessors="true"{ 2 | property name="wirebox" inject="wirebox"; 3 | } 4 | -------------------------------------------------------------------------------- /tests/resources/test1.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /tests/runner-async.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /tests/runner-cachebox.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/runner-core.cfm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/runner-integration.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/runner-logbox.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/runner-wirebox.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /tests/specs/async/BaseAsyncSpec.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Base helper for the async specs 3 | */ 4 | component extends="testbox.system.BaseSpec" skip="true" { 5 | 6 | /*********************************** LIFE CYCLE Methods ***********************************/ 7 | 8 | /** 9 | * Send output to the console 10 | */ 11 | private function toConsole( required var ){ 12 | writeDump( var = arguments.var, output = "console" ); 13 | return this; 14 | } 15 | 16 | /** 17 | * Get the current thread name 18 | */ 19 | private function getThreadName(){ 20 | return getCurrentThread().getName(); 21 | } 22 | 23 | /** 24 | * Get the current thread java object 25 | */ 26 | private function getCurrentThread(){ 27 | return createObject( "java", "java.lang.Thread" ).currentThread(); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /tests/specs/async/time/TimeUnitSpec.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My BDD Test 3 | */ 4 | component extends="tests.specs.async.BaseAsyncSpec" { 5 | 6 | /*********************************** BDD SUITES ***********************************/ 7 | 8 | function run( testResults, testBox ){ 9 | // all your suites go here. 10 | describe( "TimeUnit", function(){ 11 | beforeEach( function( currentSpec ){ 12 | timeUnit = new coldbox.system.async.time.TimeUnit(); 13 | } ); 14 | 15 | it( "can be created", function(){ 16 | expect( timeUnit ).toBeComponent(); 17 | } ); 18 | 19 | var timeUnits = [ 20 | "days", 21 | "hours", 22 | "microseconds", 23 | "milliseconds", 24 | "minutes", 25 | "nanoseconds", 26 | "seconds" 27 | ]; 28 | 29 | timeUnits.each( function( thisUnit ){ 30 | it( 31 | title = "can produce the #thisUnit# java unit", 32 | body = function( data ){ 33 | var unit = timeUnit.get( data.unit ); 34 | expect( unit.toString() ).toInclude( data.unit ); 35 | }, 36 | data = { unit : thisUnit } 37 | ); 38 | } ); 39 | } ); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /tests/specs/cache/config/DefaultConfigurationTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | config = createMock( "coldbox.system.cache.config.DefaultConfiguration" ); 5 | } 6 | 7 | function testConfigure(){ 8 | config.configure(); 9 | } 10 | 11 | } 12 | -------------------------------------------------------------------------------- /tests/specs/cache/listeners/CacheFactoryListenersTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | // init with defaults 5 | cacheFactory = createMock( "coldbox.system.cache.CacheFactory" ); 6 | mockCache = createMock( "coldbox.system.cache.providers.MockProvider" ).init(); 7 | 8 | config = createObject( "component", "coldbox.system.cache.config.CacheBoxConfig" ).init( 9 | CFCConfigPath = "coldbox.tests.specs.cache.listeners.Config" 10 | ); 11 | 12 | // init factory 13 | cacheFactory.init( config = config ); 14 | } 15 | 16 | function afterTests(){ 17 | cacheFactory.shutdown(); 18 | } 19 | 20 | function testRegisterListeners(){ 21 | eventContainers = cacheFactory.getEventManager().getEventPoolContainer(); 22 | 23 | assertEquals( true, structKeyExists( eventContainers, "afterCacheElementInsert" ) ); 24 | assertEquals( true, structKeyExists( eventContainers, "beforeCacheShutdown" ) ); 25 | assertEquals( true, structKeyExists( eventContainers, "afterCacheFactoryConfiguration" ) ); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /tests/specs/cache/listeners/MyListener.cfc: -------------------------------------------------------------------------------- 1 | component output="false" { 2 | 3 | function configure( any cacheBox, struct properties ){ 4 | variables.cacheBox = arguments.cacheBox; 5 | variables.properties = arguments.properties; 6 | 7 | variables.log = variables.cacheBox.getLogBox().getLogger( this ); 8 | } 9 | 10 | any function afterCacheElementInsert( struct data ){ 11 | log.info( "#properties.name# -> afterCacheElementInsert called", arguments.data.toString() ); 12 | } 13 | 14 | any function beforeCacheShutdown( struct data ){ 15 | log.info( "#properties.name# -> beforeCacheShutdown called", arguments.data.toString() ); 16 | } 17 | 18 | any function afterCacheFactoryConfiguration( struct data ){ 19 | log.info( "#properties.name# -> afterCacheFactoryConfiguration called", arguments.data.toString() ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /tests/specs/cache/policies/AbstractPolicyTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | mockCM = createMock( "coldbox.system.cache.providers.MockProvider" ); 5 | mockFactory = createMock( "coldbox.system.cache.CacheFactory" ); 6 | mockLogBox = createMock( "coldbox.system.logging.LogBox" ); 7 | mockLogger = createMock( "coldbox.system.logging.Logger" ); 8 | mockPool = createMock( "coldbox.system.cache.store.ConcurrentStore" ); 9 | mockStats = createMock( "coldbox.system.cache.util.CacheStats" ); 10 | 11 | // Mocks 12 | mockCM 13 | .$( "getCacheFactory", mockFactory ) 14 | .$( "getStats", mockStats ) 15 | .$( "getName", "MockCache" ) 16 | .$( "getObjectStore", mockPool ) 17 | .$( "clear", true ); 18 | mockFactory.setLogBox( mockLogBox ); 19 | mockLogBox.$( "getLogger", mockLogger ); 20 | mockLogger 21 | .$( "error" ) 22 | .$( "debug" ) 23 | .$( "info" ) 24 | .$( "canDebug", true ) 25 | .$( "canInfo", true ); 26 | 27 | mockStats.$( 28 | method = "evictionHit", 29 | returns = mockStats, 30 | preserveReturnType = false 31 | ); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /tests/specs/cache/policies/FIFOTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="AbstractPolicyTest" { 2 | 3 | function setup(){ 4 | super.setup(); 5 | 6 | config = { evictCount : 2 }; 7 | 8 | pool = { 9 | obj1 : { created : now(), timeout : 5, isExpired : false }, 10 | obj2 : { 11 | created : dateAdd( "n", -7, now() ), 12 | timeout : 10, 13 | isExpired : false 14 | }, 15 | obj3 : { 16 | created : dateAdd( "n", -6, now() ), 17 | timeout : 10, 18 | isExpired : false 19 | } 20 | }; 21 | 22 | mockStore = createStub(); 23 | mockCM.$( "getConfiguration", config ); 24 | mockCM.$( "getObjectStore", mockStore ); 25 | mockCM.$( "lookupQuiet", true ); 26 | mockCM.$( "getCachedObjectMetadata" ).$results( pool.obj2, pool.obj3, pool.obj1 ); 27 | 28 | keys = structSort( pool, "numeric", "asc", "created" ); 29 | mockStore.$( "getSortedKeys", keys ); 30 | 31 | fifo = createMock( "coldbox.system.cache.policies.FIFO" ).init( mockCM ); 32 | } 33 | 34 | function testPolicy(){ 35 | fifo.execute(); 36 | assertEquals( 2, arrayLen( mockCM.$callLog().clear ) ); 37 | assertEquals( "obj2", mockCM.$callLog().clear[ 1 ][ 1 ] ); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /tests/specs/cache/providers/CacheBoxWithConcurrentStoreTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="CacheBoxProviderTest" { 2 | 3 | // Config 4 | variables.config = { 5 | objectDefaultTimeout : 60, 6 | objectDefaultLastAccessTimeout : 30, 7 | useLastAccessTimeouts : true, 8 | reapFrequency : 10, 9 | freeMemoryPercentageThreshold : 0, 10 | evictionPolicy : "LRU", 11 | evictCount : 1, 12 | maxObjects : 200, 13 | objectStore : "ConcurrentStore", 14 | // This switches the internal provider from normal cacheBox to coldbox enabled cachebox 15 | coldboxEnabled : false, 16 | resetTimeoutOnAccess : true 17 | }; 18 | 19 | function testResetAccess(){ 20 | var testVal = { name : "luis", age : 32 }; 21 | cache.getObjectStore().set( "test", testVal, 20 ); 22 | // We duplicate, since it is by reference, we need a snapshot 23 | var originalMD = duplicate( cache.getCachedObjectMetadata( "test" ) ); 24 | 25 | sleep( 1000 ); 26 | cache.get( "test" ); 27 | var newMD = cache.getCachedObjectMetadata( "test" ); 28 | 29 | expect( newMD.created ).toBeGT( originalMD.created ); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /tests/specs/cache/providers/CacheBoxWithDiskSoreTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="CacheBoxProviderTest" { 2 | 3 | // Config 4 | variables.config = { 5 | objectDefaultTimeout : 60, 6 | objectDefaultLastAccessTimeout : 30, 7 | useLastAccessTimeouts : true, 8 | reapFrequency : 2, 9 | freeMemoryPercentageThreshold : 0, 10 | evictionPolicy : "LRU", 11 | evictCount : 1, 12 | maxObjects : 200, 13 | objectStore : "DiskStore", 14 | directoryPath : "/coldbox/tests/tmp/cacheDepot", 15 | // This switches the internal provider from normal cacheBox to coldbox enabled cachebox 16 | coldboxEnabled : false 17 | }; 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/specs/cache/providers/CacheBoxWithJDBCSoreTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="CacheBoxProviderTest" { 2 | 3 | // Config 4 | variables.config = { 5 | objectDefaultTimeout : 60, 6 | objectDefaultLastAccessTimeout : 30, 7 | useLastAccessTimeouts : true, 8 | reapFrequency : 2, 9 | freeMemoryPercentageThreshold : 0, 10 | evictionPolicy : "LRU", 11 | evictCount : 1, 12 | maxObjects : 200, 13 | objectStore : "JDBCStore", 14 | dsn : "coolblog", 15 | table : "cacheBox", 16 | // This switches the internal provider from normal cacheBox to coldbox enabled cachebox 17 | coldboxEnabled : false 18 | }; 19 | 20 | } 21 | -------------------------------------------------------------------------------- /tests/specs/cache/providers/MockProviderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | cp = createMock( "coldbox.system.cache.providers.MockProvider" ).init(); 5 | cp.configure(); 6 | } 7 | 8 | function testMethods(){ 9 | cp.set( "test", 1 ); 10 | assertEquals( 1, cp.get( "test" ) ); 11 | assertEquals( true, cp.lookup( "test" ) ); 12 | assertEquals( true, cp.lookupValue( 1 ) ); 13 | assertEquals( 1, cp.getSize() ); 14 | cp.clearAll(); 15 | assertEquals( 0, cp.getSize() ); 16 | 17 | cp.set( "test", 1 ); 18 | cp.clear( "test" ); 19 | assertEquals( 0, cp.getSize() ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /tests/specs/cache/store/BlackHoleStoreTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | /*********************************** LIFE CYCLE Methods ***********************************/ 4 | 5 | // executes before all suites+specs in the run() method 6 | function beforeAll(){ 7 | } 8 | 9 | // executes after all suites+specs in the run() method 10 | function afterAll(){ 11 | } 12 | 13 | /*********************************** BDD SUITES ***********************************/ 14 | 15 | function run( testResults, testBox ){ 16 | // all your suites go here. 17 | describe( "Black Hole Store", function(){ 18 | beforeEach( function( currentSpec ){ 19 | mockProvider = createMock( "coldbox.system.cache.providers.MockProvider" ).init(); 20 | store = createMock( "coldbox.system.cache.store.BlackHoleStore" ).init( mockProvider ); 21 | } ); 22 | 23 | it( "Can be created", function(){ 24 | expect( store ).toBeComponent(); 25 | } ); 26 | } ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /tests/specs/core/delegates/PopulationSpec.cfc: -------------------------------------------------------------------------------- 1 | component 2 | extends="tests.resources.BaseIntegrationTest" 3 | autowire 4 | accessors="true" 5 | delegates="Population@coreDelegates" 6 | { 7 | 8 | property name="popTest"; 9 | 10 | /*********************************** BDD SUITES ***********************************/ 11 | 12 | function run( testResults, testBox ){ 13 | // all your suites go here. 14 | describe( "Object Populator Delegate", function(){ 15 | beforeEach( function( currentSpec ){ 16 | setup(); 17 | } ); 18 | 19 | it( "can create the target with the populator", function(){ 20 | expect( this ).toHaveKey( "populate,populateFromXml" ); 21 | } ); 22 | 23 | it( "can populate using the delegate", function(){ 24 | variables.popTest = ""; 25 | populate( { popTest : "unit test" } ); 26 | expect( popTest ).toBe( "unit test" ); 27 | } ); 28 | } ); // end describe 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /tests/specs/core/util/CFMLEngineTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | target = new coldbox.system.core.util.CFMLEngine(); 5 | } 6 | 7 | function testGetVersion(){ 8 | expect( target.getVersion() ).notToBeEmpty(); 9 | } 10 | 11 | function testGetFullVersion(){ 12 | expect( target.getFullVersion() ).toBeString( target.getFullVersion() ); 13 | } 14 | 15 | function testGetEngine(){ 16 | expect( target.getEngine() ).toBeString( target.getEngine() ); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/specs/integration/CBDelegatesSpec.cfc: -------------------------------------------------------------------------------- 1 | /******************************************************************************* 2 | * Test for custom WireBox DSLs 3 | *******************************************************************************/ 4 | component extends="tests.resources.BaseIntegrationTest" { 5 | 6 | /*********************************** BDD SUITES ***********************************/ 7 | 8 | function run(){ 9 | describe( "ColdBox Delegates", function(){ 10 | beforeEach( function( currentSpec ){ 11 | setup(); 12 | } ); 13 | 14 | it( "can build the routable delegates", function(){ 15 | var result = controller.getWirebox().getInstance( "Routable" ); 16 | var methods = "getHTMLBaseURL,getHTMLBasePath,getSESBasePath,getSESBaseURL,route,buildLink,getPath,getUrl"; 17 | 18 | for ( var thisMethod in methods ) { 19 | expect( result ).toHaveKey( thisMethod ); 20 | } 21 | } ); 22 | } ); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /tests/specs/integration/MainSpec.cfc: -------------------------------------------------------------------------------- 1 | component extends="tests.resources.BaseIntegrationTest" autowire { 2 | 3 | property name="logger" inject="logbox:logger:{this}"; 4 | 5 | /*********************************** BDD SUITES ***********************************/ 6 | 7 | function run(){ 8 | describe( "Implicit Handlers", function(){ 9 | beforeEach( function( currentSpec ){ 10 | // Setup as a new ColdBox request, VERY IMPORTANT. ELSE EVERYTHING LOOKS LIKE THE SAME REQUEST. 11 | setup(); 12 | } ); 13 | 14 | it( "can handle autowire annotations for tests", function(){ 15 | expect( variables.logger ).toBeComponent(); 16 | } ); 17 | 18 | it( "reads metadata for the test and stores it", function(){ 19 | expect( variables.metadata ).notToBeEmpty(); 20 | } ); 21 | 22 | it( "can handle invalid events", function(){ 23 | var event = execute( event = "invalid:bogus.index", renderResults = true ); 24 | expect( event.getValue( "cbox_rendered_content" ) ).toInclude( "Invalid Page" ); 25 | } ); 26 | } ); 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /tests/specs/integration/SubscribersSpec.cfc: -------------------------------------------------------------------------------- 1 | component extends="tests.resources.BaseIntegrationTest" { 2 | 3 | /*********************************** LIFE CYCLE Methods ***********************************/ 4 | 5 | function beforeAll(){ 6 | super.beforeAll(); 7 | // do your own stuff here 8 | } 9 | 10 | function afterAll(){ 11 | // do your own stuff here 12 | super.afterAll(); 13 | } 14 | 15 | /*********************************** BDD SUITES ***********************************/ 16 | 17 | function run(){ 18 | describe( "Subscribers Tests", function(){ 19 | beforeEach( function( currentSpec ){ 20 | // Setup as a new ColdBox request, VERY IMPORTANT. ELSE EVERYTHING LOOKS LIKE THE SAME REQUEST. 21 | setup(); 22 | } ); 23 | 24 | it( "will throw a 400 error", function(){ 25 | var event = post( route = "/subscribers/create", params = {} ); 26 | var response = event.getPrivateValue( "response" ); 27 | debug( response.getDataPacket() ); 28 | expect( response.getError() ).toBeTrue(); 29 | expect( response.getStatusCode() ).toBe( 400 ); 30 | } ); 31 | } ); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /tests/specs/ioc/InjectorBinderTests.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My BDD Test 3 | */ 4 | component extends="testbox.system.BaseSpec" { 5 | 6 | /*********************************** BDD SUITES ***********************************/ 7 | 8 | function run( testResults, testBox ){ 9 | // all your suites go here. 10 | describe( "Injector creation suite", function(){ 11 | story( "I want to create an Injector", function(){ 12 | given( "an instance of a binder", function(){ 13 | then( "I should create the injector successfully.", function(){ 14 | new coldbox.system.ioc.Injector( { scopeRegistration : { enabled : false } } ); 15 | } ); 16 | } ); 17 | 18 | given( "a path to a binder", function(){ 19 | then( "I should create the injector successfully", function(){ 20 | new coldbox.system.ioc.Injector( { scopeRegistration : { enabled : false } } ); 21 | } ); 22 | } ); 23 | 24 | given( "no binder", function(){ 25 | then( "I should create the injector with the default binder", function(){ 26 | new coldbox.system.ioc.Injector( { scopeRegistration : { enabled : false } } ); 27 | } ); 28 | } ); 29 | } ); 30 | } ); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /tests/specs/ioc/config/DefaultBinderTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | function setup(){ 4 | config = createMock( "coldbox.system.ioc.config.DefaultBinder" ); 5 | } 6 | 7 | function testConfigure(){ 8 | config.configure(); 9 | } 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/specs/ioc/config/listeners/InjectorListenersTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | // init with defaults 5 | injector = createMock( "coldbox.system.ioc.Injector" ); 6 | 7 | // init factory 8 | injector.init( binder = "coldbox.tests.specs.ioc.config.listeners.Config" ); 9 | } 10 | 11 | function testRegisterListeners(){ 12 | eventContainers = injector.getEventManager().getEventPoolContainer(); 13 | 14 | assertEquals( true, structKeyExists( eventContainers, "afterInjectorConfiguration" ) ); 15 | assertEquals( true, structKeyExists( eventContainers, "afterInstanceCreation" ) ); 16 | assertEquals( true, structKeyExists( eventContainers, "beforeInstanceCreation" ) ); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/specs/ioc/config/listeners/MyListener.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function configure( any wireBox, struct properties ){ 4 | variables.wireBox = arguments.wireBox; 5 | variables.properties = arguments.properties; 6 | 7 | variables.log = variables.wireBox.getLogBox().getLogger( this ); 8 | } 9 | 10 | any function afterInjectorConfiguration( struct data ){ 11 | log.info( "#properties.name# -> afterInjectorConfiguration called", arguments.data.toString() ); 12 | } 13 | 14 | any function beforeInstanceCreation( struct data ){ 15 | log.info( "#properties.name# -> beforeInstanceCreation called", arguments.data.toString() ); 16 | } 17 | 18 | any function afterInstanceCreation( struct data ){ 19 | log.info( "#properties.name# -> afterInstanceCreation called", arguments.data.toString() ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /tests/specs/ioc/config/samples/LogBox.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | ********************************************************************************* 3 | * Copyright Since 2005 ColdBox Platform by Ortus Solutions, Corp 4 | * www.coldbox.org | www.ortussolutions.com 5 | ******************************************************************************** 6 | * LogBox Configuration 7 | */ 8 | component { 9 | 10 | function configure(){ 11 | var system = createObject( "java", "java.lang.System" ); 12 | var homeDir = expandPath( "/tests" ); 13 | 14 | logBox = {}; 15 | 16 | // Define Appenders 17 | logBox.appenders = { consoleAppender : { class : "ConsoleAppender" } }; 18 | 19 | // Root Logger 20 | logBox.root = { 21 | levelmax : "INFO", 22 | levelMin : "FATAL", 23 | appenders : "consoleAppender" 24 | }; 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /tests/specs/ioc/dsl/MyTestingDSL.cfc: -------------------------------------------------------------------------------- 1 | component accessors="true" { 2 | 3 | property name="name"; 4 | 5 | function init( required injector ){ 6 | variables.injector = arguments.injector; 7 | return this; 8 | } 9 | 10 | function process( required definition, targetObject, targetID ){ 11 | variables.name = getToken( arguments.definition.dsl, 2, ":" ); 12 | return this; 13 | } 14 | 15 | } 16 | -------------------------------------------------------------------------------- /tests/specs/logging/AbstractAppenderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | logbox = new coldbox.system.logging.LogBox(); 5 | appender = createMock( className = "coldbox.system.logging.AbstractAppender" ); 6 | appender.init( "mytest", structNew() ).setLogBox( logbox ); 7 | } 8 | 9 | function testIsInited(){ 10 | assertEquals( appender.isInitialized(), false ); 11 | assertEquals( 0, appender.getLevelMin() ); 12 | assertEquals( 4, appender.getLevelMax() ); 13 | } 14 | 15 | function testcanLog(){ 16 | for ( x = 0; x lte 4; x++ ) assertTrue( appender.canLog( x ) ); 17 | 18 | assertFalse( appender.canLog( 5 ) ); 19 | 20 | appender.setLevelMax( 0 ); 21 | for ( x = 1; x lte 4; x++ ) assertFalse( appender.canLog( x ) ); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /tests/specs/logging/ExtraInfo.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /tests/specs/logging/ExtraInfo2.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /tests/specs/logging/LogBoxEdgeCases.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * My BDD Test 3 | */ 4 | component extends="testbox.system.BaseSpec" { 5 | 6 | function run( testResults, testBox ){ 7 | // all your suites go here. 8 | describe( "LogBox edge cases", function(){ 9 | story( "I want to load LogBox with no appenders", function(){ 10 | given( "No appenders", function(){ 11 | then( "I can start LogBox", function(){ 12 | var config = new coldbox.system.logging.config.LogBoxConfig(); 13 | var logbox = new coldbox.system.logging.LogBox( config ); 14 | 15 | var logger = logBox.getLogger( "MyCat" ); 16 | expect( logger ).toBeComponent(); 17 | // if we run then we are ok, we can log with no appenders 18 | logger.info( "Test" ); 19 | } ); 20 | } ); 21 | } ); 22 | } ); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /tests/specs/logging/LogBoxWithDataCFCTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | function setup(){ 4 | // LogBox 5 | logbox = createMock( className = "coldbox.system.logging.LogBox" ); 6 | } 7 | 8 | function testLoader(){ 9 | // My Data Object 10 | dataConfig = createObject( "component", "coldbox.tests.specs.logging.config.LogBoxConfig" ); 11 | // Config LogBox 12 | config = createObject( "component", "coldbox.system.logging.config.LogBoxConfig" ).init( 13 | CFCConfig = dataConfig 14 | ); 15 | // Create it 16 | logBox.init( config ); 17 | } 18 | 19 | function testLoader2(){ 20 | // Config LogBox 21 | config = createObject( "component", "coldbox.system.logging.config.LogBoxConfig" ).init( 22 | CFCConfigPath = "coldbox.tests.specs.logging.config.LogBoxConfig" 23 | ); 24 | // Create it 25 | logBox.init( config ); 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/specs/logging/LogEventTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | function setup(){ 4 | log = createMock( className = "coldbox.system.logging.LogEvent" ); 5 | } 6 | 7 | function testextraInfoSimple(){ 8 | log.init( "unittest", 1, "hello", "unittest" ); 9 | 10 | r = log.getExtraInfoAsString(); 11 | 12 | assertEquals( "hello", r ); 13 | } 14 | 15 | function testExtraInfoComplex(){ 16 | c = { data : "hello", nums : [ 1, 2, 3 ] }; 17 | log.init( "unittest", 1, c, "unittest" ); 18 | r = log.getExtraInfoAsString(); 19 | expect( r ).toBeJson(); 20 | } 21 | 22 | function testExtraInfoConventionString(){ 23 | extra = createObject( "component", "coldbox.tests.specs.logging.ExtraInfo" ); 24 | log.init( "unittest", 1, extra, "unittest" ); 25 | r = log.getExtraInfoAsString(); 26 | // debug(r); 27 | 28 | assertEquals( serializeJSON( extra.getData() ), r ); 29 | } 30 | 31 | function testExtraInfoCFC(){ 32 | extra = createObject( "component", "coldbox.tests.specs.logging.ExtraInfo2" ); 33 | log.init( "unittest", 1, extra, "unittest" ); 34 | r = log.getExtraInfoAsString(); 35 | // debug(r); 36 | assertTrue( isXML( r ) ); 37 | } 38 | 39 | 40 | -------------------------------------------------------------------------------- /tests/specs/logging/LogLevelsTest.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | function setup(){ 4 | logLevels = createMock( className = "coldbox.system.logging.LogLevels" ); 5 | } 6 | 7 | function testLookupAsInt(){ 8 | assertEquals( logLevels.lookupAsInt( "OFF" ), "-1" ); 9 | assertEquals( logLevels.lookupAsInt( "FATAL" ), "0" ); 10 | assertEquals( logLevels.lookupAsInt( "ERROR" ), "1" ); 11 | assertEquals( logLevels.lookupAsInt( "WARN" ), "2" ); 12 | assertEquals( logLevels.lookupAsInt( "INFO" ), "3" ); 13 | assertEquals( logLevels.lookupAsInt( "DEBUG" ), "4" ); 14 | assertEquals( logLevels.lookupAsInt( "TRACE" ), "999" ); 15 | } 16 | 17 | function testisLevelValid(){ 18 | assertEquals( true, logLevels.isLevelValid( -1 ) ); 19 | assertEquals( true, logLevels.isLevelValid( 0 ) ); 20 | assertEquals( true, logLevels.isLevelValid( 1 ) ); 21 | assertEquals( true, logLevels.isLevelValid( 2 ) ); 22 | assertEquals( true, logLevels.isLevelValid( 3 ) ); 23 | assertEquals( true, logLevels.isLevelValid( 4 ) ); 24 | assertEquals( false, logLevels.isLevelValid( 5 ) ); 25 | assertEquals( false, logLevels.isLevelValid( 50 ) ); 26 | } 27 | 28 | 29 | -------------------------------------------------------------------------------- /tests/specs/logging/MockLayout.cfc: -------------------------------------------------------------------------------- 1 |  2 | 3 | function format( logevent ){ 4 | return logevent.getTimestamp() & ". My Funky Layout Worked Man!!"; 5 | } 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/specs/logging/appenders/CFAppenderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | logBox = new coldbox.system.logging.LogBox(); 5 | cf = createMock( className = "coldbox.system.logging.appenders.CFAppender" ); 6 | cf.init( "MyCFLogger" ).setLogBox( logBox ); 7 | 8 | loge = createMock( className = "coldbox.system.logging.LogEvent" ); 9 | loge.init( "Unit Test Sample", 0, structNew(), "UnitTest" ); 10 | } 11 | 12 | function testLogMessage(){ 13 | cf.logMessage( loge ); 14 | props = { logType : "application" }; 15 | cf.init( "MyCFLogger", props ); 16 | cf.logMessage( loge ); 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /tests/specs/logging/appenders/ConsoleAppenderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | logBox = new coldbox.system.logging.LogBox(); 5 | console = createMock( "coldbox.system.logging.appenders.ConsoleAppender" ); 6 | console.init( "MyConsoleAppender" ).setLogBox( logBox ); 7 | 8 | loge = createMock( "coldbox.system.logging.LogEvent" ); 9 | loge.init( "Unit Test Sample", 0, structNew(), "UnitTest" ); 10 | } 11 | function testLogMessage(){ 12 | for ( x = 0; x lte 1000; x++ ) { 13 | loge.setSeverity( randRange( 1, 5 ) ); 14 | loge.setCategory( "coldbox.system.testing" ); 15 | loge.setMessage( "Unit testing message (#x#)" ); 16 | 17 | console.logMessage( loge ); 18 | } 19 | } 20 | 21 | function testMockLayout(){ 22 | console = createMock( className = "coldbox.system.logging.appenders.ConsoleAppender" ); 23 | console.init( name = "MyConsoleAppender", layout = "coldbox.tests.specs.logging.MockLayout" ); 24 | console.setLogBox( logBox ); 25 | 26 | for ( x = 0; x lte 5; x++ ) { 27 | loge.setSeverity( x ); 28 | loge.setCategory( "coldbox.system.testing" ); 29 | console.logMessage( loge ); 30 | } 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /tests/specs/logging/appenders/EmailAppenderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | logBox = new coldbox.system.logging.LogBox(); 5 | props = { 6 | to : "info@coldboxframework.com,automation@coldbox.org", 7 | from : "info@coldboxframework.com", 8 | subject : "Email Appender Test" 9 | }; 10 | 11 | email = createMock( className = "coldbox.system.logging.appenders.EmailAppender" ); 12 | email.init( "MyEmailAppender", props ).setLogBox( logBox ); 13 | 14 | loge = createMock( className = "coldbox.system.logging.LogEvent" ); 15 | loge.init( 16 | "this is my awesome unit test sample", 17 | 5, 18 | structNew(), 19 | "UnitTest" 20 | ); 21 | } 22 | function testLogMessage(){ 23 | loge.setSeverity( 3 ); 24 | loge.setCategory( "coldbox.system.EmailAppenderTest" ); 25 | email.logMessage( loge ); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /tests/specs/logging/appenders/ScopeAppenderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | logBox = new coldbox.system.logging.LogBox(); 5 | prop = { limit : 2 }; 6 | scope = createMock( className = "coldbox.system.logging.appenders.ScopeAppender" ); 7 | scope.init( "MyScopeLogger", prop ).setLogBox( logBox ); 8 | 9 | loge = createMock( className = "coldbox.system.logging.LogEvent" ); 10 | loge.init( "Unit Test Sample", 0, structNew(), "UnitTest" ); 11 | } 12 | 13 | function testLogMessage(){ 14 | scope.logMessage( loge ); 15 | scope.logMessage( loge ); 16 | scope.logMessage( loge ); 17 | 18 | // debug(request); 19 | assertEquals( arrayLen( request[ "MyScopeLogger" ] ), 2 ); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /tests/specs/logging/appenders/TracerAppenderTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="coldbox.system.testing.BaseModelTest" { 2 | 3 | function setup(){ 4 | logBox = new coldbox.system.logging.LogBox(); 5 | tracer = createMock( className = "coldbox.system.logging.appenders.TracerAppender" ); 6 | tracer.init( "MyCFTracer" ).setLogBox( logBox ); 7 | 8 | loge = createMock( className = "coldbox.system.logging.LogEvent" ); 9 | loge.init( "Unit Test Sample", 0, structNew(), "UnitTest" ); 10 | } 11 | 12 | function testLogMessage(){ 13 | for ( x = 1; x lte 5; x++ ) { 14 | loge.setSeverity( x ); 15 | loge.setTimestamp( now() ); 16 | 17 | tracer.logMessage( loge ); 18 | } 19 | } 20 | 21 | } 22 | -------------------------------------------------------------------------------- /tests/specs/logging/config/LogBoxConfig.cfc: -------------------------------------------------------------------------------- 1 | component output="false" hint="A LogBox Configuration Data Object" { 2 | 3 | /** 4 | * Configure LogBox, that's it! 5 | */ 6 | function configure(){ 7 | logBox = { 8 | // Define Appenders 9 | appenders : { 10 | coldboxTracer : { 11 | class : "coldbox.system.logging.appenders.ConsoleAppender", 12 | layout : "coldbox.tests.specs.logging.MockLayout", 13 | properties : { name : "awesome" } 14 | } 15 | }, 16 | // Root Logger 17 | root : { levelmax : "INFO", levelMin : 0, appenders : "*" }, 18 | // Categories 19 | categories : { 20 | "coldbox.system" : { levelMax : "INFO" }, 21 | "coldbox.system.interceptors" : { levelMin : 0, levelMax : "DEBUG", appenders : "*" }, 22 | "hello.model" : { levelMax : 4, appenders : "*" } 23 | }, 24 | debug : [ "coldbox.system", "models.system" ], 25 | info : [ "hello.model", "yes.wow.wow" ], 26 | warn : [ "hello.model", "yes.wow.wow" ], 27 | error : [ "hello.model", "yes.wow.wow" ], 28 | fatal : [ "hello.model", "yes.wow.wow" ], 29 | OFF : [ "hello.model", "yes.wow.wow" ] 30 | }; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /tests/specs/logging/tmp/MYFILEAPPENDER.0EFF97B5-1D52-4237-8E4DE53E0D3782F1.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ColdBox/coldbox-platform/9a00a419483914108a03af5fa0f96c101bc2408b/tests/specs/logging/tmp/MYFILEAPPENDER.0EFF97B5-1D52-4237-8E4DE53E0D3782F1.zip -------------------------------------------------------------------------------- /tests/specs/orm-enabled/readme.txt: -------------------------------------------------------------------------------- 1 | I had to segregate the ORM enabled tests into this folder. For some reason 2 | they conflict with other integration tests and produce "ORM NOT Enabled" in 3 | Lucee only. -------------------------------------------------------------------------------- /tests/specs/testing/BaseInterceptorTest.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * Baser Interceptor Test 3 | */ 4 | component extends="coldbox.system.testing.BaseInterceptorTest" interceptor="cbtestharness.interceptors.Test1" { 5 | 6 | /*********************************** LIFE CYCLE Methods ***********************************/ 7 | 8 | /** 9 | * executes before all suites+specs in the run() method 10 | */ 11 | function beforeAll(){ 12 | } 13 | 14 | /** 15 | * executes after all suites+specs in the run() method 16 | */ 17 | function afterAll(){ 18 | } 19 | 20 | /*********************************** BDD SUITES ***********************************/ 21 | 22 | function run( testResults, testBox ){ 23 | // all your suites go here. 24 | describe( "Test 1 Interceptor Test", function(){ 25 | beforeEach( function( currentSpec ){ 26 | setup(); 27 | } ); 28 | 29 | it( "It can be created", function(){ 30 | expect( interceptor ).toBeComponent(); 31 | } ); 32 | } ); 33 | } 34 | 35 | } 36 | -------------------------------------------------------------------------------- /tests/specs/web/routing/RedirectsTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="tests.resources.BaseIntegrationTest" { 2 | 3 | function run(){ 4 | describe( "Route Redirects", function(){ 5 | beforeEach( function(){ 6 | setup(); 7 | } ); 8 | 9 | it( "can relocate with the default status code", function(){ 10 | var event = execute( route = "/oldRoute" ); 11 | var rc = event.getCollection(); 12 | expect( rc.relocate_event ).toBe( "/main/redirectTest" ); 13 | expect( rc.relocate_statusCode ).toBe( 301 ); 14 | } ); 15 | 16 | 17 | it( "can relocate with a custom status code", function(){ 18 | var event = execute( route = "/tempRoute" ); 19 | var rc = event.getCollection(); 20 | expect( rc.relocate_event ).toBe( "/main/redirectTest" ); 21 | expect( rc.relocate_statusCode ).toBe( 302 ); 22 | } ); 23 | } ); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /tests/specs/web/services/loaderserviceTest.cfc: -------------------------------------------------------------------------------- 1 | component extends="tests.resources.BaseIntegrationTest" { 2 | 3 | function run( testResults, testBox ){ 4 | describe( "Loader services", function(){ 5 | beforeEach( function( currentSpec ){ 6 | setup(); 7 | ls = getController().getLoaderService(); 8 | } ); 9 | 10 | 11 | it( "can register handlers", function(){ 12 | var context = ""; 13 | var dummyFile = getController().getSetting( "HandlersPath" ) & "/dummy.cfc"; 14 | 15 | createFile( dummyFile ); 16 | getController().getHandlerService().registerHandlers(); 17 | 18 | try { 19 | assertTrue( listFindNoCase( getController().getSetting( "RegisteredHandlers" ), "dummy" ) ); 20 | } finally { 21 | removeFile( dummyFile ); 22 | } 23 | } ); 24 | } ); 25 | } 26 | 27 | private function createFile( required filename ){ 28 | var fileObj = createObject( "java", "java.io.File" ).init( javacast( "string", arguments.filename ) ); 29 | fileObj.createNewFile(); 30 | } 31 | 32 | private function removeFile( required filename ){ 33 | var fileObj = createObject( "java", "java.io.File" ).init( javacast( "string", arguments.filename ) ); 34 | return fileObj.delete(); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /tests/suites/eventCachingCollisions/config/.htaccess: -------------------------------------------------------------------------------- 1 | #apache access file to protect the config.xml.cfm file. Delete this if you do not use apache. 2 | authtype Basic 3 | deny from all 4 | Options -Indexes -------------------------------------------------------------------------------- /tests/suites/eventCachingCollisions/config/Application.cfm: -------------------------------------------------------------------------------- 1 |  9 | -------------------------------------------------------------------------------- /tests/suites/eventCachingCollisions/index.cfm: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | -------------------------------------------------------------------------------- /tests/suites/eventCachingCollisions/layouts/Layout.None.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | #view()# 4 | -------------------------------------------------------------------------------- /tests/suites/eventCachingCollisions/views/slowEvent.cfm: -------------------------------------------------------------------------------- 1 |  2 | #rc.cacheTest# 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/.gitignore: -------------------------------------------------------------------------------- 1 | coldbox/** 2 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/box.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"Simple APP Template", 3 | "version":"1.2.0", 4 | "author":"You", 5 | "slug":"cbtemplate-simple", 6 | "createPackageDirectory":false, 7 | "type":"mvc", 8 | "keywords":"", 9 | "homepage":"", 10 | "documentation":"", 11 | "repository":{ 12 | "type":"", 13 | "url":"" 14 | }, 15 | "bugs":"", 16 | "shortDescription":"", 17 | "contributors":[], 18 | "ignore":[], 19 | "devDependencies":{}, 20 | "installPaths":{ 21 | "coldbox":"coldbox/" 22 | }, 23 | "dependencies":{ 24 | "coldbox":"^6" 25 | }, 26 | "scripts":{ 27 | "onServerInstall":"cfpm install zip,debugger" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/config/.htaccess: -------------------------------------------------------------------------------- 1 | #apache access file to protect the config.xml.cfm file. Delete this if you do not use apache. 2 | authtype Basic 3 | deny from all 4 | Options -Indexes -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/config/Application.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a protection Application cfm for the config file. You do not 3 | * need to modify this file 4 | */ 5 | component{ 6 | abort; 7 | } -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/config/Router.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function configure() { 4 | // Set Full Rewrites 5 | setFullRewrites( true ); 6 | 7 | /** 8 | * -------------------------------------------------------------------------- 9 | * App Routes 10 | * -------------------------------------------------------------------------- 11 | * 12 | * Here is where you can register the routes for your web application! 13 | * Go get Funky! 14 | * 15 | */ 16 | 17 | // A nice healthcheck route example 18 | route( "/healthcheck", function( event, rc, prc ) { 19 | return "Ok!"; 20 | } ); 21 | 22 | // A nice RESTFul Route example 23 | route( "/api/echo", function( event, rc, prc ) { 24 | return { 25 | "error" : false, 26 | "data" : "Welcome to my awesome API!" 27 | }; 28 | } ); 29 | 30 | // Conventions based routing 31 | route( ":handler/:action?" ).end(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/config/WireBox.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | /** 4 | * Configure WireBox, that's it! 5 | */ 6 | function configure(){ 7 | 8 | // The WireBox configuration structure DSL 9 | wireBox = { 10 | // Scope registration, automatically register a wirebox injector instance on any CF scope 11 | // By default it registers itself on application scope 12 | scopeRegistration = { 13 | enabled = true, 14 | scope = "application", // server, session, application 15 | key = "wireBox" 16 | }, 17 | 18 | // DSL Namespace registrations 19 | customDSL = { 20 | // namespace = "mapping name" 21 | }, 22 | 23 | // Custom Storage Scopes 24 | customScopes = { 25 | // annotationName = "mapping name" 26 | }, 27 | 28 | // Package scan locations 29 | scanLocations = [], 30 | 31 | // Stop Recursions 32 | stopRecursions = [], 33 | 34 | // Parent Injector to assign to the configured injector, this must be an object reference 35 | parentInjector = "", 36 | 37 | // Register all event listeners here, they are created in the specified order 38 | listeners = [ 39 | // { class="", name="", properties={} } 40 | ] 41 | }; 42 | 43 | // Map Bindings below 44 | } 45 | } -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/includes/helpers/ApplicationHelper.cfm: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/index.cfm: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/server-adobe@2021.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"adobe@2021" 4 | }, 5 | "name":"6load-acf2021", 6 | "JVM":{ 7 | "heapSize":"512" 8 | }, 9 | "web":{ 10 | "rewrites":{ 11 | "enable":"false" 12 | }, 13 | "http":{ 14 | "port":"8700" 15 | } 16 | }, 17 | "openbrowser":false 18 | } 19 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"lucee@5" 4 | }, 5 | "name":"6load-lucee5", 6 | "JVM":{ 7 | "heapSize":"512" 8 | }, 9 | "web":{ 10 | "rewrites":{ 11 | "enable":"false" 12 | }, 13 | "http":{ 14 | "port":"8700" 15 | } 16 | }, 17 | "openbrowser":false 18 | } 19 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/views/Application.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a protection Application cfm for the config file. You do not 3 | * need to modify this file 4 | */ 5 | component{ 6 | abort; 7 | } -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/views/partials/p1.cfm: -------------------------------------------------------------------------------- 1 | 2 | I am a partial rendered at #now()# 3 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/views/partials/p2.cfm: -------------------------------------------------------------------------------- 1 | 2 | I am a partial rendered at #now()# 3 | -------------------------------------------------------------------------------- /tests/suites/loadtests/6load/views/partials/p3.cfm: -------------------------------------------------------------------------------- 1 | 2 | I am a partial rendered at #now()# 3 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/.gitignore: -------------------------------------------------------------------------------- 1 | coldbox/** 2 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/box.json: -------------------------------------------------------------------------------- 1 | { 2 | "name":"Simple APP Template", 3 | "version":"1.2.0", 4 | "author":"You", 5 | "slug":"cbtemplate-simple", 6 | "createPackageDirectory":false, 7 | "type":"mvc", 8 | "keywords":"", 9 | "homepage":"", 10 | "documentation":"", 11 | "repository":{ 12 | "type":"", 13 | "url":"" 14 | }, 15 | "bugs":"", 16 | "shortDescription":"", 17 | "contributors":[], 18 | "ignore":[], 19 | "devDependencies":{}, 20 | "installPaths":{ 21 | "coldbox":"coldbox/" 22 | }, 23 | "dependencies":{ 24 | "coldbox":"be" 25 | }, 26 | "scripts":{ 27 | "onServerInstall":"cfpm install zip,debugger" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/config/.htaccess: -------------------------------------------------------------------------------- 1 | #apache access file to protect the config.xml.cfm file. Delete this if you do not use apache. 2 | authtype Basic 3 | deny from all 4 | Options -Indexes -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/config/Application.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a protection Application cfm for the config file. You do not 3 | * need to modify this file 4 | */ 5 | component{ 6 | abort; 7 | } -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/config/Router.cfc: -------------------------------------------------------------------------------- 1 | component { 2 | 3 | function configure() { 4 | // Set Full Rewrites 5 | setFullRewrites( true ); 6 | 7 | /** 8 | * -------------------------------------------------------------------------- 9 | * App Routes 10 | * -------------------------------------------------------------------------- 11 | * 12 | * Here is where you can register the routes for your web application! 13 | * Go get Funky! 14 | * 15 | */ 16 | 17 | // A nice healthcheck route example 18 | route( "/healthcheck", function( event, rc, prc ) { 19 | return "Ok!"; 20 | } ); 21 | 22 | // A nice RESTFul Route example 23 | route( "/api/echo", function( event, rc, prc ) { 24 | return { 25 | "error" : false, 26 | "data" : "Welcome to my awesome API!" 27 | }; 28 | } ); 29 | 30 | // Conventions based routing 31 | route( ":handler/:action?" ).end(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/config/WireBox.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | /** 4 | * Configure WireBox, that's it! 5 | */ 6 | function configure(){ 7 | 8 | // The WireBox configuration structure DSL 9 | wireBox = { 10 | // Scope registration, automatically register a wirebox injector instance on any CF scope 11 | // By default it registers itself on application scope 12 | scopeRegistration = { 13 | enabled = true, 14 | scope = "application", // server, session, application 15 | key = "wireBox" 16 | }, 17 | 18 | // DSL Namespace registrations 19 | customDSL = { 20 | // namespace = "mapping name" 21 | }, 22 | 23 | // Custom Storage Scopes 24 | customScopes = { 25 | // annotationName = "mapping name" 26 | }, 27 | 28 | // Package scan locations 29 | scanLocations = [], 30 | 31 | // Stop Recursions 32 | stopRecursions = [], 33 | 34 | // Parent Injector to assign to the configured injector, this must be an object reference 35 | parentInjector = "", 36 | 37 | // Register all event listeners here, they are created in the specified order 38 | listeners = [ 39 | // { class="", name="", properties={} } 40 | ] 41 | }; 42 | 43 | // Map Bindings below 44 | } 45 | } -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/includes/helpers/ApplicationHelper.cfm: -------------------------------------------------------------------------------- 1 |  -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/index.cfm: -------------------------------------------------------------------------------- 1 |  2 | 9 | 10 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/server-adobe@2023.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"adobe@2023" 4 | }, 5 | "name":"beload-acf2023", 6 | "JVM":{ 7 | "heapSize":"512" 8 | }, 9 | "web":{ 10 | "rewrites":{ 11 | "enable":"false" 12 | }, 13 | "http":{ 14 | "port":"8701" 15 | } 16 | }, 17 | "openbrowser":false 18 | } 19 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/server-boxlang@1.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"boxlang@be" 4 | }, 5 | "name":"beload-boxlang", 6 | "JVM":{ 7 | "heapSize":"512", 8 | "javaVersion":"openjdk21_jre" 9 | }, 10 | "web":{ 11 | "rewrites":{ 12 | "enable":"false" 13 | }, 14 | "http":{ 15 | "port":"8701" 16 | } 17 | }, 18 | "scripts":{ 19 | "onServerInitialInstall":"install bx-compat-cfml --noSave" 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/server.json: -------------------------------------------------------------------------------- 1 | { 2 | "app":{ 3 | "cfengine":"lucee@5" 4 | }, 5 | "name":"beload-lucee5", 6 | "JVM":{ 7 | "heapSize":"512" 8 | }, 9 | "web":{ 10 | "rewrites":{ 11 | "enable":"false" 12 | }, 13 | "http":{ 14 | "port":"8701" 15 | } 16 | }, 17 | "openbrowser":false 18 | } 19 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/views/Application.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * This is a protection Application cfm for the config file. You do not 3 | * need to modify this file 4 | */ 5 | component{ 6 | abort; 7 | } -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/views/partials/p1.cfm: -------------------------------------------------------------------------------- 1 | 2 | I am a partial rendered at #now()# 3 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/views/partials/p2.cfm: -------------------------------------------------------------------------------- 1 | 2 | I am a partial rendered at #now()# 3 | -------------------------------------------------------------------------------- /tests/suites/loadtests/beload/views/partials/p3.cfm: -------------------------------------------------------------------------------- 1 | 2 | I am a partial rendered at #now()# 3 | -------------------------------------------------------------------------------- /tests/suites/loadtests/box.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts" : { 3 | "start" : "server start 6load-lucee5 && server start beload-lucee5", 4 | "stop" : "server stop 6load-lucee5 && server stop beload-lucee5", 5 | "restart" : "server restart 6load-lucee5 && server restart beload-lucee5" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /tests/suites/wirebox/previous/.gitignore: -------------------------------------------------------------------------------- 1 | lib/** 2 | -------------------------------------------------------------------------------- /tests/suites/wirebox/previous/Application.cfc: -------------------------------------------------------------------------------- 1 | component extends="tests.Application"{ 2 | 3 | this.name = "prev test suite"; 4 | 5 | this.mappings[ "/coldbox" ] = getDirectoryFromPath( getCurrentTemplatePath() ) & "lib/coldbox"; 6 | 7 | } 8 | -------------------------------------------------------------------------------- /tests/suites/wirebox/previous/box.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies":{ 3 | "coldbox":"^6.6.1+2" 4 | }, 5 | "installPaths":{ 6 | "coldbox":"coldbox/" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /tests/suites/wirebox/previous/performance.cfm: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /tests/tmp/Person.cfc: -------------------------------------------------------------------------------- 1 | /** 2 | * We use this class for testing serializations 3 | */ 4 | component accessors="true"{ 5 | 6 | property String name; 7 | property String surname; 8 | property numeric age; 9 | property Date createdDate; 10 | property Date modifiedDate; 11 | property boolean isActive; 12 | property test; 13 | property system; 14 | 15 | function init(){ 16 | variables.name = "John"; 17 | variables.surname = "Doe"; 18 | variables.age = 30; 19 | variables.createdDate = now(); 20 | variables.modifiedDate = now(); 21 | variables.isActive = true; 22 | variables.test = new User(); 23 | 24 | variables.system = createObject( "java", "java.lang.System" ); 25 | 26 | return this; 27 | } 28 | 29 | } 30 | -------------------------------------------------------------------------------- /tests/tmp/Ref1.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | property name="name"; 4 | 5 | function init(){ 6 | variables.pool = {}; 7 | return this; 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /tests/tmp/Ref2.cfc: -------------------------------------------------------------------------------- 1 | component{ 2 | 3 | property name="name"; 4 | 5 | function init(){ 6 | variables.pool = {}; 7 | return this; 8 | } 9 | 10 | } -------------------------------------------------------------------------------- /tests/tmp/Test.cfc: -------------------------------------------------------------------------------- 1 | component 2 | delegates = "prefix>Delegate1,Delegate2,Delegate3" 3 | { 4 | 5 | property name="data" observedBy="dataObserver"; 6 | 7 | /** 8 | * Observer for data changes. Anytime data is set, it will be called 9 | * 10 | * @property The name of the property observed 11 | * @old The old value 12 | * @new The new value 13 | */ 14 | function dataObserver( property, old, new ){ 15 | // Execute after data is set 16 | } 17 | 18 | } 19 | -------------------------------------------------------------------------------- /tests/tmp/ormTest.cfm: -------------------------------------------------------------------------------- 1 |  2 | 3 | test = entityLoad("Category","402881882814615e01282bb047fd001e",true); 4 | user = entityLoad("User","88B73A03-FEFA-935D-AD8036E1B7954B76",true); 5 | writeDump(test); 6 | writeDump(user); 7 | 8 | orm = ormGetSession(); 9 | ormFactory = ormgetSessionFactory(); 10 | stats = orm.getStatistics(); 11 | results = { 12 | collectionCount = stats.getCollectionCount(), 13 | collectionKeys = stats.getCollectionKeys().toString(), 14 | entityCount = stats.getEntityCount(), 15 | entityKeys = stats.getEntityKeys().toString() 16 | }; 17 | 18 | //writeDump( ormFactory.getStatistics() ); 19 | 20 | //writeDump("Cache Region Names: #ormFactory.getStatistics().getSecondLevelCacheRegionNames()#"); 21 | writeDump("Category Cache: #ormFactory.getStatistics().getSecondLevelCacheStatistics('Category')#"); 22 | 23 | writeDump("Session Stats:"); 24 | writeDump(results); 25 | 26 | -------------------------------------------------------------------------------- /tests/tmp/scribble.cfm: -------------------------------------------------------------------------------- 1 |  2 | writedump( cgi ) 3 | 4 | -------------------------------------------------------------------------------- /tests/tools/IDEDictionaries/Application.bx: -------------------------------------------------------------------------------- 1 | class { 2 | 3 | this.name = "Builder Dictionaries"; 4 | 5 | // setup root path 6 | rootPath = reReplaceNoCase( 7 | getDirectoryFromPath( getCurrentTemplatePath() ), 8 | "tests(\\|/)tools(\\|/)IDEDictionaries(\\|/)", 9 | "" 10 | ); 11 | 12 | // ColdBox Root path 13 | this.mappings[ "/coldbox" ] = rootPath; 14 | this.mappings[ "/testbox" ] = expandPath( "../../../testbox"); 15 | 16 | } 17 | --------------------------------------------------------------------------------