Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

Resolve merge conflict for x-webkit-deflate-frame #1

Open
wants to merge 184 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
184 commits
Select commit Hold shift + click to select a range
a17be5a
decrement deployment target
natevw Mar 12, 2013
018abc7
Fixed bad_access that could occur when releasing _workQueue on dealloc
Mar 27, 2013
2485f80
Change "muust be compiled with ARC" to "must be compiled with ARC"
dmitric May 11, 2013
1d4ba49
Add receivedHTTPHeaders array to public properties so applications ca…
aaronvegh Sep 1, 2013
367221c
Fix references to wrong header file in README.
jcoleman Sep 11, 2013
6a9f892
Fix only building active arch in debug.
kyleve Oct 9, 2013
5271a32
Merge pull request #119 from square/kve/fix-building-only-active-arch…
kyleve Oct 10, 2013
2c241b5
Origin syntax fix
jakajancar Dec 27, 2013
c136536
Allow the clients to decide if validation of SSL certificates should …
jmkk Dec 28, 2013
27390c7
Add support for http basic auth, closes #36
mk Jan 27, 2014
1e82426
Kill Xcode 5.1 warnings
Mar 14, 2014
63996bd
Link libicucore.dylib with -L to avoid 3 warnings
Mar 14, 2014
a75d73b
Remove unused function log_queue
Mar 15, 2014
4034385
Merge pull request #153 from square/federman/kill_warnings
dfed Mar 15, 2014
1f25e1f
Remove errant assert(NO) in _sendFrameWithOpcode
reggie-inmotion Mar 17, 2014
ccd0cf3
use 'normal closure' close code by default, fixes #127
Mar 19, 2014
555bba0
Use Apple's provided base64 implementation.
kyleve Mar 26, 2014
fa316e1
Fix Xcode 5.1 project warnings.
Mar 26, 2014
0ab66d8
Merge pull request #160 from square/kve/kve/RI-3784
kyleve Mar 27, 2014
2667bcb
Fix size conversion warnings.
Mar 28, 2014
656283d
Merge pull request #162 from square/alanf/fix-size-conversion-warnings
alanf Mar 28, 2014
c7a2a8c
Moved SRStatusCode to header file for public use of status code values
Apr 11, 2014
bf88dce
Switched SocketRocket methods to use SRStatusCode instead of NSInteger
Apr 11, 2014
bc787cc
Changed 0 code to 1001 going away
Apr 11, 2014
50f975c
Fixed base64Encoding deprecation, added the actual HTTP status code w…
Apr 24, 2014
c02f775
Prevents crash in handleEvent method
jleandroperez Apr 25, 2014
08f26e4
Cleaning up NSStream delegates in SR-RunLoop
jleandroperez May 6, 2014
194bc17
Prevents sending close x2
jleandroperez May 27, 2014
4ce49ef
Merge pull request #161 from square/af/fix-code-51-warnings
alanf May 27, 2014
7e5129f
Prevents multiple cleanup calls
jleandroperez May 28, 2014
b434079
Nukes redundant stream close call
jleandroperez May 28, 2014
fa1d8f8
Go 1 has been released. Update README :)
andybons Jul 1, 2014
ad85f92
Merge pull request #180 from andybons/patch-1
natan Jul 10, 2014
cb476d4
Fixes Podspec source url
jleandroperez Jul 10, 2014
1bb4048
Fixed podspec
jleandroperez Jul 11, 2014
d0dc641
Merge pull request #112 from jcoleman/master
natan Jul 11, 2014
c089e59
Merge pull request #93 from dmitric/patch-1
JakeWharton Jul 11, 2014
831724d
Removed enforcement of the SRStatusCode enum for status code arguments
Jul 11, 2014
35a3da2
Merge pull request #164 from iheart2code/public_typedef
JakeWharton Jul 11, 2014
3244d81
Merge remote-tracking branch 'upstream/master'
jleandroperez Jul 11, 2014
21b01da
use normal close constant instead of hard-coded value
Jul 11, 2014
70f808c
Merge pull request #157 from pizthewiz/valid-close-code
JakeWharton Jul 11, 2014
4c10626
exposing SRHTTPResponseErrorKey in the SRWebSocket header file, chang…
Jul 11, 2014
8fb2131
Merge pull request #154 from reggie-inmotion/master
JakeWharton Jul 13, 2014
d586fcc
Added compatibility check around base64EncodedStringWithOptions: and …
Jul 14, 2014
7ae71da
fixed that I accidentally used base64EncodedDataWithOptions: rather t…
Jul 14, 2014
12c50f0
Adjusting one more case of base64Encoding to include compatibility ch…
Jul 14, 2014
a1a32d6
Incorporating feedback - fixed code style and comments
jmkk Jul 15, 2014
7d734d2
Incorporating feedback part 2 - fixed code style and comments
jmkk Jul 28, 2014
176845e
Merge pull request #168 from firstopinion/master
natan Aug 20, 2014
d1aef92
missing definition for SRHTTPResponseErrorKey
Aug 24, 2014
0fc6c22
Merge pull request #192 from siberianisaev/fix_for_176845e
natan Aug 25, 2014
4d25f46
fix logic error 'array access results in a null pointer dereference' …
Aug 25, 2014
3276cdc
small refactoring for fix logic error 'array access results in a null…
Aug 26, 2014
9440ba4
Use a weak reference for the delegate.
paulyoung Sep 11, 2014
9a3debf
Merge pull request #193 from siberianisaev/issue_187
natan Oct 16, 2014
e02a2fb
Merge pull request #200 from paulyoung/delegate-weak-reference
natan Oct 27, 2014
5ba88b3
Add `sendPing:` method and a delegate method for received Pongs
cbrauchli Jul 31, 2014
d0585af
Merge pull request #186 from cbrauchli/add-ping
natan Nov 8, 2014
a0871cc
Update to recommended project settings: Enable strict objc_msgSend ch…
Nov 15, 2014
34c9d13
Merge pull request #210 from square/federman/kill_warnings
dfed Nov 17, 2014
bb29e67
Update README.rst
jeffreyjackson Nov 19, 2014
143c492
Merge pull request #211 from jeffreyjackson/patch-1
natan Nov 19, 2014
bcac6bd
Merge remote-tracking branch 'original/master'
jleandroperez Dec 1, 2014
ad7890a
Prevents bad access on dealloc
jleandroperez Dec 1, 2014
04b9c1d
Implements cleanup failsafe
jleandroperez Dec 1, 2014
7add16a
Fix unused variables
Dec 17, 2014
954750c
Merge pull request #213 from justinseanmartin/jmartin/fix-unused-vari…
alanf Dec 17, 2014
06bdba3
Ignore deprecation warnings for older iOS versions
pnc Jan 5, 2015
58c3723
Merge pull request #214 from eleostech/json-deprecation-warning
natan Jan 12, 2015
992d5ce
Adopting Modern Objective-C for enum
m4rr Jan 22, 2015
c13b301
Merge remote-tracking branch 'upstream/master'
jleandroperez Jan 28, 2015
3ff6038
Prevents concurrent runloop unschedule glitch
jleandroperez Jan 28, 2015
a2dd92a
Merge pull request #217 from m4rr/patch-1
alanf Feb 18, 2015
99be5ae
Fix issue where we make the GET before checking the Server-side certi…
Mar 18, 2015
483aef0
Add a Makefile for command-line builds.
j0sh Apr 30, 2015
a9574d3
Build SocketRocket by default in main Makefile.
j0sh Apr 30, 2015
a01583e
64 bit + Warnings As Errors
May 1, 2015
d1e796c
Merge pull request #241 from square/federman/64bit
dfed May 1, 2015
4e69aaa
Fix 64 bit build error
james-howard May 28, 2015
e22565a
Suppress OCUnit warnings in Xcode 6.4
Jun 30, 2015
7007de8
Merge pull request #248 from square/federman/kill_warnings
dfed Jul 1, 2015
002ed9d
Merge pull request #244 from james-howard/Fix64BitBuild
dfed Jul 1, 2015
6e39c12
Move to XCTest
Jul 1, 2015
7775ee4
Update .gitignore
Jul 1, 2015
aa8ba82
Add Travis CI
Jul 1, 2015
d644bdd
Merge pull request #249 from square/federman/travis_ci
dfed Jul 1, 2015
ee73666
Update podspec
dnkoutso Jul 1, 2015
f95e076
Do not use Apple method names _connect and _disconnect
Jul 1, 2015
9af1b11
In iOS 9 / El Cap, NSTimer enforces non-nullability of target/action.
james-howard Jun 30, 2015
bfc2dba
Merge pull request #251 from square/dimitris/podspec
dnkoutso Jul 1, 2015
ab919d8
Merge pull request #247 from james-howard/FixNonNullable
dfed Jul 1, 2015
4264c3e
Update version number to 0.4
dnkoutso Jul 1, 2015
815c3b8
Merge pull request #252 from square/federman/do_not_used_reserved_key…
dfed Jul 1, 2015
a8f568c
Remove unnecessary run script
Jul 1, 2015
e10a461
Merge pull request #254 from square/federman/remove_unnecessary_run_s…
dfed Jul 1, 2015
28719c9
Merge pull request #253 from square/dimitris/version
dfed Jul 1, 2015
40c7655
CI should validate the pod spec
Jul 2, 2015
bd43b09
Merge pull request #255 from square/federman/add_pod_lint_to_CI
dfed Jul 2, 2015
7373546
Make SRWebSocket.h public
dnkoutso Jul 17, 2015
f534e29
Merge pull request #261 from square/dimitris/public-header
dnkoutso Jul 24, 2015
db8c681
Remove _ from _openConnection and _closeConnection. #263
kommen Aug 14, 2015
5ba1c8a
Merge pull request #269 from kommen/unprefix-method-names
dfed Sep 10, 2015
b4c224c
Bump pod version to 0.4.1
Sep 10, 2015
3c867d8
Merge remote-tracking branch 'upstream/master'
jleandroperez Sep 14, 2015
21f4b43
Merge pull request #86 from natevw/lion_compat
dfed Sep 18, 2015
8dd567e
Merge pull request #89 from janckoch/bad_access_fix
dfed Sep 19, 2015
37b196d
Merge pull request #111 from aaronvegh/master
dfed Sep 19, 2015
d65f09b
Update gitconfig
kwigginton Sep 19, 2015
f14f525
Merge pull request #277 from square/kenw/update-gitignore
RoyalPineapple Sep 19, 2015
371723a
Update gitignore
kwigginton Sep 19, 2015
bf09594
Added ability to provide cookies for the web socket connection
Dec 22, 2013
75ffad8
Merge pull request #280 from jmkk/cookies
dfed Sep 19, 2015
94fa030
Make chatroom.go pass golint and gofmt
noahlt Sep 21, 2015
20b501e
Merge pull request #278 from square/kenw/update-gitignore-2
Sep 21, 2015
b4c58f8
Removes SocketRocket.xccheckout
jleandroperez Sep 21, 2015
8449f84
Merge remote-tracking branch 'upstream/master'
jleandroperez Sep 21, 2015
4d7b75b
Merge pull request #281 from noahlt/go_fmt_lint
mikelikespie Sep 21, 2015
c1b140e
Add dynamic framework for iOS
Sep 24, 2015
b14672c
Fix Autobahn link in README
Oct 2, 2015
dc96e61
Merge pull request #291 from square/federman/fix_readme
martinmroz Oct 2, 2015
60f4713
cherry picking https://github.com/square/SocketRocket/pull/74 and fix…
Oct 3, 2015
00b4b90
Merge pull request #240 from j0sh/master
dfed Oct 3, 2015
21eaa2b
Merge pull request #292 from square/danielrb/change-location-of-heade…
dfed Oct 3, 2015
23dd00d
Merge branch 'original_master' into cert-trust
jmkk Oct 3, 2015
bf9bffa
Use dependency injection for setting the "untrusted certs" flag.
jmkk Oct 3, 2015
eefd7e0
Add space after if
mk Oct 6, 2015
efb080f
Protect against empty strings
mk Oct 6, 2015
1a12a7c
Use better variable name
mk Oct 6, 2015
6e0ca9b
Merge branch 'master' into http-basic-auth
mk Oct 6, 2015
dd1bee8
Prevent SocketRocket killing the connection before notifying of final…
joenoon Oct 8, 2015
51b8e2b
Merge pull request #136 from jakajancar/origin-fix
dfed Oct 12, 2015
bd130dc
fixup! Add dynamic framework for iOS
Oct 14, 2015
9b248a6
Merge pull request #294 from joenoon/patch-1
mikelikespie Oct 16, 2015
fd84880
Merge pull request #137 from jmkk/cert-trust
Oct 16, 2015
b47e74e
Merge pull request #146 from mk/http-basic-auth
dfed Oct 16, 2015
8ae2d77
test bump 0.4.2
jakobsa Oct 21, 2015
00279da
pump also while closing
jakobsa Oct 21, 2015
9ff02e4
enabled logging
jakobsa Oct 21, 2015
53c17b8
handle frames as long as not closed
jakobsa Oct 21, 2015
954c947
Merge pull request #290 from mogstad/carthage
dfed Oct 31, 2015
ead9622
Bump podspec
Oct 31, 2015
efe1f98
Merge pull request #231 from seanwhitsell/master
dfed Nov 3, 2015
dea0d42
Read network service type from requests.
jessearmand Mar 18, 2015
75017d1
To get this merged, please do the following:
jakobsa Nov 9, 2015
826ed64
Namespace category names to avoid collisions
jder Nov 10, 2015
a46422f
Merge pull request #306 from jder/master
mikelikespie Nov 10, 2015
d223074
Merge pull request #293 from jessearmand/master
dfed Nov 14, 2015
2c95c13
Merging upstream
jleandroperez Nov 16, 2015
b11f4be
Merge remote-tracking branch 'upstream/master'
jleandroperez Nov 16, 2015
60cec3a
Nukes strongSelf workaround
jleandroperez Nov 16, 2015
a770a5f
Re-applies scheduleCleanup patch
jleandroperez Nov 16, 2015
af4ddae
Fixed connecting limbo
fjolnir Nov 17, 2015
818cec9
Merge pull request #300 from jakobsa/master
dfed Nov 17, 2015
45352e4
Update README URLs based on HTTP redirects
ReadmeCritic Nov 28, 2015
0c31c8b
Merge pull request #313 from ReadmeCritic/master
dfed Dec 5, 2015
b93aa90
Add Contributing.md
Dec 14, 2015
f19d973
Merge pull request #317 from square/federman/contributing
dfed Dec 15, 2015
19f0c5e
- Fix OS X build by checking if OS is iOS 9 only on iOS target OSs.
Dec 15, 2015
91a2c2b
Merge pull request #318 from miguelsanchez/fix-osx-build
dfed Dec 15, 2015
0ea2099
fix(timeouts): timeout open attempts based on NSURLRequest params
anulman Jan 14, 2016
1185f16
fix(timeouts): use code 504 when erroring due to nsurl timeout
anulman Jan 16, 2016
192e7b7
Merge pull request #323 from isleofcode/master
dfed Jan 16, 2016
cc6fea0
Merge pull request #309 from fjolnir/master
dfed Jan 20, 2016
29dbaa8
Make SocketRocket usable as a module from within Swift, especially on…
davedelong Jan 22, 2016
7bff4f0
Merge pull request #327 from utahiosmac/master
dfed Jan 23, 2016
b0e0bba
Update close status codes based on spec.
Jan 25, 2016
b437dae
Merge pull request #329 from benshan/close-codes
dfed Jan 25, 2016
9ca0cee
Update travis.yml to use newer xcode image and 10.11 for OSX build
hamchapman Jan 21, 2016
ec3c39c
Update cocoapods gem
hamchapman Jan 21, 2016
521818d
Update podspec to include tvos as a deployment target
hamchapman Jan 21, 2016
6e5de1a
Add SocketRocket-tvOS scheme and target. Update project settings
hamchapman Jan 22, 2016
5c5f115
Correct the capitalization of Xcode in README
ReadmeCritic Feb 17, 2016
4c0d934
Merge pull request #334 from ReadmeCritic/master
dfed Feb 19, 2016
541f7b6
Merge pull request #169 from jleandroperez/master
dfed Feb 19, 2016
802ec4e
Update travis.yml to build for tvOS and multiple iOS configs
hamchapman Jan 28, 2016
1964394
Merge pull request #326 from hamchapman/master
dfed Mar 6, 2016
e6dc614
frameData is copied before passing to handlers
adematalay Mar 8, 2016
2d13725
Bump pod version to 0.5.0
Mar 17, 2016
43c4a52
Merge pull request #338 from adematalay/FrameDataCopy
dfed Mar 18, 2016
ad3ad77
Give the delegate the ability to specify whether SRWebSocket should c…
Mar 18, 2016
0eee907
Merge pull request #342 from pm-dev/master
dfed Mar 18, 2016
3b4da5d
Merge branch 'master' into danny/master
objectiveSee Apr 7, 2016
828ea9d
Fix merge conflict
objectiveSee Apr 7, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,19 @@ build/
nohup.out
.DS_Store
xcuserdata/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
*.xcworkspace
!default.xcworkspace
*xcuserdata
*.xccheckout
profile
*.moved-aside
DerivedData
extern/
27 changes: 27 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
language: objective-c
osx_image: xcode7.2
sudo: false
xcode_project: SocketRocket.xcodeproj
env:
global:
- IOS_SDK=iphonesimulator9.2
- IOS_SCHEME="SocketRocket-iOS"
- MACOS_SDK=macosx10.11
- MACOS_SCHEME="SocketRocketOSX"
- TVOS_SDK=appletvsimulator9.1
- TVOS_SCHEME="SocketRocket-tvOS"
matrix:
- DESTINATION="OS=9.2,name=iPad 2" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
- DESTINATION="OS=9.2,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
- DESTINATION="OS=9.2,name=iPhone 5" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
- DESTINATION="OS=9.2,name=iPhone 6s" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
- DESTINATION="OS=8.4,name=iPhone 6" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
- DESTINATION="OS=8.4,name=iPad Air" SDK="$IOS_SDK" SCHEME="$IOS_SCHEME"
- DESTINATION="OS=9.1,name=Apple TV 1080p" SDK="$TVOS_SDK" SCHEME="$TVOS_SCHEME"
- DESTINATION="platform=OS X" SDK="$MACOS_SDK" SCHEME="$MACOS_SCHEME"
before_script:
- bundle install
script:
- xcodebuild -version
- xcodebuild -scheme "$SCHEME" -sdk "$SDK" -destination "$DESTINATION" -configuration Debug -PBXBuildsContinueAfterErrors=0 ACTIVE_ARCH_ONLY=0 build test | xcpretty -tc
- pod lib lint --verbose --fail-fast
19 changes: 19 additions & 0 deletions Contributing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
###Sign the CLA

