...
 
Commits (2)
inherit_from: .rubocop_todo.yml
AllCops:
TargetRubyVersion: 2.3
......@@ -10,3 +12,8 @@ Style/FrozenStringLiteralComment:
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- 'lib/debci/api.rb' # documentation
Metrics/ClassLength:
Exclude:
- 'lib/debci/api.rb' # documentation
......@@ -15,10 +15,6 @@ Style/Documentation:
Style/FrozenStringLiteralComment:
Enabled: false
Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
# Offense count: 2
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentOneStep, IndentationWidth.
......@@ -321,11 +317,16 @@ Metrics/AbcSize:
# Configuration parameters: CountComments, ExcludedMethods.
Metrics/BlockLength:
Max: 260
Exclude:
- 'spec/**/*.rb'
- 'lib/debci/api.rb'
# Offense count: 4
# Configuration parameters: CountComments.
Metrics/ClassLength:
Max: 299
Exclude:
- 'lib/debci/api.rb'
# Offense count: 2
Metrics/CyclomaticComplexity:
......
......@@ -5,6 +5,7 @@ require 'rdoc'
require 'securerandom'
require 'sinatra'
require "sinatra/namespace"
require "sinatra/content_for"
require 'time'
require 'debci'
......@@ -13,6 +14,7 @@ require 'debci/key'
class SelfDocAPI < Sinatra::Base
helpers Sinatra::ContentFor
get '/doc' do
@doc = self.class.doc
erb :doc
......
......@@ -124,8 +124,7 @@ module Debci
private
# yield_content should do nothing in the Debci::HTML context
def yield_content(template)
end
def yield_content(template); end
def templates
@templates ||= {}
......