Skip to content

Commit

Permalink
Assert that channel is not nil when unsubscribing. Closes #39.
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeredpath committed Apr 26, 2012
1 parent 96baadf commit 8924d6a
Show file tree
Hide file tree
Showing 5 changed files with 32 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Library/PTPusher.m
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,8 @@ - (PTPusherChannel *)channelNamed:(NSString *)name

- (void)unsubscribeFromChannel:(PTPusherChannel *)channel
{
NSParameterAssert(channel != nil);

[channel unsubscribe];
[channels removeObjectForKey:channel.name];
}
Expand Down
4 changes: 2 additions & 2 deletions libPusher-OSX/libPusher-OSX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
A3F203D514DEF36C0093C793 /* PusherSampleOSX-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "PusherSampleOSX-Prefix.pch"; sourceTree = "<group>"; };
A3F203D714DEF36C0093C793 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
A3F203D914DEF36C0093C793 /* LRAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LRAppDelegate.h; sourceTree = "<group>"; };
A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LRAppDelegate.m; sourceTree = "<group>"; };
A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = LRAppDelegate.m; path = PusherSampleOSX/LRAppDelegate.m; sourceTree = "<group>"; };
A3F203DD14DEF36C0093C793 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
A3F203E514DF05410093C793 /* Constants.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Constants.h; path = ../../Sample/Constants.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -155,6 +155,7 @@
isa = PBXGroup;
children = (
A3CA675E14DBCB2D003E2F1E /* libPusher-OSX */,
A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */,
A3F203CD14DEF36C0093C793 /* PusherSampleOSX */,
A3CA675714DBCB2D003E2F1E /* Frameworks */,
A3CA675614DBCB2D003E2F1E /* Products */,
Expand Down Expand Up @@ -256,7 +257,6 @@
children = (
A3F203E514DF05410093C793 /* Constants.h */,
A3F203D914DEF36C0093C793 /* LRAppDelegate.h */,
A3F203DA14DEF36C0093C793 /* LRAppDelegate.m */,
A3F203DC14DEF36C0093C793 /* MainMenu.xib */,
A3F203CE14DEF36C0093C793 /* Supporting Files */,
);
Expand Down
12 changes: 10 additions & 2 deletions libPusher.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
A35281E513F75010000687C0 /* PTBlockEventListener.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281E313F75010000687C0 /* PTBlockEventListener.m */; };
A35281E913F75265000687C0 /* PTPusherAPI.h in Headers */ = {isa = PBXBuildFile; fileRef = A35281E713F75265000687C0 /* PTPusherAPI.h */; settings = {ATTRIBUTES = (Public, ); }; };
A35281EA13F75265000687C0 /* PTPusherAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = A35281E813F75265000687C0 /* PTPusherAPI.m */; };
A35D712C153468D800A7EA77 /* libPusher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D1D2B71158013F009A12AD /* libPusher.a */; };
A366E53114FD85EB002F0C39 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A366E53014FD85EB002F0C39 /* SystemConfiguration.framework */; };
A366E53514FD863D002F0C39 /* libicucore.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A37E160714E4C87500DCA3A6 /* libicucore.dylib */; };
A366E53814FD87F5002F0C39 /* PTPusherEventDispatcherSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = A366E53714FD87F5002F0C39 /* PTPusherEventDispatcherSpec.m */; };
Expand Down Expand Up @@ -81,7 +82,6 @@
A3D1D2CA11580162009A12AD /* PTPusher.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D1D28F1157FA4C009A12AD /* PTPusher.m */; };
A3D1D2CB11580162009A12AD /* PTPusherEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = A3D1D2901157FA4C009A12AD /* PTPusherEvent.h */; settings = {ATTRIBUTES = (Public, ); }; };
A3D1D2CC11580162009A12AD /* PTPusherEvent.m in Sources */ = {isa = PBXBuildFile; fileRef = A3D1D2911157FA4C009A12AD /* PTPusherEvent.m */; };
A3D1D308115802B2009A12AD /* libPusher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D1D2B71158013F009A12AD /* libPusher.a */; };
A3DF2D6D13B3CD5700EE4349 /* libPusher.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A3D1D2B71158013F009A12AD /* libPusher.a */; };
A3FE41CB11811161009CF5D7 /* NewEventViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A3FE41C911811161009CF5D7 /* NewEventViewController.m */; };
A3FE41CC11811161009CF5D7 /* NewEventViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = A3FE41CA11811161009CF5D7 /* NewEventViewController.xib */; };
Expand Down Expand Up @@ -214,12 +214,12 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
A35D712C153468D800A7EA77 /* libPusher.a in Frameworks */,
A37E160814E4C87500DCA3A6 /* libicucore.dylib in Frameworks */,
1D60589F0D05DD5A006BFB54 /* Foundation.framework in Frameworks */,
1DF5F4E00D08C38300B7A737 /* UIKit.framework in Frameworks */,
288765A50DF7441C002DB57D /* CoreGraphics.framework in Frameworks */,
A3D1D0B61157CCDE009A12AD /* CFNetwork.framework in Frameworks */,
A3D1D308115802B2009A12AD /* libPusher.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -800,6 +800,10 @@
GCC_PREFIX_HEADER = libPusher_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "libPusher-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../Downloads/libPusher-4\"",
);
PRODUCT_NAME = SampleApp;
SKIP_INSTALL = YES;
};
Expand All @@ -816,6 +820,10 @@
GCC_PREFIX_HEADER = libPusher_Prefix.pch;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
INFOPLIST_FILE = "libPusher-Info.plist";
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../Downloads/libPusher-4\"",
);
PRODUCT_NAME = SampleApp;
SKIP_INSTALL = YES;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForRunning = "YES"
buildForTesting = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "A3A9F9571496E96100F83617"
BuildableName = "Functional Specs.octest"
BlueprintName = "Functional Specs"
ReferencedContainer = "container:libPusher.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "source ~/.profile&#10;cd ${PROJECT_DIR} &amp;&amp; rake restart_auth_server">
scriptText = "source ~/.profile
cd ${PROJECT_DIR} && rake restart_auth_server">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -71,7 +72,9 @@
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Script"
scriptText = "source ~/.profile&#10;cd ${PROJECT_DIR} &amp;&amp; rake stop_auth_server&#10;">
scriptText = "source ~/.profile
cd ${PROJECT_DIR} && rake stop_auth_server
">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
Expand Down

0 comments on commit 8924d6a

Please sign in to comment.