All contributors to your PR must sign our [Individual Contributor License Agreement (CLA)](https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1). The CLA is a short form that ensures that you are eligible to contribute.

###One issue or bug per Pull Request

Keep your Pull Requests small. Small PRs are easier to reason about which makes them significantly more likely to get merged.

###Issues before features

If you want to add a feature, please file an [Issue](issues) first. An Issue gives us the opportunity to discuss the requirements and implications of a feature with you before you start writing code.

###Backwards compatibility

Respect the minimum deployment target. If you are adding code that uses new APIs, make sure to prevent older clients from crashing or misbehaving. Our CI runs against our minimum deployment targets, so you will not get a green build unless your code is backwards compatible.

###Forwards compatibility

Please do not write new code using deprecated APIs.
3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
source 'https://rubygems.org'

gem 'cocoapods', '0.39.0'
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
TEST_SCENARIOS="[1-8]*"
TEST_URL='ws://localhost:9001/'

all:
$(MAKE) -C SocketRocket

clean:
$(MAKE) -C SocketRocket clean

test:

mkdir -p pages/results
Expand Down
35 changes: 12 additions & 23 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ SocketRocket Objective-C WebSocket Client (beta)
A conforming WebSocket (`RFC 6455 <http://tools.ietf.org/html/rfc6455>`_)
client library.

