Skip to content

Commit

Permalink
Merge branch 'release/0.1.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zoramite committed Feb 23, 2011
2 parents 85b9e81 + 58efb29 commit 5510b8b
Show file tree
Hide file tree
Showing 17 changed files with 38 additions and 216 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
@@ -0,0 +1,3 @@
[submodule "build/master"]
path = build/master
url = git://github.com/emberfeather/ef-ant.git
13 changes: 13 additions & 0 deletions LICENSE
@@ -0,0 +1,13 @@
Copyright 2010 Ember Feather Enterprises, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
192 changes: 3 additions & 189 deletions build.xml
Expand Up @@ -4,194 +4,8 @@
<property file="${basedir}/build/settings/user.properties"/>
<property file="${basedir}/build/settings/project.properties"/>
<property file="${basedir}/build/settings/version.properties"/>
<property file="${basedir}/build/settings/build.properties"/>
<property file="${basedir}/build/settings/test.properties"/>

<target name="prepare">
<echo message="Starting: Environment Preparation"/>

<!-- Make the distribution directory -->
<mkdir dir="${build.dist}" />

<!-- Make the log directory -->
<mkdir dir="${build.logs}" />

<!-- Define log file -->
<record name="${build.logs}${file.separator}${build.logs.ant}" />

<!-- Create the time stamp -->
<tstamp>
<format property="build.date" timezone="UTC" pattern="MM/dd/yy hh:mmaa" />
</tstamp>

<!-- Combine the version parts into full version identifier -->
<property name="project.version" value="${project.version.major}.${project.version.minor}.${project.version.build}"/>

<echo message="Finished: Environment Preparation"/>
</target>

<target name="release" depends="prepare,testVarScoper,testMXUnit" description="Tags a release">
<echo message="Starting: Release of version ${project.version}" />

<!-- Start a release branch -->
<git command="flow" dir="${basedir}">
<args>
<arg value="release" />
<arg value="start" />
<arg value="${project.version}" />
</args>
</git>

<!-- Update the release version number -->
<replaceregexp file="${basedir}/version.json"
match="&#34;version&#34;: &#34;[0-9\.]*&#34;"
replace="&#34;version&#34;: &#34;${project.version}&#34;"
byline="true"/>

<!-- Update the download version number -->
<replaceregexp file="${basedir}/version.json"
match="tarball/[0-9\.]*&#34;"
replace="tarball/${project.version}&#34;"
byline="true"
/>

<!-- Finish a release branch -->
<git command="commit" dir="${basedir}">
<args>
<arg value="-a" />
<arg value="-m 'Updated version files for release'" />
</args>
</git>

<!-- Finish a release branch -->
<git command="flow" dir="${basedir}">
<args>
<arg value="release" />
<arg value="finish" />
<arg value="${project.version}" />
<arg value="-m 'Tagging version ${project.version}'" />
</args>
</git>

<!-- Update the build version -->
<propertyfile file="${build}/settings/version.properties" comment="Version properties">
<entry key="project.version.build" value="1" operation="+" type="int"/>
</propertyfile>

<antcall target="versionChanged" inheritall="false" inheritrefs="false"></antcall>

<!-- Commit the updated version files -->
<git command="commit" dir="${basedir}">
<args>
<arg value="-a" />
<arg value="-m 'Updated version properties for next release'" />
</args>
</git>

<echo message="Finished: Release of version ${project.version}"/>
</target>

<target name="testMXUnit" depends="prepare" description="Runs the Unit Tests">
<echo message="Starting: Unit Tests"/>

<!-- Make the unit test directory -->
<mkdir dir="${build.dist}/unit" />

<!-- Load ANT tasks -->
<taskdef name="mxunittask" classname="org.mxunit.ant.MXUnitAntTask" classpath="${build.lib}${file.separator}${build.lib.jar.mxunit}" />

<mxunittask server="${test.host}" port="${test.port}" outputdir="${build.dist}/unit" defaultrunner="${test.mxunit.defaultrunner}" errorproperty="test.mxunit.error" failureproperty="test.mxunit.failure" verbose="true">
<directory path="${basedir}/test" componentPath="${test.mxunit.componentpath}" recurse="true" />
</mxunittask>

<echo message="Finished: Unit Tests"/>
</target>

<target name="testVarScoper" depends="prepare" description="Runs the varScoper">
<echo message="Starting: VarScoper Tests"/>

<!-- Save the results as a csv -->
<get dest="${test.varscoper.resultFile}" src="http://${test.host}:${test.port}${test.varscoper.base}/varScoper.cfm?displayformat=csv&amp;filePath=${test.varscoper.filePath}&amp;recursiveDirectory=${test.varscoper.recurse}"/>

<loadfile srcfile="${test.varscoper.resultFile}" property="test.varscoper.csv">
<filterchain>
<headfilter skip="1"/>

<trim/>
</filterchain>
</loadfile>

<!-- Remove the csv file -->
<delete file="${test.varscoper.resultFile}"/>

<!-- Fail the build if there are any violations of the var scoping -->
<fail message="Var Scope Violation: ${line.separator}${test.varscoper.csv}">
<condition>
<isset property="test.varscoper.csv"/>
</condition>
</fail>

<echo message="Finished: VarScoper Tests"/>
</target>

<!-- Done in separate call since it required reading in updated property files -->
<target name="versionChanged">
<echo message="Starting: Version Changed" />

<property file="${basedir}/build/settings/project.properties"/>
<property file="${basedir}/build/settings/version.properties"/>

<!-- Combine the version parts into full version identifier -->
<property name="project.version" value="${project.version.major}.${project.version.minor}.${project.version.build}"/>

