pusher-fake 2.2.0 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/pusher-fake.rb +1 -1
- data/lib/pusher-fake/channel/presence.rb +1 -3
- data/lib/pusher-fake/connection.rb +2 -2
- data/spec/support/capybara.rb +2 -7
- data/spec/support/pusher_fake.rb +1 -1
- metadata +84 -42
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '09cf8cbf09383dbf9ca8829c07e67da46721965a6e226e76205a92329c55b8a1'
|
4
|
+
data.tar.gz: 0b3d172aa3c5f86c507eab2a3c71177287145ae5b819b323a26c500e2c8ef423
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 246b183a6b21546e1395cdec4e76b1b95953cb9b151901e84602be7a6ef3ef49ec00a6aea663f6ba9761c8479e5bb9799ddab3e1b629e37d449acb9c2d04c19f
|
7
|
+
data.tar.gz: 71df4af1d1a72e6ca55d1e19bdef165a04decbac64968955b2efac70b9b0c2a66e338f2c9770b857f29d86c503bb269b70c7cd779ada8911d53d3304ee406020
|
data/lib/pusher-fake.rb
CHANGED
@@ -36,9 +36,7 @@ module PusherFake
|
|
36
36
|
#
|
37
37
|
# @return [Hash] Hash containing presence information.
|
38
38
|
def subscription_data
|
39
|
-
hash =
|
40
|
-
members.map { |_, member| [member[:user_id], member[:user_info]] }
|
41
|
-
]
|
39
|
+
hash = members.map { |_, member| [member[:user_id], member[:user_info]] }.to_h
|
42
40
|
|
43
41
|
{ presence: { hash: hash, count: members.size } }
|
44
42
|
end
|
@@ -20,10 +20,10 @@ module PusherFake
|
|
20
20
|
#
|
21
21
|
# @return [Integer] The object ID of the socket.
|
22
22
|
def id
|
23
|
-
parts = socket.object_id.to_s.
|
23
|
+
parts = socket.object_id.to_s.chars
|
24
24
|
parts = parts.each_slice((parts.length / 2.0).ceil).to_a
|
25
25
|
|
26
|
-
[parts.first.join
|
26
|
+
[parts.first.join, parts.last.join].join(".")
|
27
27
|
end
|
28
28
|
|
29
29
|
# Emit an event to the connection.
|
data/spec/support/capybara.rb
CHANGED
@@ -1,12 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "capybara/poltergeist"
|
4
3
|
require "capybara/rspec"
|
5
4
|
|
6
|
-
Capybara.register_driver :poltergeist do |app|
|
7
|
-
Capybara::Poltergeist::Driver.new(app, url_whitelist: [])
|
8
|
-
end
|
9
|
-
|
10
5
|
Capybara.app = Sinatra::Application
|
11
|
-
Capybara.server = :
|
12
|
-
Capybara.default_driver = :
|
6
|
+
Capybara.server = :puma, { Silent: true }
|
7
|
+
Capybara.default_driver = :selenium_chrome_headless
|
data/spec/support/pusher_fake.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.configure do |config|
|
|
7
7
|
PusherFake.configuration.reset!
|
8
8
|
PusherFake.configuration.web_options.tap do |options|
|
9
9
|
Pusher.url = "http://PUSHER_API_KEY:PUSHER_API_SECRET@" \
|
10
|
-
|
10
|
+
"#{options[:host]}:#{options[:port]}/apps/PUSHER_APP_ID"
|
11
11
|
end
|
12
12
|
|
13
13
|
@thread = Thread.new { PusherFake::Server.start }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pusher-fake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tristan Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-http-request
|
@@ -67,103 +67,145 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.5'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: capybara
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - '='
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version:
|
75
|
+
version: 3.35.3
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - '='
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
82
|
+
version: 3.35.3
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: puma
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 5.4.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 5.4.0
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: pusher
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - '='
|
88
102
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
103
|
+
version: 2.0.1
|
90
104
|
type: :development
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
94
108
|
- - '='
|
95
109
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
110
|
+
version: 2.0.1
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
112
|
name: rake
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - '='
|
102
116
|
- !ruby/object:Gem::Version
|
103
|
-
version: 13.0.
|
117
|
+
version: 13.0.6
|
104
118
|
type: :development
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
108
122
|
- - '='
|
109
123
|
- !ruby/object:Gem::Version
|
110
|
-
version: 13.0.
|
124
|
+
version: 13.0.6
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
126
|
name: rspec
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - '='
|
116
130
|
- !ruby/object:Gem::Version
|
117
|
-
version: 3.
|
131
|
+
version: 3.10.0
|
118
132
|
type: :development
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
122
136
|
- - '='
|
123
137
|
- !ruby/object:Gem::Version
|
124
|
-
version: 3.
|
138
|
+
version: 3.10.0
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
140
|
name: rubocop
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - '='
|
130
144
|
- !ruby/object:Gem::Version
|
131
|
-
version:
|
145
|
+
version: 1.18.4
|
132
146
|
type: :development
|
133
147
|
prerelease: false
|
134
148
|
version_requirements: !ruby/object:Gem::Requirement
|
135
149
|
requirements:
|
136
150
|
- - '='
|
137
151
|
- !ruby/object:Gem::Version
|
138
|
-
version:
|
152
|
+
version: 1.18.4
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: rubocop-performance
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - '='
|
144
158
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
159
|
+
version: 1.11.4
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - '='
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: 1.11.4
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rubocop-rake
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - '='
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 0.6.0
|
146
174
|
type: :development
|
147
175
|
prerelease: false
|
148
176
|
version_requirements: !ruby/object:Gem::Requirement
|
149
177
|
requirements:
|
150
178
|
- - '='
|
151
179
|
- !ruby/object:Gem::Version
|
152
|
-
version:
|
180
|
+
version: 0.6.0
|
153
181
|
- !ruby/object:Gem::Dependency
|
154
182
|
name: rubocop-rspec
|
155
183
|
requirement: !ruby/object:Gem::Requirement
|
156
184
|
requirements:
|
157
185
|
- - '='
|
158
186
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
187
|
+
version: 2.4.0
|
160
188
|
type: :development
|
161
189
|
prerelease: false
|
162
190
|
version_requirements: !ruby/object:Gem::Requirement
|
163
191
|
requirements:
|
164
192
|
- - '='
|
165
193
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
194
|
+
version: 2.4.0
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: selenium-webdriver
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - '='
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 3.142.7
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - '='
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 3.142.7
|
167
209
|
- !ruby/object:Gem::Dependency
|
168
210
|
name: sinatra
|
169
211
|
requirement: !ruby/object:Gem::Requirement
|
@@ -184,14 +226,14 @@ dependencies:
|
|
184
226
|
requirements:
|
185
227
|
- - '='
|
186
228
|
- !ruby/object:Gem::Version
|
187
|
-
version: 0.9.
|
229
|
+
version: 0.9.26
|
188
230
|
type: :development
|
189
231
|
prerelease: false
|
190
232
|
version_requirements: !ruby/object:Gem::Requirement
|
191
233
|
requirements:
|
192
234
|
- - '='
|
193
235
|
- !ruby/object:Gem::Version
|
194
|
-
version: 0.9.
|
236
|
+
version: 0.9.26
|
195
237
|
description: A fake Pusher server for development and testing.
|
196
238
|
email: hello@tristandunn.com
|
197
239
|
executables:
|
@@ -257,47 +299,47 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
257
299
|
requirements:
|
258
300
|
- - ">="
|
259
301
|
- !ruby/object:Gem::Version
|
260
|
-
version: '2.
|
302
|
+
version: '2.6'
|
261
303
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
262
304
|
requirements:
|
263
305
|
- - ">="
|
264
306
|
- !ruby/object:Gem::Version
|
265
307
|
version: '0'
|
266
308
|
requirements: []
|
267
|
-
rubygems_version: 3.
|
309
|
+
rubygems_version: 3.2.22
|
268
310
|
signing_key:
|
269
311
|
specification_version: 4
|
270
312
|
summary: A fake Pusher server for development and testing.
|
271
313
|
test_files:
|
272
|
-
- spec/spec_helper.rb
|
273
|
-
- spec/features/server/event_spec.rb
|
274
|
-
- spec/features/server/webhooks_spec.rb
|
275
314
|
- spec/features/api/channels_spec.rb
|
276
315
|
- spec/features/api/users_spec.rb
|
277
316
|
- spec/features/client/connect_spec.rb
|
278
|
-
- spec/features/client/presence_spec.rb
|
279
317
|
- spec/features/client/event_spec.rb
|
318
|
+
- spec/features/client/presence_spec.rb
|
280
319
|
- spec/features/client/subscribe_spec.rb
|
281
|
-
- spec/
|
282
|
-
- spec/
|
283
|
-
- spec/
|
284
|
-
- spec/
|
285
|
-
- spec/
|
286
|
-
- spec/
|
320
|
+
- spec/features/server/event_spec.rb
|
321
|
+
- spec/features/server/webhooks_spec.rb
|
322
|
+
- spec/lib/pusher-fake/channel/presence_spec.rb
|
323
|
+
- spec/lib/pusher-fake/channel/private_spec.rb
|
324
|
+
- spec/lib/pusher-fake/channel/public_spec.rb
|
325
|
+
- spec/lib/pusher-fake/channel_spec.rb
|
326
|
+
- spec/lib/pusher-fake/configuration_spec.rb
|
327
|
+
- spec/lib/pusher-fake/connection_spec.rb
|
328
|
+
- spec/lib/pusher-fake/server/application_spec.rb
|
329
|
+
- spec/lib/pusher-fake/server_spec.rb
|
330
|
+
- spec/lib/pusher-fake/webhook_spec.rb
|
331
|
+
- spec/lib/pusher_fake_spec.rb
|
332
|
+
- spec/spec_helper.rb
|
287
333
|
- spec/support/application/public/javascripts/vendor/polyfill.min.js
|
334
|
+
- spec/support/application/public/javascripts/vendor/pusher-7.0.0.js
|
288
335
|
- spec/support/application/views/index.erb
|
336
|
+
- spec/support/application.rb
|
337
|
+
- spec/support/capybara.rb
|
289
338
|
- spec/support/coveralls.rb
|
290
339
|
- spec/support/helpers/connect.rb
|
291
|
-
- spec/support/helpers/subscription.rb
|
292
340
|
- spec/support/helpers/event.rb
|
341
|
+
- spec/support/helpers/subscription.rb
|
293
342
|
- spec/support/helpers/user.rb
|
294
|
-
- spec/
|
295
|
-
- spec/
|
296
|
-
- spec/
|
297
|
-
- spec/lib/pusher-fake/configuration_spec.rb
|
298
|
-
- spec/lib/pusher-fake/server/application_spec.rb
|
299
|
-
- spec/lib/pusher-fake/channel/presence_spec.rb
|
300
|
-
- spec/lib/pusher-fake/channel/public_spec.rb
|
301
|
-
- spec/lib/pusher-fake/channel/private_spec.rb
|
302
|
-
- spec/lib/pusher-fake/connection_spec.rb
|
303
|
-
- spec/lib/pusher-fake/channel_spec.rb
|
343
|
+
- spec/support/matchers/have_configuration_option.rb
|
344
|
+
- spec/support/pusher_fake.rb
|
345
|
+
- spec/support/webhooks.rb
|