`Test results for SocketRocket here <http://square.github.com/SocketRocket/results/>`_.
`Test results for SocketRocket here <http://square.github.io/SocketRocket/results/>`_.
You can compare to what `modern browsers look like here
<http://www.tavendo.de/autobahn/testsuite/report/clients/index.html>`_.
<http://tavendo.com/autobahn/testsuite/report/clients/index.html>`_.

SocketRocket currently conforms to all ~300 of `Autobahn
<http://www.tavendo.de/autobahn/testsuite.html>`_'s fuzzing tests (aside from
<http://autobahn.ws/testsuite/>`_'s fuzzing tests (aside from
two UTF-8 ones where it is merely *non-strict*. tests 6.4.2 and 6.4.4)

Features/Design
Expand Down Expand Up @@ -56,7 +56,7 @@ There's a few options. Choose one, or just figure it out


Depending on how you configure your project you may need to ``#import`` either
``<SocketRocket/SRSocketRocket.h>`` or ``"SRSocketRocket.h"``
``<SocketRocket/SRWebSocket.h>`` or ``"SRWebSocket.h"``

Framework Dependencies
``````````````````````
Expand All @@ -73,7 +73,7 @@ SocketRocket now has (64-bit only) OS X support. ``SocketRocket.framework``
inside Xcode project is for OS X only. It should be identical in function aside
from the unicode validation. ICU isn't shipped with OS X which is what the
original implementation used for unicode validation. The workaround is much
more rhudimentary and less robust.
more rudimentary and less robust.

