pusher-fake 3.0.0 → 3.0.1
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/configuration.rb +9 -1
- data/lib/pusher-fake.rb +1 -1
- data/spec/lib/pusher-fake/configuration_spec.rb +19 -0
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3bb752700c2e699cf4af6685b1583905f0f9ccc772d7e323129621c5de38625
|
4
|
+
data.tar.gz: 2ad770522739c7c11833efd13614f1731b9690583b5b08c1e48c7a9cdfb037ef
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c1aee6b0c2cbcdbe170ef203392f439558b358159983f1e9dda4634cb54ad966ea0f6ad9f4e4a5d6d3ad2a85fc3b33e2855b2286007d0b7d39829d2d24bf3a15
|
7
|
+
data.tar.gz: c3d408c4c4fd805a5d007f1e2c7a67f9278a38f9cc0848527ac0f06d8c8b453b0d6d06c642ea4e6597db798a1bf811d122d91325888efb4aed04843e83b15a46
|
@@ -49,7 +49,7 @@ module PusherFake
|
|
49
49
|
def reset!
|
50
50
|
self.app_id = "PUSHER_APP_ID"
|
51
51
|
self.key = "PUSHER_API_KEY"
|
52
|
-
self.logger =
|
52
|
+
self.logger = standard_out_io
|
53
53
|
self.secret = "PUSHER_API_SECRET"
|
54
54
|
self.verbose = false
|
55
55
|
self.webhooks = []
|
@@ -81,5 +81,13 @@ module PusherFake
|
|
81
81
|
socket.close
|
82
82
|
end
|
83
83
|
end
|
84
|
+
|
85
|
+
def standard_out_io
|
86
|
+
if $stdout.respond_to?(:to_io)
|
87
|
+
$stdout.to_io
|
88
|
+
else
|
89
|
+
$stdout
|
90
|
+
end
|
91
|
+
end
|
84
92
|
end
|
85
93
|
end
|
data/lib/pusher-fake.rb
CHANGED
@@ -53,6 +53,25 @@ describe PusherFake::Configuration do
|
|
53
53
|
it "defaults socket and web ports to different values" do
|
54
54
|
expect(subject.socket_options[:port]).not_to eq(subject.web_options[:port])
|
55
55
|
end
|
56
|
+
|
57
|
+
context "with StringIO as standard out" do
|
58
|
+
let(:io) { StringIO.new }
|
59
|
+
|
60
|
+
around do |example|
|
61
|
+
original = $stdout
|
62
|
+
$stdout = io # rubocop:disable RSpec/ExpectOutput
|
63
|
+
|
64
|
+
example.run
|
65
|
+
|
66
|
+
$stdout = original # rubocop:disable RSpec/ExpectOutput
|
67
|
+
end
|
68
|
+
|
69
|
+
it "assigns standard out to the logger" do
|
70
|
+
subject.reset!
|
71
|
+
|
72
|
+
expect(subject.logger).to eq(io)
|
73
|
+
end
|
74
|
+
end
|
56
75
|
end
|
57
76
|
|
58
77
|
describe PusherFake::Configuration, "#app_id=" do
|
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: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tristan Dunn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-09-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: em-http-request
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - '='
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 2.0.
|
103
|
+
version: 2.0.2
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - '='
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 2.0.
|
110
|
+
version: 2.0.2
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rake
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,28 +142,28 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - '='
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.20.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.20.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: rubocop-performance
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 1.11.
|
159
|
+
version: 1.11.5
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
164
|
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version: 1.11.
|
166
|
+
version: 1.11.5
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: rubocop-rake
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|