Skip to content

Commit f1a3ef0

Browse files
author
Roberto Casula
committed
Merge branch 'master' of https://github.com/pusher/pusher-websocket-swift into pusher-master
2 parents 422727d + 0cd62e1 commit f1a3ef0

File tree

66 files changed

+1594
-860
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1594
-860
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,3 +61,7 @@ fastlane/screenshots
6161
.swift-version
6262
test_push.rb
6363
SwiftLibExampleCertificate.pem
64+
65+
# macOS
66+
67+
.DS_Store

.swiftlint.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
excluded:
2+
- Carthage
3+
- Package.swift
4+
- Consumption-Tests/*/Carthage
5+
- Consumption-Tests/*/Pods
6+
7+
identifier_name:
8+
excluded:
9+
- id
10+
- ex
11+
- to
12+
- ws
13+
14+
# This generates a compiler error if more than this many SwiftLint warnings are present
15+
# (This threshold can become more restrictive as remaining warnings are resolved via refactoring)
16+
warning_threshold: 22

.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

Cartfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
github "ashleymills/Reachability.swift" ~> 5.0.0
2-
github "daltoniam/Starscream" ~> 3.1.0
32
github "jedisct1/swift-sodium" == 0.8.0

Cartfile.resolved

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
github "ashleymills/Reachability.swift" "v5.0.0"
2-
github "daltoniam/Starscream" "3.1.1"
32
github "jedisct1/swift-sodium" "0.8.0"

Consumption-Tests/.swiftlint.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
disabled_rules:
2+
- line_length

Consumption-Tests/Shared/Swift/ViewController+Extensions.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ struct DebugConsoleMessage: Codable {
2121
}
2222

2323
extension ViewController {
24-
24+
2525
func makeAndLaunchPusher() -> Pusher {
2626

2727
// Only use your secret here for testing or if you're sure that there's security risk
@@ -38,7 +38,7 @@ extension ViewController {
3838
pusher.connect()
3939

4040
// bind to all events globally
41-
let _ = pusher.bind(eventCallback: { (event: PusherEvent) in
41+
_ = pusher.bind(eventCallback: { (event: PusherEvent) in
4242
var message = "Received event: '\(event.eventName)'"
4343

4444
if let channel = event.channelName {
@@ -58,7 +58,7 @@ extension ViewController {
5858
let myChannel = pusher.subscribe("my-channel")
5959

6060
// bind a callback to event "my-event" on that channel
61-
let _ = myChannel.bind(eventName: "my-event", eventCallback: { (event: PusherEvent) in
61+
_ = myChannel.bind(eventName: "my-event", eventCallback: { (event: PusherEvent) in
6262

6363
// convert the data string to type data for decoding
6464
guard let json: String = event.data,
@@ -88,13 +88,13 @@ extension ViewController {
8888

8989
// triggers a client event on that channel
9090
chan.trigger(eventName: "client-test", data: ["test": "some value"])
91-
91+
9292
return pusher
9393
}
9494
}
9595

9696
extension ViewController: PusherDelegate {
97-
97+
9898
// PusherDelegate methods
9999

100100
func changedConnectionState(from old: ConnectionState, to new: ConnectionState) {

Consumption-Tests/Shared/Swift/iOS/AppDelegate.swift

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
66
var window: UIWindow?
77

88
#if swift(>=4.2)
9-
10-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey : Any]? = nil) -> Bool {
9+
10+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool {
1111

1212
return true
1313
}
14-
14+
1515
#else
16-
17-
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey : Any]? = nil) -> Bool {
16+
17+
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]? = nil) -> Bool {
1818

1919
return true
2020
}
21-
21+
2222
#endif
23-
23+
2424
}

Consumption-Tests/Shared/Swift/iOS/ViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ class ViewController: UIViewController {
2121
super.viewDidLoad()
2222
self.pusher = makeAndLaunchPusher()
2323
}
24-
24+
2525
}

Consumption-Tests/Shared/Swift/macOS/AppDelegate.swift

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import Cocoa
33
@NSApplicationMain
44
class AppDelegate: NSObject, NSApplicationDelegate {
55

6-
7-
86
func applicationDidFinishLaunching(_ aNotification: Notification) {
97
// Insert code here to initialize your application
108
}
@@ -13,6 +11,4 @@ class AppDelegate: NSObject, NSApplicationDelegate {
1311
// Insert code here to tear down your application
1412
}
1513

16-
1714
}
18-

0 commit comments

Comments
 (0)