1. Add SocketRocket.xcodeproj as either a subproject of your app or in your workspace.
2. Add ``SocketRocket.framework`` to the link libraries
Expand Down Expand Up @@ -192,11 +192,11 @@ SocketRocket root directory and type::

make test

This will set up your `virtualenv <http://pypi.python.org/pypi/virtualenv>`_.
This will set up your `virtualenv <https://pypi.python.org/pypi/virtualenv>`_.
Now, in your terminal::

source .env/bin/activate
pip install git+https://github.com/facebook/tornado.git
pip install git+https://github.com/tornadoweb/tornado.git

In the same terminal session, start the chatroom server::

Expand All @@ -209,7 +209,7 @@ There's also a Go implementation (with the latest weekly) where you can::

Chatting
````````
Now, start TestChat.app (just run the target in the XCode project). If you had
Now, start TestChat.app (just run the target in the Xcode project). If you had
it started already you can hit the refresh button to reconnect. It should say
"Connected!" on top.

Expand All @@ -222,10 +222,8 @@ WebSocket Server Implementation Recommendations
SocketRocket has been used with the following libraries:

- `Tornado <https://github.com/facebook/tornado>`_
- Go's `weekly build <http://weekly.golang.org>`_ (the official release has an
outdated protocol, so you may have to use weekly until `Go 1
<http://blog.golang.org/2011/10/preview-of-go-version-1.html>`_ is released)
- `Autobahn <http://www.tavendo.de/autobahn/testsuite.html>`_ (using its fuzzing
- Go's `WebSocket package <https://godoc.org/golang.org/x/net/websocket>`_ or Gorilla's `version <http://www.gorillatoolkit.org/pkg/websocket>`_
- `Autobahn <http://tavendo.com/autobahn/testsuite.html>`_ (using its fuzzing
client)

The Tornado one is dirt simple and works like a charm. (`IPython notebook
Expand All @@ -239,19 +237,10 @@ It could use some more control over things such as pings, etc., but I
am sure it will come in time.

Autobahn is a great test suite. The Python server code is good, and conforms
well (obviously). Hovever, for me, twisted would be a deal-breaker for writing
well (obviously). However for me, twisted would be a deal-breaker for writing
something new. I find it a bit too complex and heavy for a simple service. If
you are already using twisted though, Autobahn is probably for you.

Contributing
------------
Any contributors to the master SocketRocket repository must sign the `Individual
Contributor License Agreement
(CLA)
<https://spreadsheets.google.com/spreadsheet/viewform?formkey=dDViT2xzUHAwRkI3X3k5Z0lQM091OGc6MQ&ndplr=1>`_.
It's a short form that covers our bases and makes sure you're eligible to
contribute.

When you have a change you'd like to see in the master repository, `send a pull
request <https://github.com/square/SocketRocket/pulls>`_. Before we merge your
request, we'll make sure you're in the list of people who have signed a CLA.
We’re glad you’re interested in SocketRocket, and we’d love to see where you take it. Please read our `contributing guidelines <https://github.com/square/SocketRocket/blob/master/Contributing.md>`_ prior to submitting a Pull Request.
37 changes: 16 additions & 21 deletions SRWebSocketTests/SRTAutobahnTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
// limitations under the License.
//

#import <SenTestingKit/SenTestingKit.h>
#import <SenTestingKit/SenTestRun.h>
#import "SRWebSocket.h"
#import <XCTest/XCTest.h>
#import <XCTest/XCTestRun.h>
#import <SocketRocket/SRWebSocket.h>
#import "SRTWebSocketOperation.h"
#import "SenTestCase+SRTAdditions.h"

#define SRLogDebug(format, ...)
//#define SRLogDebug(format, ...) NSLog(format, __VA_ARGS__)

@interface SRTAutobahnTests : SenTestCase
@interface SRTAutobahnTests : XCTestCase
@end

@interface TestOperation : SRTWebSocketOperation <SRWebSocketDelegate>
Expand Down Expand Up @@ -98,15 +98,14 @@ - (id)initWithInvocation:(NSInvocation *)anInvocation;
{
self = [super initWithInvocation:anInvocation];
if (self) {
[self raiseAfterFailure];
_testURLString = [[NSProcessInfo processInfo].environment objectForKey:@"SR_TEST_URL"];
_prefixURL = [NSURL URLWithString:_testURLString];
_agent = [NSBundle bundleForClass:[self class]].bundleIdentifier;
}
return self;
}

- (unsigned int)testCaseCount;
- (NSUInteger)testCaseCount;
{
if (self.invocation) {
return [super testCaseCount];
Expand All @@ -120,7 +119,7 @@ - (unsigned int)testCaseCount;
return caseGetter.isFinished;
} timeout:20.0];

STAssertNil(caseGetter.error, @"CaseGetter should have successfully returned the number of testCases. Instead got error %@", caseGetter.error);
XCTAssertNil(caseGetter.error, @"CaseGetter should have successfully returned the number of testCases. Instead got error %@", caseGetter.error);

NSInteger caseCount = caseGetter.caseCount;

Expand All @@ -132,7 +131,7 @@ - (BOOL)isEmpty;
return NO;
}

- (void)performTest:(SenTestCaseRun *) aRun
- (void)performTest:(XCTestCaseRun *) aRun
{
if (self.invocation) {
[super performTest:aRun];
Expand All @@ -150,15 +149,11 @@ - (void)performTest:(SenTestCaseRun *) aRun

NSString *description = [self caseDescriptionForCaseNumber:i];

SenTestCase *testCase = [[[self class] alloc] initWithInvocation:invocation description:description];
XCTestCase *testCase = [[[self class] alloc] initWithInvocation:invocation description:description];

SenTestCaseRun *run = [[SenTestCaseRun alloc] initWithTest:testCase];
XCTestCaseRun *run = [[XCTestCaseRun alloc] initWithTest:testCase];

[testCase performTest:run];

for (NSException *e in run.exceptions) {
[aRun addException:e];
}
}
[aRun stop];

Expand All @@ -182,7 +177,7 @@ - (NSString *)caseDescriptionForCaseNumber:(NSInteger)caseNumber;
return testInfoOperation.isFinished;
} timeout:60 * 60];

