Permalink
Browse files

Merge branch 'release-0.5.2'

  • Loading branch information...
2 parents 7365bf6 + 2a5c9e2 commit d5a63c155e20edf1077d7e0a224acd7be072f495 @millermedeiros committed Feb 19, 2011
View
@@ -1,6 +1,6 @@
.tmp*
.project
-.settings
+.settings/
.DS_Store?
ehthumbs.db
View
@@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
+ <buildCommand>
+ <name>com.aptana.ide.core.unifiedBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
</buildSpec>
<natures>
<nature>com.aptana.projects.webnature</nature>
View
@@ -2,6 +2,34 @@
+## v0.5.2 (2011/02/18) ##
+
+### Other ###
+
+ - changed to a module pattern.
+ - added YUI test coverage.
+ - improved build and src files structure.
+ - simplified `remove`, `removeAll`, `add`.
+ - improved error messages.
+
+
+
+## v0.5.1 (2011/01/30) ##
+
+### API changes ###
+
+ - made `SignalBinding` constructor private. (issue #15)
+ - changed params order on `SignalBinding` constructor.
+ - removed `signals.isDef()`. (issue #14)
+
+### Other ###
+
+ - added JSLint to the build process. (issue #12)
+ - validated source code using JSLint. (issue #13)
+ - improved docs.
+
+
+
## v0.5 (2010/12/03) ##
### API changes ###
@@ -11,12 +39,12 @@
- `Signal.dispose()` (issue #6)
- `signals.VERSION`
- `signals.isDef()`
-
+
- Removed:
- - `SignalBinding.listener` (issue #3)
-
+ - `SignalBinding.listener` (issue #3)
+
- Renamed:
- - `SignalBinding.listenerScope` -> `SignalBinding.context` (issue #4)
+ - `SignalBinding.listenerScope` -> `SignalBinding.context` (issue #4)
### Fixes ###
View
@@ -6,9 +6,10 @@ Custom event/messaging system for JavaScript inspired by [AS3-Signals](https://g
## Links ##
- * [JS-Signals Project Page](http://millermedeiros.github.com/js-signals/)
- * [JS-Signals Wiki](http://github.com/millermedeiros/js-signals/wiki/)
- * [JS-Signals Documentation](http://millermedeiros.github.com/js-signals/docs)
+ * [Project Page](http://millermedeiros.github.com/js-signals/)
+ * [Wiki](http://github.com/millermedeiros/js-signals/wiki/)
+ * [Documentation](http://millermedeiros.github.com/js-signals/docs)
+ * [Changelog](http://github.com/millermedeiros/js-signals/blob/master/CHANGELOG.markdown)
## License ##
View
@@ -16,12 +16,7 @@
</delete>
</target>
- <target name="-purgeDocs">
- <delete dir="${docs.dir}" />
- <mkdir dir="${docs.dir}"/>
- </target>
-
- <target name="build" depends="-purgeJsDeploy">
+ <target name="compile" depends="-purgeJsDeploy">
<echo message="Building ${dist.name}..." />
<buildnumber file="${build.dir}/build.number"/>
@@ -30,25 +25,35 @@
<format property="build.date" pattern="MM/dd/yyyy hh:mm aa" unit="hour"/>
</tstamp>
- <concat destfile="${dist.dir}/${dist.name}" fixlastline="yes" eol="unix">
- <filelist dir="${src.dir}">
- <file name="intro.js" />
- <file name="signals.js" />
- <file name="Signal.js" />
- <file name="SignalBinding.js" />
- <file name="outro.js" />
- </filelist>
- </concat>
+ <copy file="${src.dir}/signals.js" tofile="${dist.dir}/${dist.name}" />
+ <loadfile property="SignalBinding.js" srcFile="${src.dir}/SignalBinding.js"/>
+ <loadfile property="Signal.js" srcFile="${src.dir}/Signal.js"/>
<replace file="${dist.dir}/${dist.name}">
<replacefilter token="::VERSION_NUMBER::" value="${version.number}" />
<replacefilter token="::BUILD_NUMBER::" value="${build.number}" />
<replacefilter token="::BUILD_DATE::" value="${build.date}" />
+ <replacefilter token="//::SIGNAL_BINDING_JS:://" value="${SignalBinding.js}" />
+ <replacefilter token="//::SIGNAL_JS:://" value="${Signal.js}" />
</replace>
<echo message="${dist.name} built." />
</target>
+ <target name="lint">
+ <echo message="JSLinting ${dist.name}..."/>
+
+ <apply executable="java">
+ <filelist dir="${dist.dir}">
+ <file name="${dist.name}"/>
+ </filelist>
+ <arg line="-jar"/>
+ <arg path="${jslint.jar}"/>
+ </apply>
+
+ <echo message="JSLinted ${dist.name}."/>
+ </target>
+
<target name="minify">
<echo message="Building ${dist.min.name}..." />
@@ -59,7 +64,7 @@
<arg line="-jar" />
<arg path="${yuicompressor.jar}" />
<arg value="--charset" />
- <arg value="ANSI" />
+ <arg value="UTF8" />
<arg value="-v" />
<arg value="-o" />
<targetfile />
@@ -68,8 +73,13 @@
<echo message="${dist.min.name} built." />
</target>
-
- <target name="generateDoc">
+
+ <target name="-purgeDocs">
+ <delete dir="${docs.dir}" />
+ <mkdir dir="${docs.dir}"/>
+ </target>
+
+ <target name="generateDocs" depends="-purgeDocs">
<echo message="Generating documentation" />
<apply executable="java" parallel="false" verbose="true">
<fileset dir="${dist.dir}">
@@ -84,11 +94,45 @@
<echo message="Documentation generated" />
</target>
- <target name="compile" depends="build, minify">
+ <target name="-purgeCoverage">
+ <delete dir="${coverage.dir}" />
+ <mkdir dir="${coverage.dir}"/>
+ <mkdir dir="${coverage-report.dir}"/>
+ </target>
+
+ <target name="instrument" depends="-purgeCoverage">
+ <echo message="Instrumenting ${dist.name}..."/>
+
+ <exec executable="java">
+ <arg line="-jar"/>
+ <arg path="${yuitest-coverage.jar}"/>
+ <arg value="-o"/>
+ <arg path="${coverage.dir}/${dist.inst.name}"/>
+ <arg path="${dist.dir}/${dist.name}"/>
+ </exec>
+
+ <echo message="${dist.name} instrumented."/>
+ </target>
+
+ <target name="coverageReport">
+ <echo message="Gerating test coverage report..."/>
+
+ <exec executable="java">
+ <arg line="-jar"/>
+ <arg path="${yuitest-coverage-report.jar}"/>
+ <arg value="-o" />
+ <arg path="${coverage-report.dir}"/>
+ <arg path="${coverage.json}"/>
+ </exec>
+
+ <echo message="Test coverage report generated."/>
+ </target>
+
+ <target name="build" depends="compile, lint, minify">
<echo message="Build Complete." />
</target>
- <target name="all" depends="compile, generateDoc">
+ <target name="all" depends="build, generateDocs">
<echo message="Build Complete." />
</target>
View
@@ -1,3 +1,3 @@
#Build Number for ANT. Do not edit!
-#Fri Dec 03 17:27:32 EST 2010
-build.number=101
+#Fri Feb 18 19:22:48 EST 2011
+build.number=139
View
@@ -3,9 +3,16 @@ src.dir = ${dev.dir}/src
build.dir = ${dev.dir}/build
dist.dir = dist
docs.dir = ${dist.dir}/docs
+coverage.dir = ${dev.dir}/tests/coverage
+coverage-report.dir = ${coverage.dir}/report
jsdoc-toolkit.dir = ${build.dir}/jsdoc-toolkit
yuicompressor.jar = ${build.dir}/yuicompressor/yuicompressor-2.4.2.jar
+jslint.jar = ${build.dir}/jslint4java/jslint4java-1.4.6.jar
+yuitest-coverage.jar = ${build.dir}/yuitest-coverage/yuitest-coverage-0.5.5.jar
+yuitest-coverage-report.jar = ${build.dir}/yuitest-coverage/yuitest-coverage-report-0.5.5.jar
product.name = js-signals
-version.number = 0.5
+version.number = 0.5.2
dist.name = ${product.name}.js
-dist.min.name = ${product.name}.min.js
+dist.min.name = ${product.name}.min.js
+dist.inst.name = ${product.name}.inst.js
+coverage.json = ${coverage.dir}/coverage.json
@@ -0,0 +1,23 @@
+Copyright (C) 2007 by Dominic Mitchell
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the above copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
@@ -0,0 +1,42 @@
+jslint for java <http://code.google.com/p/jslint4java/>
+=======================================================
+
+This is a java wrapper around the fabulous tool by Douglas Crockford, jslint
+(See <http://jslint.com/>). It provides a simple interface for detecting
+potential problems in JavaScript code.
+
+You can run it on the command line:
+
+ % java -jar jslint4java-1.4.6.jar application.js
+ jslint:application.js:11:9:Line breaking error ')'.
+ jslint:application.js:11:10:Missing semicolon.
+
+There are a multitude of options; try `--help` for more details.
+
+The output is colon separated fields. The fields are:
+
+ * "jslint"
+ * the file name
+ * the line number (starting at zero)
+ * the character number (starting at zero)
+ * the problem that was found
+
+You may also use the jar as an ant task. The quickest way to get started is
+to drop it in `~/.ant/lib`. See `docs/ant.html` for more details.
+
+**NB:** The packaged jar file includes a builtin version of rhino (a JavaScript
+engine). If this causes trouble, you can download a standalone version
+through the maven repository.
+
+If you wish to use jslint4java from within Java, please use a maven dependency:
+
+ <dependency>
+ <groupId>com.googlecode.jslint4java</groupId>
+ <artifactId>jslint4java</artifactId>
+ <version>1.4.6</version>
+ </dependency>
+
+If you have any comments or queries, please send them to dom [at] happygiraffe.net.
+
+This software is licenced under the BSD licence (see LICENCE.txt).
+
Binary file not shown.
@@ -0,0 +1,5 @@
+YUI Test
+Author: Nicholas C. Zakas <nzakas@yahoo-inc.com>
+Copyright (c) 2009, Yahoo! Inc. All rights reserved.
+All source code licensed under the BSD License:
+ http://developer.yahoo.net/yui/license.txt
Binary file not shown.
Binary file not shown.
Oops, something went wrong.

0 comments on commit d5a63c1

Please sign in to comment.