Skip to content

Commit

Permalink
updated snippets for 1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Tuttle committed Nov 8, 2012
1 parent 1d4304f commit 91bcd3c
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 17 deletions.
34 changes: 27 additions & 7 deletions snippets/Taffy/Application cfc-script.xml
Expand Up @@ -2,9 +2,35 @@
<snippet filetemplate="false" extension=""> <snippet filetemplate="false" extension="">
<name>Application cfc-script</name> <name>Application cfc-script</name>
<help>Creates an Application.cfc skeleton for a Taffy API using cfscript syntax</help> <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["; <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() function applicationStartEvent()
{ {
} }
Expand All @@ -17,11 +43,5 @@
{ {
} }
function configureTaffy()
{
enableDashboard(true);
setUnhandledPaths('/flex2gateway');
}
}]]></endtext> }]]></endtext>
</snippet> </snippet>
36 changes: 26 additions & 10 deletions snippets/Taffy/Application cfc-tag.xml
Expand Up @@ -5,26 +5,42 @@
<starttext><![CDATA[<cfcomponent extends="taffy.core.api"> <starttext><![CDATA[<cfcomponent extends="taffy.core.api">
<cfset this.name = "]]></starttext> <cfset this.name = "]]></starttext>
<endtext><![CDATA["/> <endtext><![CDATA[" />
<cffunction name="applicationStartEvent"> <cfset variables.framework = {
</cffunction> 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"> <cffunction name="onTaffyRequest">
<cfargument name="verb" /> <cfargument name="verb" />
<cfargument name="cfc" /> <cfargument name="cfc" />
<cfargument name="requestArguments" /> <cfargument name="requestArguments" />
<cfargument name="mimeExt" /> <cfargument name="mimeExt" />
<cfargument name="headers" /> <cfargument name="headers" />
<cfreturn true />
</cffunction> </cffunction>
<cffunction name="configureTaffy">
<cfset enableDashboard(true)/>
<cfset setUnhandledPaths('/flex2gateway')/>
</cffunction>
</cfcomponent>]]></endtext> </cfcomponent>]]></endtext>
</snippet> </snippet>

0 comments on commit 91bcd3c

Please sign in to comment.