STAssertNil(testInfoOperation.error, @"Updating the report should not have errored");
XCTAssertNil(testInfoOperation.error, @"Updating the report should not have errored");

return [NSString stringWithFormat:@"%@ - %@", [testInfoOperation.info objectForKey:@"id"], [testInfoOperation.info objectForKey:@"description"]];
}
Expand Down Expand Up @@ -220,8 +215,8 @@ - (void)performTestWithNumber:(NSInteger)testNumber;
return resultOp.isFinished;
} timeout:60 * 60];

STAssertTrue(!testOp.error, @"Test operation should not have failed");
STAssertEqualObjects(@"OK", [resultOp.info objectForKey:@"behavior"], @"Test behavior should be OK");
XCTAssertTrue(!testOp.error, @"Test operation should not have failed");
XCTAssertEqualObjects(@"OK", [resultOp.info objectForKey:@"behavior"], @"Test behavior should be OK");
}

- (void)updateReports;
Expand All @@ -234,7 +229,7 @@ - (void)updateReports;
return updateReportOperation.isFinished;
} timeout:60 * 60];

STAssertNil(updateReportOperation.error, @"Updating the report should not have errored");
XCTAssertNil(updateReportOperation.error, @"Updating the report should not have errored");
}

@end
Expand All @@ -247,7 +242,7 @@ - (id)initWithBaseURL:(NSURL *)url testNumber:(NSInteger)testNumber agent:(NSStr
{

NSString *path = [[url URLByAppendingPathComponent:@"runCase"] absoluteString];
path = [path stringByAppendingFormat:@"?case=%d&agent=%@", testNumber, agent];
path = [path stringByAppendingFormat:@"?case=%@&agent=%@", @(testNumber), agent];

self = [super initWithURL:[NSURL URLWithString:path]];
if (self) {
Expand Down Expand Up @@ -310,7 +305,7 @@ @implementation TestInfoOperation
- (id)initWithBaseURL:(NSURL *)url caseNumber:(NSInteger)caseNumber;
{
NSString *path = [[url URLByAppendingPathComponent:@"getCaseInfo"] absoluteString];
path = [path stringByAppendingFormat:@"?case=%d", caseNumber];
path = [path stringByAppendingFormat:@"?case=%@", @(caseNumber)];

return [super initWithURL:[NSURL URLWithString:path]];
}
Expand All @@ -330,7 +325,7 @@ @implementation TestResultsOperation
- (id)initWithBaseURL:(NSURL *)url caseNumber:(NSInteger)caseNumber agent:(NSString *)agent;
{
NSString *path = [[url URLByAppendingPathComponent:@"getCaseStatus"] absoluteString];
path = [path stringByAppendingFormat:@"?case=%d&agent=%@", caseNumber, agent];
path = [path stringByAppendingFormat:@"?case=%@&agent=%@", @(caseNumber), agent];

return [super initWithURL:[NSURL URLWithString:path]];
}
Expand Down
2 changes: 1 addition & 1 deletion SRWebSocketTests/SRTWebSocketOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

#import <Foundation/Foundation.h>

#import "SRWebSocket.h"
#import <SocketRocket/SRWebSocket.h>

@interface SRTWebSocketOperation : NSOperation <SRWebSocketDelegate>

Expand Down
1 change: 0 additions & 1 deletion SRWebSocketTests/SRTWebSocketOperation.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
//

#import "SRTWebSocketOperation.h"
#import "SRWebSocket.h"

@interface SRTWebSocketOperation ()

Expand Down
2 changes: 1 addition & 1 deletion SRWebSocketTests/SRWebSocketTests-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
<string>com.squareup.${PRODUCT_NAME:rfc1034identifier}</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
Expand Down
2 changes: 1 addition & 1 deletion SRWebSocketTests/SRWebSocketTests-Prefix.pch
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@

#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <SenTestingKit/SenTestingKit.h>
#import <XCTest/XCTest.h>
#import "SenTestCase+SRTAdditions.h"
#endif
4 changes: 2 additions & 2 deletions SRWebSocketTests/SenTestCase+SRTAdditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
// limitations under the License.
//

#import <SenTestingKit/SenTestingKit.h>
#import <XCTest/XCTest.h>


typedef BOOL (^PXPredicateBlock)();


@interface SenTest (PXAdditions)
@interface XCTest (PXAdditions)

- (void)runCurrentRunLoopUntilTestPasses:(PXPredicateBlock)predicate timeout:(NSTimeInterval)timeout;

Expand Down
4 changes: 2 additions & 2 deletions SRWebSocketTests/SenTestCase+SRTAdditions.m
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#import "SenTestCase+SRTAdditions.h"


@implementation SenTestCase (SRTAdditions)
@implementation XCTestCase (SRTAdditions)

- (void)runCurrentRunLoopUntilTestPasses:(PXPredicateBlock)predicate timeout:(NSTimeInterval)timeout;
{
Expand All @@ -32,7 +32,7 @@ - (void)runCurrentRunLoopUntilTestPasses:(PXPredicateBlock)predicate timeout:(NS
[[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:0.1]];
}

STAssertTrue(currentTime <= timeoutTime, @"Timed out");
XCTAssertTrue(currentTime <= timeoutTime, @"Timed out");
}

@end
Loading