Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
Migrate 3.5.0 release from develop to master
  • Loading branch information
seancorfield committed Oct 21, 2015
2 parents 038302f + 3bf2e75 commit c563ea1
Show file tree
Hide file tree
Showing 86 changed files with 2,033 additions and 292 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,5 @@ settings.xml
*.idea
.ant-targets-build.xml
run-tests.sh
/examples/6helloclojure/target/stale/extract-native.dependencies
/taskmanager/
68 changes: 59 additions & 9 deletions Application.cfc
Original file line number Diff line number Diff line change
@@ -1,11 +1,61 @@
component extends="framework.one" {

// Either put the framework folder in your webroot or create a mapping for it!

// FW/1 - configuration for introduction application:
// controllers/layouts/services/views are in this folder (allowing for non-empty context root):
variables.framework = {
base = getDirectoryFromPath( CGI.SCRIPT_NAME ).replaceFirst( getContextRoot(), '' ) & 'introduction'
};
component {
// copy this to your application root to use as your Application.cfc
// or incorporate the logic below into your existing Application.cfc

// you can provide a specific application name if you want:
this.name = hash( getBaseTemplatePath() );

// any other application settings:
this.sessionManagement = true;

// set up per-application mappings as needed:
this.mappings[ '/framework' ] = getDirectoryFromPath( getBaseTemplatePath() ) & 'framework';
// this.mappings[ '/app' ] expandPath( '../path/to/app' );

function _get_framework_one() {
if ( !structKeyExists( request, '_framework_one' ) ) {

// create your FW/1 application:
request._framework_one = new framework.one( {
trace = true,
base = getDirectoryFromPath( CGI.SCRIPT_NAME )
.replaceFirst( getContextRoot(), '' ) & 'introduction'
} );

// you can specify FW/1 configuration as an argument:
// request._framework_one = new framework.one({
// base : '/app',
// trace : true
// });

// if you need to override extension points, use
// MyApplication.cfc for those and then do:
// request._framework_one = new MyApplication({
// base : '/app',
// trace : true
// });

}
return request._framework_one;
}

// delegation of lifecycle methods to FW/1:
function onApplicationStart() {
return _get_framework_one().onApplicationStart();
}
function onError( exception, event ) {
return _get_framework_one().onError( exception, event );
}
function onRequest( targetPath ) {
return _get_framework_one().onRequest( targetPath );
}
function onRequestEnd() {
return _get_framework_one().onRequestEnd();
}
function onRequestStart( targetPath ) {
return _get_framework_one().onRequestStart( targetPath );
}
function onSessionStart() {
return _get_framework_one().onSessionStart();
}
}
6 changes: 3 additions & 3 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name" : "Framework One",
"slug" : "fw1",
"version" : "3.1.2",
"version" : "3.5.0",
"author" : "Sean Corfield, Marcin Szczepanski, Ryan Cogswell",
"location" : "https://github.com/framework-one/fw1/archive/v3.1.2.zip",
"location" : "https://github.com/framework-one/fw1/archive/v3.5.0.zip",
"createPackageDirectory" : true,
"packageDirectory" : "framework",
"Homepage" : "http://framework-one.github.io/",
Expand All @@ -28,5 +28,5 @@
{ "type" : "Apache 2.0", "URL" : "http://www.apache.org/licenses/LICENSE-2.0" }
],
"Contributors" : [ {"name": "Contributors List", "url": "https://github.com/framework-one/fw1/graphs/contributors"} ],
"ignore" : [ "index.cfm", "Application.cfc", "css", "docs", "examples", "introduction", "skeleton", "tests", ".gitignore", ".travis.yml", "code_of_conduct.md", "contributing.md", "readme.md", "build.xml", "run-tests-example.sh" ]
"ignore" : [ ]
}
80 changes: 66 additions & 14 deletions examples/Application.cfc
Original file line number Diff line number Diff line change
@@ -1,15 +1,67 @@
component extends="framework.one" {
// Either put the framework folder in your webroot or create a mapping for it!

this.name = 'fw1-examples';
this.sessionManagement = true;
// FW/1 - configuration:
variables.framework = {
usingSubsystems = true,
SESOmitIndex = true,
diLocations = "model, controllers, beans, services", // to account for the variety of D/I locations in our examples
// that allows all our subsystems to automatically have their own bean factory with the base factory as parent
trace = true
};

component {
// copy this to your application root to use as your Application.cfc
// or incorporate the logic below into your existing Application.cfc

// you can provide a specific application name if you want:
this.name = 'fw1-examples';

// any other application settings:
this.sessionManagement = true;

// set up per-application mappings as needed:
this.mappings[ '/framework' ] = expandPath( '../framework' );
// this.mappings[ '/app' ] expandPath( '../path/to/app' );

function _get_framework_one() {
if ( !structKeyExists( request, '_framework_one' ) ) {

// create your FW/1 application:
request._framework_one = new framework.one( {
SESOmitIndex = true,
diComponent = "framework.ioclj",
diLocations = [
// must provide path to project.clj in Clojure example:
getDirectoryFromPath( CGI.SCRIPT_NAME ) & "/subsystems/6helloclojure",
"model", "controllers", "beans", "services" // to account for the variety of D/I locations in our examples
// that allows all our subsystems to automatically have their own bean factory with the base factory as parent
],
trace = true
} );

// you can specify FW/1 configuration as an argument:
// request._framework_one = new framework.one({
// base : '/app',
// trace : true
// });

// if you need to override extension points, use
// MyApplication.cfc for those and then do:
// request._framework_one = new MyApplication({
// base : '/app',
// trace : true
// });

}
return request._framework_one;
}

// delegation of lifecycle methods to FW/1:
function onApplicationStart() {
return _get_framework_one().onApplicationStart();
}
function onError( exception, event ) {
return _get_framework_one().onError( exception, event );
}
function onRequest( targetPath ) {
return _get_framework_one().onRequest( targetPath );
}
function onRequestEnd() {
return _get_framework_one().onRequestEnd();
}
function onRequestStart( targetPath ) {
return _get_framework_one().onRequestStart( targetPath );
}
function onSessionStart() {
return _get_framework_one().onSessionStart();
}
}
5 changes: 4 additions & 1 deletion examples/buildurl/views/main/default.cfm
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<cfoutput>
<h1>Testbed for buildURL()</h1>
<p><a href="#buildURL('')#">buildURL('')</a></p>
<p><a href="#buildURL('.')#">buildURL('.')</a></p>
<p><a href="#buildURL(':')#">buildURL(':') -- only valid in a subsystem-based app</a></p>
<p><a href="#buildURL('main.default')#">buildURL('main.default')</a></p>
<p><a href="#buildURL('main.default##anchor')#">buildURL('main.default##anchor')</a></p>
<p><a href="#buildURL('main.default?##anchor')#">buildURL('main.default?##anchor')</a></p>
Expand All @@ -14,4 +17,4 @@
<p><a href="#buildURL(action='main.default',queryString='test=1##anchor')#">buildURL(action='main.default',queryString='test=1##anchor')</a></p>
<p><a href="#buildURL(action='main.default',queryString='?test=2')#">buildURL(action='main.default',queryString='?test=2')</a></p>
<p><a href="#buildURL(action='main.default',queryString='?test=2##anchor')#">buildURL(action='main.default',queryString='?test=2##anchor')</a></p>
</cfoutput>
</cfoutput>
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
<div class="page">
<img src="../css/fw1logo7.jpg"/>
<cfoutput>#body#</cfoutput>
<p><a href="<cfoutput>#buildURL( 'home:main.default' )#</cfoutput>">Examples Home</a></p>
<p><a href="<cfoutput>#buildURL( ':main.default' )#</cfoutput>">Examples Home</a></p>
</div>
<div class="footer">
<a href="http://fw1.riaforge.org/">FW/1</a> is copyright (c) 2009-2015 Sean Corfield, Marcin Szczepanski, Ryan Cogswell -
<a href="http://fw1.riaforge.org/">FW/1</a> is copyright (c) 2009-2015 Sean Corfield, Marcin Szczepanski, Ryan Cogswell -
<a href="http://www.apache.org/licenses/LICENSE-2.0">Licensed under the Apache License, Version 2.0</a><br />
Logo by Kevan Stannard - You are running FW/1 version <cfoutput>#variables.framework.version#</cfoutput>.
</div>
Expand Down
12 changes: 12 additions & 0 deletions examples/modular/Application.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
component extends=framework.one {
variables.framework = {
trace : true,
controllersFolder : "handlers",
layoutsFolder : "wrappers",
subsystemsFolder : "plugins",
viewsFolder : "pages"
};
function setupView( rc ) {
rc.message = "Rendered by FW/1 version " & variables.framework.version;
}
}
7 changes: 7 additions & 0 deletions examples/modular/handlers/main.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
component accessors=true {
property framework;
function default( rc ) {
rc.handlerSays = "This message brought to you by " &
framework.getConfig().controllersFolder & "/main.cfc!";
}
}
File renamed without changes.
5 changes: 5 additions & 0 deletions examples/modular/pages/main/default.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<cfoutput>
<p>I am the main page!</p>
<p>#rc.handlerSays#</p>
<p>Go to <a href="#buildURL('suba:')#">suba:main.default</a></p>
</cfoutput>
4 changes: 4 additions & 0 deletions examples/modular/plugins/suba/pages/main/default.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<cfoutput>
<p>I am subsystem A!</p>
<p>Go <a href="#buildURL( ':' )#">back home</a>!</p>
</cfoutput>
2 changes: 2 additions & 0 deletions examples/modular/plugins/suba/wrappers/default.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h2>Subsystem A Default Wrapper</h2>
<cfoutput>#body#</cfoutput>
7 changes: 7 additions & 0 deletions examples/modular/wrappers/default.cfm
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<cfoutput>
<h1>Default Wrapper</h1>
<div>
#body#
</div>
<p>#rc.message#</p>
</cfoutput>
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions examples/subsystems/6helloclojure/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
/target
/classes
/checkouts
pom.xml
pom.xml.asc
*.jar
*.class
/.lein-*
/.nrepl-port
.hgignore
.hg/
61 changes: 61 additions & 0 deletions examples/subsystems/6helloclojure/Application.cfc
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
component {
// copy this to your application root to use as your Application.cfc
// or incorporate the logic below into your existing Application.cfc

// you can provide a specific application name if you want:
this.name = hash( getBaseTemplatePath() );

// any other application settings:
this.sessionManagement = true;

// set up per-application mappings as needed:
this.mappings[ '/framework' ] = expandPath( '../../../framework' );
// this.mappings[ '/app' ] expandPath( '../path/to/app' );

function _get_framework_one() {
if ( !structKeyExists( request, '_framework_one' ) ) {

// create your FW/1 application:
request._framework_one = new MyApplication({
trace : true,
diComponent : "framework.ioclj",
diLocations : getDirectoryFromPath( CGI.SCRIPT_NAME )
});

// you can specify FW/1 configuration as an argument:
// request._framework_one = new framework.one({
// base : '/app',
// trace : true
// });

// if you need to override extension points, use
// MyApplication.cfc for those and then do:
// request._framework_one = new MyApplication({
// base : '/app',
// trace : true
// });

}
return request._framework_one;
}

// delegation of lifecycle methods to FW/1:
function onApplicationStart() {
return _get_framework_one().onApplicationStart();
}
function onError( exception, event ) {
return _get_framework_one().onError( exception, event );
}
function onRequest( targetPath ) {
return _get_framework_one().onRequest( targetPath );
}
function onRequestEnd() {
return _get_framework_one().onRequestEnd();
}
function onRequestStart( targetPath ) {
return _get_framework_one().onRequestStart( targetPath );
}
function onSessionStart() {
return _get_framework_one().onSessionStart();
}
}
Loading

0 comments on commit c563ea1

Please sign in to comment.