Skip to content

Commit

Permalink
Update dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
tristandunn committed Jul 8, 2013
1 parent 4b9967d commit 917f0f6
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## 0.10.0 — Unreleased

* Update the Pusher JS client to version 2.1.0. (Tristan Dunn)
* Update the Pusher JS client to version 2.1.1. (Tristan Dunn)
* Update dependencies. (Tristan Dunn)

## 0.9.0 — June 6, 2013
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v2.1.0
* Pusher JavaScript Library v2.1.1
* http://pusherapp.com/
*
* Copyright 2013, Pusher
Expand Down Expand Up @@ -491,7 +491,11 @@
},

getLocalStorage: function() {
return window.localStorage;
try {
return window.localStorage;
} catch (e) {
return undefined;
}
},

getClientFeatures: function() {
Expand All @@ -506,7 +510,7 @@
}).call(this);

;(function() {
Pusher.VERSION = '2.1.0';
Pusher.VERSION = '2.1.1';
Pusher.PROTOCOL = 6;

// DEPRECATED: WS connection parameters
Expand Down Expand Up @@ -1884,14 +1888,20 @@
/** @protected */
prototype.onError = function(error) {
this.emit("error", { type: 'WebSocketError', error: error });
this.timeline.error(this.buildTimelineMessage({
error: getErrorDetails(error)
}));
this.timeline.error(this.buildTimelineMessage({}));
};

/** @protected */
prototype.onClose = function(closeEvent) {
this.changeState("closed", closeEvent);
if (closeEvent) {
this.changeState("closed", {
code: closeEvent.code,
reason: closeEvent.reason,
wasClean: closeEvent.wasClean
});
} else {
this.changeState("closed");
}
this.socket = undefined;
};

Expand Down Expand Up @@ -1963,22 +1973,6 @@
return Pusher.Util.extend({ cid: this.id }, message);
};

function getErrorDetails(error) {
if (typeof error === "string") {
return error;
}
if (typeof error === "object") {
return Pusher.Util.mapObject(error, function(value) {
var valueType = typeof value;
if (valueType === "object" || valueType == "function") {
return valueType;
}
return value;
});
}
return typeof error;
}

Pusher.AbstractTransport = AbstractTransport;
}).call(this);

Expand Down Expand Up @@ -2251,11 +2245,11 @@
pingTimer = null;
}

if (closeEvent.wasClean) {
return;
}

if (openTimestamp) {
if (closeEvent.code === 1002 || closeEvent.code === 1003) {
// we don't want to use transports not obeying the protocol
self.manager.reportDeath();
} else if (!closeEvent.wasClean && openTimestamp) {
// report deaths only for short-living transport
var lifespan = Pusher.Util.now() - openTimestamp;
if (lifespan < 2 * self.maxPingDelay) {
self.manager.reportDeath();
Expand Down Expand Up @@ -2930,9 +2924,13 @@
if (error) {
self.runner = self.strategy.connect(0, callback);
} else {
// we don't support switching connections yet
self.runner.abort();
self.handshakeCallbacks[handshake.action](handshake);
if (handshake.action === "error") {
self.timeline.error({ handshakeError: handshake.error });
} else {
// we don't support switching connections yet
self.runner.abort();
self.handshakeCallbacks[handshake.action](handshake);
}
}
};
self.runner = self.strategy.connect(0, callback);
Expand Down Expand Up @@ -2996,6 +2994,9 @@
prototype.retryIn = function(delay) {
var self = this;
self.timeline.info({ action: "retry", delay: delay });
if (delay > 0) {
self.emit("connecting_in", Math.round(delay / 1000));
}
self.retryTimer = new Pusher.Timer(delay || 0, function() {
self.disconnect();
self.connect();
Expand Down
2 changes: 1 addition & 1 deletion features/support/application/views/index.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ul></ul>
</section>

<script src="/javascripts/vendor/pusher-2.1.0.js"></script>
<script src="/javascripts/vendor/pusher-2.1.1.js"></script>
<script>
window.addEventListener("DOMContentLoaded", function() {
// Create the client instance using the PusherFake server.
Expand Down
4 changes: 2 additions & 2 deletions pusher-fake.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ Gem::Specification.new do |s|
s.add_development_dependency "bourne", "1.5.0"
s.add_development_dependency "capybara-webkit", "1.0.0"
s.add_development_dependency "coveralls", "0.6.7"
s.add_development_dependency "cucumber", "1.3.2"
s.add_development_dependency "cucumber", "1.3.3"
s.add_development_dependency "pusher", "0.11.3"
s.add_development_dependency "rake", "10.1.0"
s.add_development_dependency "redcarpet", "2.3.0"
s.add_development_dependency "rspec", "2.13.0"
s.add_development_dependency "rspec", "2.14.0"
s.add_development_dependency "sinatra", "1.4.3"
s.add_development_dependency "yard", "0.8.6.2"
end

0 comments on commit 917f0f6

Please sign in to comment.