File tree Expand file tree Collapse file tree 10 files changed +264
-256
lines changed
Expand file tree Collapse file tree 10 files changed +264
-256
lines changed Original file line number Diff line number Diff line change @@ -5,9 +5,16 @@ plugins:
55AllCops :
66 DisabledByDefault : true
77
8+ # Socketry specific rules:
9+
810Layout/ConsistentBlankLineIndentation :
911 Enabled : true
1012
13+ Layout/BlockDelimiterSpacing :
14+ Enabled : true
15+
16+ # General Layout rules:
17+
1118Layout/IndentationStyle :
1219 Enabled : true
1320 EnforcedStyle : tabs
@@ -37,9 +44,6 @@ Layout/BeginEndAlignment:
3744Layout/RescueEnsureAlignment :
3845 Enabled : true
3946
40- Layout/FirstHashElementIndentation :
41- Enabled : true
42-
4347Layout/ElseAlignment :
4448 Enabled : true
4549
@@ -53,6 +57,10 @@ Layout/CaseIndentation:
5357Layout/CommentIndentation :
5458 Enabled : true
5559
60+ Layout/FirstHashElementIndentation :
61+ Enabled : true
62+ EnforcedStyle : consistent
63+
5664Layout/EmptyLinesAroundClassBody :
5765 Enabled : true
5866
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ report = Memory::Report.new([
197197sampler = Memory ::Sampler .new
198198sampler.run do
199199 # Your code here
200- 10000 .times {" test string" }
200+ 10000 .times{" test string" }
201201end
202202
203203# Add samples to the custom report:
@@ -221,7 +221,7 @@ Reports can be exported as JSON for integration with other tools:
221221``` ruby
222222report = Memory .report do
223223 # Your code
224- data = Array .new (1000 ) {{value: rand (1000 )}}
224+ data = Array .new (1000 ){{value: rand (1000 )}}
225225end
226226
227227# Export as JSON:
Original file line number Diff line number Diff line change @@ -197,7 +197,7 @@ report = Memory::Report.new([
197197sampler = Memory ::Sampler .new
198198sampler.run do
199199 # Your code here
200- 10000 .times {" test string" }
200+ 10000 .times{" test string" }
201201end
202202
203203# Add samples to the custom report:
@@ -221,7 +221,7 @@ Reports can be exported as JSON for integration with other tools:
221221``` ruby
222222report = Memory .report do
223223 # Your code
224- data = Array .new (1000 ) {{value: rand (1000 )}}
224+ data = Array .new (1000 ){{value: rand (1000 )}}
225225end
226226
227227# Export as JSON:
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ class Cache
1717 # Initialize a new cache with empty lookup tables.
1818 def initialize
1919 @gem_guess_cache = Hash . new
20- @location_cache = Hash . new { |h , k | h [ k ] = Hash . new . compare_by_identity }
20+ @location_cache = Hash . new { |h , k | h [ k ] = Hash . new . compare_by_identity }
2121 @class_name_cache = Hash . new . compare_by_identity
2222 @string_cache = Hash . new
2323 end
Original file line number Diff line number Diff line change @@ -159,12 +159,12 @@ def as_json(*)
159159 } ,
160160 usage : @usage . as_json ,
161161 }
162-
162+
163163 if @children &.any?
164164 json [ :total_usage ] = total_usage . as_json
165165 json [ :children ] = @children . transform_values ( &:as_json )
166166 end
167-
167+
168168 return json
169169 end
170170
Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ def initialize(cache)
3232 @cache = cache
3333
3434 self . register_type ( 0x01 , Allocation ,
35- packer : -> ( instance ) { self . pack ( instance . pack ) } ,
36- unpacker : -> ( data ) { Allocation . unpack ( @cache , self . unpack ( data ) ) } ,
35+ packer : -> ( instance ) { self . pack ( instance . pack ) } ,
36+ unpacker : -> ( data ) { Allocation . unpack ( @cache , self . unpack ( data ) ) } ,
3737 )
3838
3939 self . register_type ( 0x02 , Symbol )
Original file line number Diff line number Diff line change 22
33## v0.11.1
44
5- - Compresed ` Memory::Graph::Node ` JSON representation for leaf nodes.
5+ - Compressed ` Memory::Graph::Node ` JSON representation for leaf nodes.
66
77## v0.11.0
88
You can’t perform that action at this time.
0 commit comments