Commit 6023fbfd authored by Douwe Maan's avatar Douwe Maan

Enable Style/EmptyLineBetweenDefs

parent f74ca33a
......@@ -146,7 +146,7 @@ Style/ElseAlignment:
# Use empty lines between defs.
Style/EmptyLineBetweenDefs:
Enabled: false
Enabled: true
# Don't use several empty lines in a row.
Style/EmptyLines:
......
......@@ -2,6 +2,7 @@ module JavascriptHelper
def page_specific_javascript_tag(js)
javascript_include_tag asset_path(js)
end
def page_specific_javascript_bundle_tag(js)
javascript_include_tag(*webpack_asset_paths(js))
end
......
......@@ -29,59 +29,103 @@ module Ci
class Converter
def on_0(s) reset() end
def on_1(s) enable(STYLE_SWITCHES[:bold]) end
def on_3(s) enable(STYLE_SWITCHES[:italic]) end
def on_4(s) enable(STYLE_SWITCHES[:underline]) end
def on_8(s) enable(STYLE_SWITCHES[:conceal]) end
def on_9(s) enable(STYLE_SWITCHES[:cross]) end
def on_21(s) disable(STYLE_SWITCHES[:bold]) end
def on_22(s) disable(STYLE_SWITCHES[:bold]) end
def on_23(s) disable(STYLE_SWITCHES[:italic]) end
def on_24(s) disable(STYLE_SWITCHES[:underline]) end
def on_28(s) disable(STYLE_SWITCHES[:conceal]) end
def on_29(s) disable(STYLE_SWITCHES[:cross]) end
def on_30(s) set_fg_color(0) end
def on_31(s) set_fg_color(1) end
def on_32(s) set_fg_color(2) end
def on_33(s) set_fg_color(3) end
def on_34(s) set_fg_color(4) end
def on_35(s) set_fg_color(5) end
def on_36(s) set_fg_color(6) end
def on_37(s) set_fg_color(7) end
def on_38(s) set_fg_color_256(s) end
def on_39(s) set_fg_color(9) end
def on_40(s) set_bg_color(0) end
def on_41(s) set_bg_color(1) end
def on_42(s) set_bg_color(2) end
def on_43(s) set_bg_color(3) end
def on_44(s) set_bg_color(4) end
def on_45(s) set_bg_color(5) end
def on_46(s) set_bg_color(6) end
def on_47(s) set_bg_color(7) end
def on_48(s) set_bg_color_256(s) end
def on_49(s) set_bg_color(9) end
def on_90(s) set_fg_color(0, 'l') end
def on_91(s) set_fg_color(1, 'l') end
def on_92(s) set_fg_color(2, 'l') end
def on_93(s) set_fg_color(3, 'l') end
def on_94(s) set_fg_color(4, 'l') end
def on_95(s) set_fg_color(5, 'l') end
def on_96(s) set_fg_color(6, 'l') end
def on_97(s) set_fg_color(7, 'l') end
def on_99(s) set_fg_color(9, 'l') end
def on_100(s) set_bg_color(0, 'l') end
def on_101(s) set_bg_color(1, 'l') end
def on_102(s) set_bg_color(2, 'l') end
def on_103(s) set_bg_color(3, 'l') end
def on_104(s) set_bg_color(4, 'l') end
def on_105(s) set_bg_color(5, 'l') end
def on_106(s) set_bg_color(6, 'l') end
def on_107(s) set_bg_color(7, 'l') end
def on_109(s) set_bg_color(9, 'l') end
attr_accessor :offset, :n_open_tags, :fg_color, :bg_color, :style_mask
......
......@@ -108,6 +108,7 @@ module Gitlab
Arel.sql(%{EXTRACT(EPOCH FROM (#{diff.to_sql}))})
end
# Need to cast '0' to an INTERVAL before we can check if the interval is positive
def zero_interval
Arel::Nodes::NamedFunction.new("CAST", [Arel.sql("'0' AS INTERVAL")])
......
......@@ -197,11 +197,13 @@ describe Gitlab::Metrics::Instrumentation do
@child1 = Class.new(@dummy) do
def self.child1_foo; end
def child1_bar; end
end
@child2 = Class.new(@child1) do
def self.child2_foo; end
def child2_bar; end
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment