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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '09cf8cbf09383dbf9ca8829c07e67da46721965a6e226e76205a92329c55b8a1'
4
- data.tar.gz: 0b3d172aa3c5f86c507eab2a3c71177287145ae5b819b323a26c500e2c8ef423
3
+ metadata.gz: a3bb752700c2e699cf4af6685b1583905f0f9ccc772d7e323129621c5de38625
4
+ data.tar.gz: 2ad770522739c7c11833efd13614f1731b9690583b5b08c1e48c7a9cdfb037ef
5
5
  SHA512:
6
- metadata.gz: 246b183a6b21546e1395cdec4e76b1b95953cb9b151901e84602be7a6ef3ef49ec00a6aea663f6ba9761c8479e5bb9799ddab3e1b629e37d449acb9c2d04c19f
7
- data.tar.gz: 71df4af1d1a72e6ca55d1e19bdef165a04decbac64968955b2efac70b9b0c2a66e338f2c9770b857f29d86c503bb269b70c7cd779ada8911d53d3304ee406020
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 = $stdout.to_io
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
@@ -9,7 +9,7 @@ require "thin"
9
9
  # A Pusher fake.
10
10
  module PusherFake
11
11
  # The current version string.
12
- VERSION = "3.0.0"
12
+ VERSION = "3.0.1"
13
13
 
14
14
  autoload :Channel, "pusher-fake/channel"
15
15
  autoload :Configuration, "pusher-fake/configuration"
@@ -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.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-08-11 00:00:00.000000000 Z
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.1
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.1
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.18.4
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.18.4
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.4
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.4
166
+ version: 1.11.5
167
167
  - !ruby/object:Gem::Dependency
168
168
  name: rubocop-rake
169
169
  requirement: !ruby/object:Gem::Requirement