This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @name Model | |
* @author Someone Else | |
*/ | |
component name="Model" { | |
// This syntax blows up in ACF 2016 (maybe earlier as well). | |
// Only use one "name" attribute | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component displayname="Application" { | |
// Set up an in-memory testing datasource | |
// You may need to install the H2 driver (or Apache Derby, or whatever) | |
this.datasources[ "testing" ] = { | |
class: 'org.h2.Driver', | |
connectionString: 'jdbc:h2:mem:testing;MODE=MySQL', | |
username = "sa" | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"scripts":{ | |
"postVersion":"package set location='user/repo#v`package version`'", | |
"onRelease":"publish", | |
"postPublish":"!git push && !git push --tags" | |
}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
variables.factoryDefinitions = {}; | |
public Factory function init() { | |
return this; | |
} | |
public Factory function define( required string model, required struct defaultAttributes ) { | |
factoryDefinitions[ model ] = defaultAttributes; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
function configure() {} | |
function onLoad() { | |
var helpers = controller.getSetting( "applicationHelper" ); | |
arrayAppend( | |
helpers, | |
"#moduleMapping#/models/ModuleApplicationHelper.cfm" | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
function index( event, rc, prc ) { | |
prc.title = "This is the updated title"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
function groupBy( collection, callback ) { | |
var grouping = {}; | |
for ( var item in collection ) { | |
var key = callback( item ); | |
if ( ! grouping.keyExists( key ) ) { | |
grouping[ key ] = []; | |
} | |
grouping[ key ].append( item ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sublime, sublime_plugin, json | |
import CFML | |
class DumpCfmlSettings(sublime_plugin.WindowCommand): | |
def run(self): | |
projects = list(CFML.src.cfcs.cfcs.projects.keys()) | |
self.window.show_quick_panel(projects, lambda i: self.types(projects[i])) | |
def types(self, project): | |
dumpTypes = ["Variable Names", "Indexed Files"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component extends='coldbox.system.web.context.RequestContextDecorator' { | |
string function getHTTPMethod() { | |
return getRequestContext().getValue('_method', cgi.REQUEST_METHOD); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<project basedir="." default="test" name="CFML CI"> | |
<!-- | |
The CFML CI template project. | |
For integration instructions, see the Github project page: | |
https://github.com/coldfumonkeh/cfml-ci | |
--> |