Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
sneiland committed Jun 13, 2021
2 parents 52c442f + 3a9d250 commit 90d9a17
Show file tree
Hide file tree
Showing 31 changed files with 811 additions and 95 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
language: java

sudo: required
dist: bionic

env:
matrix:
- [email protected]
- ENGINE=lucee@5
- [email protected]
- ENGINE=adobe@2018
- ENGINE=adobe@2016
- ENGINE=adobe@11
- ENGINE=adobe@10
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# FW/1 (Framework One) [![Build Status](https://travis-ci.org/framework-one/fw1.png)](https://travis-ci.org/framework-one/fw1) [![Stories in Ready](https://badge.waffle.io/framework-one/fw1.png?label=ready&title=Ready)](http://waffle.io/framework-one/fw1) [![Join the chat at https://gitter.im/framework-one/fw1](https://badges.gitter.im/framework-one/fw1.svg)](https://gitter.im/framework-one/fw1?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
# FW/1 (Framework One) [![Build Status](https://travis-ci.org/framework-one/fw1.png)](https://travis-ci.org/framework-one/fw1) [![Join the chat at https://gitter.im/framework-one/fw1](https://badges.gitter.im/framework-one/fw1.svg)](https://gitter.im/framework-one/fw1?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

This FW/1 directory is a complete web application and expects to live in its own
webroot if you plan to run the applications within it. To use FW/1 in a separate
Expand Down
8 changes: 4 additions & 4 deletions box.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name":"Framework One",
"slug":"fw1",
"version":"4.2.0",
"version":"4.3.0",
"author":"Sean Corfield, Marcin Szczepanski, Ryan Cogswell",
"location":"framework-one/fw1#master",
"location":"framework-one/fw1#develop",
"createPackageDirectory":true,
"packageDirectory":"framework",
"Homepage":"http://framework-one.github.io/",
Expand All @@ -16,7 +16,7 @@
"shortDescription":"FW/1 - Framework One - is a family of small, lightweight, convention-over-configuration frameworks, primarily for CFML.",
"description":"FW/1 - Framework One - is a family of small, lightweight, convention-over-configuration frameworks, primarily for CFML. FW/1 itself provides MVC, DI/1 provides dependency injection (a.k.a. inversion of control), and AOP/1 provides aspect-oriented programming features on top of DI/1.",
"instructions":"http://framework-one.github.io/documentation/",
"changelog":"https://github.com/framework-one/fw1/commits/master",
"changelog":"https://github.com/framework-one/fw1/commits/develop",
"type":"mvc",
"keywords":[
"fw1",
Expand Down Expand Up @@ -55,7 +55,7 @@

],
"devDependencies":{
"testbox":"^2.5.0+107"
"testbox":"2.5.0+107"
},
"installPaths":{
"testbox":"testbox"
Expand Down
2 changes: 1 addition & 1 deletion framework/Application.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component {
// Version: FW/1 4.2.0
// Version: FW/1 4.3.0

// copy this to your application root to use as your Application.cfc
// or incorporate the logic below into your existing Application.cfc
Expand Down
2 changes: 1 addition & 1 deletion framework/MyApplication.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component extends="framework.one" {
// Version: FW/1 4.2.0
// Version: FW/1 4.3.0-SNAPSHOT

// if you need to provide extension points, copy this to
// your web root, next to your Application.cfc, and add
Expand Down
2 changes: 1 addition & 1 deletion framework/WireBoxAdapter.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component extends="wirebox.system.ioc.Injector" {
variables._fw1_version = "4.2.0";
variables._fw1_version = "4.3.0";
/*
Copyright (c) 2010-2018, Sean Corfield
Expand Down
32 changes: 13 additions & 19 deletions framework/aop.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component extends="framework.ioc" {
variables._fw1_version = "4.2.0";
variables._fw1_version = "4.3.0";
variables._aop1_version = variables._fw1_version;
/*
Copyright (c) 2013-2018, Mark Drew, Sean Corfield, Daniel Budde
Expand Down Expand Up @@ -119,7 +119,7 @@ component extends="framework.ioc" {
{
// build the interceptor array:
var beanName = listLast(arguments.dottedPath, ".");
var beanNames = getAliases(beanName);
var beanNames = getAliases(arguments.dottedPath);
var beanTypes = "";
var interceptDefinition = "";
var interceptedBeanName = "";
Expand All @@ -128,6 +128,8 @@ component extends="framework.ioc" {

arrayPrepend(beanNames, beanName);

// Removing duplicate beanNames
beanNames = listToArray(listRemoveDuplicates(arrayToList(beanNames),",",true) );

// Grab all name based interceptors that match.
for (interceptedBeanName in beanNames)
Expand Down Expand Up @@ -185,7 +187,7 @@ component extends="framework.ioc" {
var interceptedBeanName = "";
var interceptorDefinition = {};
var beanName = listLast(arguments.dottedPath, ".");
var beanNames = getAliases(beanName);
var beanNames = getAliases(arguments.dottedPath);
var beanTypes = "";


Expand Down Expand Up @@ -234,29 +236,21 @@ component extends="framework.ioc" {
}


/** Finds all aliases for the given beanName. */
private array function getAliases(string beanName)
/** Finds all aliases for the given dottedPath. */
private array function getAliases(string dottedPath)
{
var aliases = [];
var beanData = "";
var key = "";


if (structKeyExists(variables.beanInfo, arguments.beanName))
for (key in variables.beanInfo)
{
beanData = variables.beanInfo[arguments.beanName];

for (key in variables.beanInfo)
// Same cfc dotted path, must be an alias.
if (
structKeyExists(variables.beanInfo[key], "cfc") &&
variables.beanInfo[key].cfc == arguments.dottedPath)
{
// Same cfc dotted path, must be an alias.
if (
key != arguments.beanName &&
structKeyExists(variables.beanInfo[key], "cfc") &&
structKeyExists(variables.beanInfo[arguments.beanName], "cfc") &&
variables.beanInfo[key].cfc == variables.beanInfo[arguments.beanName].cfc)
{
arrayAppend(aliases, key);
}
arrayAppend(aliases, key);
}
}

Expand Down
2 changes: 1 addition & 1 deletion framework/beanProxy.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component {
variables._fw1_version = "4.2.0";
variables._fw1_version = "4.3.0";
variables._aop1_version = variables._fw1_version;
/*
Copyright (c) 2013-2018, Mark Drew, Sean Corfield, Daniel Budde
Expand Down
2 changes: 1 addition & 1 deletion framework/facade.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component {
variables._fw1_version = "4.2.0";
variables._fw1_version = "4.3.0";
/*
Copyright (c) 2016-2018, Sean Corfield
Expand Down
37 changes: 24 additions & 13 deletions framework/ioc.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component {
variables._fw1_version = "4.2.0";
variables._fw1_version = "4.3.0";
variables._di1_version = variables._fw1_version;
/*
Copyright (c) 2010-2018, Sean Corfield
Expand Down Expand Up @@ -291,15 +291,17 @@ component {
}


// given a bean (by name, by type or by value), call the named
// setters with the specified property values
public any function injectProperties( any bean, struct properties ) {
/*
* @hint Given a bean (by name, by type or by value), call the named setters with the specified property values
* @ignoreMissing When set verify that the setter to be called exists and skip if missing, otherwise throws an error
*/
public any function injectProperties( any bean, struct properties, boolean ignoreMissing=false ) {
if ( isSimpleValue( bean ) ) {
if ( containsBean( bean ) ) bean = getBean( bean );
else bean = construct( bean );
}
for ( var property in properties ) {
if ( !isNull( properties[ property ] ) ) {
if ( !isNull( properties[ property ] ) && (!ignoreMissing || structKeyExists( bean, "set#property#" ) ) ){
var args = { };
args[ property ] = properties[ property ];
invoke( bean, "set#property#", args );
Expand Down Expand Up @@ -533,6 +535,7 @@ component {
} catch ( any e ) {
// assume bad path - ignore it, cfcs is empty list
}
local.beansWithDuplicates = "";
for ( var cfcOSPath in cfcs ) {
var cfcPath = replace( cfcOSPath, chr(92), '/', 'all' );
// watch out for excluded paths:
Expand All @@ -559,18 +562,26 @@ component {
if ( structKeyExists( metadata.metadata, "type" ) && metadata.metadata.type == "interface" ) {
continue;
}
if ( structKeyExists( variables.beanInfo, beanName ) ) {
if ( variables.config.omitDirectoryAliases ) {
throw '#beanName# is not unique (and omitDirectoryAliases is true)';

if ( variables.config.omitDirectoryAliases ) {
if ( structKeyExists( variables.beanInfo, beanName ) ) {
throw '#beanName# is not unique';
}
structDelete( variables.beanInfo, beanName );
variables.beanInfo[ beanName & singleDir ] = metadata;
} else {
variables.beanInfo[ beanName ] = metadata;
if ( !variables.config.omitDirectoryAliases ) {
variables.beanInfo[ beanName & singleDir ] = metadata;
} else {
if ( listFindNoCase(local.beansWithDuplicates, beanName) ) {}
else if ( structKeyExists( variables.beanInfo, beanName ) ) {
structDelete( variables.beanInfo, beanName );
local.beansWithDuplicates = listAppend(local.beansWithDuplicates, beanName);
} else {
variables.beanInfo[ beanName ] = metadata;
}
if ( structKeyExists( variables.beanInfo, beanName & singleDir ) ) {
throw '#beanName & singleDir# is not unique';
}
variables.beanInfo[ beanName & singleDir ] = metadata;
}

} catch ( any e ) {
// wrap the exception so we can add bean name for debugging
// this trades off any stack trace information for the bean name but
Expand Down
2 changes: 1 addition & 1 deletion framework/methodProxy.cfc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
component {
variables._fw1_version = "4.2.0";
variables._fw1_version = "4.3.0";
/*
Copyright (c) 2018, Sean Corfield
Expand Down
Loading

0 comments on commit 90d9a17

Please sign in to comment.