Permalink
Browse files

updated snippets for 1.2

  • Loading branch information...
1 parent 1d4304f commit 91bcd3c52a75f558c32ebeddb50b8a9fb241493d @atuttle committed Nov 8, 2012
Showing with 53 additions and 17 deletions.
  1. +27 −7 snippets/Taffy/Application cfc-script.xml
  2. +26 −10 snippets/Taffy/Application cfc-tag.xml
@@ -2,9 +2,35 @@
<snippet filetemplate="false" extension="">
<name>Application cfc-script</name>
<help>Creates an Application.cfc skeleton for a Taffy API using cfscript syntax</help>
-<starttext><![CDATA[component extends="taffy.core.api"{ this.name = "]]></starttext>
+<starttext><![CDATA[component extends="taffy.core.api"
+{
+
+ this.name = "]]></starttext>
<endtext><![CDATA[";
+ variables.framework = {
+ reloadKey = "reload"
+ ,reloadPassword = "true"
+ ,reloadOnEveryRequest = false
+ ,defaultRepresentationClass = "taffy.core.nativeJsonRepresentation"
+ ,dashboardKey = "dashboard"
+ ,disableDashboard = false
+ ,unhandledPaths = "/flex2gateway"
+ ,allowCrossDomain = false
+ ,globalHeaders = structNew()
+ ,debugKey = "debug"
+ ,returnExceptionsAsJson = true
+ ,exceptionLogAdapter = "taffy.bonus.LogToEmail"
+ ,exceptionLogAdapterConfig = {
+ emailFrom = "api-error@yourdomain.com"
+ ,emailTo = "you@yourdomain.com"
+ ,emailSubj = "Exception Trapped in API"
+ ,emailType = "html"
+ }
+ ,beanFactory = ""
+ }
+
+
function applicationStartEvent()
{
}
@@ -17,11 +43,5 @@
{
}
- function configureTaffy()
- {
- enableDashboard(true);
- setUnhandledPaths('/flex2gateway');
- }
-
}]]></endtext>
</snippet>
@@ -5,26 +5,42 @@
<starttext><![CDATA[<cfcomponent extends="taffy.core.api">
<cfset this.name = "]]></starttext>
-<endtext><![CDATA["/>
+<endtext><![CDATA[" />
- <cffunction name="applicationStartEvent">
- </cffunction>
+ <cfset variables.framework = {
+ reloadKey = "reload"
+ ,reloadPassword = "true"
+ ,reloadOnEveryRequest = false
+ ,defaultRepresentationClass = "taffy.core.nativeJsonRepresentation"
+ ,dashboardKey = "dashboard"
+ ,disableDashboard = false
+ ,unhandledPaths = "/flex2gateway"
+ ,allowCrossDomain = false
+ ,globalHeaders = structNew()
+ ,debugKey = "debug"
+ ,returnExceptionsAsJson = true
+ ,exceptionLogAdapter = "taffy.bonus.LogToEmail"
+ ,exceptionLogAdapterConfig = {
+ emailFrom = "api-error@yourdomain.com"
+ ,emailTo = "you@yourdomain.com"
+ ,emailSubj = "Exception Trapped in API"
+ ,emailType = "html"
+ }
+ ,beanFactory = ""
+ } />
- <cffunction name="requestStartEvent">
- </cffunction>
+
+ <cffunction name="applicationStartEvent"></cffunction>
+
+ <cffunction name="requestStartEvent"></cffunction>
<cffunction name="onTaffyRequest">
<cfargument name="verb" />
<cfargument name="cfc" />
<cfargument name="requestArguments" />
<cfargument name="mimeExt" />
<cfargument name="headers" />
- <cfreturn true />
</cffunction>
- <cffunction name="configureTaffy">
- <cfset enableDashboard(true)/>
- <cfset setUnhandledPaths('/flex2gateway')/>
- </cffunction>
</cfcomponent>]]></endtext>
</snippet>

0 comments on commit 91bcd3c

Please sign in to comment.