Skip to content

Commit

Permalink
remove rubocop_todo.yml
Browse files Browse the repository at this point in the history
Signed-off-by: zhustec <zhustec@foxmail.com>
  • Loading branch information
zhustec committed Apr 26, 2020
1 parent 006b5a1 commit 3e54d15
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 19 deletions.
4 changes: 1 addition & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
inherit_from: .rubocop_todo.yml

require:
- rubocop-rspec

Expand Down Expand Up @@ -48,4 +46,4 @@ RSpec/MultipleExpectations:
Max: 3

RSpec/SubjectStub:
Enabled: false
Enabled: false
13 changes: 0 additions & 13 deletions .rubocop_todo.yml

This file was deleted.

2 changes: 2 additions & 0 deletions lib/jekyll-diagrams/basic_block.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,13 @@ def initialize(tag_name, markup, _tokens)
end

def render(context)
# rubocop:disable Style/GuardClause
if "#{@markup} " =~ Utils::INLINE_OPTIONS_SYNTAX
inline_options = Utils.parse_inline_options(@markup)
else
raise Errors::InlineOptionsSyntaxError, @markup
end
# rubocop:enable Style/GuardClause

self.class.renderer.render(
context, super.to_s, {
Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-diagrams/blockdiag/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def render_svg(code, config)
end

def build_command(config)
command = +"#{@diagram} -T svg --nodoctype"
command = +"#{@diagram_name} -T svg --nodoctype"

switches = self.class.const_get(:SWITCHES)

Expand Down
2 changes: 1 addition & 1 deletion lib/jekyll-diagrams/vega/renderer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Diagrams
const_set :CONFIGURATIONS, %w[scale].freeze

def render_svg(code, config)
if @diagram == 'vegalite'
if @diagram_name == 'vegalite'
code = render_with_stdin_stdout('vl2vg', code)
end

Expand Down
2 changes: 1 addition & 1 deletion spec/jekyll-diagrams/vega_renderer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
allow(renderer).to receive(:build_command)
allow(renderer).to receive(:render_with_stdin_stdout).and_return(+'')

renderer.instance_variable_set(:@diagram, 'vegalite')
renderer.instance_variable_set(:@diagram_name, 'vegalite')
renderer.render_svg('', {})

expect(renderer).to have_received(:render_with_stdin_stdout).twice
Expand Down

0 comments on commit 3e54d15

Please sign in to comment.