Skip to content
This repository has been archived by the owner on Jan 6, 2018. It is now read-only.

Commit

Permalink
Remove web-socket-js and use MozWebSocket when present.
Browse files Browse the repository at this point in the history
Also remove Flash note in README. Fixes #1.
  • Loading branch information
tristandunn committed Mar 8, 2012
1 parent 2a890ee commit 5382e67
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 29 deletions.
1 change: 0 additions & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ An example of using Cucumber to test WebSocket interactions between two users.

## Notes

* Firefox, the default browser for Selenium in Capybara, doesn't support WebSocket by default. Please ensure you have Flash installed in Firefox to allow [web-socket-js](https://github.com/gimite/web-socket-js) to function properly.
* If you have the latest version of Qt you can use [capybara-webkit](https://github.com/thoughtbot/capybara-webkit) instead of Selenium. Which also means you can remove the need for the Flash fallback.

## Credits
Expand Down
4 changes: 0 additions & 4 deletions app/assets/javascripts/vendor/web-socket-js/swfobject.js

This file was deleted.

15 changes: 0 additions & 15 deletions app/assets/javascripts/vendor/web-socket-js/web_socket.js

This file was deleted.

4 changes: 0 additions & 4 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,4 @@ def javascript_include_tag_for_jquery
javascript_include_tag 'vendor/jquery-1.7.1.min.js'
end
end

def flash_movie_path(source)
asset_paths.compute_public_path(source, 'flash')
end
end
7 changes: 2 additions & 5 deletions app/views/shared/_javascript.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<script>
if (typeof WebSocket == 'undefined') {
WEB_SOCKET_SWF_LOCATION = '<%= flash_movie_path "WebSocketMain.swf" %>';

document.write('<script src="<%= javascript_path "vendor/web-socket-js/swfobject.js" %>"><\/script>');
document.write('<script src="<%= javascript_path "vendor/web-socket-js/web_socket.js" %>"><\/script>');
if (!window.WebSocket && window.MozWebSocket) {
window.WebSocket = window.MozWebSocket;
}
</script>
<%= javascript_include_tag_for_jquery %>
Expand Down
Binary file removed public/flash/WebSocketMain.swf
Binary file not shown.

0 comments on commit 5382e67

Please sign in to comment.