From ab3196e8c80c03cdf6cc60cd38ddd115d9d223ad Mon Sep 17 00:00:00 2001 From: James Sutton Date: Fri, 15 Apr 2016 09:43:51 +0100 Subject: [PATCH 1/4] Fixing Javascript minification by switching to the closure compiler Signed-off-by: James Sutton --- pom.xml | 53 ++++++++++++++++++++++++++------------- src/test/interops-spec.js | 8 ++++-- 2 files changed, 42 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 65063ce..f080542 100644 --- a/pom.xml +++ b/pom.xml @@ -23,32 +23,50 @@ http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.javascript.git scm:git://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.javascript.git - + process-resources - net.alchim31.maven - yuicompressor-maven-plugin - 1.5.1 + org.codehaus.mojo + templating-maven-plugin + 1.0-alpha-3 - compress-js - process-sources - - true - src/ - target/ - - **/test/** - - + filter-tests - compress + filter-test-sources - + + + com.samaxes.maven + minify-maven-plugin + 1.7.4 + + + default-minify + process-sources + + UTF-8 + ${basedir}/ + src/ + + mqttws31.js + + mqttws31.js + target + ${basedir} + CLOSURE + ECMASCRIPT5 + + + minify + + + + maven-antrun-plugin 1.3 @@ -64,7 +82,7 @@ - + @@ -75,6 +93,7 @@ + diff --git a/src/test/interops-spec.js b/src/test/interops-spec.js index bcaf082..44d9b0e 100644 --- a/src/test/interops-spec.js +++ b/src/test/interops-spec.js @@ -21,7 +21,7 @@ describe('InteropsTests', function() { var subscribed = false; var disconnectError = null; var disconnectErrorMsg = null; - + var subscribed = false; var messageReceivedCount = 0; var messagePublishedCount = 0; @@ -332,6 +332,9 @@ describe('InteropsTests', function() { }); }); + /* + // This test has been commented out as it is only valid for a messagesight + // server and behaviour differs between mqtt server implementations. it('should get a return code for failure to subscribe', function() { client = new Paho.MQTT.Client(testServer, testPort, testPath, "testclientid-js"); client.onMessageArrived = callbacks.onMessageArrived; @@ -365,4 +368,5 @@ describe('InteropsTests', function() { expect(subFailed).toBe(true); }); }); -}) \ No newline at end of file + */ +}) From 35968d64e282bbc8499370b6630fbc006682feb8 Mon Sep 17 00:00:00 2001 From: James Sutton Date: Wed, 4 May 2016 09:12:01 +0100 Subject: [PATCH 2/4] Using GitHub syntax highlighting Simple change that was put forward in Pull Request #68 without a signed CLA --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 207a80d..d76b0f4 100644 --- a/README.md +++ b/README.md @@ -71,7 +71,7 @@ The included code below is a very basic sample that connects to a server using W This requires the use of a broker that supports WebSockets natively, or the use of a gateway that can forward between WebSockets and TCP. -``` +```JS // Create a client instance client = new Paho.MQTT.Client(location.hostname, Number(location.port), "clientId"); From e3a7127e61ea84076de88ffbe1819d46137cc954 Mon Sep 17 00:00:00 2001 From: James Sutton Date: Tue, 15 Nov 2016 13:31:20 +0000 Subject: [PATCH 3/4] Removing incorrect slash at start of topics There should not be a slash at the start of any topics. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d76b0f4..cd7e036 100644 --- a/README.md +++ b/README.md @@ -67,7 +67,7 @@ The client should work in any browser fully supporting WebSockets, [http://caniu ## Getting Started -The included code below is a very basic sample that connects to a server using WebSockets and subscribes to the topic ```/World```, once subscribed, it then publishes the message ```Hello``` to that topic. Any messages that come into the subscribed topic will be printed to the Javascript console. +The included code below is a very basic sample that connects to a server using WebSockets and subscribes to the topic ```World```, once subscribed, it then publishes the message ```Hello``` to that topic. Any messages that come into the subscribed topic will be printed to the Javascript console. This requires the use of a broker that supports WebSockets natively, or the use of a gateway that can forward between WebSockets and TCP. @@ -87,9 +87,9 @@ client.connect({onSuccess:onConnect}); function onConnect() { // Once a connection has been made, make a subscription and send a message. console.log("onConnect"); - client.subscribe("/World"); + client.subscribe("World"); message = new Paho.MQTT.Message("Hello"); - message.destinationName = "/World"; + message.destinationName = "World"; client.send(message); } From e3df35800acd425efd51c4f449481ccf9769e92e Mon Sep 17 00:00:00 2001 From: James Sutton Date: Mon, 16 Oct 2017 11:12:03 +0100 Subject: [PATCH 4/4] Adding Code of Conduct Original take from here: https://eclipse.org/org/documents/Community_Code_of_Conduct.php --- CODE_OF_CONDUCT.md | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 CODE_OF_CONDUCT.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..de4e8c1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,29 @@ +# Community Code of Conduct + +## Our Pledge + +As members of the Eclipse community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting code reviews, pull requests, patches, and other activities. + +## Our Standards + +We are committed to making participation in the Eclipse community a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion or analogous grounds. + +Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. + +## Our Responsibilities + +Eclipse Foundation staff have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project leaders, committers and contributors who do not follow the Code of Conduct may be removed from the project. + +## Scope + +This code of conduct applies within Eclipse project spaces, or in public spaces when an individual is representing the project or the Eclipse community. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by emailing the Eclipse Management Organization: codeofconduct@eclipse.org. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant (http://contributor-covenant.org), version 1.1.0, available at http://contributor-covenant.org/version/1/1/0/ + +The Eclipse Code Of Conduct can also be viewed [here](https://eclipse.org/org/documents/Community_Code_of_Conduct.php).