Permalink
Browse files

Merge pull request #2 from SetupRu/master

Last updates
  • Loading branch information...
2 parents 886e4fe + a4ef4f3 commit cdd760e9a0bb20f9ef458723e9404fb9b77e7443 @dionys committed May 20, 2012
Showing with 121 additions and 66 deletions.
  1. +2 −1 Changes
  2. +4 −1 MANIFEST
  3. +53 −0 META.json
  4. +27 −0 META.yml
  5. +1 −1 Makefile.PL
  6. +34 −63 README
View
@@ -2,7 +2,8 @@ Revision history for MojoX::Transaction::WebSocket76
0.02
- Fixed response processing related bug.
- - Upgraded to work with new versions of Mojolicious (>= 2.52).
+ - Upgraded to work with new versions of Mojolicious (>= 2.47).
+ - Improved documentation.
0.01
- Initial public release.
View
@@ -1,9 +1,12 @@
Changes
lib/MojoX/Transaction/WebSocket76.pm
+Makefile.PL
MANIFEST
MANIFEST.SKIP
+META.json
+META.yml
README
-t/00-load.t
+t/00-use.t
t/01-pod.t
t/02-pod-coverage.t
t/03-manifest.t
View
@@ -0,0 +1,53 @@
+{
+ "abstract" : "WebSocket version hixie-76 transaction",
+ "author" : [
+ "Denis Ibaev <dionys@cpan.org>"
+ ],
+ "dynamic_config" : 0,
+ "generated_by" : "ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112621",
+ "license" : [
+ "perl_5"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "MojoX-Transaction-WebSocket76",
+ "no_index" : {
+ "directory" : [
+ "t"
+ ]
+ },
+ "prereqs" : {
+ "build" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : 0
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Mojolicious" : "2.47",
+ "Test::More" : 0,
+ "perl" : "5.010001"
+ }
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "http://github.com/dionys/mojox-transaction-websocket76/issues"
+ },
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ],
+ "repository" : {
+ "url" : "http://github.com/dionys/mojox-transaction-websocket76"
+ }
+ },
+ "version" : "0.02"
+}
View
@@ -0,0 +1,27 @@
+---
+abstract: 'WebSocket version hixie-76 transaction'
+author:
+ - 'Denis Ibaev <dionys@cpan.org>'
+build_requires:
+ ExtUtils::MakeMaker: 0
+configure_requires:
+ ExtUtils::MakeMaker: 0
+dynamic_config: 0
+generated_by: 'ExtUtils::MakeMaker version 6.62, CPAN::Meta::Converter version 2.112621'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: MojoX-Transaction-WebSocket76
+no_index:
+ directory:
+ - t
+requires:
+ Mojolicious: 2.47
+ Test::More: 0
+ perl: 5.010001
+resources:
+ bugtracker: http://github.com/dionys/mojox-transaction-websocket76/issues
+ license: http://dev.perl.org/licenses/
+ repository: http://github.com/dionys/mojox-transaction-websocket76
+version: 0.02
View
@@ -23,7 +23,7 @@ WriteMakefile(
no_index => {directory => ['t']},
},
PREREQ_PM => {
- 'Mojolicious' => '2.52',
+ 'Mojolicious' => '2.47',
'Test::More' => 0,
},
dist => {COMPRESS => 'gzip -9f', SUFFIX => 'gz'},
View
97 README
@@ -1,82 +1,53 @@
NAME
- MojoX::Transaction::WebSocket76 - WebSocket version hixie-76 transaction
- container
-
-SYNOPSIS
-
- use MojoX::Transaction::WebSocket76;
-
- my $ws = MojoX::Transaction::WebSocket76->new;
+MojoX::Transaction::WebSocket76 - WebSocket version hixie-76 transaction
+container
DESCRIPTION
- MojoX::Transaction::WebSocket76 is a container for WebSocket transactions
- as described in hixie-76 draft. Support for this version of the protocol
- was removed in Mojolicious 1.17. But last version of the Safari browser
- (5.0.1) supports only it.
-
- To support for both versions of the protocol (last and hixie-76 draft) in
- your Mojolicious application, add:
-
- # In application module.
- package MyApp;
-
- # Override Mojolicious::build_tx().
- sub build_tx {
- my ($self) = @_;
- # Use your own transaction module.
- my $tx = MyApp::Transaction->new;
- $self->plugins->emit_hook(after_build_tx => $tx, $self);
- return $tx;
- }
-
- # In transaction module.
- package MyApp::Transaction;
+MojoX::Transaction::WebSocket76 is a container for WebSocket transactions as
+described in hixie-76 draft. Support for this version of the protocol was
+removed in Mojolicious 1.17. But last version of the Safari browser (5.0.1)
+supports only it.
- use Mojo::Transaction::WebSocket;
- use MojoX::Transaction::WebSocket76;
+INSTALLATION
- use Mojo::Base 'Mojo::Transaction::HTTP';
+To install this module, run the following commands:
- # Override Mojo::Transaction::HTTP::server_read().
- sub server_read {
- # ...
- # Need to change only this piece of code.
- if (lc($req->headers->upgrade || '') eq 'websocket') {
- # Upgrade to WebSocket of needed version.
- $self->emit(upgrade =>
- ($req->headers->header('Sec-WebSocket-Key1')
- && $req->headers->header('Sec-WebSocket-Key2'))
- ? MojoX::Transaction::WebSocket76->new(handshake => $self)
- : Mojo::Transaction::WebSocket->new(handshake => $self)
- );
- }
- # ...
- }
+ perl Makefile.PL
+ make
+ make test
+ make install
-EVENTS
+SUPPORT AND DOCUMENTATION
- MojoX::Transaction::WebSocket76 inherits all events from
- Mojo::Transaction::WebSocket.
+After installing, you can find documentation for this module with the perldoc
+command.
-ATTRIBUTES
+ perldoc MojoX::Transaction::WebSocket76
- MojoX::Transaction::WebSocket76 inherits all attributes from
- Mojo::Transaction::WebSocket.
+You can also look for information at:
-METHODS
+ Repository
+ http://github.com/dionys/mojox-transaction-websocket76
+ Bug tracker
+ http://github.com/dionys/mojox-transaction-websocket76/issues
+ Annotated CPAN documentation
+ http://annocpan.org/dist/MojoX-Transaction-WebSocket76
+ CPAN Ratings
+ http://cpanratings.perl.org/d/MojoX-Transaction-WebSocket76
+ Search CPAN
+ http://search.cpan.org/dist/MojoX-Transaction-WebSocket76/
- MojoX::Transaction::WebSocket76 inherits all methods from
- Mojo::Transaction::WebSocket.
+AUTHOR
-DEBUGGING
+Denis Ibaev, dionys@cpan.org.
- You can set the MOJO_WEBSOCKET_DEBUG environment variable to get some
- advanced diagnostics information printed to STDERR.
+COPYRIGHT AND LICENSE
- MOJO_WEBSOCKET_DEBUG=1
+Copyright (C) 2012, Denis Ibaev.
-SEE ALSO
+This program is free software; you can redistribute it and/or modify it under
+the same terms as Perl itself.
- Mojolicious, Mojo::Transaction::WebSocket.
+See http://dev.perl.org/licenses/ for more information.

0 comments on commit cdd760e

Please sign in to comment.