Skip to content

Commit 3068f7c

Browse files
committed
Formatting.
1 parent 6864651 commit 3068f7c

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

.rubocop.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,16 @@ plugins:
55
AllCops:
66
DisabledByDefault: true
77

8+
# Socketry specific rules:
9+
810
Layout/ConsistentBlankLineIndentation:
911
Enabled: true
1012

13+
Layout/BlockDelimiterSpacing:
14+
Enabled: true
15+
16+
# General Layout rules:
17+
1118
Layout/IndentationStyle:
1219
Enabled: true
1320
EnforcedStyle: tabs
@@ -50,6 +57,10 @@ Layout/CaseIndentation:
5057
Layout/CommentIndentation:
5158
Enabled: true
5259

60+
Layout/FirstHashElementIndentation:
61+
Enabled: true
62+
EnforcedStyle: consistent
63+
5364
Layout/EmptyLinesAroundClassBody:
5465
Enabled: true
5566

examples/process-monitor/service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def setup(container)
3131
end
3232

3333
# Simulate CPU usage
34-
(1..1000).each {|i| Math.sqrt(i)}
34+
(1..1000).each{|i| Math.sqrt(i)}
3535

3636
sleep 1
3737
instance.ready!

test/async/container/client.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
with "#run" do
2424
it "can run the client" do
2525
connected = Async::Promise.new
26-
expect(client).to receive(:connected!){|connection| connected.resolve(true)}
26+
expect(client).to receive(:connected!) {|connection| connected.resolve(true)}
2727

2828
client_task = client.run
2929

test/async/container/server.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
stream.close
3939

4040
# Verify error was logged about the parsing failure
41-
error_logs = console_capture.select {|log| log[:severity] == :warn}
41+
error_logs = console_capture.select{|log| log[:severity] == :warn}
4242
expect(error_logs).not.to be(:empty?)
4343
end
4444

@@ -82,7 +82,7 @@ def status(call)
8282
)
8383

8484
# Verify error was logged about the monitor failure:
85-
error_log = console_capture.find {|log| log[:severity] == :error && log[:message] =~ /Error while registering process/}
85+
error_log = console_capture.find{|log| log[:severity] == :error && log[:message] =~ /Error while registering process/}
8686
expect(error_log).to be_truthy
8787

8888
stream.close
@@ -122,7 +122,7 @@ def status(call)
122122
reactor.sleep(0.01)
123123

124124
# Verify error was logged about the monitor removal failure:
125-
error_log = console_capture.find {|log| log[:severity] == :error && log[:message] =~ /Error while removing process/}
125+
error_log = console_capture.find{|log| log[:severity] == :error && log[:message] =~ /Error while removing process/}
126126
expect(error_log).to be_truthy
127127

128128
# Verify server is still working by sending a new request:
@@ -159,7 +159,7 @@ def status(call)
159159
reactor.sleep(0.01)
160160

161161
# Verify a debug warning was logged about ignoring the message:
162-
debug_log = console_capture.find {|log| log[:severity] == :debug && log[:message] =~ /Ignoring message/}
162+
debug_log = console_capture.find{|log| log[:severity] == :debug && log[:message] =~ /Ignoring message/}
163163
expect(debug_log).to be_truthy
164164

165165
# Send a valid message to confirm the server is still working:

0 commit comments

Comments
 (0)