<!-- Update the version number for future development -->
<replaceregexp file="${project.key}/config/project.json.cfm"
match="&#34;version&#34;: &#34;[0-9\.]*&#34;"
replace="&#34;version&#34;: &#34;${project.version}&#34;"
byline="true"/>

<echo message="Finished: Version Changed"/>
</target>

<target name="versionNextMajor" description="Increment the version to the next major point number">
<echo message="Starting: Increment To Next Major Point"/>

<propertyfile file="${build}/settings/version.properties" comment="Version properties">
<entry key="project.version.major" value="1" operation="+" type="int"/>
<entry key="project.version.minor" value="0" type="int"/>
<entry key="project.version.build" value="0" type="int"/>
</propertyfile>

<antcall target="versionChanged" inheritall="false" inheritrefs="false"></antcall>

<echo message="Finished: Increment To Next Major Point"/>
</target>

<target name="versionNextMinor" description="Increment the version to the next minor point number">
<echo message="Starting: Increment To Next Minor Point"/>

<propertyfile file="${build}/settings/version.properties" comment="Version properties">
<entry key="project.version.minor" value="1" operation="+" type="int"/>
<entry key="project.version.build" value="0" type="int"/>
</propertyfile>

<antcall target="versionChanged" inheritall="false" inheritrefs="false"></antcall>

<echo message="Finished: Increment To Next Minor Point"/>
</target>

<macrodef name="git">
<attribute name="command" />
<attribute name="dir" default="" />
<element name="args" optional="true" />

<sequential>
<echo message="git @{command}" />

<exec executable="git" dir="@{dir}" failonerror="true">
<arg value="@{command}" />
<args/>
</exec>
</sequential>
</macrodef>
</project>
<!-- Include the master build file -->
<import file="${basedir}/build/master/master.xml"/>
</project>
Binary file removed build/lib/mxunit-ant-java5.jar
Binary file not shown.
Binary file removed build/lib/mxunit-ant.jar
Binary file not shown.
1 change: 1 addition & 0 deletions build/master
Submodule master added at 48eddf
14 changes: 0 additions & 14 deletions build/settings/build.properties

This file was deleted.

2 changes: 0 additions & 2 deletions build/settings/test.properties
@@ -1,4 +1,2 @@
# Var Scoper
test.varscoper.filePath=${basedir}/${project.name}
test.varscoper.recurse=true
test.varscoper.resultFile=${build.logs}/varScoper.csv
9 changes: 6 additions & 3 deletions build/settings/user.properties.example
@@ -1,6 +1,3 @@
# General
general.verbose=true

# Test Settings
test.host=localhost
test.port=8500
Expand All @@ -11,3 +8,9 @@ test.mxunit.componentpath=test

# varScoper
test.varscoper.base=/varscoper

# less CSS
compile.less.path=/home/randy/bin/

# Set options for the build
options.lessCSS=true
2 changes: 1 addition & 1 deletion build/settings/version.properties
Expand Up @@ -2,4 +2,4 @@
#Sat Aug 28 17:42:05 PDT 2010
project.version.major=0
project.version.minor=1
project.version.build=2
project.version.build=3
2 changes: 1 addition & 1 deletion mongo4cf/collection.cfc
Expand Up @@ -56,7 +56,7 @@ component {
}
}

public boolean function equals( required component otherCollection ) {
public boolean function $equals( required component otherCollection ) {
return variables.collection.equals(arguments.otherCollection._getRaw());
}

Expand Down
2 changes: 1 addition & 1 deletion mongo4cf/config/project.json.cfm
@@ -1,4 +1,4 @@
{
"key": "mongo4cf",
"version": "0.1.2"
"version": "0.1.3"
}
4 changes: 4 additions & 0 deletions mongo4cf/factory.cfc
Expand Up @@ -16,4 +16,8 @@ component {

return createObject('java', arguments.definition, '/mongo4cf/lib/mongo.jar');
}

public boolean function isUsingJavaloader() {
return variables.useJavaloader;
}
}
Binary file modified mongo4cf/lib/mongo.jar
Binary file not shown.
2 changes: 1 addition & 1 deletion test/base.cfc
Expand Up @@ -12,7 +12,7 @@ component extends="mxunit.framework.TestCase" {
*/
public void function setup( required string collectionName ) {
// Make sure that the collection is fully empty before running tests
db.getCollection(arguments.collectionName).drop();
variables.db.getCollection(arguments.collectionName).drop();

// Create a new collection
variables.collection = db.getCollection(arguments.collectionName);
Expand Down
4 changes: 2 additions & 2 deletions test/collection/equalsShouldTest.cfc
Expand Up @@ -6,12 +6,12 @@ component extends="test.base" {
public void function testSucceedWithSame() {
var collection = variables.db.getCollection('collection_equals');

assertTrue(variables.collection.equals(collection));
assertTrue(variables.collection.$equals(collection));
}

public void function testSucceedWithDifferent() {
var collection = variables.db.getCollection('collection_equals_not');

assertFalse(variables.collection.equals(collection));
assertFalse(variables.collection.$equals(collection));
}
}
4 changes: 2 additions & 2 deletions version.json
@@ -1,6 +1,6 @@
{
"releaseNotes": "http://github.com/emberfeather/cfmongodb/wiki/Release-Notes",
"archive": "http://github.com/emberfeather/cfmongodb/tarball/0.1.2",
"archive": "http://github.com/emberfeather/cfmongodb/tarball/0.1.3",
"URL": "http://github.com/emberfeather/cfmongodb",
"version": "0.1.2"
"version": "0.1.3"
}

0 comments on commit 5510b8b

Please sign in to comment.